Very useful tool.
To get this to work for drupal 7 I changed these two lines in features_clone.class.inc;
$sql = "select filename from {system} where name='%s' and status=1";
$modulefile = db_result(db_query_range($sql, $this->src_feature, 0, 1));
to
$sql = "select filename from {system} where name=:name and status=:status";
$modulefile = db_query($sql, array('name' => $this->src_feature, 'status' => 1))->fetchField();
The clone seems to work but then you get a php error after the clone has finished;
PHP Fatal error: Call to undefined function module_exists() in ***/includes/cache.inc on line 170
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function module_exists() in ***/includes/cache.inc, line 170
I don't know if this has an impact on anything because the clone still took place.
Comment | File | Size | Author |
---|---|---|---|
#4 | features_clone-port-to-drupal-7-1460008-1.patch | 1.25 KB | fl3a |
Comments
Comment #1
nedjoThe error is due to the bootstrap level specified in features_clone_drush_command(). Remove the line
and it should work.
Comment #2
thetoast CreditAttribution: thetoast commentedThanks nedjo
Comment #3
webankit CreditAttribution: webankit commentedPort this to D7
Comment #4
fl3a CreditAttribution: fl3a commentedChanged title to something more meaningfull and attached a corresponding patch which includes the lines from from description and comment 1.
Comment #5
elvis2 CreditAttribution: elvis2 commented@ fl3a, worked great for me on 7.21. The one thing I noticed was that the feature needed to be enabled before running. This is fine but maybe the README should mention that.
Thanks for the patch.
Comment #6
geek-merlinThanks! Seems to work great!
Comment #8
fl3a CreditAttribution: fl3a commented