Title: problems with preview
Last modified: August 31, 2016

---

# problems with preview

 *  Resolved [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/)
 * I just uploaded to the latest version and now have problems with preview. The
   following appears in the Preview window multiple times. Could this be a consequence
   of the latest revision or some other glitch?
 *  <div class=”error” style=”clear:both;”>
    <div id=”mdocs-error”> <p><b>Memphis
   Error: </b>Something when wrong, and your download has failed.</p> </div> </div
   >
 * <b>Warning</b>: Cannot modify header information – headers already sent by (output
   started at /home/geogra19/library.ssiwatersheds.ca/wp-content/plugins/memphis-
   documents-library/mdocs-functions.php:351) in <b>/home/geogra19/library.ssiwatersheds.
   ca/wp-content/plugins/memphis-documents-library/mdocs-downloads.php</b> on line
   <b>46</b>
 * [https://wordpress.org/plugins/memphis-documents-library/](https://wordpress.org/plugins/memphis-documents-library/)

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

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

 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394088)
 * try this to see if preview will work, open the file mdocs-downloads.php and change
   this:
 *     ```
       } elseif($is_google == false || $is_box_view == false) {
       		mdocs_errors(__('Something when wrong, and your download has failed.'), 'error');
       	}
       ```
   
 * to this
 *     ```
       }
       ```
   
 * let me know what you see.
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394100)
 * When I navigate to the website I now get this error message:
 * Parse error: syntax error, unexpected ‘}’ in /home/geogra19/library.ssiwatersheds.
   ca/wp-content/plugins/memphis-documents-library/mdocs-downloads.php on line 64
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394102)
 * change it back to the original
 * You must have deleted too many }
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394105)
 * I have done but am still getting a syntax error.
 * Here is the string . . .
 * } elseif(isset($_GET[“mdocs-file”])) {
    $the_mdoc = get_the_mdoc_by($_GET[“mdocs-
   file”], ‘id’); $is_allowed = mdocs_check_file_rights($the_mdoc, false); $filename
   = $the_mdoc[‘filename’]; $file = $upload_dir[‘basedir’].’/mdocs/’.$filename; **}
   elseif($is_google == false || $is_box_view == false) { mdocs_errors(__('Something
   when wrong, and your download has failed.'), 'error'); } // COUNT THE DOWNLOAD
   if($is_allowed && !isset($_GET[‘mdocs-export-file’]) && !isset($_GET[‘mdocs-version’])&&
   $is_box_view === false && $is_google === false) { $mdocs[$the_mdoc[‘index’]][‘
   downloads’] = intval($mdocs[$the_mdoc[‘index’]][‘downloads’])+1; mdocs_save_list(
   $mdocs);
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394108)
 * Everything looks fine, copy this:
 *     ```
       // CHECK TYPE OF DOWNLOAD
       	if(isset($_GET['mdocs-export-file']) ) {
       		$is_allowed = mdocs_check_file_rights(null, false);
       		$filename = basename($_GET['mdocs-export-file']);
       		$file = sys_get_temp_dir().'/'.$filename;
       	} elseif(isset($_GET['mdocs-version']) ) {
       		$the_mdoc = get_the_mdoc_by(basename($_GET['mdocs-file']), 'id');
       		$is_allowed = mdocs_check_file_rights($the_mdoc, false);
       		$file = basename($_GET['mdocs-version']);
       		$filename = substr(basename($_GET['mdocs-version']), 0, strrpos(basename($_GET['mdocs-version']), '-'));
       	} elseif(isset($_GET["mdocs-file"])) {
       		$the_mdoc = get_the_mdoc_by($_GET["mdocs-file"], 'id');
       		$is_allowed = mdocs_check_file_rights($the_mdoc, false);
       		$filename = $the_mdoc['filename'];
       		$file = $upload_dir['basedir'].'/mdocs/'.$filename;
       	} elseif($is_google == false || $is_box_view == false) {
       		mdocs_errors(__('Something when wrong, and your download has failed.'), 'error');
       	}
       ```
   
 * if all else fails download mDocs and FTP into your site and overwrite the file.
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394113)
 * I overwrote the file and now have access to the site. The Preview problem remains.
   I Just uploaded a trial document to see if it was only existing files that were
   affected but new uploads also show the problem. I’ve very few other plugins and
   haven’t updated the theme lately so am at a loss as to how to resolve.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394131)
 * The error is occurring because for some reason the preview get trigger is not
   firing. There are a number of reasons that this could be happening and it can’t
   be narrowed down from this error.
 * More than likely it is a server configuration that is previewing the get request
   from firing.
 * Open a browser debugger an make sure you don’t see any javascript errors.
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394187)
 * The error console shows a couple items but no javascript errors.
 * ‘Failed to load resource: the server responded with a status of 404 (HTTP/2.0
   404) ‘
 * ‘WebSocket connection to ‘wss://public-api.wordpress.com/plugin/wpcom/me/newest-
   note-date” failed: Unexpected response code: 403. ‘
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394191)
 * What preview are you using google or box?
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394192)
 * Google
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394193)
 * Box are no longer accepting new sign ups to View API.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394194)
 * hmmm….
 * Can we test code again
 * let go back to this:
 *     ```
       } elseif($is_google == false || $is_box_view == false) {
           mdocs_errors(__('Something when wrong, and your download has failed.'), 'error');
       }
       ```
   
 * and change it to this:
 *     ```
       } elseif($is_google == false || $is_box_view == false) {
           //mdocs_errors(__('Something when wrong, and your download has failed.'), 'error');
       }
       ```
   
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394196)
 * That did the trick. Thank you.
 *  Thread Starter [George](https://wordpress.org/support/users/trustgovernance/)
 * (@trustgovernance)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394197)
 * Should have marked this resolved.
 *  Plugin Author [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * (@bhaldie)
 * [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/#post-7394198)
 * so preview is working now?

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

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

The topic ‘problems with preview’ 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/)

 * 17 replies
 * 2 participants
 * Last reply from: [bhaldie](https://wordpress.org/support/users/bhaldie/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/problems-with-preview-3/page/2/#post-7394210)
 * Status: resolved