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 FieldsRSIPreventor->getAllItems() method in the Media Gallery module is essentially an exact duplicate of the functionality provided by field_get_items() in Drupal core.
However, it incorrectly handles nodes languages - unlike the core function, it will not always use the correct language.
We could probably stand to just remove this whole class in favor of using the core functions. It does provide a couple other methods that core doesn't have exact equivalents of, though.
Comment | File | Size | Author |
---|---|---|---|
#2 | media_gallery-field_get_items-1107264-2.patch | 1.98 KB | Moloc |
Comments
Comment #1
lsolesen CreditAttribution: lsolesen commentedThanks for the bug report. Did you do any work on this - or do you have any more insight?
Comment #2
Moloc CreditAttribution: Moloc commentedI created a patch for the first part of the bug report. (getValue, ->, ... is still in use)
As we now directly use the field-API, do we need to set a dependency in the info file? Or is it enough, if another dependency-project like media or number has a dependency to the field module?
Comment #3
lsolesen CreditAttribution: lsolesen commentedIt should be enough if another project has a dependency to that project. However, maybe it is still a good idea for full enclosure? I will review today.
Comment #4
lsolesen CreditAttribution: lsolesen commentedThis is committed. However, I forgot to give Moloc credit in the commit.