Skip to content

[Issue] Fix missing video when advanced js bundling used #32501

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #32499: Fix missing video when advanced js bundling used


Description (*)

This PR fixes issue when a video is missing in the product gallery when advanced JS bundling is enabled and used.

This happened because the event gallery:loaded was already triggered before this code was executed.

In order to fix the issue I looked how with this event we working in different places, so I did same in this piece of code as well.

gallery.data('gallery') ?
this._onGalleryLoaded(gallery) :
gallery.on('gallery:loaded', this._onGalleryLoaded.bind(this, gallery));

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Configure advanced JS bundling, I used this one https://github.com/magesuite/magepack
  2. Go to a product page that contains youtube or vimeo video
  3. See gallery, try to find the video

Actual result: (before this PR)
❌ No video appeared, just image shown

Expected result: (after this PR)
✔ Video should appear in gallery

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: ProductVideoEvent: Adobe Summit HackathonFixed 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: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions