WordPress.org

Ready to get started?Download WordPress

Forums

Google Doc Embedder
[resolved] No content in iframe (7 posts)

  1. marketingwc
    Member
    Posted 9 months ago #

    The plugin has been working great until all of a sudden it stopped showing its content.
    Looking at the code and this is all that shows up. No content at all.

    <iframe src="http://docs.google.com/viewer?url=https%3A%2F%2Fgreenmethods.com%2Fwp-content%2Fimages%2FAndersoni-A.pdf&embedded=true&hl=en" width="600" height="720" style="border: none;">
    #document
    <html><head></head><body></body></html>
    </iframe>

    Here is the specific webpage for reference. https://greenmethods.com/product/amblyseius-andersoni-spider-mite-predator-25000-sachets/

    Thanks!

    http://wordpress.org/plugins/google-document-embedder/

  2. k3davis
    Member
    Plugin Author

    Posted 9 months ago #

    This is an easy fix; just change your document link to https to match the protocol of your parent page. See the third bullet in this section for more thorough explanation:

    http://www.davistribe.org/gde/notes/#linkonly

  3. marketingwc
    Member
    Posted 9 months ago #

    Thank you for your quick response!

    That totally makes sense!
    However..., this is the link that I use.
    [gview file="https://greenmethods.com/wp-content/images/Andersoni-A.pdf"]

    and this is what comes out.

    <iframe src="http://docs.google.com/viewer?url=https%3A%2F%2Fgreenmethods.com%2Fwp-content%2Fimages%2FAndersoni-A.pdf&embedded=true&hl=en" width="600" height="720" style="border: none;">
    #document
    <html><head></head><body></body></html>
    </iframe>

    So somewhere its stripping the "S" off the https.

    What are your thoughts?

  4. k3davis
    Member
    Plugin Author

    Posted 9 months ago #

    You are right, the standard viewer is hardcoded to use http rather than https. This is an oversight that I'll correct in a future patch.

    To confirm this you can manually edit the gviewer.php file on line 245 where it currently reads:

    $lnk = "http://docs.google.com/viewer?url=" . urlencode( $links[0] ) . "&hl=" . $lang;

    to read:

    $lnk = "//docs.google.com/viewer?url=" . urlencode( $links[0] ) . "&hl=" . $lang;

    If you're able to make that adjustment (you can do so from the plugin editor within wordpress, if you wish), let me know if it works for you.

  5. marketingwc
    Member
    Posted 9 months ago #

    This worked!

    Thank you so much!

  6. k3davis
    Member
    Plugin Author

    Posted 9 months ago #

    Great, I'll be sure to include that patch in the next update. Thanks for pointing out the issue.

    Kevin

  7. k3davis
    Member
    Plugin Author

    Posted 8 months ago #

    This fix was included in GDE 2.5.9 and doesn't need to be manually applied anymore.

Reply

You must log in to post.

About this Plugin

About this Topic