WordPress.org

Ready to get started?Download WordPress

Forums

Exhibit install error: Call to undefined function: get_currentuserinfo() (18 posts)

  1. JohnP
    Member
    Posted 9 years ago #

    I'm trying to install the Exhibit 1.1d (asy) plugin [ identified as 1.1b in the plugins screen] with WP 1.5.1-alpha.

    Immediately on activation I get:
    Fatal error: Call to undefined function: get_currentuserinfo() in /www/virtual/username/htdocs/wp-content/plugins/exhibit10.php on line 205

    Any suggestions greatfully received.

  2. Kafkaesqui

    Posted 9 years ago #

    Point 1. Alpha?

    Point 2. get_currentuserinfo() is a basic WordPress function, so I'm not sure why Exhibit should fail to call it.

    Make sure you have wp-includes/functions.php, which is where get_currentuserinfo() resides in the core. I'd find it difficult to believe you don't have that file or the function within it, since a lot more than the plugin would be having problems, but still...

  3. Kafkaesqui

    Posted 9 years ago #

    Dug a bit, and it looks like get_currentuserinfo() moved to pluggable-functions.php in 1.5.1 (Alpha...). This may, or may not, be the cause of the error.

  4. MattRead
    Member
    Posted 9 years ago #

    I remember having issues with get_currentuserinfo() in early alphas. Maybe try upgrading to the latest..

  5. JohnP
    Member
    Posted 9 years ago #

    I'm using the 1.5.1-Alpha version of WP that Dr Dave packaged for Spam Karma 2.

    No other obvious problems.

    I can see get_currentuserinfo () in pluggable-functions.php, but whether it is faulty or not is beyond my ability to assess.

    Where can I find a newer version?

  6. JohnP
    Member
    Posted 9 years ago #

    OK, I joined wp-testers, downloaded the latest nightly and replaced pluggable-functions.php, and it made no difference.

    I couldn't possibly do without SK2, so perhaps I just have to accept Exhibit isn't compatible with the latest WP versions.

  7. get_currentuserinfo() is a replacable function, hence its inclusion in the pluggable-functions.php file. As such, the function needs to load AFTER all the plugins have been loaded (unlike in pre-1.5.1 versions where it got loaded BEFORE plugins).

    What this means for plugins is that you can't call on get_currentuserinfo() in global space. I haven't taken a look at the code for Exhibit, but that is my guess as to what it's doing and why it's now a problem.

    It's very likely other plugins will be likewise affected.

  8. kinkistyle
    Member
    Posted 9 years ago #

    I got the same problem. Here's what I did to fix it:

    Right before the call to get_currentuserinfo() in the exhibit10.php plugin file I added this:


    $incfile = 'wp-includes/pluggable-functions.php';
    $c=0;
    while(!is_file($incfile))
    {
    $incfile = '../' . $incfile;
    $c++;
    if($c==30) {
    echo "Could not find pluggable-functions.php.";
    exit;
    }
    }
    require_once($incfile);

    Now it works. Yep, its dirty and its hacky but I am too busy to deal with clean fixeds ;)

  9. JohnP
    Member
    Posted 9 years ago #

    Your hack works for me too Kinkistyle, thanks heaps!

  10. sallam
    Member
    Posted 9 years ago #

    Worked here too. Thanks a lot 'kinkistyle'!

  11. Emanon
    Member
    Posted 9 years ago #

    EDIT.

    It worked for me too. Thanks Kinki.

    I emailed Owen to notify him about this thread.

  12. prpost
    Member
    Posted 9 years ago #

    Awesome! This fix worked for me too!

  13. AC2005
    Member
    Posted 9 years ago #

    yay - you rock - all sorted for me too.

  14. alexz
    Member
    Posted 9 years ago #

    Why have it not yet been fixed? The hack worked for me too.

  15. masquerade
    Member
    Posted 9 years ago #

    The clean fix would be to take the portion of the code making the call and wrapper it in a function, and do add_action('init', 'thefunction') as explained in the Plugin Development documenation at the codex.

  16. iroc42
    Member
    Posted 8 years ago #

    this fix isnt working for me.. im getting the following error:

    Could not find pluggable-functions.php.

    any ideas?

  17. prara
    Member
    Posted 8 years ago #

    pluggable-functions.php can be found at wp-includes/

  18. Stri
    Member
    Posted 8 years ago #

    I wanted to be different and say Kinki you suck it didnt work!!!!

    Actually, no I'm lieing it worked great for me too!

    Thanks! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags