Upload limit increase breaks links (13 posts)

  1. ianp63
    Posted 3 years ago #

    I just increased my multisite file upload limit in 'network settings', and got this warning message :-
    "Document upload directory changed, but existing uploads may need to be moved to the new folder to ensure they remain accessible."

    I've used 'WP Document Revisions' plugin to upload several PDF's, which I can see in folder location...wp-content/blogs.dir/2/files/2012/03 , along with several long alphanumeric .pdf filenames in ......files/2012/04 .

    Problem is all my links to those files seem to be broken and I don't know where to move any of the files to correct those links (as suggested in the message). I can't access the files in the plugin either, so will I have to upload them all again?


  2. That's an issue with the plugin.

    Do you even know if WP Document Revisions is Multisite okay?

  3. ianp63
    Posted 3 years ago #

    Yes, I found this on the plugin page :-
    "Will in work with WordPress MultiSite
    Yes! Each site can have its own document repository (with the ability to give users different permissions on each repository), or you can create one shared document repository across all sites."

  4. It looks like they just didn't take that into account, somehow, though I'm not sure how the upload LIMIT would do that. You didn't also change the directory at the same time, did you?

  5. ianp63
    Posted 3 years ago #

    I changed the 'site upload space' setting and the 'Max upload file size' setting, but didn't move anything around.

    I looked for the 'new folder' mentioned in the warning message, but
    I can't move them as it doesn't identify the 'new' folder where they need to go. Would have expected the documents to be in the upload folder, but I'm guessing the plugin stores them securely in the blogs.dir folder.

    I've asked on the plugin site, but if I don't get an answer from the author I think I'll just have to start the uploading again. Not the end of the world! Thanks anyway.

  6. The main site is in wp-content/uploads

    All subsites are in wp-content/blogs.dir

    That's as it's always been :)

    Why the plugin should bork out when you changed upload space and max file size makes no sense. I didn't see any calls to it in their code.

  7. Ben Balter
    Posted 3 years ago #

    Figured out what's going on, and will have a fix out shortly.

    In the mean time, if you delete the global option document_upload_directory directly from the database (just remove the row completely), your documents should be accessible again (it will return to the default directory).

    My guess is that the location field auto propegated with a bad value, which hitting save on the page then stored. Will fix.


  8. ianp63
    Posted 3 years ago #

    Many thanks for the reply Benjamin.
    I've not done any work on databases yet, so I'm not sure where to look.

  9. It would be in the table wp_x_options, where X is the ID of the blog haveing the problem.

    If it's your main site, it's wp_options.

    If it's your second site, it's wp_2_options and so on.

    If you don't know the site IDs, use this: http://halfelf.org/hacks/site-id-columns-multisite/

  10. ianp63
    Posted 3 years ago #

    Sorry, now I don't understand why I can't find any wp_x_options! Logged in as Super Admin, but can't see any tables anywhere in the settings menus.

    Also, may be unecessary for just 2 sites?, but as per the site-id link I added wp-content/mu-plugins/wp-site-ids.php with the code supplied, and got a page full of errors like this when logging out:-
    Warning: Cannot modify header information - headers already sent by (output started at /home/ipswi962/public_html/wp-content/mu-plugins/show-site-ids.php:32) in /home/ipswi962/public_html/wp-login.php on line 349

  11. You probably have blank lines outside the <?php and ?> at the begining and end of the file.

    You have to log in to your DATABASE, not your site. Go in to your server's control panel and open up phpMyAdmin.

  12. ianp63
    Posted 3 years ago #

    Ok, thanks. Found that database and deleted line 'upload_path' which was set to blogs.dir/2/files/2012/04 (there was no entry called document_upload_directory) , but it hasn't restored the links so I think I should delete the contents of those blogs.dir/..../03 and 04 folders and upload the documents again. I think that will be quicker for me in the long run.

  13. Ben Balter
    Posted 3 years ago #

    document_upload_directory is actually going to be in your wp_sitemeta table it turns out. If you delete that, it should fix the problem.

    I found the underlying issue (my apologies for the trouble), and will be pushing a new version of the plugin soon. I believe you will still have to delete that one option from your sitemeta table to fix the problem, but it will not recreate itself going forward.

Topic Closed

This topic has been closed to new replies.

About this Topic