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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SergO’s picture

Status: Active » Closed (won't fix)

Oops, sorry, it's fixed in today's update.

wiifm’s picture

Priority: Normal » Critical
Status: Closed (won't fix) » Needs work

This 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 ?

wiifm’s picture

Status: Needs work » Needs review
FileSize
2.64 KB

Patch 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)

DamienMcKenna’s picture

FileSize
1.59 KB

The 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.

wiifm’s picture

Weird, 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.

DamienMcKenna’s picture

FileSize
1.59 KB

A small clarification.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks for helping to clarify the problem, wiifm.

DamienMcKenna’s picture

@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.

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Now that v7.x-1.0-beta7 is out, I'm closing this in the interest of keeping the issue queue clean.

Summit’s picture

Status: Closed (fixed) » Active

Hi,

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

DamienMcKenna’s picture

Status: Active » Closed (fixed)

This 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.

Summit’s picture

Hi,
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