Support Forum
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
Community Involvement Makes Better Software
Thanks for the kind words!
can you tell me which version of SP and the PM plugin you are using?
Visit Cruise Talk Central and Mr Papa's World
odd... can you try deactivating the pm plugin... and then reactivating... see if that will cause the table to get built...
Visit Cruise Talk Central and Mr Papa's World
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?
Community Involvement Makes Better Software
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
Community Involvement Makes Better Software
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...?
YELLOW
SWORDFISH
|
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,
Community Involvement Makes Better Software
1 Guest(s)