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

fago’s picture

Priority: Critical » Normal

What have you set for the identifier? It's not required anyway.

designerbrent’s picture

  • The identifier is set as "schedule_tweet"
  • If it's not required then why does it have a star by it?
fago’s picture

Title: Identifier doesn't seem to be going in correctly » Identifier shouldn't be required.

Well, good question. I think this is a bug.

rwd’s picture

Title: Identifier shouldn't be required. » Scheduled date stored as identifier

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

marcus178’s picture

I'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.

rwd’s picture

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

fago’s picture

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

rwd’s picture

@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!

fago’s picture

You are welcome!

*bumping the issue so others can find it*

designerbrent’s picture

Status: Active » Fixed

Thanks, 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...

Status: Fixed » Closed (fixed)

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

jday’s picture

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