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.
The code that obtains the field values fails when the field does not return a FieldItemListInterface
.
$value = ($entity->$field_name)->getValue();
Comment | File | Size | Author |
---|---|---|---|
#4 | panopoly_wysiwyg-update_hook-2925652-4.patch | 632 bytes | dsnopek |
#2 | panopoly_wysiwyg-update_hook-2925652-2.patch | 1.24 KB | kerasai |
Comments
Comment #2
kerasai CreditAttribution: kerasai at myDropWizard commentedAdjusted the code that obtains the field value and added a conditional to check that the value is set and is not empty.
Comment #3
dsnopekLooks good to me - thanks! Committed :-)
Comment #4
dsnopekFound another issue. Let's try this one!
Comment #5
dsnopekSeems to be working - committed #4 too