Skip to content

Adding new Vimeo video error #32897

Closed
Closed
@Michael-073

Description

I noticed that there are some videos from Vimeo that will return different data. Depending on what data is returned, the script that processes the video can crash.

Preconditions (*)

  1. Magento version 2.4.0
  2. Patch MDVA-35092 applied

Steps to reproduce (*)

  1. Go to Admin -> Catalog ->Products
  2. Select a product to edit
  3. Go to Images and Videos section. Click Add Video
  4. In the Url field, use a video url from Vimeo that is missing required information ( example: https://vimeo.com/313826626 )

Expected result (*)

  1. The video information to be filled in and the save button to be enabled.

Actual result (*)

  1. No other fields are filled in and the save button remains disabled
  2. The following appears in the web browser console
Uncaught TypeError: Cannot read property '0' of null
   at $.<computed].[computed]._formatVimeoDuration (get-video-information.js:592)
   at $.[computed].[computed]._formatVimeoDuration (jquery-ui-1.9.2.js:432)
   at $.[computed].[computed]._onVimeoLoaded (get-video-information.js:502)
   at Object.proxy [as success] (jquery.js:535)
   at fire (jquery.js:3238)
   at Object.fireWith [as resolveWith> (jquery.js:3368)
   at done (jquery.js:9846)
   at HTMLScriptElement.script.onload.script.onreadystatechange (jquery.js:10436)

The _formatVimeoDuration function in the get-video-information.js file has a parameter called seconds. The problem is that seconds is undefined. This is a result of the data returned from Vimeo missing the duration property.

Another error can occur when the description for the video is missing as well

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • < ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • [ > Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Assignees

No one assigned

    Labels

    Component: ProductVideoFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions