Provide worst and best rating values in tokens

Created on 2 November 2023, 8 months ago
Updated 17 May 2024, about 1 month ago

Problem/Motivation

Basically the problem is that schema_metatag filters out zero values and doesn't show such tags at all so when we include hardcoded worst and best ratings the AggregateRating tag is still there with the hardcoded values but we have required rating and ratingCount values missing and that leads to schema validation errors.

Steps to reproduce

Use tokens provided by this module in schema_metatag AggregateRating property, hardcode bestRating and worstRating, try to validate schema on an entity with no votes.

Proposed resolution

Provide worst and best rating tokens that evaluate to zero when there are no ratings so the resulting AggregateRating tag is not included at all and there are no schema validation errors.

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ต๐Ÿ‡ฑPoland Graber

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024