• Resolved iHuman

    (@ihuman)


    I had a problem with downloads not working correctly on multisite installations. Instead of the files downloading, they would open in a new browser tab.

    From other posts, selecting ‘force download’ should resolve the problem.

    But in multisite installations, this does not work, and instead returned “Download path is invalid!”

    So I got in the code and tried to debug it. This is what worked for me:

    1. edit download.php
    2. around line 524 you will see:

    $patterns = array( '|^'. get_bloginfo('wpurl') . '/' . '|');
    $path = preg_replace( $patterns, '', $thefile );

    3. add the following lines directly below this:

    //for multisite	installations
      if ( is_multisite() ) {
       $path = '/wp-content/blogs.dir/' . $blog_id . '/' . $path;
     }

    This resolved the problem for me. Hope it works for you – and I hope the developer adds this as a permanent fix!

    good luck,
    elaine

Viewing 4 replies - 1 through 4 (of 4 total)
  • thanks for this solutions 🙂

    Thanks for posting your solution iHuman! I had the same problem with my Multi Site install.

    Unfortunately I still have an issue with the Custom Download URL, when I try to use that option I get a ‘page cannot be found’ error.

    Have you managed to get this working?

    I’ve used download manager for quite some time without issue. I did a presentation today for about 100 people and told them they could go to my website to download the PowerPoint file. Then I received emails from the attendees saying the file wouldn’t download. It exists, the entry was correct, I checked .htaccess and was pointing to my master domain. I’m running A WordPress multisite system with 6 sites and six different domain names. The master domain worked without incident.

    I compared the configuration of the master domain and secondary domain. The secondary domain was configured a little differently, so I configered them identically. I even added the code recommended above to download.php.

    Now here is where it gets strange. All the files that were listed in both domains would download. The file that I had entered into the database on my secondary domain only would not download. When I entered the record into download manager on the primary domain, the secondary domain downloaded just fine.

    I want to have different files available for download on different domains. I don’t want to add them to my primary domain every time I add a new file to my secondary domain. Is there any workaround to this?

    Chais Meyer

    (@meyerthreedotinccom)

    Thanks so much for the multisite solution iHuman!

    I’m happy to owe you a coffee!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WordPress Download Monitor] Download Monitor on multisite wordpress installations’ is closed to new replies.