If SchemaVideoObjectEmbed and VideoObjectContent url is empty, we shouldn't render the object at all

Created on 20 July 2024, 4 months ago
Updated 21 July 2024, 4 months ago

Problem/Motivation

Updated for clarification and thanks @DamienMcKenna for fixing my initial post. The VideoObject is being rendered when using a token for the VideoObjectEmbed and VideoObjectContent url. The VideoObject should not be rendered, if there is no token value rendered on those two fields. On a recent implementation I noticed that the other object fields get rendered as below if either token output is empty.

"@type": "VideoObject",
            "thumbnailUrl": "https://www.testsite.com/sites/field/video/image.ipg",
            "description": "The description",
            "uploadDate": "2024-07-04T11:37:49-0800",
            "@id": "https://www.testsite.com/"
        }

Google also complains "Either "contentUrl" or "embedUrl" should be specified". So it would make sense to remove the Object altogether if the above condition exists.

Proposed resolution

The VideoObject should not be rendered if there is no URL attribute.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada hcksharp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024