-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Scan & AMP: Include toolbar scripts for Site Scan have data-ampdevmode on AMP requests #17034
Site Scan & AMP: Include toolbar scripts for Site Scan have data-ampdevmode on AMP requests #17034
Conversation
This is an automated check which relies on E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17034 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the product perspective, everything works fine.
* master: External Media: Handle space errors on upload (#17014) Autoloader: Support unoptimized PSR-4 (#16819) Donations / Payments: Use getSiteFragment for building Calypso links (#17042) Site Scan & AMP: Include toolbar scripts for Site Scan have data-ampdevmode on AMP requests (#17034) Update optin comment to correct default value of true. (#17048) Plugins: avoid including network-activated plugins in responses (#17044) Instant Search: Fix photon integration (#17037)
… have data-ampdevmode on AMP requests (#17034)
Since the Site Scan feature launched, I've very frequently seen the AMP menu item in the admin bar show validation errors:
The validation errors are coming from Jetpack:
Specifically they are coming from the Site Scan feature:
The issue can be fixed simply be flagging the scripts as being part of AMP Dev Mode.
This can be done for the
jetpack-scan-show-notice
script simply by making it dependent on theadmin-bar
script, which is itself already part of AMP Dev Mode by default. The only thing left is to ensure that the inline script (added viawp_localize_script()
) to also be flagged for AMP Dev Mode via theamp_dev_mode_element_xpaths
filter, which itself may be unnecessary after ampproject/amp-wp#4598.Changes proposed in this Pull Request:
data-ampdevmode
attributes to printed scripts for Site Scan toolbar.Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Proposed changelog entry for your changes: