Support Forum

Import Data from Simple:Forum 3.x.x to 5.x.x

SR Sebastien Roche
Sebastien Roche
Member

Hi,

I was using Simple:Forum and have data on SQL file from I think 3.1.4 and I would like to use in the latest generation of Simple:Press now installed on running on my website. I have tried to use the data on the database as it is and this does not work either creating the new forum on existing data or importing data on the new database.

Would you please be able to assist the conversion of the SQL file to allow importation of topics and posts. The threads are mainly done by guests so I don’t see a big issue expect my limited, sorry, non-existing SQL knowledge.

Thank you. Sebastien

21 Answers

New Answer

MP Mr Papa
Mr Papa
Member

do you mean mySQL?

Version 3.1.4?  really? ;) wow, dont think we have anyone from that many years back in some time…  what version of WP are you on?  cant imagine that version would function well with recent WP versions…  to get to the current 5.2.x, you will need to be on at least wp 3.3 but we would recommend 3.5

 and the only way to get to SP 5.2.2 is to upgrade from SP 4.5.1…  so you will first need to upgrade to 4.5.1… and since you are coming from so many versions ago, you will probably need to incrementally upgrade to minor versions given the myriad of wp changes since your version…  and we may still have problems from that far back again because of the changes in wp rendering those old versions non functional…

and make db backups along the way just in case…

so first lets try to upgrade you to 4.0 (which btw is from 2008):  https://simple-press.com/download-manager.php?id=44

then 4.1:  https://simple-press.com/download-manager.php?id=149

then 4.2:  https://simple-press.com/download-manager.php?id=182

then 4.3:  https://simple-press.com/download-manager.php?id=228

then 4.4:  https://simple-press.com/download-manager.php?id=275

the 4.5.1:  https://simple-press.com/download-manager.php?id=401

and then give it a shot to go to 5.2.2…  fingers crossed…

SR Sebastien Roche
Sebastien Roche
Member

Hello MrPapa,

yeah, I can imagine that I look like an alien with my old version that I dragged in the past to some WordPress upgrade limitations due to my host. Anyway, I tried as much as I could and I can access an admin menu after upgrade at version 4.2.0 and then I have the message: Simple:Press can not Create Tables in your database at the activation of 4.3.0. I did not find in your forum any similar post (with those words).

I cannot check the function of the 4.2.0 Forum as I don’t remember how we were inserting in the page – remember adding some coding earlier.

Thank you, Sebastien

YS Yellow Swordfish
Yellow Swordfish
Member

That could mean one of two things.

It could mean that the version of mySQL being used is now too old. It could mean that your host has, for reasons unknown, blocked the use of direct calls to the database using the php mySQL extension functions.

I CAN show you what code to edit to circumvent the problem but it would be best to check the first possibility before we do that. So – can you tell me what version of mySQL your are using there?

SR Sebastien Roche
Sebastien Roche
Member

Hello YSwordfish,

Thank you for the feedback. Please see further details, let me know if this help.

  • Server: mysql10 via TCP/IP
  • Server version: 5.1.66-0+squeeze1
  • Protocol version: 10
  • User: xxx@192.168.1.xxx
  • MySQL charset: UTF-8 Unicode (utf8)
  • Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny16 with Suhosin-Patch
  • MySQL client version: 5.0.51a
  • PHP extension: mysqli

I am using WP version 3.5. In the end the most important to me for now is to access my forum data and for now I would not mind if I have to use the older version of Simple forum 3.1 or 4.2 if you help me get the forum to display again. Would you have an old version of the help file that I could use in parallel and see if at least I can do that?

Sebastien

YS Yellow Swordfish
Yellow Swordfish
Member

I rather think no version of SP below V5 will run without error on WP3.5. So I think you need to complete the upgrade.

Are you OK making a small code edit? This should not be necessary judging by those version numbers and I am hoping this is not a result of the Wp version.

If you can make an edit you want the file sf-loader-install.php in the plugin’s root folder. Right near the bottom is a small test function named sf_test_table_create().

What you need to do is immediately after the opening brace add the line

return true;

which will bypass the version check.

SR Sebastien Roche
Sebastien Roche
Member

Now, I am on 5.2.2 Simple:Press but in my Forum Admin I only see 3 lines: Admins, Plugins, Themes.

In my database I have the following tables:

wp_sfauthcats, wp_sfauths, wp_sfdefpermissions, wp_sferrorlog, wp_sfforums, wp_sfgroups, wp_sflog, wp_sfmembers, wp_sfmemberships, wp_sfmessages, wp_sfmeta, wp_sfnotices, wp_sfoptions, wp_sfpermissions, wp_sfposts, wp_sfroles, wp_sftopics, wp_sftrack, wp_sfusergroups, wp_sfwaiting

MP Mr Papa
Mr Papa
Member

not sure where Andy was going, but under admins, can you manage admins?  and add in the missing capabilities?

SR Sebastien Roche
Sebastien Roche
Member

I am limited to 3 basics options about notifications and logout redirect. I have tried 2 different admin accounts of my website. I have created another admin on the site but he does not have any admin right for the forum and it calls back to the previous admin profiles that have a menu limited to what is described above.

YS Yellow Swordfish
Yellow Swordfish
Member

So can I assume from this you mean that under the Admin’s menu on the left the only option availavbe is ‘Your Admin Options’… correct?

Odd that this should fail to update. I don’t believe we have seen that happen before…

Are you able and willing to make a small change directly into a database table?

