Integrity constraint violation
Permalink
Dear C5 community,
I've got an error message when I want to copy a page + children.
I've got the same problem when I want to empty the trash.
Thanks for your help
moosh
I've got an error message when I want to copy a page + children.
I've got the same problem when I want to empty the trash.
{"error":{"message":"An exception occurred while executing 'INSERT INTO QueueMessages (queue_id, created, body, md5) VALUES (?, ?, ?, ?)' with params [1, 1458842286, \"a:5:{s:3:\\\"cID\\\";s:3:\\\"202\\\";s:13:\\\"cDisplayOrder\\\";s:2:\\\"24\\\";s:9:\\\"cParentID\\\";s:3:\\\"128\\\";s:5:\\\"level\\\";i:1;s:5:\\\"total\\\";i:0;}\", \"006d37bf1bafa15e3f1211852e968be3\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`XXXXXX`.`QueueMessages`, CONSTRAINT `queuemessages_ibfk_1` FOREIGN KEY (`queue_id`) REFERENCES `queues` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE)"},"errors":["An exception occurred while executing 'INSERT INTO QueueMessages (queue_id, created, body, md5) VALUES (?, ?, ?, ?)' with params [1, 1458842286, \"a:5:{s:3:\\\"cID\\\";s:3:\\\"202\\\";s:13:\\\"cDisplayOrder\\\";s:2:\\\"24\\\";s:9:\\\"cParentID\\\";s:3:\\\"128\\\";s:5:\\\"level\\\";i:1;s:5:\\\"total\\\";i:0;}\", \"006d37bf1bafa15e3f1211852e968be3\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`XXXXXX`.`QueueMessages`, CONSTRAINT `queuemessages_ibfk_1` FOREIGN KEY (`queue_id`) REFERENCES `queues` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE)"]}
Thanks for your help
moosh
Little up :)
First, check in phpmyadmin (or similar tool) if table QueueMessages exists in your database.
Second, check if your table is exactly named QueueMessages (no queuemessages).
Second, check if your table is exactly named QueueMessages (no queuemessages).
Thank you for your reply.
In my DB, the table QueueMessages is strictly named QueueMessages :)
thanks
moosh
In my DB, the table QueueMessages is strictly named QueueMessages :)
thanks
moosh
Solved!
The table QueueMessages has been corrupted during migration DEV<>PROD.
So, I DROP it then rebuilt. It works!
thanks
moosh
The table QueueMessages has been corrupted during migration DEV<>PROD.
So, I DROP it then rebuilt. It works!
thanks
moosh