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.

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new1 KB

The attached patch seems to work for me.

plach’s picture

Priority: Critical » Major
Status: Needs review » Reviewed & tested by the community

Looks sensible to me.

plach’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 30da866 on 7.x-1.x, factory, et-fc, revisions authored by David_Rothstein, committed by plach:
    Issue #1876750 by David_Rothstein: Fixed Fatal error when creating an...

  • Commit 30da866 on 7.x-1.x, factory, et-fc, revisions, workbench authored by David_Rothstein, committed by plach:
    Issue #1876750 by David_Rothstein: Fixed Fatal error when creating an...