Description
When you try to delete a content which is previously published after following some workflow transitions, you will get a 500 error. This is because the database table ezeditorialworkflow_workflows still has the contentId information.
The DeleteWorkflowSubscriber is dealing with the DeleteVersionSignal and DeleteContentSignal Signals but either DeleteTrashItemSignal or EmptyTrashSignal are implemented here.
When Content is deleted from the trash the information still remains in the above DB table.
Step to reproduce:
1. Create article using some workflow transitions
2. Use some transition (design, proofread, etc )
3. then publish it
4. delete it
5. Go to the trash and delete the item (either delete single item or empty trash)
6. Go to the dashboard
Actual result:
An exception has been thrown during the rendering of a template ("Could not find 'Content' with identifier 'array ( 'id' => 304, 'languages' => NULL, 'versionNo' => 1, )'").
Expected:
- Content Information are deleted from the `ezeditorialworkflow_*` tables
As workaround now if you change the Exception in the loadAllWorkflowMetadata() defined in WorkflowService.php from UnauthorizedException to \Exception the error will not break the view (in dev or prod) but when using it we will lost the really error.
The same try catch block should also implemented in loadWorkflowMetadataOriginatedByUser() around the loadContent() line.
Attachments
Issue Links
- is blocked by
-
EZP-29997 Expose information about removed content items in EmptyTrashSignal and DeleteTrashItemSignal
- Documentation Review done