duplicate key value violates unique constraint - Postgres
0
265
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

1 participant


duplicate key value violates unique constraint - Postgres
duplicate key value violates unique constraint - Postgres

Hi, it looks like plugins that use PluginLibrary's templates method are breaking in the latest version of MyBB. To test this, I freshly installed one such plugin, Symposium, which gave me the following error upon installation.

I am using the following:

MyBB Version: 1.8.33
PHP Version: 7.4.33
SQL Engine: PostgreSQL (PDO) 14.8

I created it using the official Docker Compose file (https://github.com/mybb/docker).


<error>
<dateline>1683944216</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 23505 - ERROR:  duplicate key value violates unique constraint "mybb_templategroups_pkey"
DETAIL:  Key (gid)=(3) already exists.
Query: INSERT
INTO mybb_templategroups (prefix,title)
VALUES ('symposium','Symposium')</message>
<back_trace>#0  errorHandler->error() called at [/inc/AbstractPdoDbDriver.php:388]
#1  AbstractPdoDbDriver->error() called at [/inc/AbstractPdoDbDriver.php:467]
#2  AbstractPdoDbDriver->query() called at [/inc/db_pgsql_pdo.php:52]
#3  PostgresPdoDbDriver->query() called at [/inc/AbstractPdoDbDriver.php:500]
#4  AbstractPdoDbDriver->write_query() called at [/inc/db_pgsql_pdo.php:193]
#5  PostgresPdoDbDriver->insert_query() called at [/inc/plugins/pluginlibrary.php:273]
#6  PluginLibrary->templates() called at [/inc/plugins/symposium.php:211]
#7  symposium_install() called at [/admin/modules/config/plugins.php:432]
#8  require() called at [/admin/index.php:830]
</back_trace>
</error>


https://community.mybb.com/thread-238260.html

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.

Forum Jump:


Users browsing this thread:
1 Guest(s)