Hi, a bug was introduced with 7.x-2.10 or at least a hole was closed which has invalidated several of my Rules components. The scenario that is no longer valid takes place when I Fetch Entity by Property. The field I am fetching is a multi-value entity reference field. This worked fine in the past but after I did the upgrade the components were invalidated with the following error:

The data type of the configured argument does not match the parameter's value requirement.

Thoughts? How do I go about fetching a field that has multiple values?

Comments

dbdrupal created an issue. See original summary.

dbdrupal’s picture

Issue summary: View changes
Matroschker’s picture

I can confirm this - with 7.x-2.9 it works with our rules, but now after the update to 7.x-2.10 we got this error in the log:

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

apmsooner’s picture

@dbdrupal, I'm not seeing an issue like that with 7.x-2.10. A side note, if you working with an entity reference field with multiple values, i'm not sure why you would choose to fetch by property vs fetch by id which is more reliable but either way, you need to add a loop on that particular field since it has multiple values and fetch the entity within the loop. Sounds like you might have had it working previously as a single value field but then changed it to a multi-valued field and now you're dealing with an array of ids vs. a single id. I'm speculating... but it doesn't sound like a problem with the module but rather a change in your site configuration.

@Matroschker - same as above??

dbdrupal’s picture

I think what happened is that when the Rules were released, the code was tightened up which inadvertently caused a failure. My site was static and there were no other changes introduced. I would love to fetch by id if possible, but that is not always possible and certainly was not in this case. I can change to a loop but the problem with things like this is that I now have to go through and find all of the places where I was fetching in this way. For a large site, it isn't always an easy thing to do. I found a small patch that I introduced to fix this issue.

itsmarc’s picture

@dbdrupal - could you please share your patch for this.

TR’s picture

Status: Active » Closed (duplicate)