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.
I am getting the following error:
Fatal error: Cannot access empty property in /var/www/html/my_site/sites/all/modules/entity_translation/includes/translation.handler.inc on line 206
I have tried the most recent dev and alpha1 versions, but I get the same error with both. The error appeared when I tried to edit a content type.
Comment | File | Size | Author |
---|---|---|---|
#23 | et-translation_key-1370900-23.patch | 3.52 KB | plach |
#11 | emtpy_keys-1370900-11.patch | 1.02 KB | mojzis |
Comments
Comment #1
plachPlease, provide a more meaningful bug report.
Comment #2
Kristen PolComment #3
rv0 CreditAttribution: rv0 commentedSame here after installing latest dev, couldn't access some non-multilingual nodes any more.
Comment #4
Danny EnglanderI had the same error in the issue summery above happen as a WSOD on the front end of my site after I enabled "file" (Translatable entity types) on:
/admin/config/regional/entity_translation
The error I get after checking that check box and saving is:
If I uncheck that checkbox, the WSOD on the front end goes away and I no longer get the backend error.
Comment #5
Danny EnglanderIt looks like this could somehow be related to: http://drupal.org/node/1440476
Comment #6
FranckV CreditAttribution: FranckV commentedI just had the error when trying to override the system image style "thumbnails"
Fatal error: Cannot access empty property in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc on line 206
I couldn't visit any page anymore...
I found a similar error that occurred as described in http://drupal.org/node/1032728
The suggested correction was to add :
So I tried my luck, just like an apprentice sorcerer, to rewrite :
into
and at least I could go back to the web site... but with several bad looking messages. It looks like this is a direction though.
The thumbnail style has been overridden so that you can change its settings.
Error message
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: translations in EntityTranslationDefaultHandler::loadMultiple() (line 203 in /home/myhost/www/mydrupalrootfolder/sites/all/modules/entity_translation/includes/translation.handler.inc).
Notice : Undefined index: fields in field_info_field_by_ids() (line 664 in /home/myhost/www/mydrupalrootfolder/modules/field/field.info.inc).
Notice : Undefined index: fields in field_info_fields() (line 596 in /home/myhost/www/mydrupalrootfolder/modules/field/field.info.inc).
Warning : Invalid argument supplied for foreach() in field_info_fields() (line 596 in /home/myhost/www/mydrupalrootfolder/modules/field/field.info.inc).
Notice : Undefined index: fields in field_info_fields() (line 596 in /home/myhost/www/mydrupalrootfolder/modules/field/field.info.inc).
Warning : Invalid argument supplied for foreach() in field_info_fields() (line 596 in /home/myhost/www/mydrupalrootfolder/modules/field/field.info.inc).
Comment #7
FranckV CreditAttribution: FranckV commentedNot a long term solution : just good enough to be able to revert to non overridden settings.
In the end I had to remove the Entity Translation module. Sorry.
Comment #8
batigol CreditAttribution: batigol commentedSame here:
Fatal error: Cannot access empty property in modules\entity_translation\includes\translation.handler.inc on line 206
Steps to reproduce the issue:
1. Install the module.
2. Set "Commerce Product" as translatable at (/admin/config/regional/entity_translation).
3. Cannot access my products that I have created before installing the module - (/admin/commerce/products).
UPDATE:
After run update.php, clear cache, cron, restart localhost server, rebuild permissions and god know what else, the problem is gone for me :)
Comment #9
rtdean93 CreditAttribution: rtdean93 commentedI have had this issue - and know that this is related to having items in your shopping cart that trigger the issue whenever I perform any administrative tasks.
To resolve I clear cache and cron, then run update.php.
To prevent from occurring again - I remove items from my cart.
I have been living with this for a while - since I know how to resolve it - but does anyone know how to fix this?
Comment #10
mojzis CreditAttribution: mojzis commentedI am running into the same problem with an entity that was created with eck and thus has a bundle. No cache clearing seems to help. I thing the problem is that the ['entity keys']['translations'] is not set, see my #16 @ #1440476: Argument #2 is not an array in entity_translation_menu_alter().
Comment #11
mojzis CreditAttribution: mojzis commentedAttached is a simple patch that moves the setting of the 'translations' before the paths. It doesnt bring back full functionality (has to be done in #1440476: Argument #2 is not an array in entity_translation_menu_alter(), but at least gets rid of the fatal error.
Comment #12
davemybes CreditAttribution: davemybes commentedI ran into the same problem when using the Bean module. I had 1.0-alpha1 of ET installed and was trying to figure out how to translate Bean blocks. I went to ET settings and ticked Block in the Entities to be translated and boom, 500 error. I tried several patches, including the latest dev release (June 26), but nothing work except #6 here. I don't see the extra errors mentioned. In fact, everything works perfectly, and I can get a Translate tab on the Bean block.
Comment #13
plach#11: emtpy_keys-1370900-11.patch queued for re-testing.
Comment #15
plachPlease, confirm this still exists in the latest dev.
Comment #16
mrfelton CreditAttribution: mrfelton commentedStill a problem with latest dev.
Comment #17
lathanThe simplest way to reproduce this issue is to call field_info_fields() from hook_entity_load. With entityform_type enabled, then visit the field list of any content type defined.
Comment #18
pbuyle CreditAttribution: pbuyle commentedI had the same error message, in my case this was caused by the following code flow:
entity_get_info( )
hook_entity_info_alter()
implementationrelation_type_load()
relation_get_types()
relation_type_ensure_instance()
field_info_instance()
_field_info_collate_fields()
entity_translation_field_extra_fields( )
entity_translation_get_handler( )
EntityTranslationDefaultHandler->setEntity( )
In general, nesting calls to
field_info_*
fromhook_entity_info_alter()
orhook_entity_info()
does not work (see #1416558: hook_entity_info(), hook_schema(), and the field system are strongly bound to each other). Here,entity_translation_get_handler( )
receive an incomplete entity info which has not yet been processed byentity_translation_entity_info_alter
(becauseentity_translation_module_implements_alter
moves it at the end of thehook_entity_info_alter
implementations list). So the['entity keys']['translation']
properties of the entity info expected inEntityTranslationDefaultHandler::getTranslationsKey()
is not set and the Fatal error: Cannot access empty property error occurs.A simple workaround for me was to avoid loading the relation type (since it was used to load a type defined in code by the same module, the retrieved value can be hardcoded).
I'm not sure if a general workaround can found to avoid retrieving a entity translation handler while building its entity info, which seems to be the root cause of the error.
Comment #19
elioshError is also in beta2
If i try to create a new condition in rules, before saving the rule i had the fatal error, on the row inside IF block:
In my installation, i have set as translatable entity only the node, and not the user.
The rule i am trying to create is very simple:
event: on user login
condition: check if user has role XXX
action: goto page
Modules: rules 2.2 - entity_translation 1.0-beta2 - drupal 7.21
Comment #20
elioshI can say something more.
I try to set user entity as translatable, and now i have a fatal error for every page. Offending line is 343:
I tried a workaround as in comment #6, using entity_info_cache_clear() and now I can browse every page, but can't add that rule.
I tried also to add entity_info_cache_clear() as first command in function setEntity($entity), but no way :-(
Comment #21
elioshDear mongolito404,
how can i retrieve the code flow as you've done on comment #18?
Comment #22
elioshI found the error.
Using patch for Title module as in [1269076] (patch #27) gives me this error.
Sorry
Comment #23
plachThe attached patch should provide more protection against missing data.
Comment #24
pbuyle CreditAttribution: pbuyle commentedEnabling XDebug for error report in PHP produce detailed stack traces on fatal error.
Comment #25
klonos...this is what is see in my apache error.log:
PHP Fatal error: Cannot access empty property in /var/www/mysite/sites/all/modules/entity_translation/includes/translation.handler.inc on line 716, referer: http://www.mysite.net/el/batch?op=start&id=61
Core and all contrib modules used are updated to their latest dev and I'm on Ubuntu 12.10 x64 running apache 2.2.22/php 5.4.6/mariadb 10.0.1
It happens while #1022558-12: During install, "An AJAX HTTP error occurred. HTTP Result Code: 500..."
Comment #26
klonos...making this issue easier to find.
Comment #27
plachGuys, did you try #23? It should prevent things from exploding.
Comment #28
plachcrosspost
Comment #29
klonosI applied both #23 and #619542-87: Malformed theme .info files break menu_router generation and all issues were resolved for me (though I think that it wasn't the former that did it).
Comment #30
dcrocks CreditAttribution: dcrocks commentedYou shouldn't use the patch from #619542-87: Malformed theme .info files break menu_router generation as it will never be committed. Even the simpler one at #619542-117: Malformed theme .info files break menu_router generation is probably never going in either. And all this is changing in drupal 8. As soon as you update your site you will lose it. I would keep tracking the issue here and do a clean test of the patch in #23. I think keeping the pressure on here is your best chance of cleaning this up.
Comment #31
plachI am going to commit #23 soon, since it's probably a better solution even if it doesn't fully fix the issue(s) originating the fatals reported here.
Comment #32
plachCommitted and pushed #23.
Tentatively marking fixed.
Comment #34
bannorb CreditAttribution: bannorb commentedRelated: #2021029: During Install, Inform User that they have Insufficient Memory Rather than Server Error: AJAX HTTP Result Code: 500