Integration with EXIF module is outdated

Created on 10 January 2024, 11 months ago
Updated 28 February 2024, 9 months ago

Problem/Motivation

EXIF module integration, so that Photos [hopefully] keep EXIF information when using GD.

Steps to reproduce

Use version 6.0 of Photo Album and version 2.5 of EXIF, have both enabled, then try to upload a photo.

Proposed resolution

It appears that the signature of the method called in https://git.drupalcode.org/project/photos/-/blob/6.0.x/photos.module?ref... changed to https://git.drupalcode.org/project/exif/-/blob/8.x-2.x/src/ExifContent.p...
...but I admit I haven't tested this yet.

Remaining tasks

Confirm that simply calling entityInsertUpdate in the module integration does the trick.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ggabriel
  • First commit to issue fork.
  • Status changed to Needs review 11 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    8 pass
  • 🇮🇳India viren18febS

    I have added the changes and added a patch for this.

  • Status changed to Active 11 months ago
  • Thanks, viren18febS - just tried that but there's another error upstream:

    ResponseText: The website encountered an unexpected error. Try again later.Error: Call to a member function getComponent() on null in Drupal\exif\ExifContent->filterFieldsOnSettings() (line 124 of modules/contrib/exif/src/ExifContent.php). Drupal\exif\ExifContent->entityInsertUpdate('photos_image', Object) (Line: 1492)
    photos_image_update_exif_data(Object) (Line: 1472)
    photos_photos_image_presave(Object)
    call_user_func_array(Object, Array) (Line: 409)

    I'll have a look when I get more time...

  • I admit that my Drupal knowledge is not enough to figure out what's going on exactly. From a code perspective, it seems like the Exif folks ought to add a NULL check here: https://git.drupalcode.org/project/exif/-/blob/8.x-2.x/src/ExifContent.p...
    As far as this module is concerned, I think this is "fixed" - although the only way I could achieve my objective of importing the photo metadata is by using the Image toolkit Imagick; indeed, I even had to disable the Exif Orientation module. In any case, I got a 500 error by using GD/Exif/Exif Orientation.
    Apologies I couldn't get any farther with this and fix the real issue (i.e., making this work with the GD Image toolkit).

  • 🇺🇸United States Nathaniel

    Still need to test a bit more, but after applying this patch and editing / saving this form: /admin/structure/photos/form-display I was able to upload images without error. Not seeing the exif data yet though.

    • viren18febS authored ef1c9405 on 6.0.x
      Issue #3413909 by viren18febS: Integration with EXIF module is outdated.
      
  • Status changed to Fixed 9 months ago
  • 🇺🇸United States Nathaniel

    Thanks for the patch!

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

Production build 0.71.5 2024