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

CommentFileSizeAuthor
#6 wd-rules-fix-2780449-5.patch7.61 KBc_lehel

Comments

webgeer created an issue. See original summary.

webgeer’s picture

After 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.

webgeer’s picture

After 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.

c_lehel’s picture

Category: Support request » Bug report
Priority: Normal » Critical
Status: Active » Needs work

Shhhh... 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.

  • c_lehel committed 4ca83c4 on 7.x-2.x authored by webgeer
    Issue #2780449 by webgeer: Unable to create a watchdog entry with using...
c_lehel’s picture

StatusFileSize
new7.61 KB

I've added the patch (I think it's similar to your diff). Thank you for the issue!!

c_lehel’s picture

Component: Documentation » Code
Status: Needs work » Closed (fixed)