cccraig/MugShot

MugShot Plugin Errror

Closed this issue · 4 comments

I am struggling to resolve an error with the Mugshot plugin on a fresh install of Piwigo. When I install mugshot it shows a red caution icon in the top left corner of the mugshot plugin and I get a pop when I enable it that says an error has occurred. When I look at apache2 error logs this show up in there. I have followed a few thread online but nothing seems to help. Any help you can provide would be greatly appreciated.

[Wed Apr 06 05:05:31.410064 2022] [php7:warn] [pid 6882] [client 172.70.131.179:20070] PHP Warning: [mysql error 1062] Duplicate entry 'MugShot' for k
ey 'PRIMARY'\nINSERT INTO piwigo_config (param,value,comment) VALUES ("MugShot","","MugShot configuration values"); in /var/www/html/piwigo/include/dbl
ayer/functions_mysqli.inc.php on line 847, referer: https://www.hessel.family/admin.php?page=plugins&tab=installed

Piwigo 12.2.0
Operating system: Linux
PHP: 7.4.28
MySQL: 5.5.5-10.4.24-MariaDB-1:10.4.24+maria~focal [2022-04-06 05:18:52]
Graphics Library: External ImageMagick 6.9.10-23
Cache size 20 Mo

Plugins
Community
LocalFiles Editor
Mug Shot
No Stats For Robots
Take A Tour of Your Piwigo
VideoJS

Hi, I had the same issue, I resolved editing the table "piwigo_config".
Try to remove the PRIMARY key on the param column. I've done via phpmyadmin and now I can turn on the plugin.

immagine

Hi @klauz1984 I can not thank you enough that did the trick and thge plugin is starting now. One thing the plug is doing is showing a caution where when I hover over it is telling me that mugshot is not compatible with the version of Piwigo I am running. It looks like everything this is working so hoping this is just cosmetic. Were you having this same issue and if you resolve it any help would be appreciated.

Screen Shot 2022-05-26 at 2 05 05 AM

Here is my current versions.
Piwigo 12.2.0
Operating system: Linux
PHP: 7.4.29 (Show info) [2022-05-26 02:06:04]
MySQL: 5.5.5-10.4.25-MariaDB-1:10.4.25+maria~focal [2022-05-26 06:06:04]
Graphics Library: ImageMagick 6.9.10-23
Cache size 140.47 Mo

Activated plugin list10
Community
Crypto Captcha
GThumb+
LocalFiles Editor
Mug Shot
No Stats For Robots
Tag Recognition
Take A Tour of Your Piwigo
User Tags

Thanks again, Tom.

Hi, I think that cccraig didn't update the version on main.inc.php file, try to change the version on /piwigo/plugins/MugShot/main.inc.php

(row 3) Version: 2.0.3
(row 30) define('MUGSHOT_VERSION', '2.0.3')

Thank you so much, I do remember this from earlier troubleshooting but slipped my mind, soon as I vi'd to that my cursor was stil on the version haha. Thanks again for all your help, this fixed the issue and that plugin is working perfectly now. Really appreciate it.