Hello,
i have created a plugin (code available on github) that adds two buttons to rotate pictures via the omeka admin on files views pages. I was working fine until some months ago and I believe one of the update to omeka core has broken things but I can’t find what the issue is.
At the moment I get an error in the file application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php because the getOptions(“path_to_convert”) returns an empty string, even if this option is set in my database. I have been able for the moment to quickfix the issue by replacing :
That works fine but I would be interested by an idea to properly fix that. I believe that there is an issue in the way I am creating the derivative stratergy but I can’t figure it out.
if (!$pathToConvert = get_option('path_to_convert')) {
throw new Omeka_File_Derivative_Exception(__('The ImageMagick directory path is missing.'));
}
change it to
$pathToConvert = get_option('path_to_convert');
if (empty($pathToConvert)) {
throw new Omeka_File_Derivative_Exception(__('The ImageMagick directory path is missing.'));
}
At least that worked for me. Might be a change in how PHP interprets that construction between different versions.