Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2012.5, 4.4.0
-
None
Description
You have 1 eZ Installation with several Projects.
Every Project has an own DB and a separate var Volder
var/projectA/cache
var/projectB/cache
Every Project has an own extension where the siteaccesses are located. In this sitaccesses the VarDir is defined.
The Problem is, that the expiry.php is stored in the global cache folder
var/cache/expiry.php and not in var/porject/cache/expiry.php !!!
So 1 file is used for all projects. If project A is clearing the cache e.g. image-alias all image-aliases are expired for all other projects on that installation!!!!
To fix that the eZExpiryHandler::instance(); should be reset after the siteacess is changed to use the correct VarDir.
This can be done in
kernel/classes/ezsiteaccess.php change()
...
unset( $GLOBALS['eZExpiryHandlerInstance'] );
...
static function change( array $access, eZINI $siteINI = null ) { $name = $access['name']; $GLOBALS['eZCurrentAccess'] =& $access; if ( $siteINI !== null ) { $ini = $siteINI; } else { $ini = eZINI::instance(); } $ini->prependOverrideDir( "siteaccess/$name", false, 'siteaccess', 'siteaccess' ); /* Make sure extension siteaccesses are prepended */ eZExtension::prependExtensionSiteAccesses( $name, $ini ); $ini->loadCache(); // ###JAC_PATCH_G_47_EZ_4.4.0### // multisite-hosting: CLEAR image-alias CACHE for project A also clear cache for all other projects on the same ez installation unset( $GLOBALS['eZExpiryHandlerInstance'] ); // change some global settings if $siteINI is null if ( $siteINI === null ) { eZSys::clearAccessPath(); if ( !isset( $access['uri_part'] ) || $access['uri_part'] === null ) { if ( $ini->hasVariable('SiteSettings', 'SiteUriParts') ) $access['uri_part'] = $ini->variable('SiteSettings', 'SiteUriParts'); else if ( isset( $access['type'] ) && $access['type'] === eZSiteAccess::TYPE_URI ) $access['uri_part'] = array( $access['name'] ); else $access['uri_part'] = array(); } eZSys::setAccessPath( $access['uri_part'], $name ); eZUpdateDebugSettings(); eZDebugSetting::writeDebug( 'kernel-siteaccess', "Updated settings to use siteaccess '$name'", __METHOD__ ); } return $access; }