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.
drush en entity_translation -y
The following extensions will be enabled: entity_translation
Do you really want to continue? (y/n): y
PHP Fatal error: Unsupported operand types in /entity_translation/entity_translation.module on line 188
Fatal error: Unsupported operand types in /entity_translation/entity_translation.module on line 188
Drush command terminated abnormally due to an unrecoverable error.
$entity_info[$entity_type]['entity keys'] += array('translations' => 'translations');
Comment | File | Size | Author |
---|---|---|---|
#12 | entity_translation-operandtypes-2179183-12.patch | 757 bytes | dkingofpa |
#5 | entity_translation-operandtypes-2179183-4.patch | 741 bytes | Jānis Bebrītis |
Comments
Comment #1
atin81 CreditAttribution: atin81 commentedSame error here using dev version, and same error on beta3 version but on line 187
Comment #2
plachDoes this happen on a clean installation? If not please post the steps to replicate the error.
Comment #3
atin81 CreditAttribution: atin81 commentedIn my case the problem was originated by not having enabled the comment module. After enable comment module I could install this one with out problem.
Comment #4
Jānis Bebrītis CreditAttribution: Jānis Bebrītis commentedI stumbled access the same issue, fixed it by enabling comment module *before* enabling entity_translation.
my fix was creating array key when it doesn't exist, works fine, probably fixes other entities aswell, possibly related to #2001668: Location breaks entity translation
My fix
Comment #5
Jānis Bebrītis CreditAttribution: Jānis Bebrītis commentedComment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedis there anyway to print which module does not have an entity bundle defined to watchdog?
Comment #7
plachIt's weird that the comment module is causing troubles: there's a check about it being installed (see
entity_translation_entity_info()
)Comment #8
plachComment #9
Jānis Bebrītis CreditAttribution: Jānis Bebrītis commentedit was comments, i did print_r and it broke on it.
Comment #10
atin81 CreditAttribution: atin81 commentedSame here, I did several testing to find that the problem was originated by comments module.
Comment #11
guillaumev CreditAttribution: guillaumev commentedHad the same issue and the patch in #5 fixed it.
Comment #12
dkingofpa CreditAttribution: dkingofpa commentedPatch in #5 fixed the issue for me. I just updated it to follow drupal coding conventions.
Comment #13
basillic CreditAttribution: basillic commented#12 works for me.
An alternative coding style would be:
$entity_info[$entity_type]['entity keys']['translations'] = 'translations';
Comment #14
Helrunar CreditAttribution: Helrunar commentedPatch in #12 works for me
Comment #16
plachCommitted and pushed, thanks.