0

I have Drupal Commons distribution's based website,everything was good untill I updated the site with drush.

The problem is drush downloaded the file to sites/all/modules instead of profile folder. Now I am getting bunch of redeclare function error.

When I remove everything from sites/all/modules I get can't find function xxx. How will I get back the site to normal.

2 Answers 2

1

Drush just wasn't cut out to automatically update profiles. pm-updatecode does not do the right thing, and as you noted, even pm-download picks the wrong location by default.

  1. To download a new version of a module that is in a profile, use --destination to tell Drush exactly where to put the module.

  2. If you get into a situation where Drupal no longer has the right location for your modules, run the registry rebuild tool to fix things up.

5
  • thanks for your response! I can't run none of drush command. I removed all the files from sits/all/modules. how can I tell drupal that I update path of commons to profile/common and not sites/all/modules/common. I have also emptied cache tables. Is there any way to build registry other than drush ?
    – Shabir A.
    Nov 19, 2015 at 15:26
  • Do you have a backup of your site before you started modifying it? It is sometimes difficult-to-impossible to roll back after some operations. Updates should always be done on a copy of your site first. Nov 19, 2015 at 16:44
  • sadly, not! What's the possible ways?
    – Shabir A.
    Nov 19, 2015 at 16:50
  • If your site does not bootstrap, there is no set answer. Usually, this is where you would restore from backup and start over. Nov 19, 2015 at 18:00
  • thx, rebuild registry did the trick.
    – Shabir A.
    Nov 19, 2015 at 18:42
1

The answer from Greg is correct, but I would like to add that for Drupal Commons updating modules separately isn't recommended as it can break your site. IMHO you should update all of Commons or nothing. The only exceptions would be serious security issues with modules. I guess you can use drush to update all of Commons if you want to ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.