Lampwrights Forum > Other Stuff > vBulletin Wordpress Bridge
Register Community Today's Posts Search

Reply
 
Thread Tools
03-25-2011, 03:48 PM   #1
spar303
Junior Member
 
Join Date: Mar 2011
Posts: 2
Rep Power: 0
spar303 is getting browny points
Fatal error: Cannot redeclare get_avatar()

When I activate the vBulletin Wordpress Bridge plugin version 10.0.5.1 on my version 3.1 Wordpress install, I am getting the following error/conflict:

Fatal error: Cannot redeclare get_avatar() (previously declared in /public_html/wp-includes/pluggable.php:1618) in /public_html/wp-content/plugins/vbbridge/vbbridge.php on line 435

Has anybody else ran in to this problem?
spar303 is offline   Reply With Quote

03-25-2011, 08:48 PM   #2
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
Something tells me you are including pluggable somewhere before you should. pluggable.php is named that because those functions can be overridden.

Either it is a misconfigured theme or a bad plugin.
Jeff is offline   Reply With Quote
03-25-2011, 09:49 PM   #3
spar303
Junior Member
 
Join Date: Mar 2011
Posts: 2
Rep Power: 0
spar303 is getting browny points
It was a conflicting plugin after all, however it was a plugin that I needed to keep. My solution was to make the bridge plugin load first so it can define get_avatar(), by putting this code into the bottom of vbbridge.php:

Code:
function this_plugin_first() {
    // ensure path to this file is via main wp plugin path
    $wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR."/$2", __FILE__);
    $this_plugin = plugin_basename(trim($wp_path_to_this_file));
    $active_plugins = get_option('active_plugins');
    $this_plugin_key = array_search($this_plugin, $active_plugins);
    if ($this_plugin_key) { // if it's 0 it's the first plugin already, no need to continue
        array_splice($active_plugins, $this_plugin_key, 1);
        array_unshift($active_plugins, $this_plugin);
        update_option('active_plugins', $active_plugins);
    }
}
add_action("activated_plugin", "this_plugin_first");
Hope that helps someone.
spar303 is offline   Reply With Quote
Reply

Tags

vbulletin wordpress bridge



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal Error UT1 vBulletin Wordpress Bridge 40 07-15-2011 12:06 PM


All times are GMT -4. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.