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.
This issue occured for me in version 7.x-3.6 it also exists in the newest version. I get a notice because the value that I want to show does not exist in the data array of all users.
I think it would be better if the render function checks if the value isset.
Comment | File | Size | Author |
---|---|---|---|
#6 | views-serialized-check-value-isset.2120243-4.patch | 751 bytes | Anonymous (not verified) |
#5 | views-serialized-check-value-isset.2120243-4.patch | 769 bytes | ericclaeren |
#3 | views-serialized-check-value-isset.2120243-1.patch | 692 bytes | Johnny vd Laar |
#1 | views-serialized-check-value-isset.2120243-1.patch | 820 bytes | Johnny vd Laar |
Comments
Comment #1
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedHere is a patch.
Comment #3
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedoh
Comment #4
ericclaeren CreditAttribution: ericclaeren commentedMr Johnny, I have a improvement for the patch, you checked a string and not the keys in the serialized array, so the problem still exists.
I have attached an updated patch on 7.x-3.7
Comment #5
ericclaeren CreditAttribution: ericclaeren commentedComment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch #5 had no fallback if the if statement fails.
I've created a patch which checks the keys and returns a plain version or an empty string (which in case can be handled with the "no results behaviour" option).
Comment #7
francois o CreditAttribution: francois o commentedRunning into this issue: #6 works for me
Comment #8
ioanmar CreditAttribution: ioanmar as a volunteer commented#6 seems to do the job for me too.
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 5 year old patch in #6 to views_handler_field_serialized.inc applied cleanly to the latest views 7.x-3.x-dev