• Hi guys,

    Just wanted to report a bug in the uploading of photos via Ultimate Member on a Multi-site installation. It’s a strange one that had me head scratching for a while but tracked it down and believe I’ve fixed it.

    It started when I first uploaded an image and noticed there was an error in the console (censored obviously):

    <b>Warning</b>: imagejpeg(): Unable to open ‘/nas/content/live/blahultimatemember/temp/Y5ciOyAW1eHuk1qWTv9g6b8lO0kB0YSZVoyZ3Qi5/stream_photo_47b05d45f58609d4f2674b20f31bedaa_57f772644dd81.jpg’ for writing: No such file or directory in <b>/nas/content/live/blahsites/wp-content/plugins/ultimate-member/core/um-files.php</b> on line <b>231</b><br />
    [\”http:\\/\\/blah.com\\/wp-content\\/uploads\\/ultimatemember\\/temp\\/Y5ciOyAW1eHuk1qWTv9g6b8lO0kB0YSZVoyZ3Qi5\\/stream_photo_47b05d45f58609d4f2674b20f31bedaa_57f772644dd81.jpg\”]”

    I figured it was a host issue but after contacting them they said ‘/nas/content/live/blahultimatemember/’ wasn’t a folder which had me looking at the URL and instantly thought it must be a ‘/’ missing and tracked it down to your “um_upload_basedir_filter” filter.

    The root of my server is named “/nas/content/live/blahsites/wp-content/….” and after looking at your filter it seems to be splitting the URL up by ‘sites/’ which would make logical sense as for most sites it would be fine however in my set up, there were two mention of ‘sites/’….

    ‘/nas/content/live/blahsites/wp-content/uploads/sites/2’

    I changed the code in um-filters-files.php line 14 & 15 from…

    $split = explode(‘sites/’,$dir);
    $um_dir = ‘ultimatemember/’;

    to…

    $split = explode(‘/sites/’,$dir);
    $um_dir = ‘/ultimatemember/’;

    and it created the correct URLs!

    I’ve made the change manually and seems to be working so far. Is this something that could be patched in the next update?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘[Bug] Upload Issue on Multisites’ is closed to new replies.