Closed (fixed)
Project:
Rules
Version:
6.x-1.1
Component:
Scheduler
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2009 at 16:40 UTC
Updated:
14 Mar 2010 at 07:46 UTC
I updated to 6.x-1.1 from 1.0 and things don't seem to be working correctly. I may not be understanding everything about the "Identifier" correctly but here is something that I noticed while trying to fix my other problems.
When I look at the Scheduling Page (admin/rules/rule_sets/scheduling) (and also in the DB) it has a section for the "Scheduled date" and the "User provided identifier" and those appear to be going into the DB backwards. When I trigger a new event to schedule it puts the date in the "User provided identifier" and in the "Scheduled date" it puts 0000-00-00 00:00:00.
Am I missing something or is that entirely backwards?
Comments
Comment #1
fagoWhat have you set for the identifier? It's not required anyway.
Comment #2
designerbrent commentedComment #3
fagoWell, good question. I think this is a bug.
Comment #4
rwd commentedConfirming the original issue after an upgrade from 1.0 to 1.1; still present after rules 1.1 modules are uninstalled and reinstalled.
Following the tutorial at http://drupal.org/node/520012, in the triggered rules, identifier is set as "node [node:nid]" and scheduled evaluation date as "[node:field_story_date-value]". However, when saving or updating a node, the scheduler stores the CCK field date as the identifier and leaves the scheduled evaluation date as "0000-00-00 00:00:00".
It looks like
rules_scheduler_action()in rules_scheduler.rules.inc is not getting the arguments it expects.Comment #5
marcus178 commentedI'm getting the same problem which I think was causing this issue for me. http://drupal.org/node/585376
I've reinstalled version 1.0 and all seem to be working again.
Comment #6
rwd commented@marcus178: 1.0 does not store identifiers, so reverting to that version is only a solution if you do not need them in your scheduled rules.
Comment #7
fagoOh I've a guess what's going wrong here. We added the identifier as new action argument, but the action_info is cached for existing rules. Thus it still assumes there is no such argument and that way it's getting confused :(
Well unfortunately we can't change that now at this stage, else then other users with the new action would run into troubles. But re-creating the action should fix it for you. Thus create a new and delete the old one - hope that helps.
Comment #8
rwd commented@fago: that does indeed seem to have been the problem.
Deleting the scheduled action from the triggered rule, then re-creating it identically, gets the identifier and date stored to the proper fields. This issue is resolved for me. Thanks!
Comment #9
fagoYou are welcome!
*bumping the issue so others can find it*
Comment #10
designerbrent commentedThanks, recreating the schedule action did the trick for me. I did learn in the process that the identifier MUST be unique. For some reason I didn't gather that the first time through on the documentation. However it is working now. Thanks...
Comment #12
jday commentedfinally I get it
the tutorial says Fill out the "Identifier" field with something like "node [node:nid]".
I was confused what "something like" means, does the identifier identify something or is it just a tag for reference...
turns out using the [node:nid] is what makes the scheduled task unique, otherwise the next new or updated nodes will replace previously scheduled tasks. Maybe it's me but I didn't understand that until I started experimenting with scheduling automated emails.