Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Running:
* Drupal 6.22
* Devel 1.25
* Drush 7.x-4.4
When I enable devel on my local devbox, I get the following error:
nthompson@vmdev1 drupal]$ drush en devel -y
The following extensions will be enabled: devel
Do you really want to continue? (y/n): y
devel was enabled successfully.
PHP Fatal error: Call to undefined function pm_parse_arguments() in /var/www/html/vmdev9/drupal/sites/all/modules/devel/devel.drush.inc on line 104
Fatal error: Call to undefined function pm_parse_arguments() in /var/www/html/vmdev9/drupal/sites/all/modules/devel/devel.drush.inc on line 104
Drush command terminated abnormally due to an unrecoverable error.
Error: Call to undefined function pm_parse_arguments() in /var/www/html/vmdev9/drupal/sites/all/modules/devel/devel.drush.inc, line 104
If I disable the devel module this doesn't happen. I have done a "git pull" on core and devel and "git checkout" to the latest stable release.
Anyone else seen this? Any ideas?
Comments
Comment #1
monotaga CreditAttribution: monotaga commentedI just updated to devel 6.x-1.25 and am seeing this, too.
Comment #2
roball CreditAttribution: roball commentedThis does only seem to happen when called via drush. No problems with Drupal itself.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedyes, i screwed this up. will patch in next 24 hours. thanks for the reports.
Comment #4
nicholasThompsonCheers Moshe.
It's difficult when there is an SA, you often have to release code from the dev branch a little earlier than you'd like to,.
Comment #5
dylon CreditAttribution: dylon commentedThe method seems to have been deprecated and removed from the Drush project. Apparently, all calls to pm_parse_arguments have been replaced with calls to _convert_csv_to_array. The following works:
/**
* Implements drush_MODULE_post_COMMAND().
*/
function drush_devel_post_pm_enable() {
$extensions = _convert_csv_to_array(func_get_args());
if (in_array('devel', $extensions) && !drush_get_option('skip')) {
drush_devel_download();
}
}
For anybody interested in what pm_parse_arguments did, here is its (deprecated!!!) definition:
/**
* Sanitize user provided arguments to several pm commands.
*
* Return an array of arguments off a space and/or comma separated values. It also
* lowercase arguments and optionally convert dashes to underscores.
*/
function pm_parse_arguments($args, $dashes_to_underscores = TRUE) {
$arguments = _convert_csv_to_array($args);
foreach ($arguments as $key => $argument) {
$argument = ($dashes_to_underscores)?strtr($argument, '-', '_'):$argument;
$arguments[$key] = strtolower($argument);
}
return $arguments;
}
Comment #6
kehan CreditAttribution: kehan commentedsubscribing
Comment #7
dkinzer CreditAttribution: dkinzer commentedsubscribing
Comment #8
moshe weitzman CreditAttribution: moshe weitzman commentedOK, I pushed a fix to Devel 6/7/8 branches. See http://drupalcode.org/project/devel.git/commitdiff/df472637e39ad11ad0d18.... Could someone update to one of those and verify that we are OK now? After verification, I will push to other branches and cut new releases.
The code causing this bug is valid for Drush5 (not yet released) but most folks are on the stable Drush4. Sorry about that.
Comment #9
dylon CreditAttribution: dylon commentedIt works very well for me on the 7 branch.
Comment #10
maristgeek CreditAttribution: maristgeek commentedSeems to work for me for the 6.x-1.x branch.
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedThanks. Made new 6.x and 7.x releases. They will be downloadable in 5 mins.
Comment #12
John Carbone CreditAttribution: John Carbone commentedThanks for the quick fix! I just updated for the SA a little bit ago, ran drush, hit the error, checked again and a new release was available. Awesome.
Comment #13
bleen CreditAttribution: bleen commentedI'm seeing the following while using drush 5.0-dev also:
Comment #14
bleen CreditAttribution: bleen commentedafter updating devel to 7.x-1.2 this error is fixed for drush 5 as well
Comment #15.0
(not verified) CreditAttribution: commentedremoving [ok] and [error] from the