-
Notifications
You must be signed in to change notification settings - Fork 385
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
Avoid serving dirty AMP until it is supported by the runtime #1192
Milestone
Comments
/cc @ericlindley-g |
This also means we'll need to prevent AMP-specific Gutenberg blocks from being registered when not in native AMP mode. |
westonruter
added a commit
that referenced
this issue
Jun 6, 2018
… handling * Add admin settings for picking between disabled, paired, and native theme support. See #1196. * Add checkbox for automatically allowing tree shaking. * Add checkbox for automatically sanitizing all validation errors (including tree shaking). * Make explicitly clear that unaccepted validation errors will block rendering on AMP * Prevent serving dirty AMP by forcibly sanitizing all validation errors when amp_is_canonical(). See #1192. * When validation errors are automatically sanitized, ensure the terms' term_group is updated when re-checking. * Update AMP_Options_Manager::get_options() and to return default values.
westonruter
added a commit
that referenced
this issue
Jun 6, 2018
… handling * Add admin settings for picking between disabled, paired, and native theme support. See #1196. * Add checkbox for automatically allowing tree shaking. * Add checkbox for automatically sanitizing all validation errors (including tree shaking). * Make explicitly clear that unaccepted validation errors will block rendering on AMP * Prevent serving dirty AMP by forcibly sanitizing all validation errors when amp_is_canonical(). See #1192. * When validation errors are automatically sanitized, ensure the terms' term_group is updated when re-checking. * Update AMP_Options_Manager::get_options() and to return default values.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since dirty AMP is not supported yet (see ampproject/amphtml#15583), on native AMP sites (where there is no non-AMP version) we should go ahead and auto-accept (sanitize) validation errors to remove the invalid AMP markup from the page. This could be simply implemented via:
However what also needs to be done is that the validation errors need to always be shown in the editor instead of suppressing them once accepted.
This would basically mean that this logic would not normally run:
https://github.com/Automattic/amp-wp/blob/90acca403917c2e7b7f1b5985b03bdee7ffc6697/includes/class-amp-theme-support.php#L1141-L1153
The invalid AMP URL page should show a special warning when in native AMP instead of what is currently displayed:
The text was updated successfully, but these errors were encountered: