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.
Hello. This error appears when I trying to update or delete some nodes:
Fatal error: Cannot redeclare metatag_entity_translation_delete() (previously declared in /sites/all/modules/metatag/metatag.module:1713) in /sites/all/modules/metatag/metatag.entity_translation.inc on line 53
Comment | File | Size | Author |
---|---|---|---|
#6 | metatag-n1951118-5.patch | 1.59 KB | DamienMcKenna |
#4 | metatag-n1951118-4.patch | 1.59 KB | DamienMcKenna |
#3 | 1951118-metatag-duplicate-function.patch | 2.64 KB | wiifm |
Comments
Comment #1
SergO CreditAttribution: SergO commentedOops, sorry, it's fixed in today's update.
Comment #2
wiifmThis issue is still 100% in the latest --dev
Fatal error: Cannot redeclare metatag_entity_translation_delete() (previously declared in /var/www/mts/sites/all/modules/contrib/metatag/metatag.module:1738) in /var/www/mts/sites/all/modules/contrib/metatag/metatag.entity_translation.inc on line 53
This is causing a few issues when saving a node. Can one of the functions be removed ?
Comment #3
wiifmPatch attached to remove the duplicate function from the .module file in favour of keeping it in the include.
Patch also contains whitespace changes (as my editor does this automatically)
Comment #4
DamienMcKennaThe metatag.entity_translation.inc file was removed, so what's needed is a line in hook_requirements to check if the file exists & inform the site maintainer that it needs to be removed.
Comment #5
wiifmWeird, I was using drush make to manage the updates, and it turns out it does not clean the directory before extracting the new release over the top.
Thanks for this information.
Another solution to this (and this is what views does), is to leave the file there, and simple have it intentionally bank.
Comment #6
DamienMcKennaA small clarification.
Comment #7
DamienMcKennaCommitted. Thanks for helping to clarify the problem, wiifm.
Comment #8
DamienMcKenna@wiifm: BTW Drush should remove the old files first, make sure you're using a recent Drush v5 though as older versions (v4 IIRC) did not.
Comment #9
DamienMcKennaNow that v7.x-1.0-beta7 is out, I'm closing this in the interest of keeping the issue queue clean.
Comment #10
Summit CreditAttribution: Summit commentedHi,
I open this again. In latest dev 6 august no remark, I had to look in php log and remove it myself.
Just to let you know.
Greetings, Martijn
Comment #11
DamienMcKennaThis was fixed, please check the README.txt and site status page where you would have seen a message stating that the file had to be removed.
Comment #12
Summit CreditAttribution: Summit commentedHi,
Sorry I thought I would get the message during updating. Then valuable information is shown and that would be a great place to state this.
Greetings, Martijn