Critical Error when trying to use Pro Elements Settings

3 replies2 participantsUpdated by Samir Malik

  • Avatar: tomatres
    tomatres
    Participant

    Trying to get out of catalog mode or view any preferences at all and it crashes.

    Edit widget: Elementor Library Add widget: Elementor Library Edit Add Elementor Library
    Elementor Library
    There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums.

    Learn more about troubleshooting WordPress.

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.

    3 Answers

    Avatar: Samir Malik
    Samir Malik
    Support staff

    Hello,

    The metadata of Elementor plugin was broken.

    We’ve fixed that issue with this code:

    
    <?php
    /**
     * Fix Elementor corrupted metadata
     */
    add_action('admin_init', 'fix_elementor_corrupted_meta');
    
    function fix_elementor_corrupted_meta() {
        // Only run once
        if (get_option('elementor_meta_fixed')) {
            return;
        }
        
        global $wpdb;
        
        // Fix page settings that are strings instead of arrays
        $wpdb->query("
            UPDATE {$wpdb->postmeta}
            SET meta_value = 'a:0:{}'
            WHERE meta_key = '_elementor_page_settings'
            AND meta_value NOT LIKE 'a:%'
            AND meta_value NOT LIKE 's:0%'
        ");
        
        // Fix conditions cache that are strings instead of arrays
        $wpdb->query("
            UPDATE {$wpdb->postmeta}
            SET meta_value = 'a:0:{}'
            WHERE meta_key = '_elementor_conditions'
            AND meta_value NOT LIKE 'a:%'
        ");
        
        // Mark as fixed
        update_option('elementor_meta_fixed', true);
        
        // Clear Elementor cache
        if (class_exists('\Elementor\Plugin')) {
            \Elementor\Plugin::$instance->files_manager->clear_cache();
        }
    }

    Everything should be fine now.

    Can you please double check?

    Thank you!

    Avatar: tomatres
    tomatres
    Participant

    It works correctly now. What file was edited? and if I update the plugins will it happen again? I believe my last topic was related to the same issue and it happened again when I updated Elementor and Pro Elements.

    Avatar: Samir Malik
    Samir Malik
    Support staff

    Hello, tomatres,

    The Elementor metadata issue has been resolved.
    We temporarily added code to fix the problem and have since removed it.

    You can now safely update the plugins.

    Best regards,
    The 8Theme Team

Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.

Login / Register