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

Error when you pick an image in media controller (custom widget) #27203

Open
6 tasks done
dariodp89 opened this issue May 1, 2024 · 1 comment · May be fixed by #27239
Open
6 tasks done

Error when you pick an image in media controller (custom widget) #27203

dariodp89 opened this issue May 1, 2024 · 1 comment · May be fixed by #27239
Labels
status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.

Comments

@dariodp89
Copy link

dariodp89 commented May 1, 2024

Prerequisites

  • I have searched for similar issues in open and closed tickets and cannot find a duplicate.
  • I have troubleshooted my issue, and it still exists against the latest stable version of Elementor.

Description

Hi, I've created a custom Elementor widget and, in a repeater, I added a media controller input (only for images). When I select an image file from the media library and I confirm, it doesn't get added. In the console I get the highlighted error. I think that in editor.js, in that line of code, it should be "default_value" instead of "default".

Screenshot 2024-05-01 225927

Steps to reproduce

  1. Create a custom Elementor widget wih a repeater input and for every item of the repeater add a media controller input field for images.
  2. Add an instance of that custom widget somewhere in a website (eg: in a page).
  3. In an item of the repeater, open the media library to select an image for that input and confirm the choice.

Expected behavior

The image should be set as value of the image field.

Isolating the problem

  • This bug happens when only the Elementor (and Elementor Pro) plugins are active.
  • This bug happens with the Hello Elementor theme active.
  • I can reproduce this bug consistently by following the steps I described above.

Elementor System Info

Click to reveal
== Server Environment ==
	Operating System: Linux
	Software: Apache
	MySQL version: MariaDB Server v10.6.17
	PHP Version: 8.1.28
	PHP Memory Limit: 1G
	PHP Max Input Vars: 5000
	PHP Max Post Size: 256M
	GD Installed: Yes
	ZIP Installed: Yes
	Write Permissions: All right
	Elementor Library: Connected

== WordPress Environment ==
	Version: 6.5.2
	Site URL: ...
	Home URL: ...
	WP Multisite: No
	Max Upload Size: 256 MB
	Memory limit: 40M
	Max Memory limit: 1G
	Permalink Structure: /%postname%/
	Language: it_IT
	Timezone: Europe/Rome
	Debug Mode: Inactive

== Theme ==
	Name: Expertise Child
	Version: 1.0
	Author: Mikado Themes
	Child Theme: Yes
	Parent Theme Name: Expertise
	Parent Theme Version: 1.0
	Parent Theme Author: Mikado Themes

== User ==
	Role: administrator
	WP Profile lang: it-IT
	User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36

== Active Plugins ==
	Contact Form 7
		Version: 5.9.3
		Author: Takayuki Miyoshi

	Cookie Notice & Compliance for GDPR / CCPA
		Version: 2.4.16
		Author: Hu-manity.co

	Download Manager
		Version: 3.2.90
		Author: W3 Eden, Inc.

	Elementor
		Version: 3.21.4
		Author: Elementor.com

	Expertise Core
		Version: 1.0
		Author: Qode Interactive

	MailPoet
		Version: 4.49.1
		Author: MailPoet

	Post Types Order
		Version: 2.2.1
		Author: Nsp Code

	Qi Addons For Elementor
		Version: 1.7.1
		Author: Qode Interactive

	Qi Blocks
		Version: 1.2.7
		Author: Qode Interactive

	Qode Framework
		Version: 1.2.2
		Author: Qode Interactive

	Slider Revolution
		Version: 6.6.20
		Author: ThemePunch

	The Events Calendar
		Version: 6.4.0
		Author: The Events Calendar

	Yoast Duplicate Post
		Version: 4.5
		Author: Enrico Battocchi & Team Yoast

	Yoast SEO
		Version: 22.6
		Author: Team Yoast


== Esperimenti Elementor ==
	Caricamento delle risorse migliorato: Attivo per impostazione predefinita
	Caricamento CSS migliorato: Attivo per impostazione predefinita
	Icone dei font in linea: Attivo per impostazione predefinita
	Punti di interruzione aggiuntivi: Attivo per impostazione predefinita
	admin_menu_rearrangement: Inattivo per impostazione predefinita
	Contenitore Flexbox: Attivo per impostazione predefinita
	Aggiorna la libreria Swiper: Attivo per impostazione predefinita
	Contenitore Griglia: Attivo per impostazione predefinita
	Nested Elements Performance: Inattivo per impostazione predefinita
	Optimized Control Loading: Inattivo per impostazione predefinita
	Elementor Home Screen: Attivo per impostazione predefinita
	Barra unificata degli strumenti dell'editor: Inattivo per impostazione predefinita
	Costruisci con l'AI: Attivo per impostazione predefinita
	Landing Page: Attivo per impostazione predefinita
	Elementi annidati: Inattivo per impostazione predefinita
	Lazy Load immagini di sfondo: Inattivo per impostazione predefinita


