Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Line item
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2010 at 14:54 UTC
Updated:
14 Feb 2011 at 15:10 UTC
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 ;)
| Comment | File | Size | Author |
|---|---|---|---|
| commerce-commerce_-_entity_property_info-issue-with-property-naming.patch | 3.99 KB | das-peter |
Comments
Comment #1
rszrama commentedIs 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.
Comment #2
das-peter commentedHehe, 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
Comment #3
rszrama commentedPatch 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...
Comment #4
rszrama commentedThe related issue is here: #947892: Provide full Entity Metadata support for our entities
Comment #7
rszrama commentedRemoving spam tags.