You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a well functioning subdomain type multisite multilingual (9 language) Grav system.
The only problem is updating the plugins.
The good solution here in this system was that all sites (in the multisite system) use a common set of plugins and templates.
This can be set up nicely by specifying streams in the setup.php
In the Grav Core there is a Temporarily fix for using multisites in system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php
in AbstractPackageCollection constructor from line 58-62.
// Temporarily fix for using multisites
if (isset($data['install_path'])) {
$path = preg_replace('~^user/~i', 'user://', $data['install_path']);
$data['install_path'] = Grav::instance()['locator']->findResource($path, false, true); //Overwrite the $data['install_path']
}
This Temporarily fix is suitable for the such type of setup where all of the sites has own plugin setup instead of the common.
It would be good to use a condition which type of multisite setup applied in the system.
One of the ways (may it is not the best) to apply a condition is read from setup.php some data related to the plugins (common or own for every sites).
$this->fetch($refresh, $callback);
+ //Get schemes defined in setup.php -> To make possiblity to use different multisite setups
+ $schemes = Grav::instance()['locator']->getSchemes();
foreach (json_decode($this->raw, true) as $slug => $data) {
// Temporarily fix for using multisites
if (isset($data['install_path'])) {
- $path = preg_replace('~^user/~i', 'user://', $data['install_path']);
- $data['install_path'] = Grav::instance()['locator']->findResource($path, false, true);
+ $path = preg_replace('~^user/~i', 'user://', $data['install_path']);
+ if (!in_array("pluginupdates", $schemes)) {
+ $data['install_path'] = Grav::instance()['locator']->findResource($path, false, true);
+ }
}
$this->items[$slug] = new Package($data, $this->type);
}
Or any other way that can be used for the condition overwrite of the $data['install_path'] variable.
If this small modification is not there in the core then after every Grav update I need to hack the 'system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php' to put back the plugin update folder place.
The text was updated successfully, but these errors were encountered:
I have a well functioning subdomain type multisite multilingual (9 language) Grav system.
The only problem is updating the plugins.
The good solution here in this system was that all sites (in the multisite system) use a common set of plugins and templates.
This can be set up nicely by specifying streams in the setup.php
In the Grav Core there is a Temporarily fix for using multisites in system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php
in AbstractPackageCollection constructor from line 58-62.
This Temporarily fix is suitable for the such type of setup where all of the sites has own plugin setup instead of the common.
It would be good to use a condition which type of multisite setup applied in the system.
One of the ways (may it is not the best) to apply a condition is read from setup.php some data related to the plugins (common or own for every sites).
Or any other way that can be used for the condition overwrite of the $data['install_path'] variable.
If this small modification is not there in the core then after every Grav update I need to hack the 'system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php' to put back the plugin update folder place.
The text was updated successfully, but these errors were encountered: