• Resolved agawaneharish

    (@agawaneharish)


    plugin is failing after update

    EXMAGE – WordPress Image Links

    Deactivate | Resume

    Add images using external links – Save your storage with EXMAGE effortlessly

    Version 1.0.22 | By VillaTheme(villatheme.com) | View details

     This plugin failed to load properly and is paused during recovery mode.

    An error of type E_ERROR was caused in line 94 of the file /home/royalretails/htdocs/royalretails.co.uk/wp-content/plugins/exmage-wp-image-links/exmage-wp-image-links.php. Error message: Uncaught Error: Call to undefined function get_current_screen() in /home/royalretails/htdocs/royalretails.co.uk/wp-content/plugins/exmage-wp-image-links/exmage-wp-image-links.php:94 Stack trace: #0 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/class-wp-hook.php(324): EXMAGE_WP_IMAGE_LINKS->filter_exmage_in_library_page() #1 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #2 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/plugin.php(565): WP_Hook->do_action() #3 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/class-wp-query.php(1881): do_action_ref_array() #4 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/class-wp-query.php(3852): WP_Query->get_posts() #5 /home/royalretails/htdocs/royalretails.co.uk/wp-includes/post.php(2541): WP_Query->query() #6 /home/royalretails/htdocs/royalretails.co.uk/wp-content/themes/lasa/inc/functions-helper.php(137): get_posts() #7 /home/royalretails/htdocs/royalretails.co.uk/wp-content/themes/lasa/inc/vendors/redux-framework/config/02-header.php(22): lasa_tbay_get_header_layouts() #8 /home/royalretails/htdocs/royalretails.co.uk/wp-content/themes/lasa/functions.php(148): require_once('...') #9 /home/royalretails/htdocs/royalretails.co.uk/wp-settings.php(672): include('...') #10 /home/royalretails/htdocs/royalretails.co.uk/wp-config.php(116): require_once('...') #11 /home/royalretails/htdocs/royalretails.co.uk/wp-load.php(50): require_once('...') #12 /home/royalretails/htdocs/royalretails.co.uk/wp-admin/admin.php(34): require_once('...') #13 /home/royalretails/htdocs/royalretails.co.uk/wp-admin/plugins.php(10): require_once('...') #14 {main} thrown

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter agawaneharish

    (@agawaneharish)

    my all website crashed

    Editen this file wp-content/plugins/exmage-wp-image-links/exmage-wp-image-links.php

    Replaced line 94 with  $screen = false;//get_current_screen(); because get_current_screen() is missing. The site works again

    public function filter_exmage_in_library_page( $query ) {
    if (!is_admin() || !function_exists(‘get_current_screen’)) {
    return;
    }

    $screen = get_current_screen();
    if ($screen && $screen->base === 'upload') {
        if (isset($_REQUEST['exmage_filter'])) {
            $exmage_filter = sanitize_text_field($_REQUEST['exmage_filter']);
            $meta_query = [];
    
            switch ($exmage_filter) {
                case 'only_downloaded':
                    $meta_query = [
                        'relation' => 'AND',
                        [
                            'key'     => '_exmage_external_url',
                            'compare' => 'EXISTS',
                        ],
                        [
                            'key'     => '_exmage_imported',
                            'compare' => 'EXISTS',
                        ]
                    ];
                    break;
                case 'only_undownloaded':
                    $meta_query = [
                        'relation' => 'AND',
                        [
                            'key'     => '_exmage_external_url',
                            'compare' => 'EXISTS',
                        ],
                        [
                            'key'     => '_exmage_imported',
                            'compare' => 'NOT EXISTS',
                        ]
                    ];
                    break;
                default:
                    $meta_query = [
                        'relation' => 'OR',
                        [
                            'key'     => '_exmage_external_url',
                            'compare' => 'EXISTS',
                        ],
                        [
                            'key'     => '_exmage_imported',
                            'compare' => 'EXISTS',
                        ]
                    ];
                    break;
            }
    
            $query->set('meta_query', $meta_query);
        }
    }

    }

    Hi guys,

    Thank you for reaching out to us. And thank you so much for all your effort. We just released an official update of this plugin addressing the problem. Can you please pull the latest version and try again?

    Best regards.

    Спасибо! It’s working again.

    Thank you so much for the quick confirmation!

    Thread Starter agawaneharish

    (@agawaneharish)

    in such cases you should enable option to download older version which is missing in your case.

    angelagrey

    (@angelagrey)

    For now, we don’t have option to download old version. But we’ll take it into consideration. Thank you.

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

The topic ‘Plugin Failing’ is closed to new replies.