== Registro ==
	
JS: showing 9 of 9JS: 2024-04-05 19:23:58 [error X 24][../wp-content/plugins/elementor/assets/js/ai.min.js?ver=3.20.3:3:7564] ReactUtils is not defined 
JS: 2024-04-05 19:33:54 [error X 2][../wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.20.3:3:931098] elementorFrontend is not defined 
JS: 2024-04-07 18:29:09 [error X 23][../wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.20.3:3:816057] Cannot read properties of undefined (reading 'localized') 
JS: 2024-04-08 22:00:33 [error X 6][../wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.20.3:3:697853] this.model.isValidChild is not a function 
JS: 2024-04-09 14:29:38 [error X 3][../wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.20.3:3:626344] Cannot read properties of undefined (reading 'isEditable') 
JS: 2024-04-30 23:14:56 [error X 98][../wp-content/plugins/elementor/assets/js/editor-modules.min.js?ver=3.21.4:3:16087] Cannot read properties of undefined (reading 'global') 
JS: 2024-05-01 15:38:41 [error X 11][../wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.21.4:3:307298] Cannot read properties of undefined (reading 'size') 
JS: 2024-05-01 17:07:41 [error X 5][../wp-content/plugins/elementor/assets/js/responsive-bar.min.js?ver=3.21.4:2:11756] elementor is not defined 
JS: 2024-05-01 17:07:41 [error X 1][../wp-content/plugins/elementor/assets/js/editor-loader-v1.min.js?ver=3.21.4:2:37] Cannot read properties of undefined (reading 'start') 

Log: showing 20 of 302024-04-20 16:19:11 [info] elementor::elementor_updater Started 
2024-04-20 16:19:11 [info] Elementor/Upgrades - _on_each_version Start  
2024-04-20 16:19:11 [info] Elementor/Upgrades - _on_each_version Finished 
2024-04-20 16:19:11 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.0',
  'to' => '3.21.1',
)]
2024-04-20 16:19:11 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.0',
  'to' => '3.21.1',
)]
2024-04-20 16:19:12 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.0',
  'to' => '3.21.1',
)]
2024-04-25 15:25:45 [info] elementor::elementor_updater Started 
2024-04-25 15:25:45 [info] Elementor/Upgrades - _on_each_version Start  
2024-04-25 15:25:45 [info] Elementor/Upgrades - _on_each_version Finished 
2024-04-25 15:25:45 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.1',
  'to' => '3.21.2',
)]
2024-04-25 17:10:07 [info] elementor::elementor_updater Started 
2024-04-25 17:10:07 [info] Elementor/Upgrades - _on_each_version Start  
2024-04-25 17:10:07 [info] Elementor/Upgrades - _on_each_version Finished 
2024-04-25 17:10:07 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.2',
  'to' => '3.21.3',
)]
2024-04-25 17:10:07 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.2',
  'to' => '3.21.3',
)]
2024-05-01 00:07:32 [info] elementor::elementor_updater Started 
2024-05-01 00:07:32 [info] Elementor/Upgrades - _on_each_version Start  
2024-05-01 00:07:32 [info] Elementor/Upgrades - _on_each_version Finished 
2024-05-01 00:07:32 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.3',
  'to' => '3.21.4',
)]
2024-05-01 00:07:32 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.21.3',
  'to' => '3.21.4',
)]



== Elementor - Compatibility Tag ==
	
	Qi Addons For Elementor: Compatibilità non specificata

Agreement

  • I agree that my issue may be closed without action if it doesn't meet all the requirements.
@dariodp89 dariodp89 added the status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. label May 1, 2024
@dariodp89
Copy link
Author

dariodp89 commented May 7, 2024

Probably it's the same issue as #21498.

dariodp89 added a commit to dariodp89/elementor that referenced this issue May 7, 2024
…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
@dariodp89 dariodp89 linked a pull request May 7, 2024 that will close this issue
12 tasks
dariodp89 added a commit to dariodp89/elementor that referenced this issue May 19, 2024
…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
dariodp89 added a commit to dariodp89/elementor that referenced this issue May 20, 2024
…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
dariodp89 added a commit to dariodp89/elementor that referenced this issue May 20, 2024
…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
dariodp89 added a commit to dariodp89/elementor that referenced this issue May 21, 2024
…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
status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant