It would be nice to be able to forward to a node as an action as well. For instance I have a suggest a feature link. It creates a CCK node type called suggest and e-mails the correct people(action) when that node type is created. I want it to also forward to a thank you page instead of showing the node itself. You may say why don't I just use the feedback/contact form/web form module, well these don't create nodes. I want the nodes so I can create a table with views that shows all the features to my developers, that way they don't have to dredge through e-mails looking for a feature list and could maybe even remove then from the list once they are complete.

CommentFileSizeAuthor
#2 actions.inc_redirect_to_node.patch2.02 KBpearcec

Comments

pearcec’s picture

I agree I would also like this. I am using workflow that allow people to submit a piece of content they will never edit. So one of the actions is to change the owner. But when that happens the user gets access denied, which will confuse people.

In the mean time I found this. I am going to attempt to patch actions.inc and submit a patch for review.

http://drupal.org/node/88643

pearcec’s picture

Version: 5.x-2.x-dev » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.02 KB

I am submitting a patch that lets you redirect users as an action. I don't see any reason this shouldn't be core to the actions module. It works perfect if you want someone to submit content, but don't want them to be able to edit it. (It should work for any reason you need to redirect it.)

Currently I have a state change send out an email to a different user, assign the node to the user who gets the email, redirect them to a different page and post an alert message to verify receipt of the post. Works perfectly.

I took this code from the snippet I posted earlier, and cleaned it up a bit. It didn't need the help section. It just created another action. I made the form look more like there rest of the site when using redirects (ie. frontpage or redirect path settings)

I am not certain what the batchable means or if it should be set to true. Most of them are true. The snippet I grabbed set it to false. *shrug* maybe some one knows better about this. I am assuming this isn't batchable.

xamox’s picture

awesome, thx!

mgifford’s picture

The patch seemed to work fine in my testing of it. I do like the additional functionality that you've built in. Does seem similar to the functionality provided by http://drupal.org/project/fieldactions though.

pearcec’s picture

mgifford,

I am not certain I agree with this statement:

Does seem similar to the functionality provided by http://drupal.org/project/fieldactions though.

fieldactions seems to use existing action functionality the only difference is that it uses field information when performing the action. I think it is appropriate to have the action page redirect be core to the actions module. I suppose there should be a better way of managing and adding generate actions.

pomliane’s picture

Status: Needs review » Closed (won't fix)

This version of Actions is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.