Steps to repeat:

1. Enable entity_translation, add a language and set a content type (eg. Basic page) translatable.
2. Create a role (eg. editor) with "Translate any entity" and "Basic page: Edit any content" permissions.
3. Create an user (eg user01) with editor role.
4. Create a Basic page.
5. Log in as user01 and add a translation for the node previously created.
6. In "Translation" > "Authored by" set an invalid user name.

Expected Results:
The form show an error message.

Actual Results:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null

Comments

peximo’s picture

Status: Active » Needs review
StatusFileSize
new853 bytes

Attached patch add a user name validation.

plach’s picture

StatusFileSize
new1.06 KB

Thanks! Let's validate also the authoring date :)

Status: Needs review » Needs work

The last submitted patch, et-validate-1845896-2.patch, failed testing.

plach’s picture

Title: Invalid user name cause Fatal error » Validate translation authoring info on submit
Status: Needs work » Needs review
StatusFileSize
new1.14 KB

Fixed the notices.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Green

plach’s picture

Issue tags: +Needs tests

Would be good to have tests for this too, sooner or later.

bforchhammer’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Committed and pushed :)

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

  • Commit ed9a341 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions authored by plach, committed by bforchhammer:
    Issue #1845896 by plach, peximo: Fixed Validate translation authoring...

  • Commit ed9a341 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions, workbench authored by plach, committed by bforchhammer:
    Issue #1845896 by plach, peximo: Fixed Validate translation authoring...