When there are no File types or Media types that have metadata fields to be processed, there will sometimes be errors like Warning: Invalid argument supplied for foreach() in Drupal\exif\ExifContent->get_bundle_for_exif_data() in the error log.
This is caused because $form_state->getValue() returns an empty string when there is not an actual field, but we are expecting an empty array.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | exif-d8-invalid-argument-2959312-2.patch | 1.11 KB | hosef |
Comments
Comment #2
hosef commentedHere is a patch that fixes the issue by checking if an empty value was returned for the entity types and sets them to an empty array.
Comment #3
glenshewchuck commentedGood catch. If you have already configured EXIF you need to go back and re-submit the exif configuration form page (/admin/config/media/exif) because this patch updates the configuration on form submit.
Comment #4
gkaas commentedI can confirm that this patch works if you re-submit the exif config after applying the patch.
Comment #6
jphautin commentedapplied on 8.x-1.x branch
Comment #9
zanematthew commentedThe issue still persists in the latest 1.2 version.
When will this patch be applied to the latest release?
Comment #10
opdaviesI've created a new issue, #3169084: Plan for EXIF 8.x-1.3, requesting a new 8.x-1.x release.