Backwards SiteNavigationElement in structured data

AI-generated summary

A bug has been identified in the structured data of Discourse’s SiteNavigationElement, where the URL and name are swapped. notriddle initially reported the issue using Google’s Structured Data Testing Tool, providing screenshots and a table to illustrate the problem. jomaxro initially misunderstood the issue, but later acknowledged it as a problem. notriddle further clarified the issue, stating that the URL and name should be swapped. The bug has since been fixed by joffreyjaffeux with a commit to the Discourse GitHub repository, and the fix has been verified using the testing tool.

According to Google Structured Data Testing Tool, the URL is “next page ->” and the name is “https://example.example/latest?page=1”

3 Likes

Right, so what’s the bug? Counting starts at 0, so “next page” would be 1. Or am I missing something?

Click the top-level SiteNavigationElement (not the ItemList). The table is pretty clearly wrong (as shown in the screenshots, but copied here for readability).

key value
@type SiteNavigationElement
url next page ->
name https://forum.bors.tech/latest?no_definitions=true&no_subcategories=false&page=1

The URL and the Name should be swapped.

5 Likes

Oh, I see now. Sorry, I thought you were questioning the number, not the title and data linkage. Yeah, that seems backwards.

4 Likes

Should be fixed by:

https://github.com/discourse/discourse/commit/096a81158a84576e0dea867ee44dd1d5734139cd

Just tried on https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fmeta.discourse.org

and I get:

7 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.