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

Deleting a content type doesn't delete drafts

    Details

      Description

      To be verified
      A DELETE /content/types/<contentTypeId> request won't delete the draft the content type may have.

      It also seems that the remaining draft can't be deleted using the API, PHP or REST. Since the type itself doesn't exist, it doesn't pass the checks.

      The database is inconsistent.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          The draft is a separate object that needs to be deleted manually (DELETE /api/ezp/v2/content/types/xx/draft). DELETE /content/types/xx will delete the published version without deleting the draft, as expected ?

          Do we need an option maybe ? In many cases, you don't want to keep the draft...

          Show
          Bertrand Dunogier added a comment - The draft is a separate object that needs to be deleted manually (DELETE /api/ezp/v2/content/types/xx/draft). DELETE /content/types/xx will delete the published version without deleting the draft, as expected ? Do we need an option maybe ? In many cases, you don't want to keep the draft...
          Hide
          Bertrand Dunogier added a comment -

          I also guess that it makes caching easier... but it's more logic on client side.

          Show
          Bertrand Dunogier added a comment - I also guess that it makes caching easier... but it's more logic on client side.
          Hide
          Christian Bacher (Inactive) added a comment -

          DELETE /content/types/xx must delete the draft too.
          So the PAPI method deleteContentType($contentType) for a content type with status DEFINED must delete the DRAFT if exists.

          Show
          Christian Bacher (Inactive) added a comment - DELETE /content/types/xx must delete the draft too. So the PAPI method deleteContentType($contentType) for a content type with status DEFINED must delete the DRAFT if exists.
          Hide
          Christian Bacher (Inactive) added a comment -

          This should be done by now on BL level not on persistence level

          Show
          Christian Bacher (Inactive) added a comment - This should be done by now on BL level not on persistence level

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m