Categories are removed on Page as Content when using a workflow
Client ticket: https://my.dotcms.com/tickets/detail.dot?id=ea211e53-7345-4860-996a-028e8a529561
Possible Solution
See commit below.
Known Workarounds
None.
Steps to Reproduce (for bugs)
- Go to Types & Tags -> Workflow -> Add Workflow Scheme.
- Name: 'Automated Save & Publish' -> Save -> Click on New scheme.
- Add Workflow Step -> Name : Published - > Add
- Add Workflow Action for Published
4.1 Name: Save & Publish, Save Content: True (check), Who can use: Admin, Assign To: Current User, Next Step: Published -> Save. 4.2 Add "Unlock Content" Sub-action. 4.3 Add "Publish Content" Sub-action. 4.4 Save.
- Edit Workflow Scheme: Mandatory: True, Default Action: Save & Publish -> Save
- Go to Types & Tags -> Content Types -> Add New Content Type.
6.1 Type: Page, Name: Page with Categories, Workflow: Automated Save & Publish -> Save. 6.2 Add New Field -> Display Type: Category, Label -> Topic, Category: Event Types -> Save
- Go to Content -> Search -> Type: Page With Categories -> Add New Content.
7.1 Title: Test Page, Template: Blank, Cache TTL: 0 7.2 Go to Advanced Properties -> Add 2 Categories to Topic. 7.3 Save and Publish.
- Go to Page Properties and check that Categories(Topic) are still there -> Cancel.
- Lock for Editing -> Save & Publish.
- Go to Page Properties: Categories are NOT there.
Context
We use this checkin from the WorkflowResource and inside the method we send the categories as a new ArrayList.
Your Environment
- dotCMS version used: 3.6.2 (client), master
By sending the null as an extra param, we use this checkin implementation that find the Categories from DB and save them again.
This is only for 4.3.0 cause all checkin methods were refactored in 5.0
Passed QA.
Categories are showing on Page as Content when using a workflow

Tested on release-4.3.0 branch Mac OS 10.10 / Postgres 9.6.6 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8.6
Not required for 5.0