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.
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
Comment | File | Size | Author |
---|---|---|---|
#9 | 2105407-9.interdiff.txt | 2.47 KB | plach |
#9 | 2105407-9.patch | 5.13 KB | plach |
#7 | 2105407-6-fail.patch | 2.45 KB | swentel |
#7 | 2105407-6-pass.patch | 3.87 KB | swentel |
#1 | 2105407-1.patch | 715 bytes | swentel |
Comments
Comment #1
swentel CreditAttribution: swentel commentedComment #2
johnennew CreditAttribution: johnennew commentedI've seen this issue to and came up with the same fix. I confirm that this fixes the issue
Comment #3
plachLooks good to me but I am afraid we need some basic test coverage.
Comment #4
webchickIndeed.
Comment #5
swentel CreditAttribution: swentel commentedPfew, there's more things going wrong with the content translation module, editing an individual field also fatals:
Comment #6
swentel CreditAttribution: swentel commentedWorking on it
Comment #7
swentel CreditAttribution: swentel commentedOk, 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 ?
Comment #8
plach@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: Account settings cannot be saved anymore if content translation module is installed.
Comment #9
plachAwesome!
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?
Comment #10
johnennew CreditAttribution: johnennew commentedDoing this now
Comment #11
johnennew CreditAttribution: johnennew commentedThis 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.
Comment #12
catchCommitted/pushed to 8.x, thanks!
Comment #13.0
(not verified) CreditAttribution: commentedUpdated issue summary.