Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
2.5.1
Description
After executing the version deletion command:
php bin/console ezplatform:content:cleanup-versions --keep=3 --status archived
The database is corrupted.
Symptom
The Symptom is visible in the administration interface.
/content/location/26230
An exception has been thrown during the rendering of a template ("Could not find 'Content' with identifier 'array ( 'id' => 26564, 'languages' => NULL, 'versionNo' => 152, )'").
Small analysis of the database:
SELECT contentobject_id FROM ezcontentobject_version WHERE contentobject_id = 26564 AND version=152;
26564
SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = 26564 AND version=152;
Empty set (0.00 sec)
Search for corrupted versions
Corrupted versions are those that have no attributes.
SELECT COUNT(v.id) FROM ezcontentobject_version WHERE status=0 AND CONCAT(contentobject_id, '', version) NOT IN (SELECT CONCAT(contentobject_id, '', version) FROM ezcontentobject_attribute);
112438
Attachments
Issue Links
- relates to
-
EZP-30729 CleanupVersionsCommand causes database issues when removing versions of User ContentType
- Closed