Details
-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 4.4.14, 4.5, 4.6
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
==Problem==
Currently when server paths change, CiviCRM has failures because it is still calling the cached version of those absolute paths. In many use cases this is a minor inconvenience because one can manually clear the cache. But on servers such as Pantheon (and possibly Platform.sh) where the server paths change dynamically to deal with server instability or cloning the site, CiviCRM just can't keep up. The result can be lots of 502 Gateway errors and other failures. As far as I can tell CiviCRM calling an incorrect server path is the single biggest point of failure.
Wordpress / Drupal don't have this issue on Pantheon because their code registry & caching stores relative paths, which don't change when the site root changes.
Background: http://forum.civicrm.org/index.php/topic,36505.0.html
==Possible solution==
Could CiviCRM config work fine if we stored relative paths and built the absolute path dynamically on each call?
(My current hack is to just skip the cache when calling config, which seems to work fine, though I can see that just focusing a fix on storing relative paths instead of absolute paths in cache as a better option.)