-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Labels
BugSomething isn't workingSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.Whether the issue/PR has been added to release notes.P0High priorityHigh priorityValidation
Milestone
Description
Bug Description
When a plugin generates a validation error by rendering invalid code in the block editor, the AMP Validation sidebar says WordPress core is the error source:
It seems the logic in the editor sidebar needs to be updated to treat Gutenberg like WordPress core, and also to ignore WordPress core when there is another source (e.g. a theme/plugin).
See: #6610 (comment)
Steps to reproduce
- Create a new plugin that will add a shortcode. The shortcode should generate invalid AMP markup, e.g.:
<?php
/*
Plugin Name: Bad Tag Shortcode
*/
add_shortcode( 'bad-tag-shortcode', function () {
return '<bad-tag-shortcode></bad-tag-shortcode>';
} );- Create a new post and add the new
[bad-tag-shortcode](via the Shortcode block). - Save and check out the AMP Validation sidebar in the block editor. It should say that the WordPress core is responsible for the
<bad-tag-shortcode>error:

Expected Behaviour
The logic in the editor sidebar needs to be updated to treat Gutenberg like WordPress core, and also to ignore WordPress core when there is another source (e.g. a theme/plugin).
Screenshots
No response
PHP Version
No response
Plugin Version
2.2.0-alpha
AMP plugin template mode
Transitional
WordPress Version
No response
Site Health
No response
Gutenberg Version
No response
OS(s) Affected
No response
Browser(s) Affected
No response
Device(s) Affected
No response
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.Whether the issue/PR has been added to release notes.P0High priorityHigh priorityValidation
