• Resolved Esteban

    (@ecairol)


    I have several pages that embed an iframe similar to the one below:

    <iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/611025615&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true" width="100%" height="166" frameborder="no" scrolling="no"></iframe>

    As you can notice, the iframe’s width is 100%

    However, AMP Search Console is throwing the following error:

    AMP HTML Tag has an invalid layout specified by its attributes.
    Invalid value '0' for attribute 'width' in tag 'amp-iframe' - for layout 'FIXED_HEIGHT', set the attribute 'width' to value 'auto'.

    The parsed HTML looks like this:
    <p><amp-iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/611025615&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true" width="0" height="166" frameborder="0" scrolling="no" sandbox="allow-scripts allow-same-origin" layout="fixed-height"><span placeholder="" class="amp-wp-iframe-placeholder"></span><noscript><iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/611025615&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true" width="100%" height="166" scrolling="no"></iframe></noscript></amp-iframe></p>

    Our previous width=100% is replaced with a width="0", but the strange thing is that if you go to the page and inspect the code, you’ll still see 100%.

    Any ideas or help would be highly appreciated. Thank you.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Esteban

    (@ecairol)

    I was posting this in the wrong forum.

    The plugin I was using was actually AMP WP.

    I just had to update the plugin to the latest version, that fixed the problem

    I had this same problem with a clients site that I am managing. I am still getting the errors you were getting.

    My client’s site is:
    https://studyhelp247.com
    Studyhelp247

    I am seeing that it is affecting many pages. What could be the issue, considering that I have the Latest AMP Plugin already installed.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    ecairol – That’s okay. Is that a custom theme on AMP?

    codeinecoder – Are you having the validation issue? You don’t seem to use AMPforWP. can you please activate that so that I can check and help you?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Soundcloude iframe: AMP HTML Tag has an invalid layout specified by its attrs.’ is closed to new replies.