Contact Admin

SQL error after activation (phpBB 3.2.2) - Contact Admin

SQL error after activation (phpBB 3.2.2)

by R3gi » Sun Mar 18, 2018 5:40 pm

Hi,
I'm recieving this error after saving changes in the extension's configuration page (e.g. when I want to enable it).

Code: Select all

SQL ERROR [ mysqli ]

Duplicate entry 'contactadmin_enable' for key 'PRIMARY' [1062]

SQL

INSERT INTO stroj_config (config_name, config_value, is_dynamic) VALUES ('contactadmin_enable', 1, 0)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 996
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/config/db.php
LINE: 161
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/config/db.php
LINE: 122
CALL: phpbb\config\db->set_atomic()

FILE: [ROOT]/ext/rmcgirr83/contactadmin/controller/admin_controller.php
LINE: 220
CALL: phpbb\config\db->set()

FILE: [ROOT]/ext/rmcgirr83/contactadmin/controller/admin_controller.php
LINE: 160
CALL: rmcgirr83\contactadmin\controller\admin_controller->set_options()

FILE: [ROOT]/ext/rmcgirr83/contactadmin/acp/contactadmin_module.php
LINE: 36
CALL: rmcgirr83\contactadmin\controller\admin_controller->display_options()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: rmcgirr83\contactadmin\acp\contactadmin_module->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
I've installed version 1.1.4 from this Customisation Database and tried to run it on phpBB 3.2.2 board (php 5.6.30, MySQL(i) 5.5.34). This extension hasn't been installed before. When I tested it on my localhost test server with phpBB 3.2.2 it worked without problems.

Please, is there a way to fix this issue?
User avatar
R3gi
Registered User
Posts: 103
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: SQL error after activation (phpBB 3.2.2)

by RMcGirr83 » Sun Mar 18, 2018 10:55 pm

Did you have the mod, not extension...mode from 3.0 days, installed before? Try to uninstall and delete date of the extension.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: SQL error after activation (phpBB 3.2.2)

by R3gi » Mon Mar 19, 2018 12:44 pm

No, as far as I know. But the DB itself is 10 years old so I can't say for 100 % that it doesn't contain any remaining data if it was installed in the past. I'll try to reinstall the extension ASAP, but I'm worried the dog is burried elsewhere…
User avatar
R3gi
Registered User
Posts: 103
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: SQL error after activation (phpBB 3.2.2)

by RMcGirr83 » Mon Mar 19, 2018 1:01 pm

If uninstalling and deleting data doesn't fix it then you will have to go into the database and remove contactadmin_enable from the config table. Once you do that purge the cache and you should then be able to install and use the extension.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: SQL error after activation (phpBB 3.2.2)

by R3gi » Mon Mar 19, 2018 7:46 pm

Hmm, it seems the problem has been solved somehow. I've re-enabled the internal phpBB Contact admin formular (after it was disabled by the extension), deleted extension's data, enabled it and now it seems to work.
User avatar
R3gi
Registered User
Posts: 103
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: SQL error after activation (phpBB 3.2.2)

by RMcGirr83 » Mon Mar 19, 2018 7:48 pm

Glad you got it working.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact: