Error in Google SDTT: "All values provided for url must point to the same page."
Asked Answered
F

7

9

I am trying to create some JSON-LD structured data for a list of products on an ecom-site but I am getting an error when using Google's Structured Data Testing Tool.

So far, I have this:

 {
 "@context": "http://schema.org",
 "@type": "OfferCatalog",
 "name": "Fresh Fruit",
 "itemListElement": [
  {
   "@type": "ListItem",
   "position": 1,
   "item":
   {
        "@type": "Offer",
        "price": "1.20",
        "priceCurrency": "GBP",
        "availability": "http://schema.org/InStock",
        "url": "http://example.com/green-apples/",
        "itemOffered": {
            "@type": "Product",
            "name": "Green Apples",
            "url": "http://example.com/green-apples/"
            }
        }        
   }  
 ]
}

Mostly it validates, but the Google tool throws the following error:

All values provided for url must point to the same page.

The error highlights line 11 ("@type": "Offer",).

The URL fields seem to be clashing with the @context declaration, because if I change the context to either a non-url string or http://example.com, it validates (although, this obviously causes its own issues). (This has been shown to be a red-herring, in the comments below)

What am I missing here? It feels like something blindingly obvious.

Frightened answered 21/10, 2016 at 15:40 Comment(8)
That it gets "fixed" by changing the @context is not surprising: You are using a different vocabulary then (not Schema.org anymore). Google’s SDTT is only meant for Schema.org.Stickup
@Stickup can you explain what you mean? Offer / OfferCatalog / ListItem and Product are all entities recognized by schema.orgPera
@MatthewEvans: It’s about what you wrote ("The URL fields seem to be clashing with the @context declaration […]") -- I just wanted to point out that the problem is not related to the context, or in other words: if you change the context, the SDTT stops reporting any vocabulary use errors (because it’s no longer Schema.org as soon as you change the context).Stickup
Ah, so the context-clash is a red-herring; that makes sense now you've spelled it out. Thanks. Any ideas about the URL error?Frightened
Even weirder, the tool generates the same error even when artificially making the URL properties identical, which suggests a validation issuePera
@Matthew Evans Yeah. I trimmed the list down to one ListItem to see if there were issues with different URLs in each. But even copying and pasting the same URL line in each location generates the error. I waver between thinking I'm missing something and thinking that it's a bug in the validator. I even tried nesting the Offer within the Product intead of the other way around, but it made no odds.Frightened
Its not semantically identical, but using the Graph entity validates: jsonformatter.org/45e962. Frustrating ...Pera
I'm becoming more convinced that this is a bug in the validator. The examples given on Google's 'Mark up your lists' page fail validation with the same error: (developers.google.com/search/docs/guides/mark-up-listings)Frightened
M
1

It is surely an error in the validator. I checked with the examples google provided: https://developers.google.com/search/docs/guides/mark-up-listings . If you click on the 2nd example you will see that it has the same error.

The error is shown even if you use 1 item:

{
  "@context": "http://schema.org",
  "@type": "ItemList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "item": {
        "@type": "Recipe",
        "url": "http://example.com/desserts/pies/#apple-pie",
        "name": "Apple Pie",
        "image": "https://example.com/300px-Apple_pie.jpg",
        "author": {
          "@type": "Person",
          "name": "Carol Smith"
        },
        "datePublished": "2009-11-05"
      }
    }
  ]
}
Mccool answered 30/10, 2016 at 12:42 Comment(2)
After some days my structured data is shown on the Search Console without errors, while SDTT shows the errors in the title.Mccool
Though you are correct that the validated examples in Google are incorrect. But I found a way to get past the error as I had listed all elements like name, image, url under itemListElement instead of itemLeede
O
7

I think it is connected with pushing of accelerated mobile pages and its structured data.

Please check my thoughts here: All values provided for URL must point to the same page. My guess was about the problem in Google’s SDTT

So, to fix the problem with your structure data, please use the correct version of ItemList (there are Separately and Combined marked up ItemLists, please check here):

  • If your items are on the same page, please use the version with items inside, the Combined one.

  • Otherwise, if you point to different pages inside and your items are not on one page, please DON’T put item element with type and other description inside, the Separately marked up one.

Okhotsk answered 5/12, 2016 at 19:7 Comment(2)
Your answer is correct. Not necessarily anything to do with AMP, but there are TWO different types of lists as you mentioned. Need to make sure you're using the right one.Once
I meant, that 2 different lists are connected to the necessity of Google in structured data in AMP. Once new ones were added there - problem described here occurred ;)Okhotsk
T
4

Now it's 2018.

Answer by Yash Pal above is close, but not quite right.

This is not an error from Google validator tools.

The error is valid and you need to fix it.

