News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[SMF Converter] Burning Board 3

Started by ThorstenE, January 19, 2009, 02:31:02 PM

Previous topic - Next topic

Oldiesmann

Quote from: zapex on December 19, 2012, 11:23:02 AM
Quote from: Oldiesmann on December 19, 2012, 11:20:33 AM
That error means that the "gs2043" user does not have access to the database that the wbb1_1_user table is on.

well it is on gs2043_wbb , ... and smf is on gs2043_smf ... god.. how to edit the mysql username ... as  i said it always says gs2043 , and wcf is on gs2043_wbb .. there are no opitions for mysql username in this damn convert.php.. i use wrong convert.php or ?

You can't control the MySQL username from convert.php - that information is picked up from SMF's Settings.php file (due to the way the conversion is handled, it is not possible to use separate user accounts for each system - it has to use the username and password from the SMF setup).

As far as how to fix the situation - that really depends on the control panel your host is using. I can give you instructions for cPanel, but for other things you'll either need to ask your host or search Google for appropriate documentation.

If you are using cPanel, it's fairly easy:
Login to cPanel, scroll down to the "Databases" section and click on "MySQL Databases"
Scroll down until you see the section labeled "Add User To Database"
Select the user account that's used for SMF
Select the database for wbb
Click "Add"
On the next page, check the box marked "ALL PRIVELEGES"
Click "Make Changes"
Michael Eshom
Christian Metal Fans

Anon.mous

Hi there,

I have a problem regarding the conversation WBB3 > SMF2

I got the latest wbb3_to_smf.sql from you git. But whenever I try to convert it - there is an error:

Converting members...
The database value you're trying to insert does not exist: website_title


How to solve that?

cedric18

Quote from: Androxyd on February 08, 2013, 04:20:53 PM
Hi there,

I have a problem regarding the conversation WBB3 > SMF2

I got the latest wbb3_to_smf.sql from you git. But whenever I try to convert it - there is an error:

Converting members...
The database value you're trying to insert does not exist: website_title


How to solve that?

Hello; I'm new to SMF, and I've got the same problem, does anyone know how we can solve this ?

cedric18

Sorry for message above, I've tried again, and it works !

I've done a fresh install using the same database and everything is working nice ! I'm very pleased ! Thank you all !

estorado

Hello,

i downloaded the converter from http://download.simplemachines.org/?converters;software=wbb

and got this result after some edits: Someone got an converter, which works 100%?

Converting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting poll votes (part 2 - Fallback for migrated WBB2 boards)... Successful.
Converting attachments...
Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 3

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-1) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 3

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-2) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 3

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-3) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 3

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-4) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4
Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting avatars...
Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 3

Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Notice: Undefined variable: ID_ATTACH in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 7

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/10206_2.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/wolfenstein.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-12.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-13.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-22.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/images.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/d-ray.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/Tux-Dupont.png) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/soldat_hauptmann.png) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/left_fuss.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/666_.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: copy(C:\wamp\www\smf/attachments/C:\wamp\www\smf/attachments/av-2.jpg) [function.copy]: failed to open stream: Invalid argument in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 4

Warning: array_keys() expects parameter 1 to be array, string given in C:\wamp\www\smf\convert.php on line 1288

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: in_array() expects parameter 2 to be array, null given in C:\wamp\www\smf\convert.php on line 2612

Warning: Invalid argument supplied for foreach() in C:\wamp\www\smf\convert.php on line 2624

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in C:\wamp\www\smf\Sources\Subs-Db-mysql.php on line 627
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3

Oldiesmann

What edits did you make? There is no capitalized "ID_ATTACH" variable in the code (only a lowercase one - $id_attach).
Michael Eshom
Christian Metal Fans

estorado

I´m sorry for my late reply but I made a big misstake, i used v 1.1 for 2.0.4 :(

Now i used the right one and get the following messages:
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting poll votes (part 2 - Fallback for migrated WBB2 boards)... Successful.
Converting attachments...
Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-1) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-2) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-3) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Warning: copy(C:\wamp\www\wbb/wcf/attachments/attachment-4) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6
Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting avatars...
Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-12.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-13.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6

