PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.15k stars 4.8k forks source link

Error schema.org in category pages #36230

Open ECC64 opened 5 months ago

ECC64 commented 5 months ago

Prerequisites

Describe the bug and add attachments

Error in GSC : Type de valeur incorrect

Expected behavior

No error in structured datas the last item of the products on the category page must not have a comma

Steps to reproduce

Test category page with : https://validator.schema.org/ Capture d'écran 2024-05-24 130117

PrestaShop version(s) where the bug happened

8.1.6

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

Hlavtox commented 4 months ago

No such issue exists in classic theme.

https://github.com/PrestaShop/classic-theme/blob/8e98738eac76dd565af0313425c65154a818f45e/templates/_partials/microdata/product-list-jsonld.tpl#L36

What theme are you using? Is the content of /themes/yourtheme/templates/_partials/microdata/product-list-jsonld.tpl the same?

ECC64 commented 4 months ago

Hello, i use child theme with Classic theme in the child theme i modify only the footer.tpl i modify product-list-jsonld.tpl in line 36 and i delete the comma (,) and nothig is modified on front.

best regards Patrick

AureRita commented 4 months ago

Hi @ECC64

Thank for your report, This issue is too technical for me, ping @PrestaShop/tech-council, can someone please reproduce this issue ?

Thanks you

ECC64 commented 4 months ago

hi @AureRita

to reproduce this problem, very simple, install a new version of PS go to the front office, display a category page, get the link to this page and go test it at Google (https://search.google.com/test/ rich-results) or at Schema.org (https://validator.schema.org/) and you will see the error.

best regards Patrick