• Resolved egornmore

    (@egornmore)


    Hello,
    I am getting the following error in Google Search Console (AMP Tab) – “The tag ‘i-amphtml-sizer’ may not appear as a descendant of tag ‘amp-mega-menu’.” (screenshot 1), while 0 validation errors in the AMP WP Plugin validator and everything works perfectly. I got a bit confused because in official AMP documentation it says that I can use <amp-image> element in <amp-mega-menu> component. Also, I’m very worried about the Google Search Console message, it says – “It won’t appear in Google Search results.” (screenshot 2).

    Screenshot 1: https://ibb.co/qWtJmqp
    Screenshot 2: https://ibb.co/q1QLsFQ

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

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter egornmore

    (@egornmore)

    @milindmore22

    For some reason now it appears that staging has a validation error as well.
    Update: amp_enable_ssr solves the issue after resetting CDN cache!
    But that function breaks rendering of the header image.

    • This reply was modified 2 years, 7 months ago by egornmore.
    • This reply was modified 2 years, 7 months ago by egornmore.
    • This reply was modified 2 years, 7 months ago by egornmore.
    • This reply was modified 2 years, 7 months ago by egornmore.
    • This reply was modified 2 years, 7 months ago by egornmore.
    Thread Starter egornmore

    (@egornmore)

    @milindmore22

    Is it possible to fix validation errors without amp_enable_ssr filter?

    Plugin Support Milind More

    (@milindmore22)

    @egornmore

    I have created a GitHub issue, to check if we can skip redering child amp-img tags of amp-mega-menu.

    Plugin Author Weston Ruter

    (@westonruter)

    Thanks for reporting this. I’ve identified this as a bug in the AMP validator spec. I’ve opened an upstream pull request to rectify: https://github.com/ampproject/amphtml/pull/38028

    Once that is merged and deployed, you’ll be able to re-enable SSR.

    Thread Starter egornmore

    (@egornmore)

    @westonruter, @milindmore22

    Thanks, got it. I’ll keep up with your updates guys

    Thread Starter egornmore

    (@egornmore)

    Hi @westonruter, @milindmore22

    I found a tricky solution that kind of fixes the validator.ampproject.org errors, but not the Google Search Console validator (not sure about this one, maybe it needs more time). I am using wp_is_mobile() function to detect browser user agent and then placing amp-mega-menu in DOM only if it’s a desktop device.

    Therefore do I correctly assume that validator.ampproject.org validates only the mobile version of the website and Google Search Console validates the desktop version?

    Validated Page

    Plugin Support Milind More

    (@milindmore22)

    Hello @egornmore

    This might work, as Search Console does mobile first indexing, I will recommend contacting Search Console support for the same.

    However it needs fixing at specs, that defines rules of validation so it needs some time to accept those changes and roll-out on Search console

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘amp-mega-menu + am-img’ is closed to new replies.