The following changes were made in #1329724: Change hook_microdata_field_defaults to hook_microdata_suggestions:

  • hook_microdata_field_defaults was changed to hook_microdata_suggestions
  • the array structure for the hook was changed
  • hooks can now be added in module.microdata.api

The attached patch updates Fivestar's microdata implementation to reflect the changes.

Note: It seems to me that hook_hook_info groups can only access include files in the module's root directory. Because of this, fivestar.microdata.inc is not in the includes directory, but is in root.

Comments

Anonymous’s picture

Status: Active » Needs review

Forgot to mark this as needs review. Just FYI, I was using this as my test case for rewriting the API, so I have tested it myself.

ericduran’s picture

Hey Lin, thanks for this.

This seems rather straight forward. But before we fix this I would like to fix #1386402: Remove entity_get_all_property_info that was added with the microdata patch first. I think we added a function that required entity api. :-/ I haven't looked into it yet. Just mentioning it here in case you get a chance before me.

Status: Needs review » Needs work

The last submitted patch, microdata_api_update.patch, failed testing.

Anonymous’s picture

Status: Needs work » Needs review

Does this still apply?

ericduran’s picture

Nope, just tried. Curious how is the fivestar.microdata.inc getting loading. I don't see it.

Anonymous’s picture

It should load based on my implementation of hook_hook_info in microdata module:

function microdata_hook_info() {
  $hooks['microdata_suggestions'] = array(
    'group' => 'microdata',
  );

  return $hooks;
}
ericduran’s picture

Oh ok, I'm just going to commit this patch cool?

Anonymous’s picture

Yeah, that works, thanks!

ericduran’s picture

StatusFileSize
new1.92 KB

Lets just make sure it didn't brake any test. Even thought I don't see how that's possible lol.

ericduran’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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