Warning: copy(C:\wamp\www\wbb/wcf/images/avatars/avatar-22.jpg) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\smf\convert.php(1254) : eval()'d code on line 6
Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting smileys...
Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in C:\wamp\www\smf\Sources\Subs-Db-mysql.php on line 627
The database value you're trying to insert does not exist: string


My Changes:
converter.php
line 1246
$special_result = convert_query(sprintf($current_data, $_REQUEST['start'], $_REQUEST['start'] + $special_limit - 1) . "\n" . 'LIMIT ' . $special_limit);
to
$special_result = convert_query($current_data, $_REQUEST['start'], $_REQUEST['start'] + $special_limit - 1 . "\n" . 'LIMIT ' . $special_limit);

Please compare the changes on wbb3_to_smf.sql (see attachment), i did so many (especially the members select).
Btw, the script should check, if the colum old_choice already exist in poll_choices (line 268 in wbb3_to_smf.sql).

My environment:
wbb version: 3.0.8 pl 1
smf version: 2.0.4
PHP version 5.2.9-2
Apache: 2.0.63
MySQL-version: 5.5.24-log - MySQL Community Server (GPL)

I hope someone can help me.

estorado

Hi,

now I get it!
I used the .sql file from hxxp:github.com/eurich/smf_converters [nonactive] and did 2 Changes:
columnname "containerID" and "containerType" renamed in "messageID" and "messageType".

best regards

BRAM2002

Quote from: TE on September 25, 2012, 10:55:27 AM
please try the following (enter these in the text boxes):
path to SMF: /home/airsoftt/public_html/smf
path to WBB: /home/airsoftt/public_html/forum
wcf table prefix: wcf1_
WBB table prefix_ wbb1_1_
MySQL password: your mysql password used while installing SMF.
I tried this but with not success for me...I got error

iMpuLz

I hate to dig up old threads but is there already a possibility to convert WBB 3.1 to SMF2? I tried a few times with the existing converter but it does not seem to work.

margarett

You need to tell us exactly what errors you get and which converter are you using. The current converter from our downloads should work good enough ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

iMpuLz

Oh sorry, I totally forgot to include the information.

WBB Version: 3.1.8
SMF Version: 2.0.9

I'm using the following converter: http://download.simplemachines.org/?converters;software=wbb
And I'm using the wbb3_migration.php file from the first post of this thread.

Here the first error:
- Converting members...Wrong value type sent to the database. Date expected. (birthdate)

As soon as I delte the part with birthdate from the SQL file, the following error appears:
- Converting members...Wrong value type sent to the database. Integer expected. (show_online)

And this goes on and on.

Furthermore a look at the database reveals that 0 members have been imported and the original admin account got deleted.


Hope you can help there..

iMpuLz

I had a look at MySQL and its syntax and tried to change the errors that came up and here are my results:

Converting members...Wrong value type sent to the database. Date expected. (birthdate)
Solution: Delete 102 "v.userOption11 AS birthdate,"
   
Converting members...Wrong value type sent to the database. Integer expected. (show_online)
Solution: Change 102 '' AS show_online, -> '0' AS show_online,
   
Converting members...Wrong value type sent to the database. Integer expected. (hide_email)
Solution: Change 102 '' AS hide_email, -> '0' AS hide_email,
   
Converting members...Wrong value type sent to the database. Floating point number expected. (time_offset)
Solution: Change 103 '' AS time_offset, -> '0' AS time_offset,
   
Unknown column 't.is_sticky' in 'field list'
Solution: Change 175 hxxp:t.is [nonactive]_sticky AS is_sticky, -> t.isSticky AS is_sticky,

Converting smileys...The database value you're trying to insert does not exist: string
Solution: Delete section


I have only 1 more problem trying to convert the attachments. There the following error appears:
Unknown column 'messageID' in 'field list'
As far as I understand, it has to do with linking the attachments to specific posts but unfortunately WBB changed the table (see image). I tried linking it with postID in "wbb1_1_post" but then it said:
The database value you're trying to insert does not exist: id_msg

Anyone got an idea what to do there?



margarett

I'm sorry, I still had to chance to pick this (you know, Christmas dinners and everything :P )

I used this converter as a base for a functional converter for WBB4 so I think I should be able to fix those issues ;)

Anyway, I cannot pick it for the next days. You know, Christmas dinners and everything :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

iMpuLz

No problem.   :D

