Skip to content

Fix video fields inside field collections - #4064

Open
pverdu-emico wants to merge 1 commit into
pimcore:2026.xfrom
pverdu-emico:fix/video-fieldcollection-modal
Open

Fix video fields inside field collections#4064
pverdu-emico wants to merge 1 commit into
pimcore:2026.xfrom
pverdu-emico:fix/video-fieldcollection-modal

Conversation

@pverdu-emico

@pverdu-emico pverdu-emico commented Sep 2, 2026

Copy link
Copy Markdown

Changes in this pull request

Fixes pimcore/platform-version#443

Fixes video fields that are used inside field collections.

The video settings modal was rendered inside the field collection's numbered form context. This caused the modal fields to be handled as field collection fields, resulting in an empty video ID and an about:blank preview.

The video field now opens the modal through the existing VideoModalProvider. This renders the modal outside the field collection while preserving the existing behaviour for regular video fields.

Additional info

Verified in a local Pimcore setup with a YouTube video inside a field collection. The preview now loads the expected youtube-nocookie.com embed URL.

  • npm run check-types
  • ESLint on the changed component

Copilot AI balanced review requested due to automatic review settings September 2, 2026 09:13
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The field-collection regression is only manually verified and has no automated test.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Verdict: Needs changes. The change addresses the root cause by moving the video modal outside the field-collection form context, but lacks automated regression coverage.

Changes:

  • Replaces locally rendered VideoModal state with useVideoModal.
  • Preserves video settings, disabled state, and save behavior.
  • Removes the nested modal from VideoFooter.

The boundary and existing caller are correctly handled, with no public API break identified. Documentation is unnecessary for this internal bug fix; the remaining risk is regression without a targeted component test.

File summaries
File Description
assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related/components/video/footer.tsx Opens video settings through the global modal provider.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pverdu-emico

Copy link
Copy Markdown
Author

Fixes pimcore/platform-version#443

@pverdu-emico
pverdu-emico marked this pull request as ready for review September 2, 2026 09:21
@pimcore-deployments
pimcore-deployments marked this pull request as draft September 2, 2026 09:21
@pverdu-emico

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@pverdu-emico
pverdu-emico marked this pull request as ready for review September 2, 2026 09:24
@pimcore-deployments
pimcore-deployments marked this pull request as draft September 2, 2026 09:24
@pverdu-emico
pverdu-emico marked this pull request as ready for review September 2, 2026 09:25
@pimcore-deployments
pimcore-deployments marked this pull request as draft September 2, 2026 09:25
@pverdu-emico
pverdu-emico marked this pull request as ready for review September 2, 2026 09:52
@ValeriaMaltseva
ValeriaMaltseva self-requested a review September 2, 2026 09:57
@ValeriaMaltseva ValeriaMaltseva self-assigned this Sep 2, 2026
@ValeriaMaltseva
ValeriaMaltseva requested a balanced review from Copilot September 3, 2026 09:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The behavioral fix lacks a regression test covering video fields inside field collections.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

export const VideoFooter = (props: VideoFooterProps): React.JSX.Element => {
const { t } = useTranslation()
const [isModalVisible, setIsModalVisible] = useState(false)
const { openModal } = useVideoModal({

@ValeriaMaltseva ValeriaMaltseva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pverdu-emico
Hi! Thanks a lot for bringing us this fix. Everything looks good already! There are just two small things I'd like to ask you to take care of:

  1. Could you please rebase the changes onto the 2026.2 branch?
  2. Could you also take a look at this comment?

Thanks in advance! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video fields inside field collections load an empty preview

4 participants