Unable to get a data value.

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by 10us on March 7, 2017 at 10:31am

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.

Categories:

Comments

Sorry, probably stupid

Posted by KoshaK on March 7, 2017 at 11:03am

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

Posted by 10us on March 7, 2017 at 12:04pm

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

Posted by mkostir on March 11, 2017 at 11:34am

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?

Posted by mkostir on March 12, 2017 at 12:27am

Hi us10,

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

The problem is in VBO

Posted by 10us on March 13, 2017 at 9:27am

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,

Posted by mkostir on March 18, 2017 at 1:15am

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?

Posted by esha on April 21, 2017 at 9:59am

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

Posted by marco.b on April 26, 2017 at 7:26am

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!

Posted by leoklein on May 24, 2017 at 9:08pm

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:

AltStyle によって変換されたページ (->オリジナル) /