User tests: Successful: Unsuccessful:
This PR fixes structured data errors that made Google flag breadcrumbs as invalid.
When a breadcrumb item was a menu heading, instead of a link, Google would flag it as an invalid breadcrumb because it did not have a link. This is fixed by removing the JSON markup for items without a link, with the exception of the last item/current page.
This pull request fixes issues #37508 and #37510.
Basically reproducing my changes from my prior 4.0 pull request, but updated for the new JSON format.
Create a site menu with a menu heading and subpages, like so:
Create a breadcrumbs module. Ensure the module is published and visible on Subpage 1.
Navigate to subpage 1.
If this site is accessible over the internet:
Copy the URL and paste it into the field here: https://search.google.com/test/rich-results
If this site is hosted locally:
View source of Subpage 1 and copy it into the code box on https://search.google.com/test/rich-results
(Alternatively, you can find the generated JSON for the module and just copy that into the code box.)
Google detects the breadcrumbs but shows an error complaining about the missing URL in an item.
Google correctly detects the breadcrumbs and marks them as valid.
None as far as I am aware.
I intentionally am not checking if the module is set to display the last item or not because for the purposes of the JSON, it is better to include it and does not affect the front end display of the module.
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Front End |
Labels |
Added:
?
|
Hmmm I will take a look again, maybe I missed something.
On Apr 29, 2022, at 4:28 PM, nadjak77 @.***> wrote:
I have tested this item? unsuccessfully on f034a3cI still get the error "Field itemListElement missing"
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37679.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
I have tested this item
? unsuccessfully on f034a3cI still get the error "Field itemListElement missing"
I just tested on a clean install of 4.1 with Cassiopeia template and the blog sample data. No errors for me: https://search.google.com/test/rich-results/result?id=JGXsLee4zFK1Py_gDrovhg
@nadjak77 Can you please share your rich test results link with me by hitting the "share" button so I can debug?
I'm not sure how you could have gotten different results, unless maybe you have a template override on the breadcrumbs?
Thanks!
I have tested this item
I also get the “Missing field "itemListElement"” error at https://search.google.com/test/rich-results/result/r%2Fbreadcrumbs?id=iPMy7EevFSOnJtC0n2iV5g for my test page https://nikosdiontest.joomla.com/index.php/sample-layouts/blog
However, this appears to come not from the LD-JSON microdata but from the leftover Schema.org microdata on the breadcrumbs' <ol>
tag:
<ol itemscope itemtype="https://schema.org/BreadcrumbList" class="mod-breadcrumbs breadcrumb px-3 py-2">
Since we're adding LD-JSON shouldn't we remove the Schema.org microdata altogether?
Since we're adding LD-JSON shouldn't we remove the Schema.org microdata altogether?
Yup. I missed that, must be remnant from the original conversion to JSON instead of micro data.
I have tested this item
I can confirm that now it works as described. There are no more breadcrumb microdata errors for the same page I tested before.
@aint-broke Please test if this PR solves your issue #37510 . Thanks in advance.
I have tested this item
tested successfully. Thank you
@crystalenka Sorry for my late reply.
My first test (unsuccessfully) was on a clean new website without any other installations. The installation was on localhost.
But now the test was successfull. Thank you.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
Maintainers Checked
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-05-13 11:27:43 |
Closed_By | ⇒ | laoneo |
Thanks!
I have tested this item? unsuccessfully on f034a3c
I still get the error "Field itemListElement missing"
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37679.