Whenever I try to clone one of my sites, I get this error:

Drush command terminated abnormally due to an unrecoverable error.
Error: Cannot redeclare entity_features_get_controller() (previously declared in /data/disk/dd/distro/005/drupal-7.41.1-prod/sites/www.firstsite.com/modules/entity/entity.features.inc:11) in /data/disk/dd/distro/005/drupal-7.41.1-prod/sites/www.clonesite.com/modules/entity/entity.features.inc, line 19

Could you tell me what the reason could be?

closed as too broad by Елин Й., Pierre.Vriens, sanzante, Mołot, Krishna Mohan Feb 22 '16 at 7:25

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

I would recommend that you avoid multisite, and clone the code into a separate codebase -- then copy the database. This is much easier to manage for simple use cases, and would entirely avoid your problem above, as you would only have one copy of each module present in your code base, so Drupal would not be able to load any of them twice.

I am not sure exactly how your situation above came to be, but the database from the original site contains references to all of the paths of all of the enabled modules; somehow, Drupal is trying to bootstrap both the old cached paths, and also the new paths for the same module in its new location. If you want to continue with a multisite setup, it is likely that a registry rebuild would clear this up.

  • Hello. I am using Baracuda + Octopus on which i have an Aegir instance. I usually do this without any issue. I tried "drush rr" and cleared caches and did clear registry on my aegir UI. This did not work. – Yaz Feb 22 '16 at 1:40
  • Another option would be to move modules like entity to the sites/all folder. As these infrastructure modules are usually very stable and common for many sites. – Herman van Rink Feb 23 '16 at 7:37

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