• Resolved marquedigitale

    (@marquedigitale)


    Hi,

    Since Elementor Pro v5.6.2, when I try to edit Elementor’s custom code, the field where the code is supposed to be is not displaying.
    After having done the basic deactivating every plugin, then reactivate them one by one, it appears that the issue comes back when ACF Extended is reactivated.

    Can you please check the issue?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    ACF Extended enqueues the builtin CodeMirror library from the WP core (see core documentation) on Post Types admin pages for the ACFE Code Editor field. This logic is inherited from the native ACF behavior. Here, the Post Type admin page is elementor_snippet.

    It looks like since a recent patch, Elementor isn’t compatible with that library, which is probably an oversight since it’s a core WP feature.

    I would recommend to send a ticket to Elementor and let them know that when a user enqueue the builtin WordPress Code Editor library (Codemirror) in the admin, it breaks their “Custom Code” module.

    Here is a code you can attach to your ticket. It can be used in the functions.php file in order to reproduce the issue consistently (blank WP install + Elementor, without ACF/ACFE, just this code):

    add_action('admin_enqueue_scripts', 'my_enqueue_script');
    function my_enqueue_script(){
        
        wp_enqueue_script('code-editor');
        
    }
    

    While waiting for the official Elementor patch, here is a code you can paste in your functions.php file in order to fix the issue:

    add_action('admin_enqueue_scripts', 'my_fix_elementor_custom_code_library', 25);
    function my_fix_elementor_custom_code_library(){
        
        global $typenow;
        
        // dequeue code-editor on elementor snippet post type
        if($typenow === 'elementor_snippet'){
            wp_dequeue_script('code-editor');
        }
        
    }
    

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter marquedigitale

    (@marquedigitale)

    Hi,
    Thanks for your reply!
    I applied your workaround and it is working great.

    I’ll open a ticket for this to Elementor.

    Thanks again for the support.

    Regards

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    You’re welcome!

    If you enjoy this plugin and its support, feel free to submit a review. It always helps and it’s much appreciated ??

    Have a nice day!

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with Elementor Pro’ is closed to new replies.