Workflow emails and Edit+


(Kieran@parracity) #1

Hi guys and gals, me again,


-So we have a back-end user logging into an asset on the front-end using Edit+.

-We have a trigger that says 'When Easy Edit Suit is loaded for an asset, put the asset into "Safe Edit" status'.

-This asset has a one step workflow attached (approve by admin) that we use for many other parts of the site successfully.

-The user edits in Safe Edit, saves content, puts asset into "Apply for approval" status.



So far all these status' can be tracked from an admin signed into the back-end in another browser/session.



-Approval users (Admin) get the workflow email saying click to accept/reject/preview/etc. These email links have _edit and not _admin as the assets were edited via Edit+.

-Clicking or copying this approval link and opening it in the session with the admin (that got the email to approve) signed in, the Edit+ interface loads on the workflow screen saying that there is no workflow running for this asset.

-Then we get the email (twice?) saying that the logged in admin has rejected the changes.

-The asset is then back in Safe Edit status.



These approval links in emails work fine when generated from an asset builder for other things and they use the _admin address (slightly different params) so they log into the back-end at the right screen.


(Kieran@parracity) #2

Further to this,


If the asset is in waiting for approval, as soon as an administrator logs into the front end (Edit+) using the asset url and /_edit, the changes are rejected and the 2 rejection emails sent…


(Anthony Barnes) #3

This isn't normal behaviour. Could you post a sample of the generated email including the approval/rejection links (not the real one of course, just something with some altered domains perhaps)? I'd like to see what those urls have been generated as and test them in our development environment.


(Kieran@parracity) #4

[quote]
This isn't normal behaviour. Could you post a sample of the generated email including the approval/rejection links (not the real one of course, just something with some altered domains perhaps)? I'd like to see what those urls have been generated as and test them in our development environment.

[/quote]

Sure. Here's the source code from the email sent to me:


    Kieran Scott,
Standard Page "multicultural community" is currently in workflow.

You are now required to approve or reject the changes made to "multicultural community" so the workflow process can continue.

You can Accept or Reject the changes.
A full report for the Workflow of "multicultural community" can be found on the Workflow Screen

You can also preview this asset.

This is an automated message from abc123 running Squiz Matrix v4.10.1
System Root URLs :


I've changed my domain to [i]abc123[/i], the asset ID to [i]123[/i] and also all the long page paths (which were the same) to [i]YourLongURLHere[/i], but everything else in the address is an exact copy/paste.

If there's anything else you'd like me to paste, let me know.

(Anthony Barnes) #5

I can't see anything wrong with this, the interface loads correctly at the same spot and attempts approval/rejection for me. I'm wondering whether the trigger might be contributing or causing the issue:

[quote]

-We have a trigger that says 'When Easy Edit Suit is loaded for an asset, put the asset into "Safe Edit" status'.

[/quote]



What are your conditions around running this trigger? If this happens when the interface is loaded EES might get confused about what status the asset is actually in (EES knows nothing about what those triggers are doing). We really need to troubleshoot it in more detail so you may have to contact support or your account manager to organise someone to look at this.


(Kieran@parracity) #6

Set safe edit trigger says
-When Simple Edit Accessed

-When asset is under our site

-When asset has the status of Live

-When asset is of type: standard page, news item, calendar event (recurring too), pdf file

Action

-Set status to "Safe Editing"





Next trigger says

-After workflow approval

-When asset is under our site

-Set future status to Live, immediately with offset of 30mins.


(Kieran@parracity) #7

Any ideas?
I've checked all system triggers and the workflow is fine and works perfectly when used elsewhere.


(Anthony Barnes) #8

[quote]
Any ideas?

I've checked all system triggers and the workflow is fine and works perfectly when used elsewhere.

[/quote]



I'm not sure. I got distracted with tasks yesterday but was able to test it on a development system with the link. The link itself looks fine so I'm still leaning towards the trigger angle. Are you able to test the same process with the triggers disabled?


(Kieran@parracity) #9

After turning off related triggers and turning them on one-by-one, we narrowed it down to the trigger with the following condition:
-After Workflow Approval

-In tree location of our site

-Set future status to Live with "immediately when this trigger is fired" but offset of 30 minutes.



I would think the "After workflow approval" trigger would fire when the "Approval" link in the email is clicked/run. If not, I think this wording is a little misleading??



The workflow is working correctly, but we still want a trigger to "After workflow is approved, set the future status of the asset to Live in 30 mins.

So we changed this trigger to:

-When "Status Changed"

-In our sites tree location

-With asset status of "Approved to go live"

-Set future status to Live with "immediately when this trigger is fired" but offset of 30 minutes.



Turns out this doesn't set the future status at all…

EDIT: The last trigger I mentioned seems to be working on assets that are created using an asset builder and have the same workflow attached. I see a future status set to go live in half an hour, however on the assets pushed through workflow via a "safe Edit" phase, it seems to not set any future status.

Both asset locations are under the root of our site, which is where the trigger is set to listen.




What trigger events would you suggest?



Thank you for your help so far, much appreciated.


(Kieran@parracity) #10

lol, there's "Safe Edit Approved to go Live" and "Approved to go Live" and neither of them encompass the other.
The first one solved my problem, as I didn't see it and just thought "Approved to go Live" should have worked.

Looks like I'll have to make a second trigger for those being created via asset builders and needing approval.



Thanks for your help.


(Anthony Barnes) #11

[quote]
lol, there's "Safe Edit Approved to go Live" and "Approved to go Live" and neither of them encompass the other.

The first one solved my problem, as I didn't see it and just thought "Approved to go Live" should have worked.

Looks like I'll have to make a second trigger for those being created via asset builders and needing approval.



Thanks for your help.

[/quote]



No worries. Glad you managed to get it sorted. The statuses can tend to be a little confusing depending on how you entered the approval process (under construction or safe edit).