• Resolved xelan54

    (@xelan54)


    Hello,

    AMP 1.5.2 completely breaks my site:

    Notice: is_amp_endpoint was called incorrectly. is_amp_endpoint() was called before the wp action which means it will not have access to the queried object to determine if it is an AMP response, thus neither the amp_skip_post filter nor the AMP enabled publish metabox toggle will be considered. Please see Debugging in WordPress for more information. (This message was added in version 1.0.2.) in /var/www/html/wp-includes/functions.php on line 5167

    This blog is running a plain vanilla version of TwentyNineteen via a child theme that makes very few changes (simply because I’m incapable of learning CSS no matter how hard I try).

    AMP was fine until 1.5.2.

    Can someone help me figure out what changed and maybe offer a clue of how to fix it? The plug-in is (temporarily) deactivated.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 34 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Is your child theme using the is_amp_endpoint() function? If so, please share the context for how it is being used.

    Plugin Author Weston Ruter

    (@westonruter)

    What other plugins do you have active?

    Plugin Author Weston Ruter

    (@westonruter)

    And when you say “completely breaks site” is it just by adding this notice?

    To be the most helpful, please share the Site Health info from the WordPress admin. This will include the list of plugins.

    Thread Starter xelan54

    (@xelan54)

    Q1: No, I don’t think so.

    Q2:

    
    +------------------------------------------+----------+------------------------------+------------+
    | name                                     | status   | update                       | version    |
    +------------------------------------------+----------+------------------------------+------------+
    | akismet                                  | active   | none                         | 4.1.4      |
    | all-in-one-seo-pack                      | active   | none                         | 3.4.2      |
    | amp                                      | inactive | none                         | 1.5.2      |
    | classic-editor                           | active   | none                         | 1.5        |
    | clicky-analytics                         | active   | none                         | 1.6.1      |
    | contact-form-7                           | active   | none                         | 5.1.7      |
    | easy-fancybox                            | active   | none                         | 1.8.18     |
    | enlighter                                | active   | none                         | 3.11.0     |
    | invisible-recaptcha                      | active   | none                         | 1.2.3      |
    | iq-block-country                         | active   | none                         | 1.2.7      |
    | jetpack                                  | active   | none                         | 8.4.1      |
    | gallery-by-supsystic                     | active   | none                         | 1.14.6     |
    | redirection                              | active   | none                         | 4.7.1      |
    | wpcf7-redirect                           | active   | none                         | 1.3.5      |
    | sqrl-login                               | active   | none                         | 2.1.0      |
    | updraftplus                              | active   | version higher than expected | 2.16.23.24 |
    | vaultpress                               | active   | none                         | 2.1.1      |
    | wordfence                                | active   | none                         | 7.4.6      |
    | wordpress-popular-posts                  | active   | none                         | 5.1.0      |
    | wp-optimize                              | active   | none                         | 3.0.19     |
    | auto-terms-of-service-and-privacy-policy | active   | none                         | 2.3.2      |
    | wpb-twitlinks                            | active   | none                         |            |
    | wp-mail-smtp                             | active   | none                         | 1.9.0      |
    +------------------------------------------+----------+------------------------------+------------+

    Q3: How’s this for broken? 🙂

    • This reply was modified 4 years ago by xelan54.
    Thread Starter xelan54

    (@xelan54)

    And…it breaks Jetpack. It’s binary: turn on AMP and no Jetpack dashboard. Turn it off, and all’s well.

    Plugin Author Weston Ruter

    (@westonruter)

    Note: Those notices can be removed by setting WP_DEBUG to false in the wp-config.php, or rather by setting WP_DEBUG_DISPLAY to false. See https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug_display

    In any case, I’ll look at the plugins to see if I can find which is causing the is_amp_endpoint() issue.

    Plugin Author Weston Ruter

    (@westonruter)

    Actually, what would be best is if you could leave the AMP plugin active and then try deactivating the other plugins one-by-one until the issue goes away. Once it does, then that is the plugin that has the problem. That may be faster than me looking through the plugins.

    Thread Starter xelan54

    (@xelan54)

    Well, from the perspective of every other plugin, this one IS the problematic one.

    Plugin Author Weston Ruter

    (@westonruter)

    The issue is that one of the other plugins is using the is_amp_endpoint() function incorrectly. So another plugin is attempting to be compatible with the AMP plugin, but it is not doing it correctly.

    Thread Starter xelan54

    (@xelan54)

    The fatal flaw in the WordPress ecosystem: it’s always the other plugin’s fault.

    Until your recent update, something else was “doing it wrong” and everything was fine.

    Plugin Author Weston Ruter

    (@westonruter)

    Hey, I’m trying to help you. I’m just letting you know the fastest way for you to help me help you.

    Thread Starter xelan54

    (@xelan54)

    …and I appreciate it.

    I think it’s this widget: https://jetpack.com/support/extra-sidebar-widgets/cookies-consent-banner/.

    Remove it and all’s well. Makes sense to me because I first noticed the issue when using that widget and Jetpack won’t run when Amp is enabled.

    kitchin

    (@kitchin)

    Jetpack vs. AMP is our problem, with the same error message. When both are active, we cannot stay logged into Dashboard.

    Thread Starter xelan54

    (@xelan54)

    …and the error appears more frequently in Microsoft Edge (macOS) than in “real” Google Chrome. If that’s any help.

    Plugin Author Weston Ruter

    (@westonruter)

    Jetpack vs. AMP is our problem, with the same error message. When both are active, we cannot stay logged into Dashboard.

    @kitchin Do you mean the admin bar is hidden? That’s an issue introduced in in Jetpack 8.4. You can read more about it here: https://github.com/Automattic/jetpack/issues/15353

    Here is a workaround plugin to fix that problem: https://gist.github.com/westonruter/d168c290d6c01c107da960d48fa3dad3

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘AMP 1.5.2 completely breaks site’ is closed to new replies.