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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo’s picture

webflo’s picture

Title: CckFieldValues loses duplicate values » CckFieldValues source plugin loses similar field values
benjy’s picture

Status: Needs review » Needs work

Can we have a test to prove the issue exists?

webflo’s picture

Yes, here is a failling test and a fix.

webflo’s picture

Issue tags: +Amsterdam2014

Status: Needs review » Needs work

The last submitted patch, 4: cckfield-values-array-diff-2272853-4.patch, failed testing.

webflo’s picture

Status: Needs work » Needs review
FileSize
17.66 KB

Sorry wrong patch.

webflo’s picture

webflo’s picture

The last submitted patch, 7: 2336743-languages-profiles-46.patch, failed testing.

The last submitted patch, 4: cckfield-values-array-diff-2272853-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 8: cckfield-values-array-diff-2272853-7.patch, failed testing.

Status: Needs work » Needs review
penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

benjy’s picture

+1 this looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed d111ef3 and pushed to 8.0.x. Thanks!

  • alexpott committed d111ef3 on 8.0.x
    Issue #2272853 by webflo: Fixed CckFieldValues source plugin loses...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.