2

Is there a way I can see what exactly is being executed on a Rules Event of 'Content is viewed', followed by an action of page redirect to an external URL? Specifically if the content is actually being viewed, and then redirected.

I tried Devel viewing the query log and I didn't find anything. I also tried Devel's Display redirection page, but upon visiting the node, it just timed out.

Using rules event 'Content is viewed', then redirecting, I am still able to get a log message that says I visited that node, so I believe it is loading the node, then redirecting.

This concerns me because when I test other methods of node redirects to external URLs, I don't get a log message saying that I visited that node.

1 Answer 1

0

I struggled with a similar question ... The "clue" about what "Content is viewed" actually means, seems to be like so:

  • The event Content is viewed is what it is: the user has (already) started viewing the content.

  • The (system) event Drupal is initializing is what you should use instead (possible combined with other Events and/or Actions), if you want to trigger some Rules "Action(s)" BEFORE the user can start viewing (= looking at) the content.

For more details, and a working sample (in Rules 'export format'), refer to How to specify a Rules event like "Content is 'going to be' viewed"?

Be aware: this applies to D7 ... and D6 is another story.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.