core icon indicating copy to clipboard operation
core copied to clipboard

NotifyAsigneeActionlet (custom workflow) invalid workflow item URL in email

Open yasindilekci opened this issue 9 years ago • 1 comments

In dotCMS 4 we are using a custom Workflow which includes a NotifyAsigneeActionlet (we are sending out an email to the assignee).

The NotifyAsigneeActionlet uses the WorkflowEmailUtil class to send the email, which includes the URL to the workflow item.

We noticed that the URL that should redirect the assignee to the workflow item, is incorrect.

An example of the URL that should redirect the assignee to the workflow item:

http://www.your-domain.com/c/portal/layout?plid=&ppid=workflow&ppaction=1&ppstate=maximized&ppmode=view&workflowstrutsaction=/ext/workflows/editworkflow*task&workflowcmd=view&*workflow_taskId=89e4bdeb-246b-49a6-9103-043610125547

Once you visit this URL, you get redirected to a blank page containing the following error:

An unexpected system error occurred.

null

The reason that the URL does not work is because the parameter 'plid' is empty. This is caused because the following line in the WorkFlowEmailUtil class is never true:

https://github.com/dotCMS/core/blob/044f2463efc7112283901b0da748b054a2ff7224/dotCMS/src/main/java/com/dotmarketing/portlets/workflows/util/WorkflowEmailUtil.java#L72

Replacing this line with if (lout.getPortletIds().contains(PortletID.WORKFLOW.toString())) { seems to fix it (just call toString())

yasindilekci avatar Nov 09 '17 15:11 yasindilekci

This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.

stale[bot] avatar Sep 28 '19 10:09 stale[bot]