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

katbailey’s picture

katbailey’s picture

Status: Active » Needs review
ericduran’s picture

Status: Needs review » Reviewed & tested by the community

looks correct to me. RTBCing for later.

ericduran’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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