• I am on a multisite blog and we have a contractor hosting our site for us on aws. I have a test author account that I am using, so I have been experimenting with a user who is not a superadmin.

    I have noticed a few issues that appear to be related:
    1. If you save your post once with the iframe plugin in the visual editor, the gif appears in the visual editor. On hitting update again, the gif disappears due, I believe, to it having been converted to the <iframe> tag on the first update, then stripped on the second update. Is there any solution to this, or is this just a bug?

    The gif we are trying to embed is [iframe src="//giphy.com/embed/h45algtniCWEo" width="480" height="271" frameborder="0"]

    2. Switching between visual and text editor appears to wreak havoc, with the iframe eventually getting stripped out.

    Are these known issues? I think they both revolve around the iframe shortcode being converted into iframe html, then eventually getting stripped.

    https://www.ads-software.com/plugins/iframe/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author webvitaly

    (@webvitaly)

    Its pretty weird.

    I tried your shortcode and it stay as a shortcode and never switch to gif in editor. And also never stripped by WordPress if I switch from Text mode to Visual one and vice versa.

    Maybe you have some other plugins its conflicting with?

    Thread Starter natewpayscale

    (@natewpayscale)

    Were you acting as a user who is normally able to post iframes? Note that our iframes typically get stripped unless using your plugin.

    Are there some editor settings we should change? Trying to find a good compromise between allowing our authors to embed good content and keeping our site secure.

    Steps:
    1. Put the embed code in the visual editor
    2. Hit update post – the shortcode is now gone, replaced by the actual embeddded gif
    3. Switch to the text editor: the short code has now been replaced with <iframe src="//giphy.com/embed/h45algtniCWEo" width="480" height="271" frameborder="0"></iframe>
    4. hit update again, the iframe is stripped because our editor strips out all iframes

    Plugin Author webvitaly

    (@webvitaly)

    <iframe> is stripped by WordPress for security reasons.

    So you need to use [iframe] shortcode instead. It will not be stripped by WordPress.

    You dont have to change anything else in your settings.

    Does this answer makes more sense now?

    Thread Starter natewpayscale

    (@natewpayscale)

    Err not quite unfortunately ??

    Really appreciate your responses!

    Does this link help explain what’s going on better? (It’s a video of the problem).
    https://s3-us-west-2.amazonaws.com/natew-bucket/iframeissue.html

    I am using the iframe shortcode. But it gets stripped by wordpress after hitting update twice.

    But maybe it is interference from some other plugin…

    Plugin Author webvitaly

    (@webvitaly)

    Oh, it should not behave like this by default.
    [iframe] shortcode should not be executed in the editor.
    My guess is that it can conflict with some plugin which tries to execute shortcodes in editor or something similar.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin not idempotent’ is closed to new replies.