• Resolved mattlim

    (@mattlim)


    I have a few posts that I have disabled AMP on via the ‘Enable Amp’ toggle on the right sidebar of Gutenberg. When I click to Enable AMP now, it switches back to off when I Update the post.

    Any help to get it to stay enabled?

Viewing 12 replies - 1 through 12 (of 12 total)
  • @mattlim This issue came up previously, with a user updating to the latest version of WordPress to fix the issue. Please share your Site Health information and we can troubleshoot further.

    It may be worth checking if the same issue arises when using another theme, or with other plugins temporarily deactivated.

    Thread Starter mattlim

    (@mattlim)

    Thanks James, Looks like I’m using Version 5.4.1 of WordPress. What’s the best way to share my site health?

    @mattlim you can find and copy your Site Health information as shown in this image. You can paste it as a reply here.

    Thread Starter mattlim

    (@mattlim)

    @reneesoffice Thanks Renee!

    @jamesosborne here’s that site health info for you:

    
    ### wp-core ###
    
    version: 5.4.1
    site_language: en_US
    user_language: en_US
    timezone: America/New_York
    permalink: /%postname%
    https_status: true
    user_registration: 0
    default_comment_status: open
    multisite: false
    user_count: 1
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html
    wordpress_size: 39.44 MB (41359810 bytes)
    uploads_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/uploads
    uploads_size: 213.23 MB (223590145 bytes)
    themes_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/themes
    themes_size: 6.94 MB (7272694 bytes)
    plugins_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/plugins
    plugins_size: 88.48 MB (92776569 bytes)
    database_size: 90.95 MB (95371264 bytes)
    total_size: 439.04 MB (460370482 bytes)
    
    ### wp-active-theme ###
    
    name: Hello Elementor Child (hello-theme-child-master)
    version: 1.0.1
    author: Elementor Team
    author_website: https://elementor.com/
    parent_theme: Hello Elementor (hello-elementor)
    theme_features: menus, post-thumbnails, automatic-feed-links, title-tag, html5, custom-logo, editor-style, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, amp
    theme_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/themes/hello-theme-child-master
    
    ### wp-parent-theme ###
    
    name: Hello Elementor (hello-elementor)
    version: 2.3.0
    author: Elementor Team
    author_website: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
    theme_path: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/themes/hello-elementor
    
    ### wp-themes-inactive (3) ###
    
    Astra Child: version: 1.0.0, author: Matt Lim
    Astra: version: 2.4.3, author: Brainstorm Force
    Twenty Twenty: version: 1.2, author: the WordPress team
    
    ### wp-plugins-active (15) ###
    
    AMP: version: 1.5.3, author: AMP Project Contributors
    Astra Pro: version: 2.4.1, author: Brainstorm Force
    Atomic Blocks - Gutenberg Blocks Collection: version: 2.8.1, author: atomicblocks
    Custom Post Type UI: version: 1.7.4, author: WebDevStudios
    Elementor: version: 2.9.8, author: Elementor.com
    Elementor Pro: version: 2.9.3, author: Elementor.com
    FAQ Schema For Pages And Posts: version: 2.1.0, author: Krystian Szastok (SEO Consultant) and Online Marketing Gurus
    Glue for Yoast SEO & AMP: version: 0.6, author: Joost de Valk
    Insert Headers and Footers: version: 1.4.5, author: WPBeginner
    LIQUID BLOCKS: version: 1.0.5, author: LIQUID DESIGN Ltd.
    Post Type Switcher: version: 3.2.0, author: John James Jacoby
    ShortPixel Image Optimizer: version: 4.17.4, author: ShortPixel
    Table of Contents Plus: version: 2002, author: Michael Tran
    WPForms Lite: version: 1.6.0.1, author: WPForms
    Yoast SEO: version: 14.0.2, author: Team Yoast (latest version: 14.0.4)
    
    ### wp-plugins-inactive (5) ###
    
    Breeze: version: 1.1.5, author: Cloudways
    Custom Adobe Fonts (Typekit): version: 1.0.16, author: Brainstorm Force
    Custom Post Type Permalinks: version: 3.3.5, author: Toro_Unit
    Ultimate Blocks: version: 2.3.0, author: Ultimate Blocks (latest version: 2.3.3)
    WooCommerce: version: 4.0.1, author: Automattic
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1687
    imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 https://www.imagemagick.org
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 2 GB
    	imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    	imagick::RESOURCETYPE_FILE: 768
    	imagick::RESOURCETYPE_MAP: 2 GB
    	imagick::RESOURCETYPE_MEMORY: 996 MB
    	imagick::RESOURCETYPE_THREAD: 1
    gd_version: 2.2.5
    ghostscript_version: 9.26
    
    ### wp-server ###
    
    server_architecture: Linux 4.9.0-11-amd64 x86_64
    httpd_software: Apache/2.4.25 (Debian)
    php_version: 7.1.33-14+0~20200320.35+debian9~1.gbpb15fae 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 2500
    time_limit: 60
    memory_limit: 256M
    max_input_time: 60
    upload_max_size: 10M
    php_post_max_size: 10M
    curl_version: 7.52.1 OpenSSL/1.0.2u
    suhosin: false
    imagick_availability: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.1.44-MariaDB-1~stretch
    client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content
    WP_PLUGIN_DIR: /home/390110.cloudwaysapps.com/cutzjxrufr/public_html/wp-content/plugins
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    
    ### wpforms ###
    
    version: 1.6.0.1
    license: false
    lite: Apr 23, 2020 @ 1:23pm
    total_forms: 2
    total_entries: 5
    
    ### amp_wp ###
    
    amp_mode_enabled: standard
    amp_templates_enabled: post, page, attachment, elementor_library, journal, 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: false
    amp_css_transient_caching_threshold: 5000 transients per day
    amp_css_transient_caching_sampling_range: 14 days
    amp_css_transient_caching_transient_count: 401
    amp_css_transient_caching_time_series: 
    	20200421: 0
    	20200423: 112
    	20200424: 196
    	20200425: 241
    	20200426: 241
    	20200427: 253
    	20200428: 267
    	20200429: 294
    	20200430: 322
    	20200501: 400
    
    
    Thread Starter mattlim

    (@mattlim)

    @jamesosborne looks like it is just not working on posts within a custom post type .

    @mattlim thanks for the feedback!

    On a post where you are experiencing the issue:

    1) after you have tried to Enable AMP via the toggle and update the post, does the custom field entry for amp_status still say disabled.

    2) if you change the amp_status custom field entry to enabled and update the post, does the post now retain the Enable AMP toggle as on?

    Thread Starter mattlim

    (@mattlim)

    @reneesoffice There is not a custom field for amp_status at the bottom of my posts in Gutenberg?

    @mattlim thanks for your reply. You may need to toggle this on in the editor options panel.
    1) In the editor, go the to top right 3-dot menu and select Options: https://jmp.sh/LdoSkLB
    2) Then select Custom Fields under Advanced Panels:https://jmp.sh/LaUuSvm

    Plugin Author Weston Ruter

    (@westonruter)

    What custom post type is it that isn’t working?

    According to the Site Health info, the following post types are enabled for AMP: post, page, attachment, elementor_library, journal

    Are there any errors appearing in the browser DevTools console?

    Plugin Author Weston Ruter

    (@westonruter)

    I was able to reproduce this issue.

    The problem is the Custom Fields advanced panel is conflicting with the Enabled toggle.

    @mattlim Here’s a workaround plugin for you to use in the immediate term which will prevent the postmeta from being added to the Custom Fields table, preventing the conflict from happening: https://gist.github.com/westonruter/392c3042ede361dd3cd5089733356649

    @mattlim quick update that we’re working on this issue to be fixed in the plugin: https://github.com/ampproject/amp-wp/issues/4659

    We’ll update the topic when this fix is out. Thanks for bringing this to our attention.

    Let us know if you have any further questions in the meantime.

    Thread Starter mattlim

    (@mattlim)

    Hi @westonruter and @reneesoffice, good to hear.

    I was actually able to get it working today. Turns out I did not have support for custom fields enabled in the plugin Custom Post Type UI for the custom post type I had created. I think enabling it is what ended up fixing the issue.

    Thank you for your help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Enable Amp Toggle Not Working’ is closed to new replies.