500 Internal Server Error while publishing selected content from workspace

While publishing selected content from one workspace to another, I am getting this. But While publishing all there is no issue. I am getting this issue quite often.
Can somebody please help me to understand the exact issue or circumstances?

An exception occurred while executing 'UPDATE neos_contentrepository_domain_model_nodedata SET pathhash = ?, path = ?, parentpathhash = ?, parentpath = ?, lastmodificationdatetime = ?, version = version + 1 WHERE persistence_object_identifier = ?

AND version = ?’ with params [“a78e4a3077fb5493f501de9014e3aaf1”, “/sites/schrack4students/node-hrc66zim8wc5r/node-e0667dri9kejm/node-ij921t29rswzx/node-ibcb63kxkauns/node-hxsajgbiu8kg2/main/node-xq45ksg13t657”, “9fa14ed4cca6610481cd8e11a6059b94”, “/sites/schrack4students/node-hrc66zim8wc5r/node-e0667dri9kejm/node-ij921t29rswzx/node-ibcb63kxkauns/node-hxsajgbiu8kg2/main”, “2021-02-01 13:05:24”, “d3eb41e9-d31e-4891-8823-66d84f6e3d0f”, 3]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘a78e4a3077fb5493f501de9014e3aaf1-editing-s8d4q-fb11fdde869d0a8fc’ for key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’
Exception Code 0
Exception Type Doctrine\DBAL\Exception\UniqueConstraintViolationException
Thrown in File Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
Line 74

Nested Exception
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘a78e4a3077fb5493f501de9014e3aaf1-editing-s8d4q-fb11fdde869d0a8fc’ for key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’
Exception Code 23000
Exception Type Doctrine\DBAL\Driver\PDOException
Thrown in File Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
Line 143

Nested Exception
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘a78e4a3077fb5493f501de9014e3aaf1-editing-s8d4q-fb11fdde869d0a8fc’ for key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’
Exception Code 23000
Exception Type PDOException
Thrown in File Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
Line 141

Thanks in advance!

Hi Anurag :wave:

Did you upgrade your Neos CMS version?

It seems like a missing ./flow node:repair in a upgrade process

1 Like

Thanks for quick response.

I am using Neos 4.x from Last 1 year we did not migrated CMS version since last.
Yes Soren, I did this ./flow node:repair twice but still facing same issue.

Your suggestion for the solution help me a lot.

There are cases where selective publishing doesn’t work currently when certain conditions are met.

F.e. you move a node from one place to another. Then a shadow node exists in the place where the node has been and the node is in the new place.
Now this can happen in several workspaces including live at the same time.

When you do partial publishing this can create errors as another node now wants to be in the place of the shadow node.

I’m currently investigating cases like this for a customer.

It would be great if you could do some research for the node identifiers which cause the problem and verify if it’s a similar issue with moved/deleted nodes.

1 Like

Thank you for your suggestion, I will debug and try to find the route cause node element.
If you find something please share it with me.

Hi there. Sorry for commenting here again, but I am experiencing the same issue right now. Publishing a workspace (neue-navigation-udzay) to live is not possible. It also gives me the following error, when I run ./flow node:repair --workspace neue-navigation-udzay:

Checking for nodes with missing shadow nodes …
❱ Add 5501 missing shadow nodes
An exception occurred while executing ‘INSERT INTO neos_contentrepository_domain_model_nodedata (persistence_object_identifier, pathhash, path, parentpathhash, parentpath, identifier, sortingindex, removed, dimensionshash, lastmodificationdatetime, lastpublicationdatetime, hiddenbeforedatetime, hiddenafterdatetime, dimensionvalues, properties, nodetype, creationdatetime, hidden, hiddeninindex, accessroles, workspace, contentobjectproxy, movedto) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [“694dfbe0-e3c1-400b-96fe-2de9db0babd1”, “92880ddd3b03bbd9592c9652848c07c7”, “/sites/newland-basetheme/node-d0f6erua8z8tj/node-fdsivy5cijqrj/node-5dlx1195kjbx8/main/node-d32o0q0rq15p1”, “2a6faf19f454558a3cdc8796e30a6016”, “/sites/newland-basetheme/node-d0f6erua8z8tj/node-fdsivy5cijqrj/node-5dlx1195kjbx8/main”, “458d20e6-cc80-4503-8973-d3b4ab47539d”, 100, 1, “8f21da181f6ce38197fcb78d49f5384e”, “2024-03-19 17:21:16”, null, null, null, “{\n "language": {\n "0": "fr"\n }\n}”, “{\n "marginTop": "mt-10",\n "title": "Container"\n}”, “Newland.BaseTheme:Container”, “2024-03-19 17:21:16”, 0, 0, “{}”, “neue-navigation-udzay”, null, “000481bc-64c6-4579-afb9-d7fb6534295e”]:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
‘92880ddd3b03bbd9592c9652848c07c7-neue-navigation-udzay-8f21da…’ for
key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’

Type: Doctrine\DBAL\Exception\UniqueConstraintViolationException
File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriv
er.php
Line: 74

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘92880ddd3b03bbd9592c9652848c07c7-neue-navigation-udzay-8f21da…’ for key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’

Type: Doctrine\DBAL\Driver\PDO\Exception
Code: 23000
File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php
Line: 18

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘92880ddd3b03bbd9592c9652848c07c7-neue-navigation-udzay-8f21da…’ for key ‘UNIQ_CE6515692DBEC7578D94001992F8FB01’

Type: PDOException
Code: 23000
File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
Line: 117

Do you have any ideas what this could be and how to solve it?

Thanks in advance!

I think could solve the problem:

I found out that there are two objects when I search for the ID 000481bc-64c6-4579-afb9-d7fb6534295e from the error message. I found both of them in the neos_contentrepository_domain_model_nodedata table. In the column removed one had the value 0 the other one 1 (maybe this is a shadow node then?!). When I wanted to remove the entry with removed = 1, I noticed that there are way more entries that share the same behavior, so I run this command in phpMyAdmin under the SQL tab of the neos_contentrepository_domain_model_nodedata table: DELETE FROM neos_contentrepository_domain_model_nodedata WHERE removed = 1;

After that I could run node:repair but also the workspace:publish task without any problems.