The missing piece? I have implemented this using the hook_context_page_reaction() hook and it seems to work. Patch to follow...

BTW - I found that rule conditions based on context didn't work for me. For example, if you create a triggered rule with the "User is going to view a page" event and add a "Node" context condition, the rule is fired before the context is set so the condition always returns false.

And thanks for the module!

CommentFileSizeAuthor
#1 context_rules_events-1-1147918.patch1.8 KBchaps2

Comments

chaps2’s picture

Status: Active » Needs review
StatusFileSize
new1.8 KB
thomjjames’s picture

Assigned: Unassigned » thomjjames

Thanks for the patch i'll review it and add it in if all looks good!!

Cheers
Tom

alexweber’s picture

Status: Needs review » Reviewed & tested by the community

Tested and works against current d6 stable Context and Rules modules. Applies mostly cleanly except for some whitespace at end of file warnings.

Good to go!

This solution has been forward-ported to the 7.x branch, here: #1696166: New Rules event to react when a context has been set

alexweber’s picture

Assigned: thomjjames » alexweber
Status: Reviewed & tested by the community » Fixed

This has been comitted in 9a7586f. Thanks chaps2 for the patch and thomjjames for allowing me to co-maintain this module! :)

Status: Fixed » Closed (fixed)

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