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.
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.