Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: 1062 Duplicate entry when trying to publish workspace or run node:repair in it #4963

Open
1 task done
LIS-CorneliusLink opened this issue Mar 25, 2024 · 1 comment
Open
1 task done
Labels

Comments

@LIS-CorneliusLink
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When trying to publish a workspace (neue-navigation-udzay) to live, I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry error.

When I try to run ./flow node:repair --workspace neue-navigation-udzay I also get the following error message:

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

Expected Behavior

Workspaces can be published to Live and duplicate entries like this are resolved on their own.

Steps To Reproduce

No response

Environment

- Flow: 5.3.28
- Neos: 4.3.19
- PHP: 7.3.0

Anything else?

No response

@LIS-CorneliusLink
Copy link
Author

LIS-CorneliusLink commented Mar 25, 2024

In case anyone else has this problem, there might be a workaround. It is not the best thing to do, especially when you have big projects with a lot of changes in your workspaces. So be aware, that:

This might lead to loss of data, so always back up your files!

I found out that there are two objects when I search for the ID 000481bc-64c6-4579-afb9-d7fb6534295e from the above 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. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant