Bug 39528 - Get rid of schema.org type "Product"
Summary: Get rid of schema.org type "Product"
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Michael Skarupianski
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-02 13:44 UTC by Michael Skarupianski
Modified: 2025-05-15 06:35 UTC (History)
3 users (show)

See Also:
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" (1.24 KB, patch)
2025-04-30 09:39 UTC, Michael Skarupianski
Details | Diff | Splinter Review
Bug 39528: Remove schema.org "Product" type from OPAC record pages (2.10 KB, patch)
2025-05-01 12:24 UTC, David Nind
Details | Diff | Splinter Review
Bug 39528: Remove schema.org "Product" type from OPAC record pages (2.17 KB, patch)
2025-05-14 14:41 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!