dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
849 stars 466 forks source link

dotcontent.pull not working during unpublish step #29157

Open Neehakethi opened 2 months ago

Neehakethi commented 2 months ago

Parent Issue

No response

Problem Statement

We have encountered an issue with script execution in the Unpublish step of dotCMS workflows. The script works as expected when added to the Save sub-action but fails in the Unpublish step. Specifically, we are unable to fetch content details such as the content type name and other fields when the script is included in the Unpublish step.

Screenshot 2024-07-08 at 9 18 59 AM Screenshot 2024-07-08 at 9 18 50 AM

Screenshot 2024-07-08 at 9 24 37 AM Screenshot 2024-07-08 at 9 24 22 AM

Steps to Reproduce

Add the following script to the Save sub-action of a workflow: vtl

#set($contentType = $content.get('identifier'))
$contentType

#foreach($con in $dotcontent.pull("+identifier:$contentType +working:true +live:false",10,"modDate desc"))
    $con.title
    $con.contentType.name
#end

Publish content and observe the output, which correctly shows the content type name and other details. Add the same script to the Unpublish step of the workflow. Unpublish content and observe the output, which only shows the content identifier but fails to fetch the content type name and other details.

Acceptance Criteria

Expected Behavior: The script should work in the Unpublish step as it does in the Save sub-action, correctly fetching and displaying content details.

Actual Behavior: The script fails to fetch content details such as the content type name in the Unpublish step, only displaying the content identifier.

dotCMS Version

24.04 23.10 22.03

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.zendesk.com/agent/tickets/116793

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

prestonso commented 4 days ago

@Neehakethi is there a Freshdesk ticket for this?

erickgonzalez commented 4 days ago

@prestonso Since we migrated to Freshdesk, we lost all references, but it was a Zendesk ticket.

Neehakethi commented 4 days ago

@prestonso This should be the one : https://dotcms.freshdesk.com/a/tickets/26372