Page MenuHomePhabricator

Re-ordering columns in workboard throws AphrontQueryDuplicateKeyException exception
Closed, ResolvedPublic

Description

Start with this:
{F176877 size=full}

Re-order one column:
{F176879 size=full}

Then drag & drop doesn't work anymore:
{F176881 size=full}

Event Timeline

swisspol raised the priority of this task from to Needs Triage.
swisspol updated the task description. (Show Details)
swisspol added a subscriber: swisspol.

That's on OS X 10.9.4 w/ Chrome Version 35.0.1916.153.

Actually I just realized re-order doesn't work at all: after clicking Done, the columns order is the same.

Well here's the problem:

Request URL:https://phabricator..../project/board/1/reorder/
Request Method:POST
Status Code:500 Internal Server Error

From php-fpm log:

[12-Jul-2014 10:08:35 America/Los_Angeles] [2014-07-12 10:08:35] EXCEPTION: (AphrontQueryDuplicateKeyException) #1062: Duplicate entry 'PHID-PROJ-ek56uvdf2kihdqr6pax5-2' for key 'key_sequence' at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:296]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:275]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #1 AphrontMySQLDatabaseConnectionBase::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:181]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string, string)
[12-Jul-2014 10:08:35 America/Los_Angeles]   #4 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:26]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #5 AphrontDatabaseConnection::query(string, string, string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1172]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #6 LiskDAO::update() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1098]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #7 LiskDAO::save() called at [<phabricator>/src/applications/project/controller/PhabricatorProjectBoardReorderController.php:91]
[12-Jul-2014 10:08:35 America/Los_Angeles]   #8 PhabricatorProjectBoardReorderController::processRequest() called at [<phabricator>/webroot/index.php:95]
[12-Jul-2014 10:08:35 America/Los_Angeles] PHP Fatal error:  Uncaught exception 'Exception' with message 'Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction().' in /mnt/phabricator/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:69
Stack trace:
#0 [internal function]: AphrontDatabaseTransactionState->__destruct()
#1 {main}
  thrown in /mnt/phabricator/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php on line 69

I tried in a different board and got the same problem:

[12-Jul-2014 10:11:54 America/Los_Angeles] [2014-07-12 10:11:54] EXCEPTION: (AphrontQueryDuplicateKeyException) #1062: Duplicate entry 'PHID-PROJ-niecmdpb725ewibs4fol-1' for key 'key_sequence' at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:296]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:275]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #1 AphrontMySQLDatabaseConnectionBase::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:181]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string, string)
[12-Jul-2014 10:11:54 America/Los_Angeles]   #4 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:26]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #5 AphrontDatabaseConnection::query(string, string, string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1172]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #6 LiskDAO::update() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1098]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #7 LiskDAO::save() called at [<phabricator>/src/applications/project/controller/PhabricatorProjectBoardReorderController.php:91]
[12-Jul-2014 10:11:54 America/Los_Angeles]   #8 PhabricatorProjectBoardReorderController::processRequest() called at [<phabricator>/webroot/index.php:95]
[12-Jul-2014 10:11:54 America/Los_Angeles] PHP Fatal error:  Uncaught exception 'Exception' with message 'Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction().' in /mnt/phabricator/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:69
Stack trace:
#0 [internal function]: AphrontDatabaseTransactionState->__destruct()
#1 {main}
  thrown in /mnt/phabricator/phabricator/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php on line 69
chad triaged this task as Normal priority.Jul 12 2014, 5:22 PM
chad added a project: Workboards.
chad added subscribers: epriestley, chad.
swisspol renamed this task from Workboard column re-ordering only allow re-ordering one column at a time to Re-ordering columns in workboard throws AphrontQueryDuplicateKeyException exception.Jul 12 2014, 5:23 PM

Oops -- I effectively had D9914 applied locally which is why this worked for me.