core icon indicating copy to clipboard operation
core copied to clipboard

Categories are removed on Page as Content when using a workflow

Open oarrietadotcms opened this issue 9 years ago • 4 comments

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)

  1. Go to Types & Tags -> Workflow -> Add Workflow Scheme.
  2. Name: 'Automated Save & Publish' -> Save -> Click on New scheme.
  3. Add Workflow Step -> Name : Published - > Add
  4. 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.

  1. Edit Workflow Scheme: Mandatory: True, Default Action: Save & Publish -> Save
  2. 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

  1. 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.

  1. Go to Page Properties and check that Categories(Topic) are still there -> Cancel.
  2. Lock for Editing -> Save & Publish.
  3. 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

oarrietadotcms avatar Aug 14 '17 17:08 oarrietadotcms

By sending the null as an extra param, we use this checkin implementation that find the Categories from DB and save them again.

oarrietadotcms avatar Aug 14 '17 17:08 oarrietadotcms

This is only for 4.3.0 cause all checkin methods were refactored in 5.0

dsilvam avatar Feb 12 '18 21:02 dsilvam

Passed QA. Categories are showing on Page as Content when using a workflow image

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

shaydotcms avatar Feb 14 '18 21:02 shaydotcms

Not required for 5.0

shaydotcms avatar Feb 27 '18 15:02 shaydotcms