Problem/Motivation

On my local development environment, the exiftool command fails with the following error:

sh: line 0: exec: exiftool: not found

I noticed this only happens when uploading a file through the UI, not when running drush metadata_sanitizer:clean.

Steps to reproduce

Upload a file through the UI, having #3570403: Hooks are not being triggered applied.

Proposed resolution

Add an option to define the full path where the executable can be found. When left empty, we should try some default paths.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Issue summary: View changes
dieterholvoet’s picture

Assigned: dieterholvoet » Unassigned
Issue summary: View changes
Status: Active » Needs review

In another issue the file sanitation logic should probably be moved to a service, to reduce duplication and to statically cache the executable path to make sure it's only being looked for once per request.

dieterholvoet’s picture

We should probably also add a hook_requirements implementation checking if the executable is available in any of the default or configured paths.

zarabatana’s picture

Status: Needs review » Needs work

Thanks for tackling this! Could you open an MR from the issue-fork branch 3570407-add-option-to?
The core requirement is an exiftool_path setting (optional full path). If empty, we can still try PATH/default locations so UI uploads work even when the webserver PATH differs from Drush.
If you have time, it’d be great to reuse the same resolver for both the upload path and the Drush command, and use it for the status/requirements check too (to avoid duplication).

zarabatana’s picture

Status: Needs work » Reviewed & tested by the community
zarabatana’s picture

Status: Reviewed & tested by the community » Fixed

MR !13 is now merged. This adds a configurable ExifTool executable path and default-path fallback, fixing the “exiftool: not found” error on UI uploads where the webserver PATH differs from Drush. The suggested service/refactor and requirements check can be handled in a follow-up. Marking fixed/closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

zarabatana’s picture

Status: Fixed » Closed (fixed)