I have not been able to create a watchdog entry using the rules system. I believe it is likely that I am just missing a step or a concept.
This is what I have tried to do:
1. start with adding an action.
2. Select the action "Create a new Entity" -> value "Watchdog"
3. Set the user and give my new entity a name (no opportunity to edit/create message, severity or anything else)
4. Add another action "set data "
5. Data selector picky my-watchdog:message When I try to continue I get a message that "The selected data property doesn't support writing."
I've tried a couple of variations (creating a variable of type watchdog and few similar thing with no luck.)
I would really appreciate it if I could get some pointers on what I could be doing wrong, or a pointer to somewhere I could find how to do a rule that creates a watchdog entry.
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | wd-rules-fix-2780449-5.patch | 7.61 KB | c_lehel |
Comments
Comment #2
webgeer commentedAfter looking at the source code I realized there is supposed to be an action that was not showing up in the rules list of actions. I can't figure out why.
I tried it on multiple sites (different db's) as well as two different servers with similar problems. With testing I determined that for some reason module_invoke_all() was not invoking the better_watchdog_ui_rules_action_info()
After a whole bunch of futzing around (including renaming the hook to be better_watchdog_ui_rules_rules_action_info() (isn't that what it should be??) and installing other modules that had rules ... it eventually showed up on the list of actions available. However the new module I installed was not invoked. I suspect that there is some other module on my site that is causing the problem, but I'm not yet sure.
Comment #3
webgeer commentedAfter working around with it some more, by renaming the invoked functions to all be better_watchdog_ui_rules_rules_action/event/condition_info and then uninstalling and reinstalling the module everything now works. Not sure why it seems to work for others with the incorrect module name used for the function names. I will try to create a diff for this and file a bug report.
Comment #4
c_lehel commentedShhhh... I can't believe we've come this far with such an issue... Seems like people don't really use the rules related submodule.
It would be great if you could provide the diff/patch asap.
Comment #6
c_lehel commentedI've added the patch (I think it's similar to your diff). Thank you for the issue!!
Comment #7
c_lehel commented