cannot assing a system action in the triggers page

robertgarrigos - May 3, 2008 - 19:29
Project:Actions
Version:5.x-2.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I cannot see my created actions in the trigger page for the workflow triggers (admin/build/trigger/workflow). The only action I can assign to any of the triggers of my workflows is the 'change workflow state' action, but none of my created actions, nor any of the other actions shown in the actions page. Is that a limitation of the workflow module? Cannot I use any of the system actions?

BTW, I had to clear the cache in order to see my workflow triggers in the triggers page (?).

#1

jvandyk - May 3, 2008 - 20:07
Status:active» by design

See "Actions in Contexts" on the actions project page.

#2

robertgarrigos - May 4, 2008 - 17:10

I see. thanks.

However, this is a shame, as now we cannot send an email to the author of the node because it's out of the context. Is there a way of doing this on a change of the workflow state?

#3

jvandyk - May 4, 2008 - 17:57

I do not think you see.

Install the triggerunlock module and all will be well.

#4

robertgarrigos - May 5, 2008 - 09:58

nop, it doesn't, unfortunately. Although I can see my system actions when triggerunlock is activated, they are not working as good as before.

Don't get me wrong. I rather use workflows 2 than previous versions, it is great and your work is awsome. (BTW, your sessions at drupalcons are always one of the bests).

However, I recall I could use a mail action with workflow 1 with no problem with context (in some extend). This is, for instance, I could use %author in the subject of the mail as a placeholder for the author of the node whose workflow state was being changed. This is not happening now with workflow 2 and triggerunlock.

My question is: is this something that could be fixed/achieved somehow now?

Many thanks for your help.

#5

jvandyk - May 5, 2008 - 15:15
Project:Workflow» Actions
Version:5.x-2.2» 5.x-2.4
Status:by design» fixed

Aha.

This issue is really "the Send email action doesn't Do the Right Thing when called from a noncore hook". It should have been checking for a node in the context before assuming that it was being called directly. Now it does. It is therefore able to retrieve the author of the node, and therefore the author's username for placeholder replacement.

So the following now works. When setting up the "Send email" advanced action, you can use %author in the Recipient field to indicate that this email should be sent to the email address of the node author. You can use %username in the Subject and Message fields to show the Drupal username of the author.

This bug applied to the "Display a message to the user" advanced action, too.

Thanks for your report. This fix will appear in 5.x-2.5.

#6

robertgarrigos - May 6, 2008 - 08:12

great! Many thanks!

#7

Anonymous (not verified) - May 20, 2008 - 08:21
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.