verbb / workflow

A Craft CMS plugin to create a workflow for publishing entries.
Other
140 stars 27 forks source link

Workflow email link does not link to the correct draft but only to the live version of the entry #204

Closed azad6026 closed 4 months ago

azad6026 commented 4 months ago

Describe the bug

Workflow email link does not link to the correct draft but only to the live version of the entry.

Steps to reproduce

  1. Editor edits a page and submits thier draft for approval as usual
  2. Publisher receives an email with the link to approve the entry submitted
  3. The email link is linking to the live version of that entry and not the correct draft , therefore , no button to approve anything and the publisher has to manually go to workflow and approve the entry. The link in the email does not have any draftId in it.

Craft CMS version

4.7.0

Plugin version

2.0.8

Multi-site?

No

Additional context

This happens both in local and production.

engram-design commented 4 months ago

Quick clarification here - is the editor creating a brand new entry, or a draft on an already existing entry? The two processes can work slightly differently, so it's worth noting the difference one way or the other.

The submission.ownerCpUrl that's used in emails should resolve to the last review's owner cpEditUrl. In this case, the owner should be the draft entry you've submitted.

azad6026 commented 4 months ago

Hello and thanks for coming back to this.If the editor is creating a brand new entry, the email link is correct. But if the editor is creating a draft on an existing entry,this process does not create the correct email link. This is the issue we hope to get a fix for as it is a problem for our clients. Thanks.

azad6026 commented 4 months ago

Hi there. Is there any response or thoughts available on this matter. This is important for us. Appreciate it. Cheers

azad6026 commented 4 months ago

Hi there,this issue is important for our clients and I would appreciate if it is being looked into and responded. Thanks

engram-design commented 4 months ago

Haven't forgotten about this, just struggling to reproduce this one on our end. Are you able to send through the email template for the submission notification? These can be found in Utilities > System Messages.

engram-design commented 4 months ago

Actually, just after sending this I was able to replicate this one. Should be fixed for the next release. To get this early, run composer require verbb/workflow:"dev-craft-4 as 2.0.8".

azad6026 commented 4 months ago

Thank you so very much. Tested it and the issue is now resolved. Cheers.

engram-design commented 4 months ago

Updated in 2.0.9