Active
Project:
Microdata
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2013 at 08:12 UTC
Updated:
12 Mar 2013 at 08:12 UTC
I added the microdata module for Recipes (schema.org) and when I was adding fields noticed error log entries.
Warning: Invalid argument supplied for foreach() in microdata_get_types() (line 83 of C:\wamp\www\d7dev\sites\all\modules\microdata\microdata.pages.inc).
By adding a few drupal_set_message() calls in micodata.pages.inc I was able to see that the index ['types'] is undefined in the returned array from microdata_get_vocabularies().
In microdata_get_types() the 'foreach ($vocabulary['types'] as $type)' was referencing an index that did not exist.
The returned array ($vocabulary) was:
$vocabularies = array (
[schema_org] = array (
[label] = Schema.org
[description] = Google, Bing, and Yahoo! supported terms for Rich Snippets, documented at Schema.org.
[import_url] = http://schema.rdfs.org/all.json ),
[google_schema_org_extensions] = array (
[label] => Google Schema.org Extensions
[description] => Google's custom extensions to Schema.org, such as SoftwareApplication. These are not well documented.
[import_url] => http://lin-clark.com/api/vocbaulary/google-schemaorg ),