[solved]Node:repair exception thrown in "remove nodes with invalid dimensions" step

Hi guys

sorry for spamming so much. But if I ran./flow node:repair I have the following exceptions.

Do you want to remove 18 nodes with invalid dimensions now? (y/n)y

An exception occurred while executing 'DELETE FROM typo3_typo3cr_domain_model_nodedata WHERE identifier = ?
AND dimensionshash = ?' with params
["44791517-7f82-4c1c-8f45-68265215f278",
"fb11fdde869d0a8fcfe00a2fd35c031d"]:

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or
update a parent row: a foreign key constraint fails
(`xy`.`typo3_typo3cr_domain_model_workspace`, CONSTRAINT
`FK_71DE9CFBBB46155` FOREIGN KEY (`rootnodedata`) REFERENCES
`typo3_typo3cr_domain_model_nodedata` (`persistence_object_ident)

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

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`xy`.`typo3_typo3cr_domain_model_workspace`, CONSTRAINT `FK_71DE9CFBBB46155` FOREIGN KEY (`rootnodedata`) REFERENCES `typo3_typo3cr_domain_model_nodedata` (`persistence_object_ident)

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

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`xy`.`typo3_typo3cr_domain_model_workspace`, CONSTRAINT `FK_71DE9CFBBB46155` FOREIGN KEY (`rootnodedata`) REFERENCES `typo3_typo3cr_domain_model_nodedata` (`persistence_object_ident)

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

How can I fix this exceptions?

Hello Marv,

which version of Neos do you use? Are the doctrine migrations applied?

I’ve seen similar problem if node were in a workspace that no longer existed. But i think thas was before Neos 2.3.

Directly looking at the database usually helps to understand such errors. If you are on Mac i recommend “Sequel Pro” for that.

Regards, Martin

No migration was necessary

I have started developing with Version 2.2. Later I installed the new version 2.3 and then I imported the site.

Greetings

Was the cr empty before importing? Maybe some old nodes are still in there and are now making trouble.

I usually could understand and solve such problems by reading the error message + exception log and looking into the database directly. The nodeData db-table is quite easy to understand. Just make sure to have a dB-backup before you alter something directly.

Regards, Martin