-
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
Skip rendering child amp-img tags of amp-mega-menu #7029
Comments
Seems like this may be a bug with the AMP validator. Namely, Now that native add_filter( 'amp_native_img_used', '__return_true' ); |
Oh, but |
I've opened ampproject/amphtml#38028 to address this. |
The resolution for this issue is to update the plugin's validator spec once the amphtml PR is merged. |
We need to wait for ampproject/amphtml#38028 to be merged. |
The issue is not reproducible with the current version of the plugin. It appears to be functioning correctly. |
Seems like it's not working as expected because amp-wp/includes/sanitizers/class-amp-allowed-tags-generated.php Lines 22 to 76 in 789e099
The reason why they are not included in the allowed descendants is this spec generator code Lines 420 to 432 in 789e099
|
Bug Description
A user reported a that he encounter a validation error when he tries to add amp-img under amp-mega-menu component. the validation error is regarding sizer being descendent of amp-mega-menu which is not allowed.
I am able to reprorudcue the issue at my end using the following HTML snippet
Users Site: https://www.nmore.com/
My testing site. : https://amp-support.rt.gw/amp-mega-menu-with-image/?amp=1
Expected Behaviour
It should not produce validation error.
Screenshots
No response
PHP Version
7.4
Plugin Version
2.2.2
AMP plugin template mode
Transitional
WordPress Version
5.9.4
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
The text was updated successfully, but these errors were encountered: