BreadcrumbList itemListElement syntax error – outputs object instead of array
-
The SEO Framework is outputting
itemListElementas a plain object{}instead of an array[]when there’s only one breadcrumb level (such as on the homepage). This creates invalid JSON-LD that fails validation.Current output (invalid):
“breadcrumb”: {
“@type”: “BreadcrumbList”,
“@id”: “https://haletrailer.com/#/schema/BreadcrumbList”,
“itemListElement”: {
“@type”: “ListItem”,
“position”: 1,
“name”: “Hale Trailer”
}
}Expected output (valid):
“breadcrumb”: {
“@type”: “BreadcrumbList”,
“@id”: “https://haletrailer.com/#/schema/BreadcrumbList”,
“itemListElement”: [{
“@type”: “ListItem”,
“position”: 1,
“name”: “Hale Trailer”
}]
}Per schema.org spec:
itemListElementis defined as an array (ListItem or Text). Even with a single item, it must be wrapped in array brackets[].To reproduce:
- View source on any page with a single breadcrumb level (e.g., homepage)
- Check the BreadcrumbList JSON-LD output
- Validate with Google Rich Results Test or schema.org validator
Validation error: Google Rich Results Test flags this as “Invalid JSON-LD syntax” and schema validators report “itemListElement should be an array.”
Impact: While Google’s parser may be forgiving, this produces technically invalid schema that fails validation tools and could affect proper interpretation by search engines.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.