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 CckFieldValues source plugin does not return all source properties. I found a bug in CckFieldValues::prepareRow
, we probably want to compare the existing array source object by key and not by value.
Proposed resolution
Replace array_diff with array_diff_key.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#8 | cckfield-values-array-diff-2272853-7.patch | 7.76 KB | webflo |
Comments
Comment #1
webflo CreditAttribution: webflo commentedComment #2
webflo CreditAttribution: webflo commentedComment #3
benjy CreditAttribution: benjy commentedCan we have a test to prove the issue exists?
Comment #4
webflo CreditAttribution: webflo commentedYes, here is a failling test and a fix.
Comment #5
webflo CreditAttribution: webflo commentedComment #7
webflo CreditAttribution: webflo commentedSorry wrong patch.
Comment #8
webflo CreditAttribution: webflo commentedComment #9
webflo CreditAttribution: webflo commentedComment #14
penyaskitoI walked through this test with @webflo at Amsterdam sprints and it works as intended. Tests check the right behavior and test-only patch fails at #4 as expected.
Comment #15
benjy CreditAttribution: benjy commented+1 this looks good to me.
Comment #16
alexpottCommitted d111ef3 and pushed to 8.0.x. Thanks!