• Hi, guys.
    Sorry, my English is very bad.
    I have a problem.
    After installing the plugin “loginza” (login through social network), i see this error on homepage, error disappears if page refresh.
    Fatal error: Call to undefined function wp_get_current_user() in /var/www/u8116206/data/www/lwps.ru/wp-includes/capabilities.php on line 1342
    https://s018.radikal.ru/i522/1312/2e/97919cdf3073.jpg
    I tried to upload capabilities.php again – doesn’t work.
    Wordpress – 3.8
    Help, please.

    Ой парни, надеюсь не опозорил я страну свою таким знанием английского… Стыдно.

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s a problem with compatibility with one of few plugins. Try to deactivate them all, then activate one at a time, and see which one breaks the site.

    There are many ways to deactivate all plugins, my preferred one is to update the MySQL database, the table wp_options, record active_plugins. Save it’s old value somewhere, and replace with this:

    a:0:{}


    Видимо есть проблема с одним или несколькими плагинами. Попробуйте деактивировать их все, и затем активировать по одному, пока сайт не сломается опять.

    Details:

    In my case the guilty plugin calls the function “current_user_can” at improper time.

    You case could be the same – most likely, it calls current_user_can() right from the constructor, rather than from a method, which has to be called via add_action (‘init’, …).

    It might be something new to WP 3.8 – at the time the plugin is being constructed, the wp-include\pluggable.php had not been called yet, and the function wp_get_current_user is not being defined yet.

    So it’s up to the plugin’s author to fix that.

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