WordPress.org

Forums

WPNewsman Lite
[resolved] Fatal error: Call to undefined function get_current_screen() (3 posts)

  1. stones001
    Member
    Posted 2 years ago #

    Dear all,

    Got the following message in the editor when i click on "W" icon to insert articles:

    Fatal error: Call to undefined function get_current_screen() in /home/eexpl870/public_html/wp-content/themes/graphene/includes/theme-head.php on line 256

    Any idea how to solve this issue ?
    Version is 1.5.3

    Thanks in advance...
    Phil

    http://wordpress.org/extend/plugins/wpnewsman-newsletters/

  2. neocoder
    Member
    Plugin Contributor

    Posted 2 years ago #

    Hello Phil,
    I reproduced the issue. Here's a quick fix.

    open the frmGetPosts.php file in plugins folder and replace line 30 ( <?php wp_head; ?> ) with this line:
    <?php do_action('admin_enqueue_scripts'); ?>

    I will also include this fix in the next plugin update.

    Regards,
    Alex L.

  3. stones001
    Member
    Posted 2 years ago #

    Dear Alex,

    After doind this, the fatal error is now in woocomerce instead of graphene.
    The following issue appears:
    Fatal error: Call to undefined function get_current_screen() in /home/eexpl870/public_html/wp-content/plugins/woocommerce/admin/woocommerce-admin-init.php on line 401

    Anyway, i'm able to correct the issue by adding comments in the theme-head.php located in Graphene folder like this:

    // if ( ! $hook_suffix && is_admin() ) {
    // $current_screen = get_current_screen();
    // $hook_suffix = $current_screen->base;
    // }

    and then add comment in the woocommerce-admin-init.php line 401:
    //$screen = get_current_screen();

    I don't know at this time what would be the collateral effects of this change :-(

    Take care,
    Phil

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.