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.
If you try to create an entity as an anonymous user with Entity Translation enabled, you get a fatal error:
Notice: Undefined property: stdClass::$name in EntityTranslationDefaultHandler->entityFormSubmit() (line 1271 of .....entity_translation/includes/translation.handler.inc).
Notice: Trying to get property of non-object in EntityTranslationDefaultHandler->entityFormSubmit() (line 1296 of .....entity_translation/includes/translation.handler.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: ....
In my case, this was for a custom entity (using http://drupal.org/project/eck); I'm not sure if it the problem exists for other types of entities, although based on the code it looks like it should.
The fix should be pretty simple.
Comment | File | Size | Author |
---|---|---|---|
#1 | entity-translation-anonymous-user-1876750-1.patch | 1 KB | David_Rothstein |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedThe attached patch seems to work for me.
Comment #2
plachLooks sensible to me.
Comment #3
plachCommitted and pushed, thanks!