Original feature request was hijacked. I recreated the feature request at #2161791: Pull list of extensions to enable from file, retitled this, and changed it to be a support request.

Comments

amitgoyal’s picture

I tried this after installing latest version of civicrm_starterkit on my local ubuntu 13.10 machine but it didn't work.

1) I downloaded and installed civicrm_starterkit.
2) Disrtibution didn't create sites/all/extensions/ folder so I created it manually and placed the extension, downloaded from https://civicrm.org/extensions/civivolunteer/version-12, under sites/all/extensions/org.civicrm.volunteer
3) I enabled devel module and then enabled civicrm_extension_enabler module. Module gets enabled but extension is not being enabled.

I checked CiviCRM->Administer->System Settings->Manage Extensions (civicrm/admin/extensions?reset=1), there are no extensions. I also checked CiviCRM->Administer->System Settings->Directories (civicrm/admin/setting/path?reset=1) but "CiviCRM Extensions Directory" is not set.

So I am not sure how and where to set "CiviCRM Extensions Directory" dynamically?

Secondly when I set the "CiviCRM Extensions Directory" manually and then tried to enable the module, I got following error,

$ drush en civicrm_extension_enabler -y
The following extensions will be enabled: civicrm_extension_enabler
Do you really want to continue? (y/n): y
PHP Fatal error: Call to undefined method CRM_Utils_Migrate_Import::runXmlElement() in /var/www/civicrm_starterkit/sites/all/extensions/org.civicrm.volunteer/CRM/Volunteer/Upgrader.php on line 258
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined method CRM_Utils_Migrate_Import::runXmlElement() in
/var/www/civicrm_starterkit/sites/all/extensions/org.civicrm.volunteer/CRM/Volunteer/Upgrader.php, line 258

Any ideas?

kreynen’s picture

Title: Pull list of extensions to enable from file » Call to undefined method CRM_Utils_Migrate_Import when run on local ubuntu 13.10 environment
Category: Feature request » Support request
Issue summary: View changes
Status: Needs work » Active

Why did you add an unrelated issue to a feature request and changing the status needs work? I've change this into a support request and recreated my feature request. DO NOT HIJACK AN ISSUE LIKE THAT AGAIN!

I also checked CiviCRM->Administer->System Settings->Directories (civicrm/admin/setting/path?reset=1) but "CiviCRM Extensions Directory" is not set.

That is because the Extensions Directory is only set in the civicrm.settings.php for Pantheon sites. If you followed the instructions, it would work.

Did you even try use the module to enable the CiviVolunteer extensions using a free Pantheon site?

Did you enable the module using the UI when drush didn't work?

Did you try clearing the CiviCRM cache after you added the extension?

These are basic troubleshooting steps I expect developers to do BEFORE posting an issue.

@amitgoyal Is this account is being shared between multiple people? I've emailed you directly using your Drupal.org contact form, but have not received a response. You have contributed to several modules, but you won't follow basic instructions or manage issues properly which seems really odd. Is this a language issue?

I wrote this module specifically to show you how this could be done hoping you'd contribute by adding the code required to make this more flexible and allow enabling the Extended Report extensions you originally asked about in addition to the CiviVolunteer extension I plan to add to https://drupal.org/project/cm_starterkit_moderate. I really want more use case specific Drupal distributions that include CiviCRM. I'd love to see distributions for some of the types of organizations where I know there are already several, similar groups already using CiviCRM like religious groups, mountain biking groups, schools, etc.

I'm willing to help you create a distribution, but I'm not going to do it for you.

There is very little code in this module...

http://drupalcode.org/project/civicrm_extension_enabler.git/blob/refs/he...

If you start on Pantheon where this works, you should be able to figure out what's different and get it working on your local environment.

amitgoyal’s picture

Sorry about posting this issue in your existing feature request. I haven't made any changes. I just added the comment with a thought that it will simply add a comment without changing any status etc.

Secondly @amitgoyal is my personal account and I am mainly using it. I got your email and replied back next day to your gmail account. Looks like it's in your spam/junk folder that's why you didn't saw it. Please check your spam folder or email account again to see my response.

Thirdly as a developer, I downloaded latest civicrm kit and waited for 30 min. to get it installed on my system and then tried this module. But the extension didn't get installed as Extensions Directory is not being set by civicrm kit. I even tried, following code in hook_install() to set Extensions Directory path but it didn't really work for me so I posted my queries here,

$result = db_query("SELECT * FROM {civicrm_setting} WHERE name = 'extensionsDir'");
// Fetch next row as a stdClass object.
$record = $result->fetchObject();
if (empty($record->value)) {
db_merge('civicrm_setting')
->key(array('id' => $record->id))
->fields(array(
'group_name' => 'Directory Preferences',
'name' => 'extensionsDir',
'value' => serialize($d . "sites/all/extensions/"),
))
->execute();
}
drupal_flush_all_caches();

I am not really interested to use Pantheon for now. Firstly it needs to work on my local system only then I will think about other options.

I am bit surprised to see that you are not accepting the bugs and marking them to support requests. Not everybody in this world is using free Pantheon sites. If this module or civicrm kit will not work on other systems then please mention it very clearly on the project page.

I am really interested to help here and that's why I tried different ways to make it work. Please try to understand my view point as well.

Thanks.