• Resolved Johnz Place

    (@johnz-place)


    Hi,

    I’m getting this fatal error:

    Fatal error: Call to undefined function wp_get_current_user() in /home/alter4u/public_html/wp-includes/capabilities.php on line 1281

    I’ve called my host provider and they said it was something to do with WordPress and couldn’t help me so I’m here hoping to find something or someone that can help.

    Does anyone know what this error is and how to fix it?

    I can access the individual sites on the multisite but I can’t access the Network Admin Panel – Dashboard to update or do anything there since I can’t access it.

    I did look at the 1281 lines on the php file in question but I don’t know enough to do anything here.

    Here is the code specifically from 1281:

    $current_user = wp_get_current_user();

    Here is the code from 1272 to 1290

    /**
    * Whether current user has capability or role.
    *
    * @since 2.0.0
    *
    * @param string $capability Capability or role name.
    * @return bool
    */
    function current_user_can( $capability ) {
    $current_user = wp_get_current_user();

    if ( empty( $current_user ) )
    return false;

    $args = array_slice( func_get_args(), 1 );
    $args = array_merge( array( $capability ), $args );

    return call_user_func_array( array( $current_user, ‘has_cap’ ), $args );
    }

    Does anyone know what this error is and how to change/fix the code?

    I would like to update the multisite plugins and what not but can’t.

    Anyone? Thanks

    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Delete wp-includes and reinstall it from a fresh WP download.

    YOUR DATA IS SAFE IF YOU DO THAT. 🙂

    If that doesn’t work, turn off your plugins.

    Thread Starter Johnz Place

    (@johnz-place)

    Hi Mike,

    I’ve tried your suggestion and I still get the same error.

    However, I did deactivate all the plugins on the main multisite and walla I was than able to access the Network Admin Panel. I then updated all the plugins.

    After this I went back to the main multisite dashboard and reactivated the plugins. The issue reoccurred. I then deactivated the plugins one at a time and found that “Automatic Post Scheduler” By Tudor Sandu is the culprit that stops access to the Network Dashboard.

    I’ll see if I want to reactivate this plugin knowing that I can deactivate it if I need to update things. We’ll see.

    Anyhow this issue is solved, how nice! THANKS!

    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatel Error’ is closed to new replies.