Jetpack: SSO JITM appears in Calypso Sidebar

Created on 31 Jan 2020  路  6Comments  路  Source: Automattic/jetpack

It looks like an SSO JITM is showing up in the sidebar, probably unintentionally. This was originally found and reported by @rickybanister

I believe this one is registered at https://github.com/Automattic/jetpack/blob/e17a5c667d9d7aaf5527e9c626911d00489aa073/modules/sso.php#L1113

Screen Shot 2020-01-31 at 2 16 51 PM

But appears in two API responses on the calypso:stats-day:admin-notices and calypso:stats:sidebar_notice. For the amount of content here the API should not be returning this.

Screen Shot 2020-01-31 at 2 18 31 PM

Screen Shot 2020-01-31 at 2 17 26 PM

We do have an A/B test running for sidebar banners, but this is unrelated since I see the same behavior in Calypso master at 9820c2fa70292fda1db438deca943ce1b29f0faa before the PR was merged.

@Automattic/manage is happy to help review any PRs if folks have a fix.

To Reproduce This:

Expected: Banner appears in Stats
Actual: Banner appears in Stats and in Sidebar

JITM [Type] Bug

Most helpful comment

Is there no clean way of modifying the API response from v4/jitm?

Yes, that would seem to be the best way. #14622 should take care of that, hopefully.

All 6 comments

cc @jeherve we're also happy to help fix this one if folks guide us a bit in code. I suspect we have a regex here that's too inclusive.

Nice catch!

This one is a bit of a custom JITM, it doesn't work the same way as the other messages. We force-inject it to the list of messages you should get when you first log in to your site after enabling SSO.

That makes fixing things a bit more complicated. To be honest I don't think it makes sense for this message to appear at all in Calypso.

Do you happen to know if there would be a way to remove a specific JITM right in Calypso?

@jeherve Is there no clean way of modifying the API response from v4/jitm?

One sanity check might be that anything added to the calypso:*:sidebar_notice path should use a template of sidebar. Depending on how difficult it is, we can try to do this this on the server (preferable) or ignore this in Calypso on the slot.

Is there no clean way of modifying the API response from v4/jitm?

Yes, that would seem to be the best way. #14622 should take care of that, hopefully.

Thanks @jeherve I've added 14622 to our review list!

cc @rickybanister, thanks to @jeherve this one should be fixed in the 8.3 release

Was this page helpful?
0 / 5 - 0 ratings