Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30555

ezplatform:content:cleanup-versions command is breaking the database.

    XMLWordPrintable

    Details

      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

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              remy_php Rémy PHP
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: