Fatal error:  Cannot use object of type Drupal\field\Entity\FieldInstance as array in /Users/drupal/drupal/core/modules/content_translation/content_translation.module on line 1000

When editing a field

Fatal error: Call to a member function isFieldTranslatable() on a non-object in /Users/drupal/drupal/core/modules/content_translation/content_translation.module on line 813

Because of #1953408: Remove ArrayAccess BC layer from field config entities

Files: 
CommentFileSizeAuthor
#9 2105407-9.interdiff.txt2.47 KBplach
#9 2105407-9.patch5.13 KBplach
PASSED: [[SimpleTest]]: [MySQL] 58,684 pass(es).
[ View ]
#7 2105407-6-fail.patch2.45 KBswentel
FAILED: [[SimpleTest]]: [MySQL] 58,844 pass(es), 4 fail(s), and 3 exception(s).
[ View ]
#7 2105407-6-pass.patch3.87 KBswentel
PASSED: [[SimpleTest]]: [MySQL] 58,695 pass(es).
[ View ]
#1 2105407-1.patch715 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 58,817 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new715 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,817 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

I've seen this issue to and came up with the same fix. I confirm that this fixes the issue

Looks good to me but I am afraid we need some basic test coverage.

Status:Reviewed & tested by the community» Needs work
Issue tags:+Needs tests

Indeed.

Pfew, there's more things going wrong with the content translation module, editing an individual field also fatals:

Fatal error: Call to a member function isFieldTranslatable() on a non-object in /Users/drupal/drupal/core/modules/content_translation/content_translation.module on line 813

Assigned:Unassigned» swentel

Working on it

Status:Needs work» Needs review
StatusFileSize
new3.87 KB
PASSED: [[SimpleTest]]: [MySQL] 58,695 pass(es).
[ View ]
new2.45 KB
FAILED: [[SimpleTest]]: [MySQL] 58,844 pass(es), 4 fail(s), and 3 exception(s).
[ View ]

Ok, I have a test for the breakage on the field edit form.

I don't have one yet for the batch on admin/config/regional/content-language. When on standard and submitting that page, it always disables translatability of the user picture for some reason and I haven't been able to figure out what's going on there, or even why it's disabling that all the time, even if all checkboxes for user etc are disabled. To me, this sounds like a different bug which we might need to explore somewhere else ?

@swentel:

I think we can skip the batch on admin/config/regional/content-language, I am about to remove that as part of #2076445: Make sure language codes for original field values always match entity language regardless of field translatability.

The issue you are talking about might be #1894596: content_translation_enable_widget() breaks user settings form.

StatusFileSize
new5.13 KB
PASSED: [[SimpleTest]]: [MySQL] 58,684 pass(es).
[ View ]
new2.47 KB

Awesome!

I reviewed and tested the patch and overall it looks good. We were missing test coverage for the exception reported in the OP. Added that. Maybe @ceng can perform a last test/review and RTBC this?

Doing this now

Status:Needs review» Reviewed & tested by the community

This patch looks good to me.

Confirmed current 8.x HEAD has the OP error when trying to set content translation settings on admin/config/regional/content-language.

Applied this patch cleanly and the error no longer occurs.

Patch looks good and test coverage appears good as well. Setting to RTBC.

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

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

Issue summary:View changes

Updated issue summary.