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.
Problem/Motivation
The parent field is a problem currently as it is loaded only explicitly and in hasTranslationChanges when we load original the parent field will be always empty.
Additionally the parent field has the problem that on TermForm submit the root might be selected which means that the first item will have target_id=0 but when we load the parents of the original the target_id=0 item will not be present as TermStorage::loadParents loads only entities.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#5 | 2843060.patch | 833 bytes | amateescu |
Comments
Comment #5
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedSince #2543726: Make $term->parent behave like any other entity reference field, to fix REST and Migrate support and de-customize its Views integration landed and made the
parent
field behave like a regular field, I think this piece of code is no longer needed.Comment #6
borisson_Since this is just a protected method, we can remove this. The tests agree with removing it.
Deleting code is the best, great work @amateescu!
Comment #7
hchonov@amateescu++
+1 for the RTBC
Comment #8
alexpottNot surprising that there's a few stragglers like this left in the code. And thinking about it adding tests is a bit funny here because we'd be testing for absence of this code.
Also removing this method is fine because it is implement on the parent class so there is no API changes.
Comment #10
alexpottCommitted 2d0c3eb and pushed to 8.6.x. Thanks!