Details
-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 4.4.0
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
Description
<h2>Problem</h2>
We recently had to move (for emergency) a number of civicrm+drupal sites to a different server, where they had a different location in the filesystem.
This already requires some steps on the Drupal side that are easy to forget: Esp,
- new database credentials (that's an obvious one we don't usually forget)
- setting the correct filesystem permissions (sites/default/files)
- setting the private files dir.
Now if that wasn't enough, civi has a number of additional steps to follow:
- new database credentials for drupal + civi database (that's obvious and not so easy to forget. but still annoying having to touch two settings files instead of one)
- absolute filesystem paths (and urls?) to set up in civicrm.settings.php
- absolute filesystem paths to set up in CiviCRM config
This is all survivable, but it feels largely redundant and annoying. And I have this feeling every time I do this (e.g. clone a site to a dev server or local for development)
We can use relative paths here and there, but these tend to not play well with symlinks.
<h2>Proposed solution</h2>
There are different angles we can approach this.
- Use more relative paths, and somehow figure out a way to deal with symlinks.
- Option to not use the /extern/ at all, and do it all through regular Drupal requests instead (yes this has the bootstrap performance penalty but I think it is acceptable).
- Reuse configuration from Drupal's settings.php, if possible
- Option to define the CiviCRM DSN (and other config) in Drupal's settings.php. Drupal allows to configure more than one DSN, and it might be generally useful for Drupal to have the Civi DSN easily available.
- Figure out a standard to make it easier to set up extensions dir, template dir, etc.
- Option to set up extensions dir and friends in (civicrm.)settings.php instead of the database, so you hav it all in one place.
- more warning messages all over the place, if directories are not set up correctly. Especially, if e.g. extensions dir was configured and working once and then suddenly is no more - e.g. after a server move.