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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lsolesen’s picture

Thanks for the bug report. Did you do any work on this - or do you have any more insight?

Moloc’s picture

Status: Active » Needs review
FileSize
1.98 KB

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

lsolesen’s picture

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

lsolesen’s picture

Status: Needs review » Fixed

This is committed. However, I forgot to give Moloc credit in the commit.

Status: Fixed » Closed (fixed)

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