SR Sebastien Roche
Sebastien Roche
Member

I have my WP admin options and in the Forum Tab I have: Your Admin Options, Plugins Options and Theme Options.

There is no problem for me to access the database and do some changes.

YS Yellow Swordfish
Yellow Swordfish
Member

In the ‘usermeta’ table for your own ‘user_id’ you will find a row where the ‘meta_key’ column contains a value made up of your WP table prefix followed by the term ‘capabilities’.

This is stored as a php serialised array and should – at the very least – contain an entry for ‘administrator’ and any SP capabilities you do have (plugins and themes). Beware – If you have any other WP plugins that add capabilities then you can NOT perform the data change below as you would wipe that capability out.

The full serialised array for retaining WP administrator caps plus all SP caps is:

a:14:{s:13:"administrator";s:1:"1";s:18:"SPF Manage Options";s:1:"1";s:17:"SPF Manage Forums";s:1:"1";s:22:"SPF Manage User Groups";s:1:"1";s:22:"SPF Manage Permissions";s:1:"1";s:21:"SPF Manage Components";s:1:"1";s:15:"SPF Manage Tags";s:1:"1";s:16:"SPF Manage Users";s:1:"1";s:19:"SPF Manage Profiles";s:1:"1";s:17:"SPF Manage Admins";s:1:"1";s:18:"SPF Manage Toolbox";s:1:"1";s:24:"SPF Manage Configuration";s:1:"1";s:18:"SPF Manage Plugins";s:1:"1";s:17:"SPF Manage Themes";s:1:"1";}

So replacing what is there now with exactly the above will restore your caps.

 

SR Sebastien Roche
Sebastien Roche
Member

Ok, now I have the full menu for SP. I managed to display the forum with a list of bugs that make me think that the database and the data I have are now incompatible.

The most important is that I cannot Edit nor Create Groups / Forum. I have 2 existing Groups that seem to match previous Forum layout that I cannot change. 

I can see that threads are showing empty posts for the “admin” user and as I understand the group high level topics are now all under the same thread (as if the previous groups where showing under the first topic – I cannot confirm as those posts are empty but a succession of posts posted by admin which makes me thinks that there are the description of the sections of my old forum). Again, this seems to be an incompatibility of the data vs the database layout. The “log in” button does not work and few other bugs that you can imagine related to the topics, threads and posts that are no matching the database.

Is there a way to convert mySQL data directly in phpmyadmin by doing a succession of SQL?

I hope that you will understand what I am trying to explain… Thank you. Sebastien

PS: Just in case http://feetonthefield.com/forum-2/ sorry, it is French.

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t see a ‘list of bugs?’ I don’t see any data but I don’t see any bugs. Can you tell me what the error messages are please?

I suspect that your permissions have become scrambled although not sure why this would be. But I would start by taking a quick look at the database tables. Can we check that the ‘sfgroups’, sfforums’, ‘sftopics’ and ‘sfposts’ tables all have data?

And assuming they do then I think we need to perform some basic housekeeping. I would be tempted to start by performing a basic permission reset (From the admin > Permissions menu). This WILL mean that the forum permissions need to be rebuilt but with only 5 forums listed that should be a quick manual task. It is up to you of course…

SR Sebastien Roche
Sebastien Roche
Member

I have been playing with the permissions and now I can display posts / topics – thank you for that. Now the problem goes back to not being able to creata / update groups / forums.

sfgroups has data in it – I still cannot add / edit group in the administration panel even after the “Permission Reset”:

  group_id group_name group_seq group_desc group_rss group_icon group_view
      1 xxx 2 xxx NULL NULL public
      4 xxx 2 xxx NULL NULL public

sfforums has data in it:

  forum_id forum_name group_id forum_seq forum_desc forum_status forum_slug forum_rss forum_icon post_id topic_count forum_rss_private topic_status_set post_count post_ratings use_tags forum_view post_id_held post_count_held forum_icon_new topic_icon topic_icon_new
      1 xxx 1 7   0 xxx NULL NULL 1 1 1 0 1 0 0 public 1 1 NULL NULL NULL
      2 xxx 1 8 xxx 0 xxx NULL NULL 402 35 1 0 324 0 0 public 402 324 NULL NULL NULL
      3 xxx 1 9 xxx 0 xxx NULL NULL 358 6 1 0 40 0 0 public 358 40 NULL NULL NULL
      4 xxx 4 1 xxx 0 xxx NULL NULL 396 3 1 0 17 0 0 public 396 17 NULL NULL NULL
      5 xxx 4 2 xxx 0 xxx NULL NULL 366 7 1 0 14 0 0 public 366 14 NULL NULL NULL

sftopics has data in it (example):

  topic_id topic_name topic_date topic_status forum_id user_id topic_pinned topic_subs topic_sort topic_opened blog_post_id topic_slug post_id post_count topic_status_flag topic_watches post_id_held post_count_held
      1 xxx xxx 1 1 1 0 NULL NULL 230 0 xxx 1 1 0 NULL 1 1
      3 xxx xxx 0 5 1 0 NULL NULL 206 0 xxx 5 2 0 NULL 5 2

sfposts has data in it (example):

  post_id post_content post_date topic_id user_id forum_id guest_name guest_email post_status post_pinned post_index post_edit poster_ip source
      1 xxx xxx 1 1 1     0 0 1 NULL   0
      4 xxx xxx 3 1 5     0 0 1 NULL   0

Sorry for posting the tables, but thought you could see anything wrong. Thank you. Sebastien