The \Drupal\field\Tests\TranslationTest::testFieldAvailableLanguages
is still use the old field_name property of the field entity.
This cause a Undefined property: Drupal\field\Entity\Field::$field_name
notice error, but therefore the while test is irrelevant, because the name of the field is not changed.
There is another bug with the length of the field name, because the field name become longer than the maximum 32 character when it gets the "_untranslatable" suffix.
And this test is still using the deprecated functions.
Comment | File | Size | Author |
---|---|---|---|
#22 | field-trans-old-field-name-2125497-22.patch | 1.49 KB | yched |
#18 | field-trans-old-field-name-2125497-18.patch | 2.91 KB | Sweetchuck |
#14 | 2125497-14.patch | 3.24 KB | areke |
#12 | field_translation_test-2125497-12.patch | 2.87 KB | yched |
#4 | interdiff.txt | 3.08 KB | yched |
Comments
Comment #1
SweetchuckComment #2
SweetchuckComment #3
chx CreditAttribution: chx commentedThis is correct but I have no idea why it didn't fail previously so I am assigning this to yched in hope he has some insight. That should not block committing this.
Comment #4
yched CreditAttribution: yched commentedIndeed, nice catch. Test classes that have seen addition after addition are sorry stacks of crappy code...
Refactored/cleaned a bit more, but reverted the unrelated entity_get_info() / field_info_instances() changes, I'm not in favor of doing those bit by bit in unrelated issues.
Comment #5
SweetchuckOK. RTBC for patch #4
Comment #6
YesCT CreditAttribution: YesCT commentedIs that right? "For untranslatable fields only Language::LANGCODE_NOT_SPECIFIED is available." I thought things could know their language even if they were not translatable.
.
Comment #7
YesCT CreditAttribution: YesCT commentedtagging d8mi as it is related to translation
Comment #8
YesCT CreditAttribution: YesCT commentedit makes sense to not do these changes bit by bit. but which issue is doing them? let's link to it.
Comment #9
Xano4: field_translation_test-2125497-4.patch queued for re-testing.
Comment #12
yched CreditAttribution: yched commentedReroll
@YesCT
Yes, in the new Entity/Field API, but this is still testing the "old" field_language_*() API, that behaves a little differently. This API is being deprecated, but there are still a couple blocker issues, for now it's still here along with the corresponding tests.
Comment #13
Sweetchuck#2076445: Make sure language codes for original field values always match entity language regardless of field translatability
Comment #14
areke CreditAttribution: areke commentedThe patch didn't apply anymore, so I re-rolled it.
Comment #16
Berdir14: 2125497-14.patch queued for re-testing.
Comment #18
SweetchuckComment #19
yched CreditAttribution: yched commentedComment #20
yched CreditAttribution: yched commentedBack to RTBC...
Comment #21
webchickNo longer applies, presumably because we just removed the old translation API.
One more time! :)
Comment #22
yched CreditAttribution: yched commentedHeh :-)
In the end, there's actually not much left to fix here now, the faulty test has been removed along with the old translation API.
What's left from the patch are just minor streamline / cleanups with no functional impact.
Reuploading it, and setting back to RTBC (since what's left has been RTBCed before), but this doesn't really match the issue title & category anymore.
Comment #24
Berdir22: field-trans-old-field-name-2125497-22.patch queued for re-testing.
Comment #25
BerdirRandom test fail.
Comment #26
webchickCommitted and pushed to 8.x. Thanks!