The patch at #1386402: Remove entity_get_all_property_info that was added with the microdata patch introduced a slight bug in the _fivestar_get_microdata_property_info() function whereby the microdata variable is left as just
array(
'#attributes' => array(),
)
if the entity module is enabled.
I think what it should be doing is setting the $entity_info variable differently according to whether entity module is enabled or not but then continuing on the same way for each case, i.e. instead of
if (module_exists('entity')) {
$entity_info = entity_get_all_property_info($entity_type);
}
else {
$info = array();
$info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']] = array();
fivestar_property_info_callback($info, $entity_type, $field, $instance, 'fivestar');
$entity_info = $info[$entity_type]['bundles'][$instance['bundle']]['properties'];
foreach ($entity_info[$field['field_name']]['property info'] as $property_name => $property) {
$microdata[$property_name]['#attributes'] = array();
}
}
it should be:
if (module_exists('entity')) {
$entity_info = entity_get_all_property_info($entity_type);
}
else {
$info = array();
$info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']] = array();
fivestar_property_info_callback($info, $entity_type, $field, $instance, 'fivestar');
$entity_info = $info[$entity_type]['bundles'][$instance['bundle']]['properties'];
}
foreach ($entity_info[$field['field_name']]['property info'] as $property_name => $property) {
$microdata[$property_name]['#attributes'] = array();
}
Patch forthcoming...
Comments
Comment #1
katbailey commentedComment #2
katbailey commentedComment #3
ericduran commentedlooks correct to me. RTBCing for later.
Comment #4
ericduran commentedThanks. Fixed.
--
http://drupalcode.org/project/fivestar.git/commit/4c47915