Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: non unique id on update

Status Resolved
Add-on / Version Publisher 2.10.8
Severity
EE Version 5.4.2

Jelle Dijkstra

Mar 16, 2021

Hi Brian,
I was updating this site and got an error when updating publisher from 2.10.8 to latest. This happened on a server running php 5.6.
When i first clicked the update button i got an error saying some bracket was missing or something. However when i retried the update i think a part of the update already did some stuff and now i’m getting this error below:
Current version is on a php 7.2 server (as there are some magic quotes messages that i need to sort before updating to php 7.4
There’s no frontend at the moment so only control panel.

SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name ‘pub_key’:
ALTER TABLE `exp_publisher_titles` ADD UNIQUE KEY `pub_key` (entry_id, lang_id, status)
ee/legacy/database/drivers/mysqli/mysqli_connection.php:117

Stack Trace: Please include when reporting this error
#0 ee/legacy/database/drivers/mysqli/mysqli_driver.php(112): CI_DB_mysqli_connection->query(‘ALTER TABLE `ex…’)
#1 ee/legacy/database/DB_driver.php(270): CI_DB_mysqli_driver->_execute(‘ALTER TABLE `ex…’)
#2 ee/legacy/database/DB_driver.php(180): CI_DB_driver->simple_query(‘ALTER TABLE `ex…’)
#3 user/addons/publisher/updates/up_3_00_00.php(64): CI_DB_driver->query(‘ALTER TABLE `ex…’)
#4 user/addons/publisher/Library/Basee/Updater.php(95): Update_3_00_00->doUpdate()
#5 user/addons/publisher/upd.publisher.php(587): BoldMinded\Publisher\Library\Basee\Updater->runUpdates()
#6 ee/EllisLab/ExpressionEngine/Controller/Addons/Addons.php(551): Publisher_upd->update(‘2.10.8’)
#7 [internal function]: EllisLab\ExpressionEngine\Controller\Addons\Addons->update(Array)
#8 ee/EllisLab/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)
#9 ee/EllisLab/ExpressionEngine/Core/Core.php(118): EllisLab\ExpressionEngine\Core\Core->runController(Array)
#10 ee/EllisLab/ExpressionEngine/Boot/boot.php(156): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))
#11 admin.php(153): require_once(’...’)
#11 admin.php(153): require_once(’...’)

#1

BoldMinded (Brian)

Did you try the update from 2.10 when running PHP 7+? Or did you upgrade PHP afterward? If so, I’d recommend running the upgrade on a PHP 7 server.

#2

Jelle Dijkstra

I did the initial update on a php 5.6 server. Still have that one running. After i tried the update i noved a copy to a php7 server. mind you: this was the version that had the update started on php5.

#3

BoldMinded (Brian)

Yeah, try an update started on PHP 7 and see what happens.

#4

Jelle Dijkstra

getting the above error also on php7

#5

BoldMinded (Brian)

And you started the process over from the beginning or trying to resume an update? Eg did you roll the db back to the pre-upgrade state?

#6

Jelle Dijkstra

I din’t rool back the DB. Will try that too

#7

BoldMinded (Brian)

It might be in a half upgraded state. It’s complaining about a duplicate key, which the upgrade process should fix, but if something when wrong initially it could be stuck.

#8

Jelle Dijkstra

Well i managed to update this thing. I needed to take a fresh copy of the live site. Put the server to php 7.2. When i ran the publisher update, i got a php warning about use of constant BASEcausing trouble in future versions of php, which remained so i couldn’t continue the update. So next step was to make sure all error messaging on the server and in the EE config/admin.php/index.php files was turned off. Then took a fresh DB copy and ran the update. This time it went through. A bit cumbersome, but it’s running now.

#9

BoldMinded (Brian)

Glad you got it updated, sorry about the trouble.

Login to reply