Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #27203 Image selection for media controller inside… #27239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dariodp89
Copy link

… 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

PR Type

What kind of change does this PR introduce?

  • 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:

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

  • 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

@CLAassistant
Copy link

CLAassistant commented May 7, 2024

CLA assistant check
All committers have signed the CLA.

@dariodp89 dariodp89 changed the title fix(media.js): #27203 Fix image selection for media controller inside… Fix (media.js): #27203 Fix image selection for media controller inside… May 9, 2024
@dariodp89 dariodp89 changed the title Fix (media.js): #27203 Fix image selection for media controller inside… Fix: #27203 Image selection for media controller inside… May 9, 2024
@dariodp89 dariodp89 force-pushed the main branch 2 times, most recently from 8ea0d74 to 9dec166 Compare May 20, 2024 08:58
…er inside 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 elementor#27203
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.

Error when you pick an image in media controller (custom widget)
2 participants