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.
I am currently running Drupal version 7.26 and using the Mix and Match theme version 7.x-2.1, a sub-theme of Adaptive Theme 7x-3.1. I get the following error message when I try to issue a Drush command:
"Cannot redeclare adaptivetheme_drush_command."
I haven't a clue what this means. Any help would be greatly appreciated.
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedWell, it's a PHP error, its saying that somewhere that command has been duplicated which is not allowed in PHP, but AT itself does not do this.
Comment #2
ajross CreditAttribution: ajross commentedAnd neither does Mix and Match. Some people have had similar problems when they had drush installed in two places, so you might look into that: https://drupal.org/node/1114424
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedAgreed, super odd, I never seen this before.
Comment #4
screeno CreditAttribution: screeno commentedOK, I've just used drush to download Drupal 7.26. After setup I used "drush dl adaptivetheme" to grab the latest version of my favorite theme. No problems at all. When I type "drush" with no command I get the error message mentioned above.
Here is the entire output:
drush
Fatal error: Cannot redeclare adaptivetheme_drush_command() (previously declared in /Users/gilbertstankiewicz/.drush/adaptivetheme/at_core/adaptivetheme.drush.inc:13) in /Applications/MAMP/htdocs/gilbertwebdesign/sites/all/themes/adaptivetheme/at_core/adaptivetheme.drush.inc on line 35
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare adaptivetheme_drush_command() (previously declared in /Users/gilbertstankiewicz/.drush/adaptivetheme/at_core/adaptivetheme.drush.inc:13)
in
/Applications/MAMP/htdocs/gilbertwebdesign/sites/all/themes/adaptivetheme/at_core/adaptivetheme.drush.inc,
line 35
This is for your information. Drush is working, I'm happy!
PS - Just set up an AT subtheme using the drush command mentioned on the adaptivetheme site. One small bit of information may be helpful. Let users know that AT must be enabled before using drush to create a subtheme.
Thanks for contributing this great theme. It is the starting point for all my projects.