Improve handling of Stories in Compatibility Tool#3329
Merged
westonruter merged 2 commits intodevelopfrom Sep 24, 2019
Merged
Conversation
Contributor
|
Approved Hi @westonruter, Like you mentioned, I also saw that there were too many redirects when a validation error for a story was rejected: But with this PR, the AMP story with the rejected error appears as expected: |
kienstra
approved these changes
Sep 24, 2019
westonruter
added a commit
that referenced
this pull request
Sep 24, 2019
Cherry-picking from #3329 into 1.3 branch
westonruter
added a commit
that referenced
this pull request
Sep 24, 2019
Cherry-picking from #3329 into 1.3 branch
Collaborator
|
See issue description above for testing instructions |
Member
Author
|
@csossi I was seeing this as well. However, I just tried in the latest 6.6.0-RC1 of Gutenberg, and I'm not seeing it. When creating a post or a story with invalid markup, it is showing me the warning upon the first save: |
Collaborator
|
Verified this as per the testing instructions 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






In #3321 it was discovered that rejecting the sanitization of a validation error on an AMP Story results in an infinite redirect when a site is not in Standard mode. When processing a Story, it should behave as if the site is in Standard mode. No redirection should be performed when there are rejected validation errors, but rather the
ampattribute should be removed from the page to prevent it from being validated as a valid AMP page.In the same way, when a Story is listed among the Validated URLs in the admin, there should be no
?ampappearing in the displayed URLs.Testing instructions:
<script>bad</script>?ampin the heading.htmlelement should have theampattribute omitted.Before
Viewing the story:
After
Viewing the story: