Unable to get a data value.

Events happening in the community are now at Drupal community events on www.drupal.org.
10us's picture

Hi,

Since I updated to Drupal core 7.54 I have an issue with Rules.

The situation:
- I have an action component with parameter training_id;
- this action component loads a list of Entities from a VBO view using the training_id as filter;

Since the update I get the message:

Unable to get a data value. Error: Invalid data value given. Be sure it matches the required data type and format. Value at registration(): .

As far as I can see, the parameter training_id gets lost on the way.

The action looks like:

{ "rules_send_tips_1_to_participants" : {
    "LABEL" : "Stuur tips sessie 1 naar deelnemers training x",
    "PLUGIN" : "action set",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "views_bulk_operations", "mimemail" ],
    "USES VARIABLES" : { "training_id" : { "label" : "ID training", "type" : "integer" } },
    "ACTION SET" : [
      { "views_bulk_operations_action_load_list" : {
          "USING" : { "view" : "registrations|default", "args" : "[training-id:value]" },
          "PROVIDE" : { "entity_list" : { "registration_list" : "A list of registrations" } }
        }
      },
      { "LOOP" : {
          "USING" : { "list" : [ "registration-list" ] },
          "ITEM" : { "registration" : "Current registration" },
          "DO" : [
            { "mimemail" : {
                "key" : "[training-id:value] [registration:registration-id]",
                "to" : "[registration:mail]",
                "bcc" : "info@example.com",
                "subject" : "Lorem ipsum",
                "body" : "Lorem ipsum...",
                "plaintext" : "Lorem ipsum...",
                "language" : [ "" ]
              }
            }
          ]
        }
      }
    ]
  }
}

Any help or suggestion is appreciated.

Comments

Sorry, probably stupid

KoshaK's picture

Sorry, probably stupid sugestion, but have you tried to remove the filter, save, and add it again. Helped me couple of times with other issues where views was not working after some updates.

Hi KoshaK, Thanks for your

10us's picture

Hi KoshaK,

Thanks for your help.
I removed filters and contextual filters on training, saved and restored the view. Unfortunately it didn't solve my issue.

Thanks all the same.

same problem - also after update to drupal core 7.54

mkostir's picture

Hi all,

so I got exactly the same problem. Tried even to create a completely new view, with a completely new rule component. No luck.

This is what I get when I run the rule:

8.766 ms Evaluating the action views_bulk_operations_action_load_list. [edit]
12.508 ms Unable to get a data value. Error: Invalid data value given. Be sure it matches the required data type and format. Value at node(): .
14.401 ms Unable to evaluate action views_bulk_operations_action_load_list. [edit]
15.657 ms Unable to get variable entity_list, it is not defined.
16.523 ms Unable to evaluate loop. [edit]

what modules versions?

mkostir's picture

Hi us10,

can you let me know what version of views, vbo, and rules you are running?

The problem is in VBO

10us's picture

Hi mkostir,

I run the following versions:
- Views: 7.x-3.15
- VBO: 7.x-3.4
- Rules: 7.x-2.9

After a lot of debugging I nailed down the problem to line 176 in views_bulk_operations.rules.inc:
$entities[] = entity_metadata_wrapper($entity_type, $vbo->get_value($result));

$result contains the entity in the VBO-list you want to loop, in my case a Registration. If you replace $vbo->get_value($result)) by $result, the problem is 'solved'. I must admit that I don't yet understand why the get_value doesn't work neither why it did work in the past.

Maybe it helps you, maybe you can find out the cause of the problem.

Greetings

Thanks 10us,

mkostir's picture

I did the change you suggested and it seems to work! Yay.

However, my knowledge is too superficial to actually figure out why that is. In either way, thanks a million for the advice, much appreciated.

major bug, isn't it?

esha's picture

Shouldn't the VBO maintainers be notified about this?
File an issue at https://www.drupal.org/project/issues/views_bulk_operations ?
Couldnt find any...

Seems like a major bug in the latest version of vbo, all my rules stopped working after the update...

fixed in the current dev version

marco.b's picture

Here is the bug issue: https://www.drupal.org/node/2853029
I updated the module to version = "7.x-3.4+9-dev" and now it is fixed.

Thanks!

leoklein's picture

Had same problem as mkostir. Dev version fixed it.

Thanks.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: