ramack / exiftool_gps

Exiftool GPS plugin for Piwigo gallery (PWG)
GNU General Public License v3.0
1 stars 2 forks source link

Dependency on exiftool binary is not checked #2

Open ramack opened 6 years ago

ramack commented 6 years ago

If exiftool binary is not found on the server the following warning is shown:

Warning: Invalid argument supplied for foreach() 
in.../plugins/exiftool_gps/main.inc.php on line 23

This is not nice and shall be replaced by a check whether exiftool binary is available and a understandable warning shall be output.

ramack commented 6 years ago

add

if (`which exiftool`) {
    ...
}else{
    warn -> this is where I do not yet know how to do this in a simple manner...
}

see http://piwigo.org/forum/viewtopic.php?id=28450

dgrammlich commented 4 years ago

I had a further look at this issue. I am new to Piwigo and as far as I understand the structure and its templates you can not avoid adding a template or a admin.php to show a message in the administration backend. It seems like main.inc.php only is executed in the frontend.

I would not recommend to show the message in the frontend because it's a technical issue that a regular user can't fix or even understand.

As first shot I added a condition to avoid any PHP error messages in the frontend according to a missing exiftool installation. This issue is different to #6 as described in my comment there.

ramack commented 4 years ago

To be honest I have also not more experience with the server side of piwigo than what I learned during writing down this plugin. I have mainly published it because I wanted to have it for me and though it could be useful for others, but since it does the job in my gallery I did not really care about it. - Shame on me.

I fully agree, that showing the error in the user frontend is not a good option, but in my eyes better than nowhere at all. So in case you have an idea of how to show the warning with an admin.php or a template it would be great if you could implement it.

dgrammlich commented 4 years ago

Hi @ramack, sorry for the delay. I would love to contribute the missing parts. But it will take some more days due to a lack of time...

ramack commented 4 years ago

thanks for the feedback, I don't see the need to hurry here. So I'd happily wait for you proposal!

shanchieh commented 4 years ago

In Ununtu 18.04 . run following command can solve my problem

sudo apt install libimage-exiftool-perl

klaoun commented 1 year ago

Hello, i propose line 23 for foreach ((array) $metadata as $key => $section) { line 24 for foreach ((array) $section as $name => $val) {

thanks