• Resolved tschortschomagic

    (@tschortschomagic)


    Hi,

    I’m using the shortcode [su-document] to embed PDF files on several pages which basically works like a charm. Having said this, I noticed that the embedded PDF files frequently are not loaded properly resulting in a blank iframe. This happens browser independent on Safari, Chrome, Firefox, Opera or Edge. As of yet I was not able to find the reason behind this behaviour.

    Plugin, WordPress and Browser are all up to date. I certainly tested with the standard theme (Twenty Nineteen) as well, but same result!

    I appreciate any help as I really rely on this awesome shortcode!

    Kind regards,
    George

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi George,

    the [su_document] shortcode only displays an iframe with the Google Document Viewer, it doesn’t render documents. I’m afraid I can’t help here.

    Make sure you’re using an httpS URL.

    Thread Starter tschortschomagic

    (@tschortschomagic)

    Hi Vladimir,

    thanks for your answer! I am using https URLs and I’m aware that [su_document] only displays an iframe with Google Document Viewer embedded! As the issue explained above even occurs on a clean installed WordPress instance without any other plugins and certainly using the standard theme I think it has to do something with the shortcode or at least with the plugin itself.. It basically works but, let’s say every third time loading the site, it doesn’t.

    What do you think? Could it be somehow security related in the current browser versions that contents of iframe are occasionally blocked?

    Kind regards,
    George

    Plugin Author Vova

    (@gn_themes)

    Hi George,

    this is definitely related to browser security policies and the Google APIs.

    I’ve added the following content to a page and tried loading it multiple times in Safari and Chrome:

    [su_document url="https://www.gnu.org/licenses/gpl-3.0.rtf"]
    
    <iframe src="//docs.google.com/viewer?embedded=true&url=https://www.gnu.org/licenses/gpl-3.0.rtf" width="600" height="400" class="su-document" title=""></iframe>

    The second part with iframe is the exact copy of what outputs the shortcode from the first part.

    After a few reloads a got the following results:

    Safari

    Chrome

    Sometimes both elements are empty, sometimes only one of them.

    According to Safari’s error log, the issue is related to some script inside the iframe. That means the issue is on the Google side.

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

The topic ‘Shortcode Document (su-document) – Empty iframe’ is closed to new replies.