• Resolved kennycr

    (@kennycr)


    I change the AMP to use transitional approach, and after that I’m getting some broken links with some blog post using the “/?amp=” param at the end for the amphtml url.

    This is very random, for some blog post page the param works, but for others don’t and there is when the 502 error appears.

    • This topic was modified 3 years, 8 months ago by kennycr.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @kennycr

    Thank you for the support topic, Can you please share your site URL along with site health information and PHP error log (please send only error part) using this form so we can further investigate your issue.

    Additionally, please check this article to learn about what are possible reasons for 502 on your site.

    @kennycr As we haven’t received a response, I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist. Thank you!

    Thread Starter kennycr

    (@kennycr)

    Hello @milindmore22 sorry for the late answer.

    I already submitted the form that you need.

    Let me know if you need something else.

    Thread Starter kennycr

    (@kennycr)

    More info here @milindmore22 @shetheliving

    PHP Notice: amp_is_available was called <strong>incorrectly</strong>. amp_is_available() (or <strong>amp_is_request</strong>(), formerly is_amp_endpoint()) was called too early and so it will not work properly. WordPress is not currently doing any 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 theme with slug gorilla-logic-1 is responsible; please contact the author. Please see <a href="Debugging in WordPress">Debugging in WordPress</a> for more information. (This message was added in version 2.0.0.

    Plugin Support Milind More

    (@milindmore22)

    Hello @kennycr

    It seems your theme gorilla-logic-1 is using is_amp_endpoint() function before wp action, possibly on init action,

    Since this issue required a code change in your theme, I will recommend contacting your theme author to get that fixed.

    following is an example of is_amp_endpoint() usages for your refernce.
    Eg:

    
    add_action( 'wp', 'do_something_onlyon_amp' );
    
    function do_something_onlyon_amp() {
        if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
            // I am doing it on amp
        }
    }
    
    
    Thread Starter kennycr

    (@kennycr)

    Hey @milindmore22 , thanks for your help.

    I just tried your code snipped, that actually makes a lot of sense, without luck.

    Any other recommendation from your end?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Random 502 errors with transitional “/?amp=1”’ is closed to new replies.