• Resolved olegburakov

    (@olegburakov)


    Hi guys, I use AMP plugin https://www.ads-software.com/plugins/amp/
    I’ve installed Relevanssi plugin and got this error when I navigate to Search page:

    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 /nas/content/live/dglofox/wp-includes/functions.php on line 5167

    On the same site but without AMP all works good. And when I deactivate Relevanssi on AMP site – notice also gone (thats why I decided this is because of plugin conflict).

    I wrote to amp plugin support and they said:

    The Relevanssi is apparently calling the is_amp_endpoint function too early, which causes this notice.

    Indeed I recommend you to contact their support to fix this in the Relevanssi plugin, as it’s not an issue in the AMP plugin itself.

    https://www.ads-software.com/support/topic/relevanssi-search-conflict/#post-13092238

    Have you any ideas what cause the problem?

    • This topic was modified 4 years, 8 months ago by olegburakov.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi is not calling is_amp_endpoint(), at least not directly. Relevanssi doesn’t care about AMP or not; that’s about presenting the search results, and presenting the search results is the responsibility of the theme.

    I tried reproducing the problem, but on my test site the combination of my theme (2019), Relevanssi and AMP caused no errors like this.

    Thread Starter olegburakov

    (@olegburakov)

    Thanks for answering! I switching my theme to 2019, add search widget to footer and still got same notice on search result page: https://i.imgur.com/3NOK6OX.png
    https://dglofox.wpengine.com/blog/?s=price

    I use multisite if it’s matter

    Plugin Author Mikko Saari

    (@msaari)

    Well, multisite shouldn’t matter, as Relevanssi doesn’t do anything different in multisite environments (multisite searching might be different, but since you’re not using Premium, that’s not the case here).

    If you disable Relevanssi-generated excerpts, does that help?

    What kind of settings you have in AMP?

    Thread Starter olegburakov

    (@olegburakov)

    I use AMP in “standart” mode https://i.imgur.com/1GLRHdd.png

    Yeah, disabling excerpts helps! Notice is gone!

    Plugin Author Mikko Saari

    (@msaari)

    Ok, so the problem is somehow related to what is in your excerpts. Since your actual theme didn’t use the Relevanssi-generated excerpts, it’s a good idea to keep them disabled – generating the excerpts is often the slowest part of the search.

    Thread Starter olegburakov

    (@olegburakov)

    Okay, thanks for helping a lot and for so quick response! I have added a review ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Relevanssi and AMP conflict’ is closed to new replies.