• Hello Support Team,

    I am writing to report an issue I am experiencing with the WP Login and Logout Redirect plugin. I have received multiple automated emails from WordPress indicating a fatal error related to this plugin. However, upon thorough investigation, I have not identified any visible issues on my website, and the plugin’s functionality appears to be intact.

    Here are the details of the error as reported by WordPress:
    Error Details

    An error of type E_ERROR was caused in line 64 of the file /www/wp-content/plugins/wp-login-and-logout-redirect/includes/login-user-time/login-user-time.php. Error message: Uncaught Error: Call to undefined function get_current_screen() in /www/wp-content/plugins/wp-login-and-logout-redirect/includes/login-user-time/login-user-time.php:64
    Stack trace: 0 /wordpress/wp-includes/class-wp-hook.php(324): wplalr_sort_user_last_login_column(Object(WP_User_Query)) 1 /wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 2 /wordpress/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 3 /wordpress/wp-includes/class-wp-user-query.php(281): do_action_ref_array(‘pre_get_users’, Array) 4 /wordpress/wp-includes/class-wp-user-query.php(79): WP_User_Query->prepare_query(Array) 5 /wordpress/wp-includes/user.php(776): WP_User_Query->__construct(Array) 6 /www/wp-content/plugins/ithemes-security-pro/core/modules/notification-center/validator.php(302): get_users(Array) 7 /www/wp-content/plugins/ithemes-security-pro/core/modules/notification-center/validator.php(28): ITSEC_Notification_Center_Validator->get_available_admin_users_and_roles() 8 /www/wp-content/pl

    Website and Environment Details

    • Website URL: https://owners.idealmountainproperty.com/
    • WordPress version: 6.5.4
    • Active theme: Twenty Twentyone child (version )
    • Current plugin: WP Login and Logout Redirect (version 2.0)
    • PHP version: 7.4.33.5

    Steps Taken

    1. Visited the website and the specified admin page as advised.
    2. Checked for any visible issues—none found.
    3. Verified that the plugin functionality is working as expected.

    Despite the normal functionality, the error notifications persist, suggesting a potential underlying issue.

    I would appreciate your assistance in diagnosing and resolving this issue to prevent further error notifications. If additional information or access to the website is required, please let me know.

    Thank you for your support.

    Best regards,

    Devmountaintop

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter devmountaintop

    (@devmountaintop)

    Dear Support Team,

    I wanted to follow up on my above-mentioned issue regarding the repeated error notifications from the WP Login and Logout Redirect plugin. I haven’t received a response yet and would appreciate your prompt assistance in resolving this issue.

    Please provide an update or any further instructions as soon as possible.

    Thank you for your attention to this matter.

    Best regards,

    Devmountaintop

    Thread Starter devmountaintop

    (@devmountaintop)

    Dear Support Team,

    I wanted to follow up on my above-mentioned issue regarding the repeated error notifications from the WP Login and Logout Redirect plugin. I haven’t received a response yet and would appreciate your prompt assistance in resolving this issue.

    Please provide an update or any further instructions as soon as possible.

    Thank you for your attention to this matter.

    Best regards,

    Devmountaintop

    The solution (albeit needs their code modified) is:

    This can be resolved by adding before that line this:
    require_once(ABSPATH . 'wp-admin/includes/screen.php');

    Add this to the function e.g.

    function wplalr_sort_user_last_login_column( $query ) {

    if( !is_admin() ) {
    return $query;
    }

    require_once(ABSPATH . 'wp-admin/includes/screen.php');
    $screen = get_current_screen();

    if( isset( $screen->id ) && $screen->id !== 'users' ) {
    return $query;
    }

    if( isset( $_GET[ 'orderby' ] ) && $_GET[ 'orderby' ] == 'wplalr_last_login' ) {

    $query->query_vars['meta_key'] = 'wplalr_last_login';
    $query->query_vars['orderby'] = 'meta_value';

    }

    return $query;

    }

    Not ideal but will fix until they do.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.