• gemedet

    (@gemedet)


    There seems to be a new requirement for iframes. The default rules generate this:
    <figure class="op-social"><iframe src="https://www.youtube.com..."></iframe></figure>

    This used to work, but now it results in errors:

    HTML Embeds Require Valid Width: HTML Embeds require a valid integer width in order to be displayed properly.

    HTML Embeds Require Valid Height: HTML Embeds require a valid integer height in order to be displayed properly.

    Manually adding the “width” and “height” attributes fixes it.

    https://ww.wp.xz.cn/plugins/fb-instant-articles/

Viewing 4 replies - 1 through 4 (of 4 total)
  • mlemberg

    (@mlemberg)

    I get this error too.

    namli

    (@namli)

    Same issue.

    Both WordPress and Instant Articles for WP are updated to the latest version.

    eperezf

    (@eperezf)

    Same here. Everything up to date. It’s not efficient to specify height and width of embeds since it’s better to use a responsive mode.

    Gil Reich

    (@gil-reich)

    I set the custom rules as below, to get the plugin to write out the height and width that are in the original source. There are a few different SocialEmbed selectors, so if this doesn’t work on your code you may want to add height and width to other SocialEmbedRules.

    {
        "rules":
        [{
            "class": "SocialEmbedRule",
            "selector" : "//p[iframe]",
            "properties" : {
                "socialembed.url" : {
                    "type" : "string",
                    "selector" : "iframe",
                    "attribute": "src"
                },
                "socialembed.height" : {
                    "type" : "int",
                    "selector" : "iframe",
                    "attribute": "height"
                },
                "socialembed.width" : {
                    "type" : "int",
                    "selector" : "iframe",
                    "attribute": "width"
                },
                "socialembed.iframe" : {
                    "type" : "children",
                    "selector" : "iframe"
                },
                "socialembed.caption" : {
                    "type" : "element",
                    "selector" : "figcaption"
                }
            }
    	}]
    }

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘HTML Embeds Require Valid Width’ is closed to new replies.