Hi Myar, We haven’t done much multisite testing. I’ll have a play and see if we can fix this.
Thread Starter
Myar
(@myar)
That would be great! I can not use the plugin now. But I did not found any other minify plugin, that works correctly with multisite. And your plugin is the best minify plugin I found so far, please fix it. 🙂
Hi,
I completely agree with Myar… I was very happy with this plugin, until I activated it on the second (sub folder) domain… Are you still planning to make this plugin multisite? I also did not find a better one which actually works!
I, I have installed and updated the plugin for Network pages, this works for us now.
I had to extend the code a little bit in order for it to load the correct resources. Right above the file_get_contents() commads I used code like this:
// check path
if(!is_file($this->root.$style_path)){
$style_path = str_replace($this->wordpressdir, '', $style_path);
if(!is_file($this->root.$style_path)){
$this->root = str_replace($this->wordpressdir, '', get_bloginfo('url'));
}
} else {
$this->root = $_SERVER['DOCUMENT_ROOT'];
}
I can provide you with the files if you like. Also, I added the following code to make it work better with MU in wp-config.php:
define('MMR_CACHE_DIR', ABSPATH.'wp-content/cache/min/'.$_SERVER['HTTP_HOST']);
define('MMR_CACHE_URL', '//'.$_SERVER['HTTP_HOST'].'/wp-content/cache/min/'.$_SERVER['HTTP_HOST']);
Cheers, Noël
Thread Starter
Myar
(@myar)
Hi!
Where did you add the code above?
Hi, here is a copy of the file:
https://gitlab.com/snippets/32418
Search for // check path
Lines:
https://gitlab.com/snippets/32418#L435
https://gitlab.com/snippets/32418#L597
https://gitlab.com/snippets/32418#L753
https://gitlab.com/snippets/32418#L913
You could also add the dynamic host configuration for the cache folder yourself. BTW, congrats on the plugin, it’s the one that worked best on my setup with multisite and other minify-concat components.
Liebe Grüsse 😉
Ps. Disabling of minify & concat in the backend doesn’t seem to have an effect…
Pps. Could give you access an our Cloud-Developer-Plattform to see it live…
-
This reply was modified 9 years, 10 months ago by
leonartboss.