Closed glucka closed 3 years ago
Hmm, I have no Facebook account (intentional), so can't use the link. The id is used for getting the content for the Admin Panel, but that can be a data attribute to select the node, if that helps.
Only one type? schema.org is a standard, if the Structured Data Testing Tool is giving its okay, it is fine. The breadcrumb is essential for SEO, but you are free to deactivate the automatic generation or avoid using the breadcrumb view helper. Also you can deactivate the integration of the WebPage type: https://docs.typo3.org/p/brotkrueml/schema/1.10/en-us/Configuration/Index.html#extension-configuration
Perhaps the property "mainEntityOfPage" can help to define the main type for a specific page?
@glucka Can you share a screenshot of the error?
@glucka As far as I can see, you can also use Open Graph tags for defining your microdata for Facebook Pixel: https://developers.facebook.com/docs/marketing-api/catalog/guides/microdata-tags
But if JSON-LD takes precedence over Open Graph that is not an option. Google and other search engines recognises a BreadcrumbList type and show the breadcrumb in the snippets and can also handle more types on a page and Facebook only wants to handle one type (the main type). For me it looks like you have to choose: SEO or Facebook.
In principle it should be possible to have a checkbox on the page "Optimise for Facebook", then the structured data uses only the defined main entity of the page and discards all other types. But I am not conviced that this as a good option. Then the next website comes up with another interpretation of schema.org.
But as already mentioned, you can deactivate the WebPage type and the BreadcrumbList type in the extension settings for all pages. So only the types are added as structured data that you define in your plugin.
So, do you have a suggestion, what would be a possible solution?
Relating the id in the script tag: Just change the id in the EXT:schema source code to e.g. a data-id for testing purposes and check if Facebook also complains about it. If not I can adjust the code to use a data attribute: https://github.com/brotkrueml/schema/blob/master/Classes/Extension.php#L27
@brotkrueml sorry "falsche alarm" Deactivate the WebPage type and the BreadcrumbList type in the extension settings works fine for Facebook Microdata. Id in the script tag works to! Sorry
Das attribute id="ext-schema-jsonld" im script tag müsste entfernbar sein, weil so lange es da ist, facebook sieht die schema daten nicht. Siehe: https://business.facebook.com/ads/microdata/debug Ausserdem eine Info: Nur eine type darf vorhanden sein, zB. nur Product, keine Webpage und Breadcrumb.