Prime Links

General Error - Prime Links

General Error

by wads24 » Sun Oct 14, 2018 6:09 am

I went to save the settings and got this error

Code: Select all

General Error
SQL ERROR [ mysqli ]

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

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('primelinks_enable_general', 1, 0)

BACKTRACE

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

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
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/primehalo/primelinks/acp/main_module.php
LINE: 40
CALL: phpbb\config\db->set()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: primehalo\primelinks\acp\main_module->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
Thanks in advance for a reply.
User avatar
wads24
Registered User
Posts: 513
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: General Error

by primehalo » Sun Oct 14, 2018 11:58 pm

I have no idea why this is happening or how to recreate it. It's not happening for me. The backtrace isn't showing any useful info but line #40 in main_module.phpn is where primelinks_enable_general is set when the form is submitted:
$config->set('primelinks_enable_general', $request->variable('primelinks_enable_general', true));

That set() function is from phpBB, not one I wrote. I'd suggested maybe try clearing the forum's cache, and if that doesn't work maybe uninstalling the extension and then reintall.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2816
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: General Error

by horseguards » Thu Jan 17, 2019 10:50 pm

Hello,

I got the same error message. I have phpBB 3.2.3 on PHP 7.2.14.

Any idea how to solution this? I REALLY need this extension.


Code: Select all

SQL ERROR [ mysqli ]

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

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('primelinks_inlink_domains', '', 0)

BACKTRACE

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

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
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/primehalo/primelinks/acp/main_module.php
LINE: 46
CALL: phpbb\config\db->set()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: primehalo\primelinks\acp\main_module->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
User avatar
horseguards
Registered User
Posts: 74
Joined: Sun Oct 26, 2008 12:18 pm
Location: Mar del Plata [Argentina]
Name: P C
Contact:

Re: General Error

by primehalo » Fri Jan 18, 2019 1:10 am

I think I see how this error is happening, but I don't know WHY it is happening. It seems difficult to explain with just text so I took a screenshot of some code so I could write my notes on it:
phpbb-config-db.png
My version of the ACP module is following the example laid out in the official tutorial https://area51.phpbb.com/docs/dev/3.1.x ... el-modules

So I think I would need help from one of the phpBB coding experts to figure this out. I have never seen this error happen on either my test website or my live website.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
primehalo
Former Team Member
Posts: 2816
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: General Error

by Leinad4Mind » Wed Jan 23, 2019 12:08 pm

This is because of an old persistant bug that existed on 3.1 too and was finally solved at 3.2.4.

More info here: https://tracker.phpbb.com/browse/PHPBB3-15850
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
Leinad4Mind
Translator
Posts: 839
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: General Error

by horseguards » Sun Feb 03, 2019 4:39 am

I just upgraded to phpBB 3.2.4 and PrimeLinks works! Thanks!
User avatar
horseguards
Registered User
Posts: 74
Joined: Sun Oct 26, 2008 12:18 pm
Location: Mar del Plata [Argentina]
Name: P C
Contact: