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.
When creating a new translation for an entity, the code only ports default values:
- for the 1st item (default values can be multi-items)
- for the 'value' property (the set of properties depend on the field type)
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff.txt | 1.11 KB | yched |
#13 | 2382493-translation_default_values-13.patch | 9.43 KB | yched |
#10 | 2382493-translation_default_values-10.patch | 9.91 KB | yched |
#10 | 2382493-translation_default_values-10-fix-only.patch | 556 bytes | yched |
#10 | 2382493-translation_default_values-10-test-only.patch | 9.37 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedPatch - needs tests, but not sure where they should be added yet.
Comment #2
yched CreditAttribution: yched commentedThis is a smoketest patch that just removes the behavior, in the hope that the failing tests will point me to which test curently test this :-)
Comment #4
yched CreditAttribution: yched commentedWith tests.
To test the fact that we don't hardcode logic on the 'value' property, this switches the existing entity_test_field_default_value() callback, targetting it for the "shape" test field type.
The existing EntityTestDefaultValue, that also uses that callback, is changed accordingly - this also tests that "multiple items" default values work as expected, which was apparently not tested so far.
Comment #5
yched CreditAttribution: yched commentedComment #8
yched CreditAttribution: yched commentedHm - that means moving the ShapeItem field type over to entity_test, though.
Comment #9
yched CreditAttribution: yched commentedComment #10
yched CreditAttribution: yched commentedNow that we're green, reuploading patch & test-only patch.
Note that the actual fix (see fix-only.patch) is a one liner, the rest is about making this testable.
Comment #12
plachLooks good, I have found just this wrong indentation :)
Comment #13
yched CreditAttribution: yched commentedOops, indeed.
Also, reverted the addition of field_test.module to EntityFieldDefaultValueTest / EntityTranslationTest, not needed anymore.
Comment #14
yched CreditAttribution: yched commentedRTBC anyone ?
Comment #15
plachMe :)
Comment #16
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 1290d38 and pushed to 8.0.x. Thanks!