• I contend that recent changes to how WP now deals with upload_path and upload_url_path in core – causes an incorrect path result when working with a blog created using the add_network function in this plugin.

    Core automatically adds /sites/## (where ## is the blog id) to the directory path (in _wp_upload_dir). The plugin currently updates these two blog options with uploads/sites/## – which is then compounded by _wp_upload_dir making for some crazy urls – e.g. sites/##/sites/## …

    I believe that leaving the two blog options empty will correct the issue. (at least that fixes it for my site(s))

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello, how did you solve this problem?

    Thread Starter transom

    (@transom)

    I just cleared the options for each site to fix existing sites – I patched the code in the plugin to not update the option (in the add_network function) – I can look up the code if need be.

    I haven’t had this problem yet, but if I do, I’ll write to see how you solved it, thank you very much ??

    So glad it’s not just me having this problem!

    My solution has been the same – to go to My Sites->Network Admin->Sites, click on the site and then click Settings, and either set upload-path and upload-url-path to blank, or remove the sites/xxx from the end.

    The odd thing in my case, is I have some sites that are about 7 years old that still have the blogs.dir/xx/files structure and they work fine, but some news ones got the blogs.dir/xxx/files/sites/xxx structure. I’m guessing there must be an option_name in wp_xxx_options that tells WordPress to use the old blogs.dir structure but I can’t for the life of me figure it out!

    I found this comment on stutter, but I still can’t find where “the ms_files_rewriting option is explicitly set on the new network”.

    By the way, the section in the code that adds the sites/xxx onto the end of the path is here.

    @johnjamesjacoby is there an updated version of WP Multi Network in the works?

    As Triple J is currently working full time on Core, Documentation and Meta, are @flixos90 , @rmccue , or @spacedmonkey aware of the issue? (Sorry to spam you guys!)

    • This reply was modified 1 year, 4 months ago by thejasonator. Reason: Added other developers
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creation of upload_path & upload_url_path’ is closed to new replies.