Recently I imported several blogs into a WordPress multisite installation (using sub-directories, not sub-domains).
The error was caused by the method YapbImage::systemFilePath() when it tried to _combinePaths(). E. g. it could not combine the following pathes:
$full_path = /var/www/vhosts/zett42.de/httpdocs/wp-content/blogs.dir/4/files $uri = photoblog/files/2012/07/mypic.jpg
This is because for the multisite feature, one uses a rewrite rule in .htaccess to map the virtual site directories to the physical pathes.
The fix will remove the site sub folder from the $uri path, in my example “photoblog”. It has only been tested for multisite using sub-directories. Please drop a comment if it works for sub-domains too.
In ” lib\YapbImage.class.php”, function systemFilePath(), insert the highlighted code.
// Remove site sub folder so _combinePaths() will work if (is_multisite()) $uri = strstr($uri, '/'); // Return result return YapbImage::_combinePaths($full_path, $uri);
WordPress version: 3.4.1
YAPB version: 1.10.9