• Brad

    (@boechslin)


    Hello,

    Everything seemed to going very well with the plugin, I have uploaded almost 300 documents, and I was going back and checking some of the earlier documents and they’re no longer displaying.

    I uploaded them to document revisions in the end of January, middle of February. As far as I can tell, all of the more recent documents are working. Even if I go into the ‘documents’ section, go directly to the document, and click ‘view’ it doesn’t work.

    Any ideas?

    The error message is:

    Not Found
    Sorry, but the page you were trying to view does not exist.
    It looks like this was the result of either:

    a mistyped address
    an out-of-date link

    https://wordpress.org/plugins/wp-document-revisions/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Brad

    (@boechslin)

    As an update, I checked the upload folders on the WP server and the files seem to be missing. I certainly didn’t delete the files, is there any setting that I might have missed that could explain why the files were deleted from my ‘uploads’/’2015’/’01 folder?

    threemcc

    (@threemcc)

    Look in database for the filename that wp document revisions would have used.

    In your theme function file add the following

    if($r = $wpdb->get_results("SELECT meta_value FROM ".$wpdb->postmeta." WHERE meta_key='_wp_attached_file';"))
    		echo '<pre>'.print_r($r,true),'</pre>';

    Then reload your admin interface to get a dump of all the filenames and relative path upload path… once you see the dump you can comment out the code above… just don’t reload.

    Mine returns:

    Array
    (
        [0] => stdClass Object
            (
                [meta_value] => 2015/02/0db560200ec202737130ac36ff6b3769.doc
            )
    
        [1] => stdClass Object
            (
                [meta_value] => 2015/02/9053bd318ff6cb81ff895c9d137f83c7.doc
            )
    ...
    )

    If this is a multisite install, then the actual directory will be:
    /wp-content/uploads/sites/<site id>/<year>/<month>/<filename>.<ext>

    Now look for the files again, just to be sure that you are looking in the right place. We are also assuming that you didn’t override this using the general/network setting.

    If you find the files, then check for the “Document Upload Directory” setting in your general/network settings to be sure that it didn’t default to something… If that field has something odd in it, then follow what I wrote to do here:
    https://wordpress.org/support/topic/broken-and-unable-to-resolve-issue-myself-at-this-time?replies=7

    Otherwise, I have no idea what happened… I’ve had WPDR do some weird things, but deleting files isn’t one of them… I am guessing they are misplaced or became unlinked by a revision cleaning or WordPress db optimization utility type thing maybe… just a guess.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Documents No Longer Viewable’ is closed to new replies.