• Resolved Ashish Jangra

    (@ashishjangra-1)


    Hi Folks

    I have seen error on few AMP pages.

    There is content which fails AMP validation. Nevertheless, the invalid markup has been automatically removed. Review issues

    Invalid elements: script (29)

    Invalid attributes: alt (2), onbeforeunload

    However lots of page has same structure but they didn’t have this error. I have spend lots of time on the debugging the errors. I have seen only AMP scripts are there like overlay mask script, Sidebar script etc Apart from that there are no script on the website.

    Also I din’t found onbeforeunload on any file and sourcecode.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Ashish Jangra

    (@ashishjangra-1)

    overall these scripts are exist

    <script async custom-element=”amp-sidebar” src=”https://cdn.ampproject.org/v0/amp-sidebar-0.1.js”></script&gt;
    <script async custom-element=”amp-inputmask” src=”https://cdn.ampproject.org/v0/amp-inputmask-0.1.js”></script&gt;
    <script async custom-element=”amp-fit-text” src=”https://cdn.ampproject.org/v0/amp-fit-text-0.1.js”></script&gt;
    <!– AMP Analytics –><script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script&gt;

    @ashishjangra-1 If you can share example URLs with these error’s we’d be happy to investigate. If using AMP in standard mode please temporarily switch to transitional so we can compare your AMP vs non AMP.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    Hi James

    Here is the URL https://bit.ly/2MNCLYQ, We already using it in transitional mode.

    Thanks

    • This reply was modified 4 years, 5 months ago by Ashish Jangra.

    @ashishjangra-1 From inspecting the URL you provided all looks good with the plugin and how it handles these validation errors. I can’t be sure of the source of the onbeforeunload attribute, but you could try the Health Check & Troubleshoot plugin. After installing navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”. (As a logged in user only this mode will deactivate other plugins and switch to a default theme). From there you can enable plugins one by one or switch themes, while checking your source code each time.

    From checking some other URLs on your site I noticed other elements such as accordions and tabbed content, which may also be the cause of some of the validation errors, in particular the scripts.

    Let us know if you’re able to determine the cause.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    Hi James,

    Thank you for your reply, these accordians and tabs are not enabaled on AMP pages. I already removed these stuff from blog.

    If you noticed there are nothing related to the scripts but it sill showing error.

    Regarding onbeforeunload, In my whole project I didn’t use this function anywhere.

    Strange!!

    Thanks

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    One More thing .. In Google Search Console I have checked 444 pages only valid, However we have 1500 blog post. but in search console its showing 444 Valid 48 invalid

    @ashishjangra-1

    Regarding onbeforeunload, In my whole project I didn’t use this function anywhere.

    It may be placed by another plugin but you can check using the mentioned troubleshooting steps.

    One More thing .. In Google Search Console I have checked 444 pages only valid, However we have 1500 blog post. but in search console its showing 444 Valid 48 invalid

    It looks like you don’t have AMP enabled for all URLs. If you want to share an example invalid URL we can see if we’re able to identify any issues, or you can use the plugins validation tool. You can also request a re-crawl if they are issues which you’ve since addressed.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    Hi James,

    Yes, I have not enabled on all pages I have more then 2000 paes, I have enabled it on blog post only. And total blog post is 1500. they atleast should index on google but as per google search console only 444 + 48 page have been crawled.

    Our all blog post non-amp version are already submitted for index and they are indexed. But only AMP pages are concern, They are not indexed.

    Thanks

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    hi James,

    Here is the Page URL which is not indexed.

    https://bit.ly/2Y74V7A

    I have checked on AMP validation tool and its Valid Page with valid structure.

    Plugin Author Pascal Birchler

    (@swissspidy)

    Since you are using AMP in transitional mode, https://www.1e.com/news-insights/blogs/windows-10-forrester-johan-arwidmark/?amp will point to https://www.1e.com/news-insights/blogs/windows-10-forrester-johan-arwidmark/ as the canonical URL. This is correct, otherwise search engines would index both URLs, which would result in duplicate content.

    Searching for inurl:https://www.1e.com/news-insights/blogs/windows-10-forrester-johan-arwidmark/ on Google returns that canonical URL. So to me it seems all correct.

    I recommend you to follow the troubleshooting guide at https://support.google.com/webmasters/answer/7450883?hl=en since this is a question specific to Search Console and indexing.

    Thread Starter Ashish Jangra

    (@ashishjangra-1)

    I already followed all steps and verified . my test pass on every steps and everything looks good enough. Strange why Google doesn’t index whole AMP pages.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘AMP Errors’ is closed to new replies.