You use the "Single Page" approach ( there are two approaches "Summary page" and "Single page" )

For "Single Page" approach, you need each URL to be exactly same, and each of them should have "an anchor".

The Google developer doc clearly mentioned it.

I wrote the explanation details there

If your page contains some links to another page, then you should use "Summary Page" approach and it had different data structure ( much simpler one, I think )

Tallula answered 10/11, 2018 at 3:18 Comment(1)
perfect clarificationNur
M
3

I think the issues occurs when we mix two list types i.e Summary page + multiple full details pages and A single, all-in-one-page list.

Google stated on page - https://developers.google.com/search/docs/guides/mark-up-listings

  • If this is a summary page, the ListItem should include only the type, position, and url properties.
  • If this is an all-in-one-page list, the ListItem should include all the additional schema.org properties for the data type that it describes (for example, Recipe or Course objects).

But Google should consider eCommerce category's product listing where people display numbers of product with more than 3 properties on summery page and these are obvious for eCommerce, like price and image are 2 important item on product listing page except the 3 listed above.

So we need to raise this issue with Google to address the concern.

Moreno answered 6/4, 2018 at 11:58 Comment(0)
I
2

No, it is NOT an error in Google's SDTT,

I have helped many people fix their structured data, including dynamic arrays. Read the instructions. Google clearly states "All values for the URL must point to the same page". Think about it, Google is trying to tell you something.

That something means this "Hey you are using a different item list from the example we provided, your item list has more than two item".

The solution:

Use anchors! Voila!

Please use this example snippet and you cannot go wrong. And another tip; use the Fetch Url option from SDTT:

<script type="application/ld+json">
/*structerd data markup compiled by http://www.iwanross.co.za */
{
"@context": "http://schema.org",  
"@type": "ItemList",
"itemListElement": [
{
    "@type": "ListItem",
    "position": 1,
    "item": {
    "@type": "Recipe",
    "url": "https://www.smokingchimney.com/#beetroot",
    "name": "Beetroot Side Salad for the braai",
    "image": "http://www.smokingchimney.com/recipe-pages/images/1x1/Beetroot-Salad- 
  for-the-Braai-800x451.jpg",
    "author": {
    "@type": "Person",
    "name": "Marna Ross"
   },
  "datePublished": "2018-10-05"
  }
},
{
  "@type": "ListItem",
  "position": 2,
  "item": {
    "@type": "Recipe",
    "url": "https://www.smokingchimney.com/#carrot",
    "name": "Carrot Cake",
    "image": "http://www.smokingchimney.com/recipe-pages/images/16x9/carrot-cake- 
 recipe-picture-1024x576.jpg",
    "author": {
    "@type": "Person",
    "name": "Marna Ross"
   },
  "datePublished": "2018-10-05"
 }
},
{
  "@type": "ListItem",
  "position": 3,
  "item": {
    "@type" : "Recipe",
    "url":"https://www.smokingchimney.com/#overnight",
    "name": "Overnight Steak Marinade",
    "image": "http://www.smokingchimney.com/recipe-pages/images/1x1/Overnight-steak- 
 marinade-700x465.png",
    "author": {
    "@type": "Person",
    "name": "Marna Ross"
   },
   "datePublished": "2009-10-05"
   }
   }
 ]
}
</script>
Icelandic answered 26/10, 2018 at 10:13 Comment(0)
M
1

It is surely an error in the validator. I checked with the examples google provided: https://developers.google.com/search/docs/guides/mark-up-listings . If you click on the 2nd example you will see that it has the same error.

The error is shown even if you use 1 item:

{
  "@context": "http://schema.org",
  "@type": "ItemList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "item": {
        "@type": "Recipe",
        "url": "http://example.com/desserts/pies/#apple-pie",
        "name": "Apple Pie",
        "image": "https://example.com/300px-Apple_pie.jpg",
        "author": {
          "@type": "Person",
          "name": "Carol Smith"
        },
        "datePublished": "2009-11-05"
      }
    }
  ]
}
Mccool answered 30/10, 2016 at 12:42 Comment(2)
After some days my structured data is shown on the Search Console without errors, while SDTT shows the errors in the title.Mccool
Though you are correct that the validated examples in Google are incorrect. But I found a way to get past the error as I had listed all elements like name, image, url under itemListElement instead of itemLeede
H
0

you don't need to anchor every URL, you can add parameters to the URL as well ?i=1

like:

https://website.com/d/link?i=1

https://website.com/d/link?i=2 ....

Hedrick answered 7/6, 2019 at 13:51 Comment(0)
M
-2

Use type OfferCatalog instead of ItemList. https://schema.org/OfferCatalog

Mychael answered 25/6, 2019 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.