At the Business plan level on Pantheon, image paths and paths to extension files don't work as expected.

The symptom is that in DEV and TEST things seem to work okay, but in LIVE, where there are two app servers with separate bindings, the bindings configuration / server environment causes the paths to be broken: images don't load, and any installed extension throws an error like this:

"Error loading module file (srv/bindings/[some binding number]/code/sites/all/extensions/[extension php file]). Please restore the file or disable the module."

Refreshing the page will always result in the same error, but sometimes displaying one binding number and sometimes displaying the other.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kreynen’s picture

The image paths should be managed with settings in the civicrm.settings.php, but this may be another issue where caching that value causes issues. While we continue to update the defaults for civicrm.settings.php in #2082713: Filename of civicrm.settings.php.tpl changed to civicrm.settings.php.template in CiviCRM 4.4, existing sites have to follow the manual process described in https://www.drupal.org/node/2031763 to update and/or add settings. Once civicrm.settings.php is created, the web service user can no longer make changes to the file.

Addressing #2322187: Update Setting-Upload Directories Help Message would help keep Pantheon users pointed in the right direction, but I haven't had time to address that. Just added some pointers to how someone could address it if they have some time, but I can't do more than review patches for a few months.

The patches required to force CiviCRM to use uncached values in the paths to extensions are really minimal, but we need more testing of these changes in both larger and smaller Pantheon configurations before making this the default for all Pantheon instances. While forcing CiviCRM to skip the cached path with a specific binding is required for the multiple app server configuration of a Business level configuration, it may cause performance problems on configurations with fewer resources. If that is the case, we'll likely need to add a line to civicrm.settings.php about whether or not to use the cached patches.

kreynen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nubeli’s picture

Status: Closed (fixed) » Needs work

I don't entirely understand this patch. CRM_Core_Config::singleton(FALSE) doesn't seem to avoid it from first attempting to load from cache. Around line 185 from CRM/Core/Config.php:

     // first, attempt to get configuration object from cache
      $cache = CRM_Utils_Cache::singleton();
      self::$_singleton = $cache->get('CRM_Core_Config' . CRM_Core_Config::domainID());

Maybe I'm missing something. The rest of the patch makes sense to me.

nubeli’s picture

Updated patch for CiviCRM 4.6

nubeli’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.