WordPress.org

Ready to get started?Download WordPress

Forums

Google Doc Embedder
[resolved] Embedding HTTP / HTTPS source dynamically (7 posts)

  1. Clifford Paulick
    Member
    Posted 1 year ago #

    I tried this code
    [gview file="//www.ok.gov/OREC/documents/Contract%20Info%20Pamphlet%20(11-2012).pdf"]
    Notice the // instead of http:// or https://

    Ideally, if the page loads via HTTP, it should load the PDF via HTTP, and if the page loads via HTTPS, the PDF source should be HTTPS.

    I'm posting here because this code didn't work, even after I changed the GDE Settings "File Base URL" to be blank.

    I think this would be a good feature, since the PDF loads via iframe src and an HTTP PDF on a HTTPS page would show an "insecure" warning.

    Thank you for this plugin.

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

  2. k3davis
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Clifford,

    This is an easy fix on my part and I will be sure to add it to the final GDE 2.5 release (hopefully this week). In the meantime you can bypass this by turning off GDE's error checking. The method for doing so varies by version (2.4.x or 2.5) but in general look for "advanced" options and you'll find it there. Let me know if you need more help.

    Thanks for the suggestion.

    Kevin

  3. Clifford Paulick
    Member
    Posted 1 year ago #

    I updated and it worked. Thanks!

    However, when I updated, I got the error "GDE Error: Unable to load profile settings"
    I went into Network Settings (because it's a Multisite) and Network Deactivated and then Network Activated and it worked again.

    Also, I installed the plugin on a few other sites and noticed that the initial activation sets it to use the Enhanced Viewer, which didn't work on any of the sites I installed it on, but the Standard Viewer did work for all of them.

    Enhancement Idea: fallback to HTTP if HTTPS errors out (for pages loaded as HTTPS but pulling a document from a site that doesn't have an SSL certificate)... it's better to load via HTTP than not at all (worse yet, it displays "GDE Error:", ick).

    Thanks again!

  4. k3davis
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Clifford,

    The initial activation on a clean install should not use the Enhanced Viewer. The only reason the default profile should be configured to use the Enhanced Viewer is if 1) the default profile (literally, the one named "default") couldn't be created for some reason, or 2) you're upgrading from GDE 2.4.x and you had the Enhanced Viewer set there. If you found this NOT to be the case, I'd be interested in seeing a log of the issue.

    The dynamic loading of http/https doesn't work well in cases where you're loading outside documents that don't support SSL. This will need to be more robust in the future. Obviously, if you know you're pulling from a site without a cert, it's better just to declare your protocol explicitly rather than dynamically. But hopefully this functionality can still be improved in the future.

    Thanks for your feedback,

    Kevin

  5. Clifford Paulick
    Member
    Posted 1 year ago #

    I emailed it. Thanks.

  6. k3davis
    Member
    Plugin Author

    Posted 1 year ago #

    Clifford,

    Could you resend? I never received it. (checked spam folder also)

    Thanks.

  7. Clifford Paulick
    Member
    Posted 1 year ago #

    Manually emailed it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags