cccraig / MugShot

Plugin for piwigo.
MIT License
15 stars 15 forks source link

Upgraded from MugShot 1.x to 2.0.2 and Piwigo 10 (minor issues) #23

Closed amenk closed 2 years ago

amenk commented 2 years ago

I upgraded my Piwigo instance. It did not show MugShot as compatible, still I tried :-)

The following issues appear:

When reactivating the plugn "an error occured" and ws.php responds in the network tab:

<b>Warning</b>:  [mysql error 1062] Duplicate entry 'MugShot' for key 'PRIMARY'
INSERT INTO piwigo_config (param,value,comment) VALUES ("MugShot","","MugShot configuration values"); in 
<b>/var/www/virtual/example/html/include/dblayer/functions_mysqli.inc.php</b> on line <b>847</b><br />
</pre>{"stat":"ok","result":true}

At the end of gallery pages I get

Warning
: unserialize() expects parameter 1 to be string, array given in
/var/www/virtual/example/html/plugins/MugShot/main.inc.php
on line
247

~New face-tags are not saved~ EDIT: The are saved - I just did not hit the save button :-)

amenk commented 2 years ago

https://github.com/cccraig/MugShot/blob/fe52f2bd54575b164e5250a7132e4f8b1a8998fc/main.inc.php#L43

removing the unserialize() works here, I already have a config array - not sure if that is due to the new Piwigo version or if some config is messed in my database.

cccraig commented 2 years ago

@amenk Is this still a problem for you? I believe this should be corrected but the problem essentially I was double serializing the parameter somewhere.

amenk commented 2 years ago

Not sure, I patched it locally and removed that unserialize ... Will close it for now