elementor icon indicating copy to clipboard operation
elementor copied to clipboard

Fix: #27203 Image selection for media controller inside…

Open dariodp89 opened this issue 1 year ago • 2 comments

… repeater

When using a custom widget with a repeater field that contains a media controller in its items, you can't set an image for the image field of repeater items. With this fix, the error is fixed and image selection works again.

fix #27203

PR Checklist

  • [x] The commit message follows our guidelines: https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md

PR Type

What kind of change does this PR introduce?

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

Summary

This PR can be summarized in the following changelog entry:

  • Fixes #27203: When using a custom widget with a repeater field that contains a media controller in its items, you can't set an image for the image field of repeater items. With this fix, the error is fixed and image selection works again.

Description

An explanation of what is done in this PR

  • Changed "default" with "default_value" in assets\dev\js\editor\controls\media.js:405

Test instructions

This PR can be tested by following these steps:

  • Create a custom Elementor widget with a repeater field that has a media controller for a inner field.
  • In the Elementor editor, try to pick an image for an inner field of the repeater field (previously image was not setting and you were receiving an error in the js console, now the image should be set correctly).

Quality assurance

  • [x] I have tested this code to the best of my abilities
  • [ ] I have added unittests to verify the code works as intended
  • [ ] Docs have been added / updated (for bug fixes / features)

Fixes # #27203

dariodp89 avatar May 07 '24 21:05 dariodp89

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 07 '24 21:05 CLAassistant

Please, can somebody check this?

dariodp89 avatar Jun 27 '24 16:06 dariodp89