after updating entity translation, when I create a commerce entity, it goes to the translation page, then I get this error: "Array to string conversion in module_implements()"

i put a dsm in the includes/module and it said:
dsm($hook) = entity_translation_insert
dsm($hook_info[$hook]['group']) = ... (Array, 2 elements)
0 (String, 18 characters ) entity_translation
1 (String, 18 characters ) entity_translation

for the rule $include_file = isset($hook_info[$hook]['group']) && module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']);
so it seems that it indeeds get's an array instead of a string.
can anyone solve this please?

Comments

yeaha’s picture

update: It stops giving the error message when commenting
/**
* Implements hook_hook_info().
*/
/*function entity_translation_hook_info() {
//dsm($hooks);
$hooks['entity_translation_insert'] = array(
'group' => 'entity_translation',
);
$hooks['entity_translation_update'] = array(
'group' => 'entity_translation',
);
$hooks['entity_translation_delete'] = array(
'group' => 'entity_translation',
);
return $hooks;
}*/
in the entity_translation.module, apparently somewhere else this is already defined. don't know where.

plach’s picture

in the entity_translation.module, apparently somewhere else this is already defined. don't know where.

Try and have a look to entity_translation_module_implements_alter().

plach’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
yeaha’s picture

entity_translation_module_implements_alter(). does nothing as far as i can see except reordering implementation['entity_translation'] group when the hook is entity_info_alter or menu_alter

when commented out entity_translation_hook_info, i get in translation_module_implements_alter():
hook = entity_translation_update and the implementations = array('metatag'->'entity_translation')

when not commented out entity_translation_hook_info, i get in translation_module_implements_alter():
hook = entity_translation_update and the implementations = array('metatag'->FALSE)

so i tried commenting out entity_translation_module_implements_alter() and also did:
case 'entity_translation_update':
$implementations['entity_translation'] = 'entity_translation';
$implementations['metatag'] = 'entity_translation';
break;
but that both changed nothing to the error, so entity_translation_hook_info stays comment for the moment.

plach’s picture

If the issue you are experiencing is tied to metatags, it may be related to #1845326: Metatags not loading correctly with beta4.

mvdve’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta2

I can confirm that the error is linked to metatags. I have the same error when saving a commerce product with entity translation. After disabling the metatags module the error is gone.
Not sure if the mentioned issue solves the problem. The available patches (#65 and #75) do not solve the issue for now.

plach’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Postponed

Let's wait for the metag issue to be fixed.

magic_al’s picture

Exactly the same issue here. It appeared after installing Metatags...

plach’s picture

Component: Node translation upgrade » Base system
Status: Postponed » Postponed (maintainer needs more info)

Is this still present with the latest dev version of Metatags?

mvdve’s picture

Status: Postponed (maintainer needs more info) » Fixed

Yes! This issue has been fixed with the latest dev version of metatags.

plach’s picture

Status: Fixed » Closed (works as designed)

Cool