When running cron from the admin I get the following error:

Fatal error: Call to a member function update() on a non-object in /sites/all/modules/rules/rules/rules.variables.inc on line 346

Comments

marcus178’s picture

Component: User Interface » User interface
Priority: Normal » Critical
marcus178’s picture

OK I've found that is I clear my scheduled tasks I am able to run the cron again so maybe there is something up with the rules I've set up

array (
  'rules' => 
  array (
    'rules_17' => 
    array (
      '#type' => 'rule',
      '#set' => 'event_node_insert',
      '#label' => 'Saving event',
      '#active' => 1,
      '#weight' => '0',
      '#categories' => 
      array (
      ),
      '#status' => 'custom',
      '#conditions' => 
      array (
        0 => 
        array (
          '#type' => 'condition',
          '#settings' => 
          array (
            'type' => 
            array (
              'events' => 'events',
            ),
            '#argument map' => 
            array (
              'node' => 'node',
            ),
          ),
          '#name' => 'rules_condition_content_is_type',
          '#info' => 
          array (
            'label' => 'Created content is Events',
            'arguments' => 
            array (
              'node' => 
              array (
                'type' => 'node',
                'label' => 'Content',
              ),
            ),
            'module' => 'Node',
          ),
          '#weight' => 0,
        ),
      ),
      '#actions' => 
      array (
        1 => 
        array (
          '#type' => 'action',
          '#settings' => 
          array (
            'task_date' => '[node:field_event_date-date] 18:00:00',
            '#argument map' => 
            array (
              'node' => 'node',
            ),
            '#eval input' => 
            array (
              'token_rules_input_evaluator' => 
              array (
                'task_date' => 
                array (
                  0 => 'node',
                ),
              ),
            ),
          ),
          '#name' => 'rules_action_schedule_set_rules_expire_event',
          '#info' => 
          array (
            'arguments' => 
            array (
              'task_date' => 
              array (
                'type' => 'date',
                'label' => 'Scheduled evaluation date',
              ),
              'node' => 
              array (
                'label' => 'Content',
                'type' => 'node',
              ),
            ),
            'label' => 'Schedule Expire Event',
            'status' => 'custom',
            'categories' => 
            array (
            ),
            'module' => 'Rule Scheduler',
            'base' => 'rules_scheduler_action',
            'set' => 'rules_expire_event',
          ),
          '#weight' => 0,
        ),
      ),
      '#version' => 6003,
    ),
    'rules_18' => 
    array (
      '#type' => 'rule',
      '#set' => 'event_node_update',
      '#label' => 'Editing event',
      '#active' => 1,
      '#weight' => '0',
      '#categories' => 
      array (
      ),
      '#status' => 'custom',
      '#conditions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#info' => 
          array (
            'label' => 'Updated content is Events',
            'arguments' => 
            array (
              'node' => 
              array (
                'type' => 'node',
                'label' => 'Content',
              ),
            ),
            'module' => 'Node',
          ),
          '#name' => 'rules_condition_content_is_type',
          '#settings' => 
          array (
            'type' => 
            array (
              'events' => 'events',
            ),
            '#argument map' => 
            array (
              'node' => 'node',
            ),
          ),
          '#type' => 'condition',
        ),
      ),
      '#actions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#type' => 'action',
          '#settings' => 
          array (
            'task_date' => '[node:field_event_date-date] 18:00:00',
            '#argument map' => 
            array (
              'node' => 'node',
            ),
            '#eval input' => 
            array (
              'token_rules_input_evaluator' => 
              array (
                'task_date' => 
                array (
                  0 => 'node',
                ),
              ),
            ),
          ),
          '#name' => 'rules_action_schedule_set_rules_expire_event',
          '#info' => 
          array (
            'arguments' => 
            array (
              'task_date' => 
              array (
                'type' => 'date',
                'label' => 'Scheduled evaluation date',
              ),
              'node' => 
              array (
                'label' => 'Content',
                'type' => 'node',
              ),
            ),
            'label' => 'Schedule Expire Event',
            'status' => 'custom',
            'categories' => 
            array (
            ),
            'module' => 'Rule Scheduler',
            'base' => 'rules_scheduler_action',
            'set' => 'rules_expire_event',
          ),
        ),
      ),
      '#version' => 6003,
    ),
    'rules_14' => 
    array (
      '#type' => 'rule',
      '#set' => 'rules_expire_event',
      '#label' => 'Expire the event',
      '#active' => 1,
      '#weight' => '0',
      '#categories' => 
      array (
      ),
      '#status' => 'custom',
      '#conditions' => 
      array (
      ),
      '#actions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#type' => 'action',
          '#settings' => 
          array (
            'field_name' => 'field_product_offline',
            '#argument map' => 
            array (
              'node' => 'node',
            ),
            'value' => 
            array (
              0 => 
              array (
                'value' => '1',
              ),
            ),
            'code' => '',
          ),
          '#name' => 'content_rules_action_populate_field',
          '#info' => 
          array (
            'label' => 'Populate Content\'s field \'field_product_offline\'',
            'arguments' => 
            array (
              'node' => 
              array (
                'type' => 'node',
                'label' => 'Content',
              ),
            ),
            'eval input' => 
            array (
              0 => 'code',
              1 => 'value|0|value',
            ),
            'module' => 'CCK',
          ),
        ),
      ),
      '#version' => 6003,
    ),
  ),
  'rule_sets' => 
  array (
    'rules_expire_event' => 
    array (
      'arguments' => 
      array (
        'node' => 
        array (
          'label' => 'Content',
          'type' => 'node',
        ),
      ),
      'label' => 'Expire Event',
      'status' => 'custom',
      'categories' => 
      array (
      ),
    ),
  ),
)
fago’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Hard to tell what's going wrong for you there. Try enabling rules debug log and hit cron.php as user, then you should get any debug log on the next regular drupal page log. Is there something in the log?

fago’s picture

fago’s picture

Status: Postponed (maintainer needs more info) » Active

wrong issue..

fago’s picture

Status: Active » Closed (duplicate)
ndstate’s picture

I am having this same issue. When I turn on the debug log, where should I look for that info?

Thanks!