-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Bug Description
I did post to the support forum. My posting is gone thus I am here.
https://wordpress.org/support/?post_type=topic&p=18515113
I had raised an issue with the folks that support the Otter blocks plugin.
The correspondence with the support group is shown below the summary.
I can provide a test environment within a virtual machine.
Summary:
The original issue is “- AMP versions of pages "lost" formatting”. Please see the image file wordpress_issue_2024-12-03.jpg. https://www.garrigan.nyc/images/wordpress_issue_2024-12-03.jpg
Explanation of the original issue:
WordPress version 6.6.2 is the last version of WordPress in which my pages function properly with AMP.
After I upgrade WordPress, the formatting of the pages “break” as illustrated in the attached image file.
From the vendor:
@jimgarrigan Yes, you can forward this to the AMP theme team. You can also share your staging URL with them so they can analyze the <style amp-custom> and confirm the issue.
—
Thank you for the information. With your permission, may I forward this message to the AMP team?
Soare-Robert-Daniel left a comment (Codeinwp/otter-blocks#2601)
@jimgarrigan, there were 2 issues.
• The usage of is_amp_endpoint() triggered the warning in the logs. This one we can easily fix.
• The missing styles aren’t actually missing. They’re grouped together in a way that causes a parsing issue, preventing the browser from fully processing the CSS.
The AMP groups all the CSS into a single <style amp-custom> element, like in the image below:
CleanShot.2025-06-06.at.15.08.29@2x.png (view on web)
Then the browser will parse it and compute like this:
CleanShot.2025-06-16.at.10.06.39@2x.png (view on web)
Note
Notice the source as amp-custom
On your instance, when I checked, the generated CSS contained some incorrect fragments, which caused certain CSS rules (both from Otter Blocks and Gutenberg) to be ignored. I extracted some of our CSS rules from the <style amp-custom> tag to test them separately, and they worked correctly. It’s still unclear whether the issue lies with the plugin itself or with the way AMP combines all the CSS.
If the page has a broken layout but the <style amp-custom> tag is filled with CSS rules, then the issue likely lies in how AMP has combined the CSS.
I am using the Neve Resume 2 starter site template.
Steps to reproduce the problem:
- Build a “web” server using either Apache or NGINX.
- Install WordPress version 6.6.2. (Note: I am using multisite.)
- Install and activate the following plugins: AMP, Image optimization service by Optimole, Otter – Page Builder Blocks & Extensions for Gutenberg, Starter Sites & Templates by Neve
- Install the following plugin: Hyve Lite
- Neve – Plugin/Theme:
a. Network disable theme Twenty Twenty-Four
b. Install Neve Theme, not activated
c. Install Neve Pro Plugin
d. Activate Neve Pro Plugin
e. Install and Network Enable - Neve child theme
f. For each site, import the Resume 2 starter site.
g. From staging, appearance themes, activate the Neve Child
h. Neve Child menu, starter sites,
i. Resume 2
j. Continue
k. Select Image Optimization
l. Import Website
m. Skip and view site.
n. Neve Child, Dashboard, Settings, Performance, Enable Local Fonts Hosting, Enable Emoji Removal, Enable Embed Removal, Enable Lazy Rendering
o. Neve Child, Dashboard, Settings, Manage Modules, Disable Scroll to top
p. Disable Stick to top - Neve Child, customize, Header, Header Top/Header Main - Configure AMP via the wizard.
a. Open Wizard
b. Developer or technically savvy
c. Transitional Mode - Only the portfolio page will display properly without modifications in AMP.
- Upgrade WordPress
- The formatting for the AMP pages will be “broken”.
From my production site:
Jun 13 07:26:16 ip-XXX-XX-X-XX 2025/06/13 07:26:15 [error] 14471#14471: *181749 FastCGI sent in stderr: "on amp_is_available was called incorrectly. amp_is_available() (or amp_is_request(), formerly is_amp_endpoint()) was called too early and so it will not work properly. WordPress is currently doing the render_block hook. Calling this function before the wp action means it will not have access to WP_Query and the queried object to determine if it is an AMP response, thus neither the amp_skip_post() filter nor the AMP enabled toggle will be considered. It appears the plugin with slug otter-blocks is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /usr/share/nginx/html/www/wp-includes/functions.php on line 6085; PHP message: PHP Notice: Function amp_is_available was called incorrectly. amp_is_available() (or amp_is_request(), formerly is_amp_endpoint()) was called too early and so it will not work properly. WordPress is currently doing the render_block hook. Calling this function before the wp action means it will not have access to WP_Query and the queried object to determine if it is an AMP response, thus neither the amp_skip_post() filter nor the AMP enabled toggle will be considered. It appears the plugin with slug otter-blocks is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /usr/share/nginx/html/www/wp-includes/functions.php on line 6085; PHP message: PHP Notice: Function amp_is_available was called incorrectly. amp_is_available() (or amp_is_request(), formerly is_amp_endpoint()) was called too early and so it will not work properly. WordPress is currently doing the `render_block
Expected Behaviour
One would expect the AMP page to have the proper appearance from the CSS.
Screenshot of the broken state.
PHP Version
8.2.28 (Supports 64bit values)
Plugin Version
Version 2.5.5 by AMP Project Contributors | Auto-updates disabled
AMP plugin template mode
Transitional
WordPress Version
6.6.2 (Latest version: 6.8.1)
Site Health
`
wp-core
version: 6.6.2
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /blog/%postname%/
https_status: true
multisite: true
user_registration: false
blog_public: undefined
default_comment_status: closed
environment_type: production
site_id: 1
site_count: 11
network_count: 1
user_count: 1
dotorg_communication: true
wp-dropins (2)
advanced-cache.php: true
object-cache.php: true
wp-active-theme
name: Neve Child (neve-child-master)
version: 1.0.0
author: ThemeIsle
author_website: https://themeisle.com
parent_theme: Neve (neve)
theme_features: core-block-patterns, hfg_support, widgets-block-editor, align-wide, automatic-feed-links, border, custom-background, custom-logo, custom-spacing, custom-units, customize-selective-refresh-widgets, editor-color-palette, fl-theme-builder-footers, fl-theme-builder-headers, fl-theme-builder-parts, header-footer-elementor, html5, lifterlms-sidebars, lifterlms, link-color, post-thumbnails, service_worker, starter-content, title-tag, amp, menus, widgets, themeisle-demo-import
theme_path: /usr/share/nginx/html/www/wp-content/themes/neve-child-master
auto_update: Disabled
wp-parent-theme
name: Neve (neve)
version: 4.1.2
author: ThemeIsle
author_website: https://themeisle.com
theme_path: /usr/share/nginx/html/www/wp-content/themes/neve
auto_update: Disabled
wp-themes-inactive (3)
Twenty Twenty-Four: version: 1.3, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Three: version: 1.6, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Two: version: 2.0, author: the WordPress team, Auto-updates disabled
wp-mu-plugins (2)
Asset CleanUp Pro: Plugin Filtering: version: 1.0, author: Gabriel Livan
Index WP MySQL For Speed Upgrade Filter for mu-plugins.: author: (undefined), version: 1.5.3
wp-plugins-active (30)
AMP: version: 2.5.5, author: AMP Project Contributors, Auto-updates disabled
AMP Enhancer: version: 1.0.49, author: ampenhancer, Auto-updates disabled
AMP Wordfence Compat: version: 0.2, author: Weston Ruter, Google, Auto-updates disabled
Asset CleanUp Pro: Page Speed Booster: version: 1.2.6.8, author: Gabe Livan, Auto-updates disabled
Cacheability: version: 1.1.7, author: Danila Vershinin, Auto-updates disabled
Health Check & Troubleshooting: version: 1.7.1, author: The WordPress.org community, Auto-updates disabled
Image optimization service by Optimole: version: 4.0.3, author: Optimole, Auto-updates disabled
Index WP MySQL For Speed: version: 1.5.3, author: Oliver Jones, Rick James, Auto-updates disabled
Mail logging - WP Mail Catcher: version: 2.1.10, author: James Ward, Auto-updates disabled
Neve Pro Addon: version: 3.1.1, author: ThemeIsle, Auto-updates disabled
Nginx Helper: version: 2.3.3, author: rtCamp, Auto-updates disabled
OPcache Reset: version: 2.2.0, author: Danila Vershinin, Auto-updates disabled
Otter – Page Builder Blocks & Extensions for Gutenberg: version: 3.0.12, author: ThemeIsle, Auto-updates disabled
PageSpeed Module: version: 2.1.0, author: KAGG Design, Auto-updates disabled
Phoenix Media Rename: version: 3.12.9, author: crossi72, Auto-updates disabled
Proxy Cache Purge: version: 5.2.2, author: Mika Epstein, Danila Vershinin, Auto-updates disabled
Rank Math SEO: version: 1.0.246, author: Rank Math SEO, Auto-updates disabled
Rank Math SEO PRO: version: 3.0.89, author: Rank Math SEO, Auto-updates disabled
Redis Object Cache: version: 2.5.4, author: Till Krüss, Auto-updates disabled
Site Kit by Google: version: 1.154.0, author: Google, Auto-updates disabled
Site Plugin for mywebsite.com: version: 1.39, author: Jim G, Auto-updates disabled
Starter Sites & Templates by Neve: version: 1.2.23, author: Themeisle, Auto-updates disabled
Wordfence Security: version: 8.0.5, author: Wordfence, Auto-updates disabled
WordPress Importer: version: 0.8.4, author: wordpressdotorg, Auto-updates disabled
WPForms Lite: version: 1.9.6, author: WPForms, Auto-updates disabled
WP GDPR Cookie Notice: version: 1.0.0-rc.2, author: Felix Arntz, Auto-updates disabled
WP Ghost: version: 8.2.11, author: Hide My WP Ghost, Auto-updates disabled
WP Mail SMTP: version: 4.5.0, author: WP Mail SMTP, Auto-updates disabled
WP Rocket: version: 3.19.0.1, author: WP Media, Auto-updates disabled
WP Rocket | Varnish IP: author: WP Rocket Support Team, version: (undefined), Auto-updates disabled
wp-plugins-inactive (5)
Akismet Anti-spam: Spam Protection: version: 5.4, author: Automattic - Anti-spam Team, Auto-updates disabled
Hello Dolly: version: 1.7.2, author: Matt Mullenweg, Auto-updates disabled
Hyve Lite: version: 1.2.4, author: ThemeIsle, Auto-updates disabled
WP Consent API: version: 1.0.8, author: RogierLankhorst, Auto-updates disabled
Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
wp-media
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-97 Q16 x86_64 2025-05-14 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 128M
upload_max_filesize: 128M
max_effective_size: 128 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 4 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 49151
imagick::RESOURCETYPE_MAP: 4 GB
imagick::RESOURCETYPE_MEMORY: 2 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP
ghostscript_version: 10.01.2
wp-server
server_architecture: Linux 4.14.355-277.647.amzn2.x86_64 x86_64
httpd_software: nginx/1.28.0
php_version: 8.2.28 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 600
memory_limit: 384M
admin_memory_limit: 512M
max_input_time: -1
upload_max_filesize: 128M
php_post_max_size: 128M
curl_version: 8.3.0 OpenSSL/1.0.2k-fips
suhosin: false
imagick_availability: true
pretty_permalinks: true
current: 2025-06-16T21:59:12+00:00
utc-time: Monday, 16-Jun-25 21:59:12 UTC
server-time: 2025-06-16T17:59:11-04:00
wp-database
extension: mysqli
server_version: 10.5.29-MariaDB
client_version: mysqlnd 8.2.28
max_allowed_packet: 16777216
max_connections: 151
wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /usr/share/nginx/html/www/wp-content
WP_PLUGIN_DIR: /usr/share/nginx/html/www/wp-content/plugins
WP_MEMORY_LIMIT: 256M
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: utf8mb4_unicode_520_ci
wp-filesystem
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: writable
mu-plugins: writable
neve
api: Yes
child: /usr/share/nginx/html/www/wp-content/themes/neve-child-master/functions.php,
/usr/share/nginx/html/www/wp-content/themes/neve-child-master/screenshot.png,
/usr/share/nginx/html/www/wp-content/themes/neve-child-master/style.css
customizer_css: a{
text-decoration: none!important;
}
.wp-block-themeisle-blocks-advanced-columns-separators.bottom svg{
z-index: -20;
}
.wp-block-themeisle-blocks-form .otter-form__container .wp-block-button .wp-block-button__link {
padding: 20px 40px;
}
.Hide-Text1 {
height: 0;
display: none;
visibility: hidden
}
google-site-kit
version: 1.154.0
php_version: 8.2.28
wp_version: 6.6.2
reference_url: https://staginga.garriganenterprises.com
amp_mode: secondary
site_status: not-connected
user_status: not authenticated
verification_status: not-verified
connected_user_count: none
active_modules: site-verification, search-console, pagespeed-insights
recoverable_modules: none
required_scopes:
openid: ⭕
https://www.googleapis.com/auth/userinfo.profile: ⭕
https://www.googleapis.com/auth/userinfo.email: ⭕
https://www.googleapis.com/auth/siteverification: ⭕
https://www.googleapis.com/auth/webmasters: ⭕
capabilities:
googlesitekit_authenticate: ✅
googlesitekit_setup: ✅
googlesitekit_view_posts_insights: ⭕
googlesitekit_view_dashboard: ⭕
googlesitekit_manage_options: ⭕
googlesitekit_update_plugins: ⭕
googlesitekit_view_splash: ✅
googlesitekit_view_authenticated_dashboard: ⭕
googlesitekit_view_wp_dashboard_widget: ⭕
googlesitekit_view_admin_bar_menu: ⭕
googlesitekit_view_shared_dashboard: ⭕
googlesitekit_read_shared_module_data::["search-console"]: ⭕
googlesitekit_read_shared_module_data::["pagespeed-insights"]: ⭕
googlesitekit_manage_module_sharing_options::["search-console"]: ⭕
googlesitekit_manage_module_sharing_options::["pagespeed-insights"]: ⭕
googlesitekit_delegate_module_sharing_management::["search-console"]: ⭕
googlesitekit_delegate_module_sharing_management::["pagespeed-insights"]: ⭕
enabled_features:
adsPax: ⭕
firstPartyMode: ⭕
privacySandboxModule: ⭕
rrmModule: ⭕
active_conversion_event_providers:
wpforms: submit_lead_form
consent_mode: disabled
consent_api: not-detected
search-console_shared_roles: none
search-console_management: owner
pagespeed-insights_shared_roles: none
pagespeed-insights_management: all_admins
key_metrics_status: Not setup
search_console_property: none
wp_mail_smtp
version: 4.5.0
license_key_type: lite
debug: No debug notices found.
lite_install_date: May 24, 2025 @ 5:48pm
amp_wp
amp_slug_query_var: amp
amp_slug_defined_late: false
amp_mode_enabled: transitional
amp_reader_theme: legacy
amp_templates_enabled: post, page, is_singular, is_front_page, is_home, is_archive, is_author, is_date, is_search, is_404, is_category, is_tag
amp_serve_all_templates: true
amp_css_transient_caching_disabled: n/a
amp_css_transient_caching_threshold: 5000 transients per day
amp_css_transient_caching_sampling_range: 14 days
amp_css_transient_caching_transient_count: 134
amp_css_transient_caching_time_series:
20250523: 0
20250524: 19
20250525: 94
20250526: 113
amp_libxml_version: 2.9.1
wpforms
version: 1.9.6
lite: May 24, 2025 at 5:48 pm
upload_dir: Writable
total_forms: 1
total_submissions: undefined
`
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
