elementor / elementor

The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
https://elementor.com/
GNU General Public License v3.0
6.42k stars 1.39k forks source link

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

Open dariodp89 opened 2 weeks ago

dariodp89 commented 2 weeks ago

Prerequisites

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

Elementor System Info

== 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
    Admin Email: ...
    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

dariodp89 commented 1 week ago

Probably it's the same issue as https://github.com/elementor/elementor/issues/21498.