Title: Preview problems still
Last modified: August 22, 2016

---

# Preview problems still

 *  Resolved [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/)
 * Trying to get the embedded preview to work. I’ve read through all the forums 
   and checked the .htaccess file in the mdocs folder (is correct), permissions 
   on mdocs folder are world readable, i don’t have an furl(open) restriction or
   anything like that set to my knowledge. I’ve tried it with my browser both logged
   into my google account and logged out with no difference.
 * – when clicking on the preview icon you get a blank page (no message)
    – when
   clicking on the preview tab it is blank (no message)
 * – when I found the URL being sent to google viewer and try to connect to it with
   my browser, it returns a 500 error from google
 * – when i paste the document portion of the same URL into my browser window (minus
   the google part at the beginning)… it begins to properly download and view the
   PDF
 * Any suggestions on what I should try next? Stumped.
 * Document page (for now) is at [http://www.syccolumbus.org/resources-for-parents/documents-test/](http://www.syccolumbus.org/resources-for-parents/documents-test/)
 * Thanks! Great plugin so far.. shows promise!
 * [https://wordpress.org/plugins/memphis-documents-library/](https://wordpress.org/plugins/memphis-documents-library/)

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/preview-problems-still/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/preview-problems-still/page/2/?output_format=md)

 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478373)
 * If you can try and edit this file mdocs-functions.php:
 * **line 486**
    From this `<iframe class="mdocs-google-doc" src="https://docs.google.
   com/viewer?url=<?php echo $file; ?>&embedded=true" style="border: none;"></iframe
   >` To this `<iframe class="mdocs-google-doc" src="//drive.google.com/viewer?url
   =<?php echo $file; ?>&embedded=true" style="border: none;"></iframe>`
 * **line 488**
    From this `} else return '<iframe class="mdocs-google-doc" src="
   https://docs.google.com/viewer?url='.$file.'&embedded=true" style="border: none;"
   ></iframe>';` To this `} else return '<iframe class="mdocs-google-doc" src="//
   drive.google.com/viewer?url='.$file.'&embedded=true" style="border: none;"></
   iframe>';`
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478375)
 * Also try this goto Setting>Permalinks and press save.
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478392)
 * I’ve done both those… the code is now the new code and i resaved permalinks. 
   But still same result of blank preview area. There has been another change in
   google previews that they now seem to look like:
 * [https://drive.google.com/viewerng/viewer?url=http://www.syccolumbus.org/?mdocs-file%3D1816&mdocs-url=1815](https://drive.google.com/viewerng/viewer?url=http://www.syccolumbus.org/?mdocs-file%3D1816&mdocs-url=1815)
 * THIS works in a new window… if I paste in the URL. It is a link that is the same
   document as the FIRST document on my document page. ([http://www.syccolumbus.org/resources-for-parents/documents-test](http://www.syccolumbus.org/resources-for-parents/documents-test)/)
   The page will eventually have a password, but I removed that in case you want
   to check out the live site.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478394)
 * The problem looks to be the an issue with trying to open a https page from a 
   http. Here is the error that I receive when I visited your site.
 * `Refused to display 'https://drive.google.com/viewerng/viewer?url=http://www.
   syccolumbus.org?mdocs-file%3D1816&mdocs-url=1815&embedded=true&u=0' in a frame
   because it set 'X-Frame-Options' to 'SAMEORIGIN'.`
 * I have tested https to https and preview works. I will keep looking for a solution
   but it doesn’t look good the internets doesn’t like this kind of thing anymore.
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478397)
 * From what I read… google sites in particular don’t like being framed, and you’re
   right, mixing content like this is unwise for security reasons (more so the OTHER
   way around embedding http within https)… how about an option to display the preview
   in a popup window? (and remove the preview tab on the post, but make a link within
   the info somewhere)?
 * I would imagine that most WordPress sites are not https capable or enabled and
   others might have this problem too… assuming this is the issue.
 * but maybe there is another creative code solution?
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478399)
 * Yeah you are right, I need to reconfigure how I load the preview page I just 
   tested my personal site which is not https and I have the same issue as you.
 * I will add this to my expanding list of things to do and try and think of a solution
   asap.
 * Thanks for the report and stay tuned.
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478400)
 * no problem… i don’t really ‘need’ previews, just thought they’d be nice. I think
   there might be an open source pdf display solution you could package.. but that’d
   be only pdf files. Although in my case i just decided to convert any doc files
   to pdf anyway for usability.
 * I’ll just leave previews turned off.
 * Do you prefer bug reports being left here for you? I’ll probably be spending 
   a lot of time with this plugin over the next few days/week and am happy to write
   stuff up as I go, but don’t want to overwhelm you 😉
 * Thanks again for this awesome looking plugin… the documents page does just what
   I wanted (I think!)
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478402)
 * One quick update… in searching around for preview solutions using Google I found
   this WP Plugin that is under active development:
 * [https://wordpress.org/plugins/google-document-embedder/](https://wordpress.org/plugins/google-document-embedder/)
 * If you look at the message on that description and the discussions in the support
   section for the plugin, it seems that Google has made some very recent changes.
   I may try this plugin out just to see if it successfully embeds my documents 
   and if so perhaps you could look at her/his code for an idea of workaround.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478403)
 * Thanks the heads up I will take a look at the plugin.
 * Thanks again and feel free to add more suggestions bugs and other I will get 
   to them when I can
 * Cheers 🙂
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478404)
 * ok.. last post for a while probably.. moving on to other work here till later…
   BUT i installed that plugin and it worked. check out the ‘teachers resources’
   page and i embedded the 1st file (.doc) at the bottom of that page. had to remove
   the .htaccess you had to get it to work.
 * hope this helps. I’ll leave things this way for awhile
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478424)
 * I have the latest?/recent Mdocs update now. Based on the info I’m seeing now 
   with the 2 plugins and difference between them, could it be that the Google viewer
   now requires the actual URL to the file, not the wp/mdocs permalink like you 
   use? Again, you can hit my page and see this in action with a working preview
   below the mdocs section.
 * Mdocs previews still blank. the iFrame URL the plugin is sending to google is
   like this:
 *     ```
       <iframe class="mdocs-google-doc" src="//drive.google.com/viewer?url=http://www.syccolumbus.org?mdocs-file=1800&mdocs-url=1799&embedded=true" style="border: none;"></iframe>
       ```
   
 * the GDE plugin (embedded in the same page at the bottom, same document) is working.
   the iFrame code that GDE embeds looks like:
 *     ```
       <iframe src="//docs.google.com/viewer?url=http%3A%2F%2Fwww.syccolumbus.org%2Fwp-content%2Fuploads%2Fmdocs%2FPlaydateHandout.Spanish.doc&hl=en_US&embedded=true" class="gde-frame" style="width:100%; height:500px; border: none;" scrolling="no"></iframe>
       ```
   
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478425)
 * oops… one note more. kind of important: Google viewer won’t work if there is 
   your default .htaccess in the folder. I deleted that and the viewer then works.
   But mdocs keeps recreating it.
 * I don’t know enough about htaccess syntax to change your default to allow the
   preview external linking to work. I tried changing the file to be simply:
 * Allow from all
 * but that doesn’t work. If I empty the box in your setting page it recreates a
   zero byte .htaccess file which then also breaks Google preview. The only way 
   I’ve found for preview to work is removing the .htaccess file but it always comes
   back after a while.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478442)
 * Thanks for the input I am looking at the Google preview plugin trying to figure
   out the difference, so far no luck. Will let you know if I find anything.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478448)
 * Try the newest version 2.6.13 I think the problem is solved. Let me know.
 *  Thread Starter [bhagemann](https://wordpress.org/support/users/bhagemann/)
 * (@bhagemann)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/preview-problems-still/#post-5478450)
 * OK… so here’s whats going on now. As I mentioned, there seems to be a problem
   with the .htaccess settings in this folder (or in my hosted account i suppose).
 * When I updated mdocs to the 2.6.13 version, it recreates the .htaccess file with
   your defaults.
 * With .htaccess in place,
    1) the google embedder preview fails 2) the mdocs preview
   in the preview tab WORKS! 3) the mdocs preview in a full window (using the magnifying
   glass) fails with the same error message as the google embedder plugin.
 * If I delete the .htaccess file, however,
    1) the google embedder preview works
   great 2) the mdocs preview tab continues to work 3) the mdcos preview fullwindow(
   mag glass) works, but takes a LONG time compared to either of the other 2 previews.
 * You can see this in action on my site now. It currently has the default .htaccess
   in the folder.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/preview-problems-still/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/preview-problems-still/page/2/?output_format=md)

The topic ‘Preview problems still’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memphis-documents-library_91918f.
   svg)
 * [Memphis Documents Library](https://wordpress.org/plugins/memphis-documents-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memphis-documents-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memphis-documents-library/)
 * [Active Topics](https://wordpress.org/support/plugin/memphis-documents-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memphis-documents-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memphis-documents-library/reviews/)

 * 19 replies
 * 2 participants
 * Last reply from: [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/preview-problems-still/page/2/#post-5478504)
 * Status: resolved