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
/var/lib/drupal7 has subdirectories for those symlinks, plus a backups subdirectory.
I think the rationale here is:
The Drupal code lives under /usr and is controlled by apt.
Small Drupal configuration files live under /etc and are controlled by the sysadmin.
Files managed by Drupal directly (including modules) live under /var and are controlled by the Drupal code.
In CiviCRM, Administer→Directories→Extensions Directory is set to [civicrm.files]/ext/.
Because of all this, it seems like the right place to run civix is under /var/lib/drupal7/files/ext. But because that's outside the Drupal root, it doesn't work, even if you set CIVICRM_SETTINGS:
shell% pwd
/var/lib/drupal7/files/ext
shell% CIVICRM_SETTINGS=/etc/drupal/7/sites/default/civicrm.settings.php civix generate:module org.brettcsmith.testb
License set to AGPL-3.0 (authored by Brett Smith <[email protected]>)
If this is in error, please correct info.xml and LICENSE.txt
Initalize module org.brettcsmith.testb
Write org.brettcsmith.testb/info.xml
Write org.brettcsmith.testb/testb.php
Write org.brettcsmith.testb/testb.civix.php
Write org.brettcsmith.testb/LICENSE.txt
<br />Sorry, could not locate bootstrap.inc\n
shell% pushd org.brettcsmith.testb
/var/lib/drupal7/files/ext/org.brettcsmith.testb /var/lib/drupal7/files/ext
shell% ls -l
total 72
drwx------ 2 brett brett 4096 Sep 27 11:15 build
drwx------ 3 brett brett 4096 Sep 27 11:15 CRM
-rw------- 1 brett brett 816 Sep 27 11:15 info.xml
-rw------- 1 brett brett 34753 Sep 27 11:15 LICENSE.txt
drwx------ 2 brett brett 4096 Sep 27 11:15 templates
-rw------- 1 brett brett 10066 Sep 27 11:15 testb.civix.php
-rw------- 1 brett brett 4074 Sep 27 11:15 testb.php
drwx------ 2 brett brett 4096 Sep 27 11:15 xml
shell% CIVICRM_SETTINGS=/etc/drupal/7/sites/default/civicrm.settings.php civix generate:case-type "Test Case"
<br />Sorry, could not locate bootstrap.inc\n
shell% ls -l xml/
total 0
It would be nice if civix could provide better error reporting or guidance in this case. I'm going to edit the wiki page to emphasize this, but having help directly in the tool would be even better.
The text was updated successfully, but these errors were encountered:
brettcs
changed the title
Obscure errors when run outside CMS root (i.e., because the extensions directory it outside it)
Obscure errors when run outside CMS root (i.e., because the extensions directory is outside it)
Sep 27, 2016
Have you tried constructing the PATH to the civicrm.settings.php in different ways?
For example, if /usr/share/drupal7 is the nominal root of the project, then maybe CIVICRM_SETTINGS=/usr/share/drupal7/sites/default/civicrm.settings.php would work better? That way there's at least a theoretical possibility of discovering the path to the actual Drupal root.
I'm running a CiviCRM system installed on Debian 8 ("jessie", current stable) and its drupal7 package. The filesystem is laid out like this:
/usr/share/drupal7
./usr/share/drupal7/sites
is a symlink to/etc/drupal/7/sites
, which came with adefault
subdirectory. It looks like this:/var/lib/drupal7
has subdirectories for those symlinks, plus abackups
subdirectory.I think the rationale here is:
/usr
and is controlled by apt./etc
and are controlled by the sysadmin./var
and are controlled by the Drupal code.In CiviCRM, Administer→Directories→Extensions Directory is set to
[civicrm.files]/ext/
.Because of all this, it seems like the right place to run civix is under
/var/lib/drupal7/files/ext
. But because that's outside the Drupal root, it doesn't work, even if you setCIVICRM_SETTINGS
:It would be nice if civix could provide better error reporting or guidance in this case. I'm going to edit the wiki page to emphasize this, but having help directly in the tool would be even better.
The text was updated successfully, but these errors were encountered: