-
Notifications
You must be signed in to change notification settings - Fork 382
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
Block gallery styles erroneously get output as separate style from amp-custom in Classic mode #1780
Comments
This seems to be a plugin compatibility problem with NextGEN Gallery. In particular, there is a conflict between how that plugin (for some reason) does output buffering in its resource manger component. Here is a workaround compatibility plugin: https://gist.github.com/westonruter/99b1ca0d593f44888401a396d991e3a6 |
I am also experiencing this but am not using NextGen gallery. I'm using a custom theme and have disabled all functions to try and prevent the issue from occurring but it still appears. This leads me to believe that a core WordPress function relating to images that is used by the theme may be causing the issue. Additionally, I believe better handling of when this style is output on the page should be added as, whilst using the latest version of WordPress, the whole site is using the Classic Editor plugin and as this related to a Gallery Block in the Block/Gutenberg editor, it shouldn't be being added to the page at all. |
Thanks @westonruter. Have installed and am testing but nothing in between the |
No, that is not expected. |
@westonruter I appreciate this probably isn't the place for this but when using any custom theme i've tried and using a custom AMP template, nothing is rendered between the |
Ok, it seems that using the_content(); outside of the loop when on an AMP template is the fix for now. The loop seems to fail completely in this scenario. Will investigate more if I have the time. |
What template mode are you using? Standard, Transitional, or Reader? So you have AMP-specific templates in your theme (in an |
Reader Mode. I've using the |
Can you share the original |
Sure. See attached. |
@jackmcconnell Thanks very much. You identified a bug. I've opened a fix in #4185. In the future you'll be able to use The Loop as normal. Here's a new build to test: #4185 (comment). |
Reported in https://wordpress.org/support/topic/amp-custom-is-missing-in-the-class-amp-gallery-embed-php/
On a site with Classic mode, the template is currently generating the following invalid markup in the head when a gallery is used:
This seems to be due to the use of
wp_print_styles
action introduced in #1627 via 6b7d305.The text was updated successfully, but these errors were encountered: