Support » Fixing WordPress » Fatal error: Call to undefined function wp_get_current_user()

  • Hi.

    I have a new site that I’m building, have added in a new Talian theme and all was OK. Went to add the Web Traffic Genius RSS plugin by uploading a zip file.

    As soon as it started to install I received the following error message:

    Fatal error: Call to undefined function wp_get_current_user() in /home/alwinsi1/public_html/healthyinsights.co.uk/wp-includes/capabilities.php on line 1059

    I read another post on this forum that mentioned something about adding require_once(‘pluggable.php’); but I don’t know anything about this type of coding so don’t know where to start. I’m fine with editing the capabilities php file if someone knws how to overcome this.

    The post can be found at: http://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wp_get_current_user-3?replies=4

    Would it be the new plugin I’m trying to load that’s causing the problem?

    Any help appreciated.

    Regards

    Nigel

Viewing 15 replies - 16 through 30 (of 31 total)
  • sxpiv, Yes please send me a copy of your capabilities.php file. I will let you know how it works.

    Thanks again.

    suziwilson@q.com

    unfortunately not. It was an automatic update.

    It seems I have found what causes problem in network mode but not why it is causing a problem.

    On my plugin the problem was because there was a file called settings.php. After renaming it to something else the error disappeared!

    I just don’t know why settings.php causes error in network mode.

    Thanks guys, I eventually managed to get into my host and the plugins. Deleted amazon associate plugin. My site is back up!

    Johan.Great.I Hope that it will work well.

    Is there some way to just fix the code here where the error is occurring? The error line is right after the $post = get_post($args[0]);

    case 'read_post':
    case 'read_page':
    $author_data = get_userdata( $user_id );
    $post = get_post( $args[0] );

    if ( 'revision' == $post->post_type ) {
    $post = get_post( $post->post_parent );
    }

    suzi,the file already sent to your mail address
    sxpiv

    suzy.
    from where did you get this code?

    Hi sxpiv,
    Thank you for the capabilities.php. I uploaded it and I still get the error:
    You do not have permission to access this page.

    The excerpt I sent earlier is from the lines showing in error in the capabilities.php.

    I’m stuck. Nothing is working.

    Suzi

    I’m said.I’m sorry,that i wasn’t able to help you:(
    sxpiv

    sxpiv, I did not resolve the reason for the issue, but I have resolved the immediate problem. I went into cpanel and renamed the Nivo Slider php plugin which caused the problem in the first place.

    That let me into the Network section where I deleted the plugin.

    Thanks for your efforts. MUCH appreciated!

    Suzi

    Suzi!

    I’m said,that i wasn’t able to help you directly,but if you have any question in the future,don’t hesitate, just let me know,because maybe i can help you neather.

    sxpiv

    @johanhburger How did it just start working again? I’m having the same problem.

    Hi Johanhburger,
    I suspected that the last plugin I installed may have caused the problem so I went into cpanel on my server and renamed the subdirectory for the plugin. In my case it was the Nivo Slider plugin.

    That allowed me to get back into the Admin panel where I deleted the plugin.

    Hope this helps you.

    Instead of adding a line to capabilities.php (where it will be overwritten by updates), I added this line right before require_once(ABSPATH . 'wp-settings.php'); in my wp-config.php file:

    require_once(ABSPATH . 'wp-includes/pluggable.php');

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Fatal error: Call to undefined function wp_get_current_user()’ is closed to new replies.