Hi everyone.
I user activity_log module(beta and dev), when i create a rules on event update extings node, condition node is published, vietnamese message: [node:title] is published, token not replaced in message cache.
But work well when i create a rules on node comment. :).
Please help me.
Error in dblog
Rules

Invalid argument supplied for foreach() in \sites\all\modules\activity_log\activity_log.theme.inc line 198.
array (
  'rules' => 
  array (
    'rules_khi_xu_t_b_n_m_t_b_i_vi_t' => 
    array (
      '#type' => 'rule',
      '#set' => 'event_workflow_state_changed',
      '#label' => 'Khi xuất bản một bài viết',
      '#active' => 1,
      '#weight' => '0',
      '#categories' => 
      array (
        0 => 'workflow',
      ),
      '#status' => 'custom',
      '#conditions' => 
      array (
        0 => 
        array (
          '#type' => 'condition',
          '#settings' => 
          array (
            'from_state' => 
            array (
              1 => '1',
              2 => '2',
              3 => '3',
              7 => '7',
              8 => '8',
              5 => '5',
            ),
            'to_state' => 
            array (
              4 => '4',
            ),
            '#argument map' => 
            array (
              'old_state' => 'old_state',
              'new_state' => 'new_state',
            ),
          ),
          '#name' => 'workflow_check_transition',
          '#info' => 
          array (
            'label' => 'Check workflow transition from (creation), Gửi Ban biên tập, Lưu nháp, Gửi thư ký toàn soạn, Thư ký toà soạn không duyệt, BBT từ chối duyệt to Xuất bản',
            'arguments' => 
            array (
              'old_state' => 
              array (
                'type' => 'workflow_state',
                'label' => 'Old workflow state',
              ),
              'new_state' => 
              array (
                'type' => 'workflow_state',
                'label' => 'New workflow state',
              ),
            ),
            'module' => 'Workflow',
          ),
          '#weight' => 0,
        ),
      ),
      '#actions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#info' => 
          array (
            'label' => 'Log activity',
            'module' => 'Activity Log',
            'eval input' => 
            array (
              0 => 'placeholder',
              1 => 'grouping|group_summary',
              2 => 'visibility|stream_owner_id',
              3 => 'visibility|viewer_id',
              4 => 'acting_uid',
              5 => 'templates|en|template',
              6 => 'grouping|templates|en|template',
              7 => 'templates|vi|template',
              8 => 'grouping|templates|vi|template',
            ),
          ),
          '#name' => 'activity_log_log_action',
          '#settings' => 
          array (
            'placeholder' => '#!ACTIVITY_LOG_DELIMITER:',
            'public_name' => '',
            'templates' => 
            array (
              'en' => 
              array (
                'template' => '',
              ),
              'vi' => 
              array (
                'template' => '[node:title]đã xuất bản',
              ),
            ),
            'grouping' => 
            array (
              'group_method' => 'none',
              'group_interval' => '86400',
              'group_max' => '100',
              'group_summary' => '',
              'collapse_method' => 'activity_log_collapse_inline',
              'templates' => 
              array (
                'en' => 
                array (
                  'template' => '',
                ),
                'vi' => 
                array (
                  'template' => '',
                ),
              ),
            ),
            'visibility' => 
            array (
              'stream_owner_entity_group' => 
              array (
                'custom' => 'custom',
                'acting user' => 0,
                'target entity' => 0,
                'active group' => 0,
                'active group members' => 0,
                'active group admin' => 0,
                'node terms' => 0,
              ),
              'stream_owner_id' => '[node:author-uid]',
              'stream_owner_type' => 'node',
              'viewer_entity_group' => 
              array (
                'custom' => 'custom',
                'everyone' => 0,
                'everyone_except_active' => 0,
                'everyone_except_custom' => 0,
                'acting user' => 0,
                'target entity' => 0,
                'stream_owner' => 0,
                'not_stream_owner' => 0,
                'active group members' => 0,
                'active group admin' => 0,
              ),
              'viewer_id' => '[node:author-uid]',
            ),
            'cache' => 
            array (
              'cache' => 1,
              'resources' => '',
            ),
            'acting_uid' => '',
            'display_type' => 
            array (
              'web' => 'web',
            ),
            'tid' => '10',
            '#eval input' => 
            array (
              'token_rules_input_evaluator' => 
              array (
                'placeholder' => 
                array (
                  0 => ':global',
                ),
                'grouping|group_summary' => 
                array (
                  0 => ':global',
                ),
                'visibility|stream_owner_id' => 
                array (
                  0 => 'node',
                  1 => ':global',
                ),
                'visibility|viewer_id' => 
                array (
                  0 => 'node',
                  1 => ':global',
                ),
                'acting_uid' => 
                array (
                  0 => ':global',
                ),
                'templates|en|template' => 
                array (
                  0 => ':global',
                ),
                'grouping|templates|en|template' => 
                array (
                  0 => ':global',
                ),
                'templates|vi|template' => 
                array (
                  0 => 'node',
                  1 => ':global',
                ),
                'grouping|templates|vi|template' => 
                array (
                  0 => ':global',
                ),
              ),
              'activity_log_input_evaluator_process' => 
              array (
                'placeholder' => true,
                'grouping|group_summary' => true,
                'visibility|stream_owner_id' => true,
                'visibility|viewer_id' => true,
                'acting_uid' => true,
                'templates|en|template' => true,
                'grouping|templates|en|template' => true,
                'templates|vi|template' => true,
                'grouping|templates|vi|template' => true,
              ),
            ),
          ),
          '#type' => 'action',
        ),
      ),
      '#version' => 6003,
    ),
  ),
)

Comments

trevorw’s picture

Having the same issue after upgrading to latest version of Commons using activity_log beta 2, tried dev with same results. Regenerated activity messages with no change in output. Any other ideas???

Invalid argument supplied for foreach() in                                   /<path>/sites/all/modules/contribs/activity_log/activity_log.theme.inc on line
214.

With line 214 being this foreach:

foreach ($state['variables'] as $type => $info) {
      if (drupal_substr($type, -10) != '_unchanged') {
        $info->data->_data = activity_log_get_variable($type, $event->id_map);
      }
    }