Nonetheless I'm going to try finding a solution and if I do so, I will post it here right away. I need to improve my coding skills anyway.  :D


Merry christmas.  :)

margarett

So, now I could pick this up. I don't have a functional test board for WBB3 so I can't really debug it but, nevertheless, I could compare the files.

In the converter for WBB3, you have this:
v.userOption11 AS birthdate,
In WBB4 I had to change it to this:
IF(IFNULL(v.userOption2, '') = '', '0001-01-01', v.userOption2) AS birthdate,
So, for WBB3 something like this:
IF(IFNULL(v.userOption11, '') = '', '0001-01-01', v.userOption11) AS birthdate,
Should work ;)

For "show_online" is exactly like you did. With "0" you are configuring your users to NOT show up as online. You can also choose to use "1" (without quotes) so that your users are shown online ;)

For the attachments, I would need to access the forum and the database. I would say that it should be "containerID" but I'm not sure...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

iMpuLz

Excuse the late reply, just arrived at home after a longer than planned trip. I can give you access to a forum and a database on January 2, but containerID looks right as far as I can see.

Nevertheless I'm going to try the proposed changes (also containerID) and report if it has worked or not today or tomorrow.

iMpuLz

Everything worked perfectly with the attachements. Attached to this the final sql (if needed).

Here my changes:

Changed line 102 (which changes every birthdate to 0000-00-00, so users have to edit this after the conversion)
IF(IFNULL(v.userOption11, '') = '', '0001-01-01', v.userOption11) AS birthdate,

Changed line 103 (enables "Show others my online status" and disables "Allow users to email me")
'1' AS show_online, '' AS personal_text, '0' AS id_group, '1' AS hide_email,

Changed line 104 (Sets the time offset for every user to 0)
'0' AS time_offset, SUBSTRING(u.signature, 1, 65534) AS signature, '' AS lngfile,

Changed line 176 (in WBB 3.1 the stickies are saved as t.isSticky and not as hxxp:t.is [nonactive]_sticky)
t.threadID AS id_topic, t.isSticky AS is_sticky, t.boardID AS id_board,

Changed line 306 (again thanks to margarett for this)
attachmentID, containerID AS id_msg, downloads AS downloads, attachmentName AS filename

Deleted line 498 - 554 (the entire smiley section) (I did not need the smileys of my old WBB installation anymore)


One more thing which is kind of important: Apparently you can not send attachments via PM in SMF, so it would be better to delete every attachment which has the containerType PM pre-conversion because they are not displayed and would just fill up disk space.

margarett

Thank you :) It's always interesting to see someone else dealing with the converters :)
About the attachments, I'm on the phone so I can't see the code but I would assume that the SELECT query for the attachments includes a WHERE in order to filter unnecessary attachments, doesn't it? If not, it should :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

iMpuLz

Here the part of the SQL-file concerning the attachments:

/******************************************************************************/
--- Converting attachments...
/******************************************************************************/
ALTER TABLE {$to_prefix}poll_choices
DROP old_choice;

---* {$to_prefix}attachments
---{
$no_add = true;

$file_hash = getAttachmentFilename($row['filename'], $id_attach, null, true);
$physical_filename = $id_attach . '_' . $file_hash;

if (strlen($physical_filename) > 255)
return;

if (copy($_POST['path_from'] . '/wcf/attachments/attachment-' . $row['attachmentID'] , $attachmentUploadDir . '/' . $physical_filename))
{
$rows[] = array(
'id_attach' => $id_attach,
'size' => filesize($attachmentUploadDir . '/' . $physical_filename),
'filename' => $row['filename'],
'file_hash' => $file_hash,
'id_msg' => $row['id_msg'],
'downloads' => $row['downloads'],
);
$id_attach++;
}
---}
SELECT
attachmentID, containerID AS id_msg, downloads AS downloads, attachmentName AS filename
FROM {$from_prefix}{$wcf_prefix}attachment;
---*



So no "WHERE containerType ='post'" in the SQL yet, but: As far as I understand the convert.php copies every file in the WBB attachment directory to the new SMF attachment directory, so the PM attachments would be copied as well even if you would include the WHERE clause. Or am I wrong there? (first time really working with SQL files  :D )

That's why I thought deleting every attachment with containerType PM pre-conversion would be easier and necessary.

Advertisement: