I'm having a big problem with this module on PHP 5.4.
in metatag.module at line 76 there is the code:
$hooks_entity_translation = array(
'entity_translation_insert',
'entity_translation_update',
'entity_translation_delete',
);
$hooks_entity_translation = array_fill_keys($hooks_entity_translation, array('group' => 'entity_translation'));
To add the above data to the 'hook_info' array generated in module_hook_info. The problem is that the entity translation module is also adding these hooks to the array meaning in hook info you see:
{entity_translation_insert :
{group :
0 : 'entity_translation',
1 : 'entity_translation'
}
}
Instead of being just:
{entity_translation_insert :
{group : 'entity_translation'}
}
Which it needs to be. The problem occurs later in module_implements() - includes/module.inc at line 709:
$include_file = isset($hook_info[$hook]['group']) && module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']);
Because $hook_info[$hook]['group'] is now an array and not a string, it throws out a long list of errors:
Notice: Array to string conversion in module_implements() (line 709 of ~/includes/module.inc).
My question is, is the above code in metatag.module actually needed if it is being added by the entity_translation module? And if so, then there needs to be a way around this problem.
Adam
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | metatag-n1935084.patch | 979 bytes | damienmckenna |
Comments
Comment #1
damienmckennaI think these were added without realizing what they were actually used for. This patch removes the entity_translation_* items entirely.
Comment #2
damienmckennaCommitted.
Comment #3
adam clarey commentedGreat, thanks.
I would have created the patch myself but just didn't know whether that code was needed for some other purpose.
Comment #4
damienmckennaNow that Metatag v7.x-1.0-beta5 is out am closing this to keep the issue queue clean.