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.
FormatterBase::view() includes an '#object' => $the_entity_being_rendered entry in $build[$field_name].
That is pointless, the parent entity can be obtained from the #items entry.
The name ('object' ?) is also really weird. Plus, it's never ever used in Core.
Comment | File | Size | Author |
---|---|---|---|
#21 | 2409297-21.patch | 694 bytes | _utsavsharma |
#21 | interdiff_20-21.txt | 694 bytes | _utsavsharma |
#1 | 2409297-remove_#object-1.patch | 1.84 KB | yched |
#3 | interdiff.txt | 859 bytes | swentel |
#3 | 2409297-remove_#object-3.patch | 2.21 KB | swentel |
Comments
Comment #1
yched CreditAttribution: yched commentedEr - oops, it is actually used by quickedit.
Well, here's a patch.
Comment #3
swentel CreditAttribution: swentel commentedquick edit test is adding a pseudo field where #items is a dumb array.
Comment #4
amateescu CreditAttribution: amateescu commentedDo we need some manual testing here for the quick edit update?
Comment #5
swentel CreditAttribution: swentel commented@amateescu tested it quickly and all seems to work fine.
Comment #6
amateescu CreditAttribution: amateescu commentedCool :)
Comment #7
alexpottThis looks like an API change. And this issue is a normal task so we need to outline how it fits within the allowable Drupal 8 beta criteria. Can someone add Drupal 8 beta phase evaluation template to the issue summary.
Comment #20
steinmb CreditAttribution: steinmb as a volunteer commentedLooking at old core issues tagged with "Needs change record":
Quickedit is in D10 moved out of core making most of the changes outdated/no-longer needed. However, looking at "FormatterBase.php" we still include the "#object" element.
Comment #21
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs for DrupalFit commentedPatch for 10.1.x.
Comment #22
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs for DrupalFit commentedComment #23
smustgrave CreditAttribution: smustgrave at Mobomo commentedStill needs issue summary update and change record.
Did not test or review.