Replace all the dashes with underscores in the property names.
Description of hook_entity_property_info() says:
"The name may only contain alphanumeric lowercase characters and underscores"

It seems rules respects that - thus if we use dashes, the mapping in EntityStructureWrapper->getPropertyInfo() fails.
Caused due a $parts = explode(':', str_replace('-', '_', $selector), 2); in RulesPlugin->applyDataSelector().

I've checked the code and I think this change shouldn't break a thing - but I give no guarantee at all ;)

Comments

rszrama’s picture

Is this the same issue as #941652: Issue with commerce_*_property_info_callback? If so, we can close the other one as a duplicate and carry on with the patch in this issue.

das-peter’s picture

Hehe, awesome - I provided the answer to a issue I opened earlier, by opening a new issue.
Has something of a perpetual motion machine.
And yes, the patch provided here will fix this #941652: Issue with commerce_*_property_info_callback, too

rszrama’s picture

Status: Needs review » Fixed

Patch looks good, and it tells me we need to do some better work with defining Entity Metadata. : P

There's stuff missing from the implementations we have, and Customer and Payment transactions aren't represented at all. I'll open a separate issue to do a full audit on the properties we're defining.

Commit: http://github.com/rszrama/drupalcommerce/commit/f5204ed33912afd76e541e45...

rszrama’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rszrama’s picture

Removing spam tags.