Hi all,

I'm trying to create an action which delete inactive order everyday at 4AM. I've added the action into a schedule, and inside the action I want it to schedule itself again to achieve a loop everyday. But I'm stuck while adding "Schedule component evaluation", it give me the error shown below:

https://drupal.org/files/Selection_051_1.png

Here is my export of my Action component.

{ "rules_clear_inactive_orders" : {
    "LABEL" : "Clear Inactive orders",
    "PLUGIN" : "action set",
    "REQUIRES" : [ "views_bulk_operations", "rules" ],
    "ACTION SET" : [
      { "views_bulk_operations_action_load_list" : {
          "USING" : { "view" : "commerce_backoffice_orders|admin_page" },
          "PROVIDE" : { "entity_list" : { "entity_list" : "A list of entities" } }
        }
      },
      { "LOOP" : {
          "USING" : { "list" : [ "entity_list" ] },
          "ITEM" : { "list_item" : "Current list item" },
          "DO" : [ { "component_rules_delete_order" : { "order" : [ "list-item" ] } } ]
        }
      }
    ]
  }
}

Any help shall be greatly appreciate.

Thanks.

CommentFileSizeAuthor
Selection_051.png10.47 KBmaxchock
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RedEight’s picture

Version: 7.x-2.3 » 7.x-2.7
Issue summary: View changes

I'm having the same issue on my site with Rules version 7.x-2.7.
My steps to reproduce are as follows:
1) I have set up an action set component that I am attempting to schedule with a date input parameter.
2) I add an action, and select "Schedule component evaluation".
3) After a quick ajax call the page next asks for a component which I would like to schedule.
4) I then select the component with the date parameter and click "continue".
Expected result:
I expect to see a page with fields for the date parameter of the component along with a date component for when the cron should evaluate the component.
Actual result:
After clicking "Continue" I receive the exact error the issue creator had.

My thoughts:
I think the designed workflow expects to have the schedule date and component parameter fields pop up immediately. But since there is no ajax call being executed to fetch those fields (no clue why) they don't exist. When continue is clicked it sees those "fields" as empty and throws a form error.

Other notes:
This site is a commerce kickstart site. I'm not sure if that has anything to do with this particular issue but I've had similar issues on other commerce kickstart installations and there is a possibility that it is related.

Does anyone have any ideas as to why this is occurring or if there is any workarounds available?

PS: I would also like to point out that the issue occurs regardless of which component I attempt to schedule. No matter which one I select, nothing happens when I select it and it errors when I click continue. This is not the case when I click Schedule from the list of components. When I schedule it that way it takes me to a page that includes all of the fields I would expect to see. Unfortunately I am still unable to add the action to schedule itself so I can't make the loop I need.

PPS: A recurring scheduler feature would make much more sense than a component which schedules itself on an offset.