• Resolved hycent

    (@hycent)


    Hello guys, I installed the amp plugin some weeks back and I have some issues I’ll appreciate if you can help me fix.

    My search console showed.

    The attribute ‘frameborder’ in tag ‘amp-iframe’ is set to the invalid value ”.

    The attribute ‘frameborder’ in tag ‘iframe’ is set to the invalid value ”.

    The error effects 45 pages and I have verified the errors via amp validator.

    I will appreciate it if you can help me fix these issue. I have attached a URL to a page with such an issue, I believe if if I fix these one I can fix the rest.

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

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

    (@westonruter)

    In the non-AMP version of that page, I can see an iframe defined as:

    <iframe
    style="width: 100%; max-width: 660px; overflow: hidden; background: transparent;" src=https://embed.music.apple.com/us/album/boyfriend-single/1474647483 height=450 frameborder sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-storage-access-by-user-activation allow-top-navigation-by-user-activation"></iframe>

    Note the frameborder attribute has no value provided. Even so, if I try that my machine I get this result:

    <amp-iframe src="https://embed.music.apple.com/us/album/boyfriend-single/1474647483" height="450" frameborder="0" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-storage-access-by-user-activation allow-top-navigation-by-user-activation" layout="fixed-height" width="auto" class="amp-wp-a2db037">...</amp-iframe>

    So the value is getting supplied. Nevertheless, your site is removing the value from the attribute. I also see that all attributes have quotes being removed.

    Do you have some optimization plugin or server module that is doing this? It seems to be making the pages invalid AMP.

    Thread Starter hycent

    (@hycent)

    I am not sure, the only optimization plugins I have is:

    W3 total cache

    Other plugins on my site include:
    Ads inserter
    Ads for wp
    AdSense invalid click protector
    Amp
    Better WordPress google sitemap
    Classic editor
    GDPR cookie consent
    Glue for yoast
    Inline related post
    Jetpack
    One signal
    Powerkit
    Seo framework
    Seo framework manager

    Plugin Author Weston Ruter

    (@westonruter)

    Ok, please try deactivating W3 Total Cache and see if that eliminates the issue. If so, there is probably a way to configure the plugin to not minify the HTML.

    Thread Starter hycent

    (@hycent)

    Sorry for the late reply, w3 total cache was causing the error, it was not only striping my iframes of ‘frameborder’ but also my videos of ‘name’, ‘description’ etc, causing a lot of errors in my search console.

    Everything is fine now, thank you!!!

    • This reply was modified 6 years, 4 months ago by hycent.
    Plugin Author Weston Ruter

    (@westonruter)

    Excellent. I believe you’d be able to fix this also by disabling the “HTML minify” in the W3 Total Cache settings.

    Hello @westonruter @hycent
    I am Marko, W3 Total Cache support.
    I am sorry about the issue you are experiencing when HTML minify is enabled.
    Can you please apply this fix:
    and replace line 356 in lib/Minify/Minify/HTML.php
    if ( empty( $m[3] ) ) {
    with
    if ( $m[3] === '' ) {

    Please let us know if this helps!

    Tambien tengo el mismo problema, voy a intentar resolverlo con lo que describe @vmarko

    Hello @vmarko , I have done what you recommend but you have not solved this error in the amp with the frameborder

    tuxmob

    (@tuxmob)

    Moved, I put this post in the wrong place, sorry…

    • This reply was modified 6 years ago by tuxmob.
Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Amp validation issues’ is closed to new replies.