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 (?).

Comments

jvandyk’s picture

Status: Active » Closed (works as designed)

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

robertgarrigos’s picture

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?

jvandyk’s picture

I do not think you see.

Install the triggerunlock module and all will be well.

robertgarrigos’s picture

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.

jvandyk’s picture

Project: Workflow » Actions
Version: 5.x-2.2 » 5.x-2.4
Status: Closed (works as designed) » 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.

robertgarrigos’s picture

great! Many thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

Bob Stein’s picture

Actually, it appears this bug has been fixed ONLY for the %username placeholder in actions using Workflow. Other placeholders (I've tested at least %node_type, %title, %site_name, and %teaser) still appear in system-generated email subject lines and bodies as the placeholder only, not as the referenced content.

Thanks for your great work on this module.

EDIT: I'm using Drupal 6.9 with all modules up-to-date as of today.

Bob Stein’s picture

Status: Closed (fixed) » Active
Bob Stein’s picture

Status: Active » Closed (fixed)

Okay, I finally tracked down the threads already addressing this bug. If anyone is interested, they are:

http://drupal.org/node/253711
http://drupal.org/node/339591

I also reset this thread to Closed.