Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1][schemaorg] Value consisting of 0 is removed as empty #43380

Open
MSGroupFM opened this issue Apr 27, 2024 · 0 comments
Open

[5.1][schemaorg] Value consisting of 0 is removed as empty #43380

MSGroupFM opened this issue Apr 27, 2024 · 0 comments

Comments

@MSGroupFM
Copy link

Steps to reproduce the issue

When creating a schemaorg plugin for an element containing offers, it is not possible to specify a price value of 0 - it is deleted

Expected result

"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }

Actual result

"offers": { "@type": "Offer", "priceCurrency": "USD" }

System information (as much as possible)

Joomla 5.1
Php 8.2

Additional comments

Google allow value 0 for show "Price: free" (https://developers.google.com/search/docs/appearance/structured-data/software-app?hl=en)

Lines causing the error

plugins/system/schemaorg/src/Extension/Schemaorg.php : cleanupSchema
if (empty($value)) { continue; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants