Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    I had the same issue with Link Whisper Free 0.9.4 and Elementor.

    The fatal error happens because the plugin calls this method:

    Wpil_Editor_Elementor::appendProcessableValue()

    but this method is not declared in the plugin files.

    The error is in:

    wp-content/plugins/link-whisper/core/Wpil/Editor/Elementor.php

    In my case, the issue happened when saving an Elementor page. Link Whisper tried to process the Elementor content and crashed because the method was missing.

    Temporary fix:

    I added the missing method inside the Wpil_Editor_Elementor class in:

    core/Wpil/Editor/Elementor.php

    Code added:

    private static function appendProcessableValue(&$processable_data, ...$values)
    {
        if (!is_array($processable_data)) {
            $processable_data = array();
        }
    
        foreach ($values as $value) {
            if (is_array($value)) {
                foreach ($value as $sub_value) {
                    self::appendProcessableValue($processable_data, $sub_value);
                }
                continue;
            }
    
            if (is_object($value)) {
                $value = wp_json_encode($value);
            }
    
            if (is_scalar($value)) {
                $value = trim((string) $value);
    
                if ($value !== '') {
                    $processable_data[] = $value;
                }
            }
        }
    
        return $processable_data;
    }
    

    After adding this method, Elementor pages could be saved again.

    Please note: this is only a temporary patch because it modifies a plugin core file. It may be overwritten during a future Link Whisper update. The best solution would be an official fix from the plugin author.

    Try this:

    in your header replace your code by this:

    <?php if ( is_active_sidebar( 'sidebar-my-widget' ) ) : ?>
    <?php dynamic_sidebar( 'sidebar-my-widget' ); ?>
    <?php endif; ?>
    
    and in your function replace your code by this:
    
    add_action( 'widgets_init', 'theme_slug_widgets_init' );
    function theme_slug_widgets_init() {
        register_sidebar( array(
            'name' => __( 'My Widget', 'theme-slug' ),
            'id' => 'sidebar-my-widget',
            'before_widget' => '<div class = "My Widget">',
    	'after_widget'  => '</div>',
    	'before_title'  => '<h3>',
    	'after_title'   => '</h3>',
        ) );
    }

    good luck!

    • This reply was modified 8 years, 4 months ago by bcworkz. Reason: code fixed, otherwise syntax errors occur

    Type in fields Scripts in header or Scripts in footer for example like this:
    <style>
    your style here
    </style>
    <script type=”text/javascript”>
    your js here
    </script>
    ….
    and make save.

Viewing 3 replies - 1 through 3 (of 3 total)