-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Pimcore version
11.5.14.1 / admin-ui-classic-bundle 1.7.16 (verified also on 12.x / admin-ui-classic-bundle 2.x)
Steps to reproduce
- Create a DataObject class with a Video field
- Create an object instance
- Open the Video field without setting any value (or clear an existing value)
- The video preview attempts to render
Actual Behavior
-
Null ID crash: JavaScript error
Cannot read properties of null (reading 'indexOf')becausethis.data.datais null and.indexOf()is called without null check. -
Referrer Policy error: When a YouTube video IS set, error 153 "Video unavailable" can occur due to missing
referrerpolicyattribute.
Expected Behavior
- No JavaScript error when video data is null
- YouTube videos should load correctly with proper referrer policy
Affected file: public/js/pimcore/object/tags/video.js (around line 355)
Suggested fix:
// Change from:
if (this.data.data.indexOf('PL') === 0) {
// To:
if (this.data.data?.indexOf('PL') === 0) {
// And add referrerpolicy to iframes:
<iframe ... referrerpolicy="strict-origin-when-cross-origin" ...>Related: A similar referrer policy fix is needed in pimcore/pimcore for models/Document/Editable/Video.php (pimcore/pimcore#18937)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels