Bug 39528

Summary: Get rid of schema.org type "Product"
Product: Koha Reporter: Michael Skarupianski <michael.skarupianski>
Component: OPACAssignee: Michael Skarupianski <michael.skarupianski>
Status: Pushed to main --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: trivial    
Priority: P5 - low CC: david, januszop, michael.skarupianski
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: Sponsored
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39528: Get rid of Schema.org Type "Product"
Bug 39528: Remove schema.org "Product" type from OPAC record pages
Bug 39528: Remove schema.org "Product" type from OPAC record pages

Description Michael Skarupianski 2025-04-02 13:44:31 UTC
On the opac detail page a bibliorecord has beside it's schema.or type additionally always a second type "Product". 

This is not needed and also rejected by some search engines like Google. 

Additionally this is translated (e.g. in German to "Produkt") which is not recognised because it's not defined by schema.org).
Comment 1 Michael Skarupianski 2025-04-30 09:39:42 UTC
Created attachment 181710 [details] [review]
Bug 39528: Get rid of Schema.org Type "Product"

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Comment 2 David Nind 2025-05-01 12:24:26 UTC
Created attachment 181826 [details] [review]
Bug 39528: Remove schema.org "Product" type from OPAC record pages

OPAC record detail pages include https://schema.org microdata information
in the HTML page markup, such as CreativeWork.

It incorrectly includes the "Product" type - this is not needed
and is also rejected by some search engines, for example
... vocab="http://schema.org/" typeof="CreativeWork Product" ...

(Koha maps schema.org to the RDFa Lite syntax https://www.w3.org/TR/rdfa-lite/)

Test plan:
1. Look at HTML source of a details page for a record in the OPAC.
2. Search for schema.org
3. Note that it there are two typeof entries:
   .. vocab="http://schema.org/" typeof="CreativeWork Product" ...
4. Apply the patch.
5. Refresh the page and look at the HTML source again.
6. Note that the "Product" schema.org type is removed:
   .. vocab="http://schema.org/" typeof="CreativeWork" ...
7. Sign off.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-05-01 12:27:33 UTC
I've attempted to rewrite the commit message (see the commit message guidelines https://wiki.koha-community.org/wiki/Commit_messages).

Feel free to amend this to better reflect what the bug does,

I'm not sure my very basic understanding schema.org microdata and how it is implemented in Koha is correct. Comments welcome!
Comment 4 Jonathan Druart 2025-05-14 14:41:22 UTC
Created attachment 182452 [details] [review]
Bug 39528: Remove schema.org "Product" type from OPAC record pages

OPAC record detail pages include https://schema.org microdata information
in the HTML page markup, such as CreativeWork.

It incorrectly includes the "Product" type - this is not needed
and is also rejected by some search engines, for example
... vocab="http://schema.org/" typeof="CreativeWork Product" ...

(Koha maps schema.org to the RDFa Lite syntax https://www.w3.org/TR/rdfa-lite/)

Test plan:
1. Look at HTML source of a details page for a record in the OPAC.
2. Search for schema.org
3. Note that it there are two typeof entries:
   .. vocab="http://schema.org/" typeof="CreativeWork Product" ...
4. Apply the patch.
5. Refresh the page and look at the HTML source again.
6. Note that the "Product" schema.org type is removed:
   .. vocab="http://schema.org/" typeof="CreativeWork" ...
7. Sign off.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Katrin Fischer 2025-05-15 06:35:58 UTC
Pushed for 25.05!

Well done everyone, thank you!