Git Product home page Git Product logo

Comments (4)

jresse avatar jresse commented on July 2, 2024

Even i have the same error

piwigo: 13.7.0
Ubuntu: 22.04.2 LTS
PHP 8.1.2-1ubuntu2.11

Adding below error from the apache error.log file:
modified error log to hide local system info

PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry 'MugShot' for key 'PRIMARY' in <piwigo-install-path>/include/dblayer/functions_mysqli.inc.php:139 Stack trace: #0 <piwigo-install-path>/include/dblayer/functions_mysqli.inc.php(139): mysqli->query() #1 <piwigo-install-path>/plugins/MugShot/include/helpers.php(84): pwg_query() #2 <piwigo-install-path>/plugins/MugShot/maintain.inc.php(40): create_facetag_table() #3 <piwigo-install-path>/plugins/MugShot/maintain.inc.php(65): MugShot_maintain->install() #4 <piwigo-install-path>/admin/include/plugins.class.php(202): MugShot_maintain->activate() #5 <piwigo-install-path>/include/ws_functions/pwg.extensions.php(76): plugins->perform_action() #6 <piwigo-install-path>/include/ws_core.inc.php(600): ws_plugins_performAction() #7 <piwigo-install-path>/include/ws_protocols/rest_handler.php(41): PwgServer->invoke() #8 <piwigo-install-path>/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest() #9 <piwigo-install-path>/ws.php(22): PwgServer->run() #10 {main} thrown in <piwigo-install-path>/include/dblayer/functions_mysqli.inc.php on line 139, referer: http://<ipaddress>/photos/admin.php?page=plugins&plugin=MugShot&pwg_token=1ecf01c9207585c1d9616d971224868f&action=activate&filter=deactivated

from mugshot.

jresse avatar jresse commented on July 2, 2024

Update:

  1. When the MugShot extension is tried to be activated, it does an insert operation on the CONFIG_TABLE
  2. But the installation of the piwigo already has an entry of MugShot in the CONFIG_TABLE and the sql insert operation fails resulting in the failure to activate the extension

I was able to get the extension activated by below:
WA: manually delete the MugShot entry from the piwigo_config table of the piwigo_db

from mugshot.

achuet avatar achuet commented on July 2, 2024

Thanks @jresse ..

Use this to delete the entry manually.
DELETE FROM piwigo_config Where param = 'MugShot';

from mugshot.

laerm avatar laerm commented on July 2, 2024

Check line 82 of the file plugins/MugShot/include/helpers.php

If it reads

$configQuery = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("MugShot","","MugShot configuration values");';

Change to

$configQuery = 'REPLACE INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("MugShot","","MugShot configuration values");';

from mugshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.