Skip to content
This repository was archived by the owner on Oct 18, 2020. It is now read-only.
This repository was archived by the owner on Oct 18, 2020. It is now read-only.

json-ld Unspecified Type #178

@MadMikeyB

Description

@MadMikeyB

Hello!

Love the package, use it on as many projects as I can.

First time using it solely for JSON-LD Schema though!

Everything works like a charm, but upon running the published site through Google's Structured Data Testing tool, I'm getting the following error:

Unspecified Type (The @type is required and cannot be an empty string.)

See Results

I'll preface the below with the fact that I'm not too familiar with schema.org - but it seems to me we're missing a @type declaration from each individual ListItem here:

https://github.com/davejamesmiller/laravel-breadcrumbs/blob/master/views/json-ld.php#L17

Though after looking at schema.org

Their example looks like this:

<script type="application/ld+json">
{
 "@context": "http://schema.org",
 "@type": "BreadcrumbList",
 "itemListElement":
 [
  {
   "@type": "ListItem",
   "position": 1,
   "item":
   {
    "@id": "https://example.com/dresses",
    "name": "Dresses"
    }
  },
  {
   "@type": "ListItem",
  "position": 2,
  "item":
   {
     "@id": "https://example.com/dresses/real",
     "name": "Real Dresses"
   }
  }
 ]
}
</script>

So I'm unsure what we can do here? Sorry for the rambling issue, I just wondered if there's anything you may know about this that I probably don't?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions