• forum1nick

    (@forum1nick)


    I have problem with generated URL path:
    <network_root>/wp-content/uploads/sites/<site_id>/sites/<site_id>/

    two time add sites/<site_id>

    Your solution from June 12. 2019:

    And to summarise, changing “Upload Path” value from:
    /<full_path>/wp-content/uploads/sites/3
    to:
    /<full_path>/wp-content/uploads
    should fix this issue.

    Not work for me ??
    Can you help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author erolsk8

    (@erolsk8)

    I’d have to set up a multisite installation to try it out. I’ll let you know once I find some time to do that.

    Plugin Author erolsk8

    (@erolsk8)

    Hey @forum1nick, sorry for the late reply, I guess you probably found some solution or workaround already. But here is what I found, it might be useful for someone else with these issues.

    So I didn’t find anything I can fix in this plugin, and normally, you don’t even need to change “Upload Path” (e.g. with define(‘UPLOADS’, ‘wp-content/uploads’);) since it works fine with the default configuration.

    I tested this plugin again with multiple sites in multisite network and with files in various folder structures and it’s always scanning and importing without a problem. That was with WordPress 5.2.1, then I updated to 5.5.3 and it also works.

    But in order to test this, I had to move my multisite WordPress installation to a new computer and under a different path. Doing that, I noticed that WordPress remembered the old path, for only 1 Site (“sub-site”). So for that site only, on the initial screen of this plugin, I had this path:

    
    /full/old/path/wp-content/uploads/sites/3
    

    instead of the correct one:

    
    /wp-content/uploads/sites/3
    

    I found out that’s because I had this row in wp_3_options database table:

    
    +---------+--------------+-----------------------------+--------+
    |option_id|option_name   |option_value                 |autoload|
    +---------+--------------+-----------------------------+--------+
    |428      |upload_path   |/old/path/wp-content/uploads |yes     |
    +---------+--------------+-----------------------------+--------+
    

    And when I tried the “native” WordPress Media Library uploader – it didn’t work properly, because it uploaded my file to that old path. So in this scenario, even WordPress itself is broken, with nothing to do with this plugin.

    I couldn’t find where to edit that path from WP, because it seems like WP removed that option at some point.
    So I solved that by adding this to wp-config.php:

    
    define('UPLOADS', 'wp-content/uploads');
    

    Removing that upload_path option from the database should also work, but I didn’t try it.

    By the way, I don’t see how you tried to solve this, what exactly did you do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with Multisite WordPress’ is closed to new replies.