Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Facebook connect plugin: "Fatal error: Call to undefined function Sprite()..."

I'm getting an error with the Facebook plugin:

Fatal error: Call to undefined function Sprite() in .../public_html/forums/plugins/Facebook/class.facebook.plugin.php on line 182

This is only happening whenever a user attempts to view a discussion page where the comment box is displayed.

I found one other thread where someone posted about this, but the solution was only to try a different 3rd party plugin... I'd rather try and fix this first before swapping out for another plugin. Has anyone else encountered or solved this?



  • Options
    x00x00 MVP
    edited April 2013

    You are using a 2.1 plugin in a version of vanilla that does not contain that function.

    I suggest you use the appropriate version of the plugin for your vanilla version, or predefine the Sprite function in conf/boostap.before.php, however this is assuming there isn't anything more that is incompatible with your version.

    grep is your friend.

  • Options

    Thanks for the reply -
    That makes sense, definitely the function is missing.

    The version of Vanilla I am using is brand new though... which I started yesterday... And I downloaded everything fresh... yesterday.... so I'm guessing the version available for download ( is not the latest?

    The reason I had to update my Facebook plugin is that I was having this issue:

    The solution for this problem was to update the class.facebook.plugin.php file with the latest from GitHub. Unfortunately, this plugin is newer than the distribution of Vanilla... so... ?

    Do you know if there is an updated version of Vanilla I can download somewhere else? OR is there somewhere that I can at least try and copy that missing function? Without looking at it, I don't think I can temporarily hack it to try reproduce what it is supposed to be doing... :/

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @carmolio Vanilla is the latest stable version of vanilla released. There is a beta version (2.1b1) also available. Unless you like beta testing, use plugins that explicitly work with the version you are using.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options comes with Facebook plugin 1.0.1... which errors when users try and register
    See this thread for an example:

    The suggested solution was to upgrade the Facebook Plugin... which solved the issue for logging in, but created this new issue.

    The upgraded version of the Facebook plugin is now 1.0.9.
    But... it says in the code that is should be compatible back to 2.0.14a?

    $PluginInfo['Facebook'] = array(
    'Name' => 'Facebook Social Connect',
    'Description' => 'Users may sign into your site using their Facebook account.',
    'Version' => '1.0.9',
    'RequiredApplications' => array('Vanilla' => '2.0.14a'),
    'RequiredTheme' => FALSE,
    'RequiredPlugins' => FALSE,
    'MobileFriendly' => TRUE,
    'SettingsUrl' => '/dashboard/social/facebook',
    'SettingsPermission' => 'Garden.Settings.Manage',
    'HasLocale' => TRUE,
    'RegisterPermissions' => FALSE,
    'Author' => "Todd Burry",
    'AuthorEmail' => '',
    'AuthorUrl' => '',
    'Hidden' => TRUE,
    'SocialConnect' => TRUE,
    'RequiresRegistration' => TRUE

    Obviously, the Sprite function is still missing.... so I agree and understand that I might need to upgrade my Vanilla version.... OR maybe there was a better fix for the UniqueID issue that was happening with version 1.0.1 of the plugin...?


  • Options
    x00x00 MVP
    edited April 2013

    I take no responsability. You could try putting conf/bootstrap.before.php

    <?php if (!defined('APPLICATION')) exit();
    function Sprite($Name, $Type = 'Sprite') {
        return '<span class="'.$Type.' '.$Name.'"></span>';

    BTW that link is a moving target, so it is goign to have more things added to it, they should have linked to a specific commit.

    grep is your friend.

  • Options

    Thanks for the suggestion - I'm working in a dev environment right now so I can break things :)
    I'll post here as soon as I try it out...

  • Options

    x00 Looks like that did the trick!
    Thank you!

Sign In or Register to comment.