Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
database error Table _sfbuddies
Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 2:40 am

Hi,

I'm new here. I have searched the world wide web from top to bottom for the best forum plugin for WP. According to my research and the experience so far, SimplePress seems to be that plugin. Thank you for it.

I am happy to see that the forums here are quite active and interaction is fast, that is nice to see.

I am having one issue so far. I noticed when posting topics there has been a database error message showing up. Then when I tried to add buddies in the PM section, nothing happened. I happened to be looking in the error_log today and found the following. I did a search through the SP files and plugin files and sfbuddies only showed up one time. I don't know what to make of the following error. Any insight would be greatly appreciated.

Thank you in advance. (I have xxxxx'd the database prefixes.)

WordPress database error Table 'xxxxxx_sfbuddies' doesn't exist for query SELECT buddy_id FROM xxxxxx_sfbuddies WHERE user_id=1 made by require('wp-blog-header.php'), wp, WP->main, do_action_ref_array, call_user_func_array, sp_is_forum_page, sp_load_current_user, sp_get_user, spUser->__construct, do_action_ref_array, call_user_func_array, sp_pm_add_to_user_class, spdb_select

CG-logo-50.png Community Involvement Makes Better Software

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 2:56 am

Thanks for the kind words!

can you tell me which version of SP and the PM plugin you are using?

Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 3:14 am

Hi Mr. Papa,

I downloaded the SP plugin on September 8th it's version 5.3.1.

I downloaded the PM plugin on September 9th it's version 2.0.2.

I presume it is the latest release. I just got it set up yesterday.

CG-logo-50.png Community Involvement Makes Better Software

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 3:23 am

odd... can you try deactivating the pm plugin... and then reactivating... see if that will cause the table to get built...

Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 3:30 am

I went and deactivated the pm plugin, activated it again and still there is no sfbuddies table in the database. I just checked to verify, it's not there.

I might add, as a side note, the install instructions on this site say that there is a readme file in the download of the plugin.. I sure couldn't find it. Can you tell me where it is?

CG-logo-50.png Community Involvement Makes Better Software

Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 4:25 am

I just had a look through the files for the pm plugin.

There is something missing (from what I can tell)

In the sp-pm-plugin.php file, there is the following:

define('SPPMBUDDIES',        SF_PREFIX.'sfbuddies');

Then in sp-pm-install.php, unlike all of the other defined tables, there is no:

CREATE TABLE IF NOT EXISTS ".SPPMBUDDIES."

That CREATE TABLE IF NOT EXISTS, is there for every other table but not that one.

In the sp-pm-upgrade.php that instruction does exist.

            CREATE TABLE IF NOT EXISTS ".SPPMBUDDIES." (
                id bigint(20) NOT NULL auto_increment,
                user_id bigint(20) NOT NULL,
                buddy_id bigint(20) NOT NULL,
                PRIMARY KEY  (id),
                KEY user_idx (user_id),
                KEY buddy_idx (buddy_id)
            ) ENGINE=MyISAM ".spdb_charset().";";

 

But it sure is not in the install.php file.

I'm not real good at coding, so I am not going to attempt to code in what should be there. If you could tell me what to place in the code, or provide a corrected sp-pm-install.php file, I will sure be happy to start over with it..

Thanks

CG-logo-50.png Community Involvement Makes Better Software

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 12, 2013 - 4:29 am

Let me do some research into the code of you will. And I will come back to you.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 5:32 am

Thanks Yellow Swordfish,

Much appreciated. I hope I am correct in what I think I was seeing there..

CG-logo-50.png Community Involvement Makes Better Software

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 12, 2013 - 5:43 am

Yes you are and that is my fault for which I apologise. It missed the code scrutiny I am afraid to say. Mainly because we needed to get an update out quickly and this got dragged in with it.

Would you be able to create that table manually - which is all that is needed? Or do you want me to provide a SQL script...?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Central Geek
Califorina, USA
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2013 - 2:26 pm

I copied from the upgrade file the script to create the table.

        # need new table for buddies
        $sql = "
            CREATE TABLE IF NOT EXISTS ".SPPMBUDDIES." (
                id bigint(20) NOT NULL auto_increment,
                user_id bigint(20) NOT NULL,
                buddy_id bigint(20) NOT NULL,
                PRIMARY KEY  (id),
                KEY user_idx (user_id),
                KEY buddy_idx (buddy_id)
            ) ENGINE=MyISAM ".spdb_charset().";";
        spdb_query($sql);       

 

And placed it at line 73.

Then I copied and pasted the following

        if (!in_array(SPPMBUDDIES, $tables)) $tables[] = SPPMBUDDIES;

at the new line 216 right under

        if (!in_array(SPPMADVERSARIES, $tables)) $tables[] = SPPMADVERSARIES;

Then I uninstalled the plugin and activated it again. The table is created now. However, sfbuddies and sfadversaries tables have no rows.

I went to the frontend and attempted to add buddies, and noting it happening. The script says that the buddies have been saved, but none show up in either the send PM or the Manage Buddies.

I went back to the db and looked in the table, and there are still no rows in sfbuddies.

I thought maybe the rows might be created upon first use, but that didn't happen.

I am not quite sure where to look to make the rows created, and to update so that the buddies are actually saved to the database.

Thanks,

 

CG-logo-50.png Community Involvement Makes Better Software

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625