Fix "All values provided for url must point to the same page"
Let's start with the background how did I stumble upon that issue.
This begins with one of the tasks on the on-going project I am working on.
The task asked me to implement Google's structure data so the site will be eligible for a list-like display called a carousel (doc: https://developers.google.com/search/docs/guides/mark-up-listings).
The task suggested me to go with A single, all-in-one-page list approach.
So I follow the suggestion and finish up the implementation.
Once I am done writing the codes, then as usual, I tested the result with Google Structure data testing tool.
The result is always displaying only one error:
All values provided for url must point to the same page
The accepted answer on SO stated that it's actually an error in the validator ( https://stackoverflow.com/a/40329199 )
But I am not convinced.
Error on the tool built by Google? Seriously?
I think again.
Yes, it's possible if Google's tool had an error.
They're built by humans too, and humans always make a mistake.
But I am still not convinced.
Is it really Google structure data tool having an error to validate?
Google employs the best software engineer on this earth.
Even it's an error, they should have received report and fixed it right away, right?
That's what I thought.
This thought leads me to read the Google developer documentation page once again, read it slower and slower.
After reading it once again, I notice this sentence under Single, all-in-one-page list section:
The page should contain user-visible text and an anchor to match each
That's the answer, the page should contain an anchor.
When I looked back on the page where I built the structure data using Single, all-in-one-page list approach, there's no anchor there.
The page is contained the links to the other pages.
Imagine the page is kind of category page in WordPress, where you have some links to different posts page.
That page did not have any anchor.
So, no matter how I build the structure data for carousels, the Google SDTT will always display that error.
The requirement is simply not met.
My current solution is changing the approach to the first one: Summary page + multiple full details pages.
This approach allows a page to have different url attributes under ListItem data structure.
It's not the error on Google Structure Data Testing tool.
It is simply because I overlooked the Google developer documentation.
Had I read it slowly earlier, and catch that phrase, I will surely realize soon that I need to go with different approach.
The lesson for me ( and probably you can learn from this lesson too ): Always no rush. The more you rush, the more you miss, the more you need to go back to find the solution.