Following some requests here, I tried to create a converter from XF. The attached file results of some trial-and-error around XF's database schema and the necessary equivalent in SMF.
Unfortunately I struggled too much with the "official" converters so I eventually gave up and started from scratch. I know that I've probably tried to reinvent the wheel but this way I know what I am doing, every step of the way.
Also, I'm not very good at design and present forms to fill and blablabla. So, there is no beautiful layout and some file edits are needed. Nothing too much, but it has to be done.
What the converter will convert:
- Members
- Categories
- Boards
- Topics/Posts
- PMs
- post attachments
- avatars
- polls
How to use this converter:1 - BACKUP
2 - Install SMF in a separate folder and
in the same database as XF3 - Download the attached "xf2smf.php" file to you computer and edit it with a decent editor (eg: Notepad++). The small edits that are needed are all localized in this part here:
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=512266.0;attach=225037;image)
3.1 - You need to define the folder where XF is installed. By folder, I mean the server path where XF's installation is located. SMF's path is automatically discovered (because you will put the file there :P ). If you don't know it, please upload the attached "whats_the_path.php" file to XF's folder and run it via browser. It will tell you the path you should add.
3.2 - You need to adjust my "$max_queries" variable. This defines how many registers the converter tries to move at once. A low number takes a LOT of time, a large number will hammer your server and may cause it to become unresponsive.
3.3 - As my image above states, I didn't find a way to change XF's table prefix, so it shouldn't be necessary to change anything else. But, in case your prefix isn't "xf_" please edit the corresponding line
4 - Save. Load the file "xf2smf.php" to SMF's folder and launch it through your browser. The whole "thing" is a step-by-step operation and each step deals with each of the converted parts.
4.1 - You will notice, in the first screen, that the paths for SMF and XF (the first one is self-discovered, the second was set by you) are shown. Please check them ;)
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=512266.0;attach=225039;image)
5 - When the conversion finishes, you should remove the file from your SMF folder. Go to your newly converted forum and recover your password. The converter does not (and probably will not) convert passwords so you need to follow the usual steps for password recovery. If you cannot email yourself a new password, use this trick from the wiki (http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do):
QuoteResetting an admin users password
Use phpMyAdmin (or similar) to locate (within the "_members" table) the member whose password is to be reset. In the database field entitled "passwd", enter a new password using plain text.
Then, clear out (erase) any existing content in the database field entitled "password_salt".
The next time the member logs in (using the new password), SMF will automatically re-encrypt his credentials.
6 - Go to your ACP --> Maintenance --> Recount all forum totals and statistics. This will (obviously) fill your boards and topics totals.
That's it, for now. Please do test and let me know the outcome. If the converter throws a "database error" somewhere, it will be stored in the table "smf_log_errors" (it will probably be the last one). It is handy if you check that table and also attach your "xf2smf.php" in use.
Finally, be advised that this was developed and tested with a local installation of XAMPP, so I cannot tell the impact in a live and especially shared server. It shouldn't kill it, don't worry :P
License: Simplified BSD (BSD-2) (http://wiki.simplemachines.org/smf/Customization_Licenses#Simplified_BSD)
Version 1.02 // 22-03-2016
! Fixed issue with trying to insert empty polls
! Changed license to Simplified BSD
Version 1.01 // 18-03-2014
================================================================================
! Fixed issue with empty "poster_name" or "poster_email"
Version 1.00 // 13-11-2013
================================================================================
+ Added import for polls
+ Added option to automate the converter (moving between steps automatically)
Version 0.14 // 26-10-2013
================================================================================
! Fixed possible issue with password not stored as initially expected
Version 0.13 // 26-10-2013
================================================================================
+ Added a license
+ Added import for user avatars
Version 0.12 // 21-10-2013
================================================================================
+ Added import for Post Attachments
Version 0.11 // 07-10-2013
================================================================================
+ Added import for PMs
Version 0.10 // 06-10-2013
================================================================================
+ First release
Legend:
--------------------------------------------------------------------------------
! Minor change or bugfix.
+ Feature addition or improvement.
- Feature or option removal.
Updated: PMs are now converted :)
Thank you Margerett I will try this out today sometime and post back here for you.
Quick question and for some reason I can't remember how to define the root directory for the xenforo install.
Ty for trying.
Edit the converter and edit the line:
$xf_dir = '';
If you are unsure of what the full path is, upload the attached file to XF's folder and run it through your browser. It will tell you the folder.
ok got that sorted out here is the error I'm receiving
in the acp
http://xxxxx.com/forum/xf2smf.phpApply Filter: Only show the errors with the same messageDatabase Error: Table 'xxxx_smf.xf_user' doesn't existApply Filter: Only show the errors from this file File: /home/xxx/public_html/forum/xf2smf.php
Line: 71
and this is the error in the
Table 'xxxx_smf.xf_user' doesn't exist
File: /home/xxxxx/public_html/forum/xf2smf.php
Line: 71
If you need to know the xxxx i will pm you.
Did you install both XF and SMF in the same DB (different prefixes)?
Is the prefix for XF's tables "xf_"?
That line is just a test to see if it finds both sets of tables (and I just tested both "members" tables).
So, the script cannot find the table "xf_user" in the database "xxxx_smf".
oh they have to go into the sames Db, not on the same server? Never done that so not sure how lol
also will that mess up the current live xenforo forum.
It won't mess up, as long as you don't mix the table prefixes ;)
Using the default values in both forums, XF is "xf_" and SMF is "smf_". So it should be safe ;)
Just backup your XF DB for the sake of conscience, but it will be fine.
Once I got this the set worked like a charm, no errors converting.
Very nice to "hear" that, thanks a lot. ;D
Can you check if everything is in place, no missing boards, topics, PMs, etc? The conversion from "Conversations" from our "PM" was a bit tricky, I admit...
Post attachments are in the making ;)
Everything is in order, Pm's, topics and boards all is great. Thank you so much for this.
New update. The converter is now taking care of Post Attachments.
Very nice, was looking for a like button :P
New update: user avatars are now converted :)
I'm getting the following error on the members section when trying to convert:
This is the first step of the conversion. We are trying to convert Members
First, let's trash the actual contents of SMF members table....
Members cleared from SMF table. Next step, how many members are in XF "users" table? 20 users were found in XF.
Now retrieving members 1 to 10...
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 210
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 210
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 210
An Error Has Occurred!
The database value you're trying to insert does not exist: passwd
Converting from XF1.2.2
Thanks,
Matt
Hu? :o Let's hope that the database schema wasn't changed (I used 1.2.0). Can you please edit the file, find:
foreach ($members as $key => $value)
{
$temp_passwd = unserialize($value['passwd']);
Add after:
echo '<pre>';
print_r ($temp_passwd);
echo '</pre>';
And repeat?
Sure:
First, let's trash the actual contents of SMF members table....
Members cleared from SMF table. Next step, how many members are in XF "users" table? 20 users were found in XF.
Now retrieving members 1 to 10...
Array
(
[hash] =>
)
Array
(
[hash] =>
)
Array
(
)
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 213
Array
(
)
Array
(
)
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 213
Array
(
[hash] =>
)
Array
(
[hash] =>
)
Array
(
)
Notice: Undefined index: hash in /home/sffcouk/public_html/smf/xf2smf.php on line 213
Array
(
[hash] =>
)
Array
(
[hash] =>
)
An Error Has Occurred!
The database value you're trying to insert does not exist: passwd
Sorry, edited your post to remove the hash. Just in case ;)
Anyway, it was OK, there is no reason for the undefinedindex, unless it's some PHP version difference...
Can you please attach your current xf2smf.php here?
Thanks. Should be attached.
Please re-download the zip file above. I imagine XF has more ways to store passwords that what I could test initially :P
Quote from: margarett on October 30, 2013, 12:21:52 PM
Please re-download the zip file above. I imagine XF has more ways to store passwords that what I could test initially :P
Brill, thanks. That's now getting to Stage 8 (Polls). It's printing out the array of polls, and then stopping there. Looking in the code, the section for adding the polls is commented out. Is that the case?
Err, sorry :P I've uploaded a work-in-process file, as the polls are not yet completed. Please re-download (just deleted that incomplete part) or ignore that, it didn't change anything in the database regarding polls.
You can go to your new SMF, recover your passwords and recount totals ;)
Quote from: margarett on October 30, 2013, 01:03:22 PM
Err, sorry :P I've uploaded a work-in-process file, as the polls are not yet completed. Please re-download (just deleted that incomplete part) or ignore that, it didn't change anything in the database regarding polls.
You can go to your new SMF, recover your passwords and recount totals ;)
Thanks again for this. All working and up and running on SMF ;)
Thank you for testing ;)
I'll be finishing polls shortly (I hope :P )
Update: Polls are now converted 8)
I called this "V1.00" and it is the first "full" version. I will not develop it any further as it is now converting all the relevant content.
I am, however, available for the necessary support and bug-fixing (oh, it will be needed :P )
Great work Margarett, this is the first xenforo converter I have see for non-paid software.
Just tried this again on another forum and go this error on stage 7
Warning: dir(public_html/data/avatars/l) [function.dir]: failed to open dir: No such file or directory in /home/xxxt/public_html/forum/xf2smf.php on line 2071
Fatal error: Call to a member function read() on a non-object in /home/xxxx/public_html/forum/xf2smf.php on line 2073
I did some looking around inside the data/avatars foder and there are 3 folders in the avatar l,m.s and then a subfolder 0 in each of them that actually contains the avatars. Hope that helps.
Yup, that's really how it works. The avatars are obtained from the sub-folders inside folder "l" And the functions I used have issues dealing with a folder named "0", so there is also a rename operation included. I'm not on the computer right now, but I'll look into it ASAP.
Ok great, everything else is great. I got the forum up and running besides the avatars and polls which I think is step 8.
Just curious, did you successfully convert post attachments in the previous step?
I'm under the impression that you might have set an incorrect path for XF.
Your SMF path is: /home/xxxx/public_html/forum
But the error you are getting looks for XF files in public_html/data/avatars/l.
See the difference? No /home/xxxx/public_html...
Everything converted great besides the avatars, the topics, posts and members went fine.
Humm... I can't reproduce that :(
What did you set in this bit:
//YOU HAVE TO DEFINE THIS
$xf_dir = '';
?
I just have public_html in there since the xenforo is in the root folder.
Like this:
//YOU HAVE TO DEFINE THIS
$xf_dir = 'public_html';
Or like this:
//YOU HAVE TO DEFINE THIS
$xf_dir = '/home/xxxx/public_html';
?
I have it like the top one.
//YOU HAVE TO DEFINE THIS
$xf_dir = 'public_html';
Try with the other one ;)
OK I wil, out work right so will be later.
Hi there;
I'm trying to convert my Xf forum to SMF with your plugin and i get this error ... but it happens after 2500 posts ...
Best regards
First, let's trash the actual contents of SMF "topics" and "messages" tables....
Posts and topics cleared from SMF tables. Next step, count what's there to move?? 525 topics and 4116 posts were found in XF.
Now retrieving topics 1 to 50...
Now retrieving topics 51 to 100...
Now retrieving topics 101 to 150...
Now retrieving topics 151 to 200...
Now retrieving topics 201 to 250...
Now retrieving topics 251 to 300...
Now retrieving topics 301 to 350...
Now retrieving topics 351 to 400...
Now retrieving topics 401 to 450...
Now retrieving topics 451 to 500...
Now retrieving topics 501 to 525...
Now retrieving posts 1 to 50...
Now retrieving posts 51 to 100...
Now retrieving posts 101 to 150...
Now retrieving posts 151 to 200...
Now retrieving posts 201 to 250...
Now retrieving posts 251 to 300...
Now retrieving posts 301 to 350...
Now retrieving posts 351 to 400...
Now retrieving posts 401 to 450...
Now retrieving posts 451 to 500...
Now retrieving posts 501 to 550...
Now retrieving posts 551 to 600...
Now retrieving posts 601 to 650...
Now retrieving posts 651 to 700...
Now retrieving posts 701 to 750...
Now retrieving posts 751 to 800...
Now retrieving posts 801 to 850...
Now retrieving posts 851 to 900...
Now retrieving posts 901 to 950...
Now retrieving posts 951 to 1000...
Now retrieving posts 1001 to 1050...
Now retrieving posts 1051 to 1100...
Now retrieving posts 1101 to 1150...
Now retrieving posts 1151 to 1200...
Now retrieving posts 1201 to 1250...
Now retrieving posts 1251 to 1300...
Now retrieving posts 1301 to 1350...
Now retrieving posts 1351 to 1400...
Now retrieving posts 1401 to 1450...
Now retrieving posts 1451 to 1500...
Now retrieving posts 1501 to 1550...
Now retrieving posts 1551 to 1600...
Now retrieving posts 1601 to 1650...
Now retrieving posts 1651 to 1700...
Now retrieving posts 1701 to 1750...
Now retrieving posts 1751 to 1800...
Now retrieving posts 1801 to 1850...
Now retrieving posts 1851 to 1900...
Now retrieving posts 1901 to 1950...
Now retrieving posts 1951 to 2000...
Now retrieving posts 2001 to 2050...
Now retrieving posts 2051 to 2100...
Now retrieving posts 2101 to 2150...
Now retrieving posts 2151 to 2200...
Now retrieving posts 2201 to 2250...
Now retrieving posts 2251 to 2300...
Now retrieving posts 2301 to 2350...
Now retrieving posts 2351 to 2400...
An Error Has Occurred!
The database value you're trying to insert does not exist: poster_name
[Edit] I'm doing the conversion in local with wampserver. XF 1.3 and SMF 2.0.7
Hi and welcome to SMF ;)
Don't you just love converters? :P I assume you have no posts with IDs between 2351 and 2400 because I can't reproduce that in my test board... Can you try to increase the number of $max_queries?
(note to self: this needs to be verified and fixed, of course)
Thanks for your help Margarett and i love converters. Perhaps it will be the first time that i'll have to use only one converter !
So i've increase the $max_queries (trying many value 100 - 200) and it's the same. It stops at the same post ... but i don't see anything special in the next post ... I've tried to increase value in php.ini but nothing (With the same settings, i've convert a forum with more than 100.000 posts without any issues but it was from phpbb to xf).
Actually I think I was reading it wrong, that shouldn't be the issue.
I think that you might have some posts without username (deleted members, maybe?)
On the converter, you can find this:
// echo '<pre>';
// print_r ($data_array);
// echo '</pre>';
$smcFunc['db_insert']('insert',
$prefix_smf . 'messages',
array(
Can you uncomment the 3 first lines and repeat?
Please note that this will dump a big amount of information. Then please let me check the result of the last few operation(s).
Thanks
Quote from: margarett on March 18, 2014, 03:08:12 PM
Actually I think I was reading it wrong, that shouldn't be the issue.
I think that you might have some posts without username (deleted members, maybe?)
On the converter, you can find this:
[b][color=red]// echo '<pre>';
// print_r ($data_array);
// echo '</pre>';[/color][/b]
$smcFunc['db_insert']('insert',
$prefix_smf . 'messages',
array(
Can you uncomment the 3 first lines and repeat?
Please note that this will dump a big amount of information. Then please let me check the result of the last few operation(s).
Thanks
There are still uncomment ... (The red ones)
No, I mean, uncomment them. Like:
echo '<pre>';
print_r ($data_array);
echo '</pre>';
$smcFunc['db_insert']('insert',
$prefix_smf . 'messages',
array(
And try again.
See attached file
marg edit: attachment removed for privacy ;)
Hum ... if you open the file in browser there're problems with some links ... the closed code </a> seems to have disappear (during a migration, i think)... Should it be the problem ?
[EDIT]Links repaired, same issue :-\
Yeah, I think this is the issue:
[197] => Array
(
[id_msg] => 6489
[id_topic] => 6489
[id_board] => _removed_
[poster_time] => _removed_
[id_member] => 236
[id_msg_modified] => _removed_
[subject] => _removed_
[poster_name] =>
[poster_email] =>
[poster_ip] =>
[smileys_enabled] => 1
[modified_time] => 0
[modified_name] =>
[body] => _removed_
[icon] => xx
[approved] => 1
)
This has no user/email and those are mandatory fields in SMF ;) I'll update the converter to add some dummy values in those fields if they are empty.
Should be fixed ;)
Please re-download and try again.
it seems to work but i had an issue on the fifht step (iti seems to be a php one)
This is the fifth step of the conversion. We will now convert Conversations(XF)/PMs(SMF)
First, let's trash the actual contents of SMF "personal_messages" and "pm_recipents" tables....
PMs cleared from SMF tables. Next step, count what's there to move?? 467 PMs were found in XF.
Now retrieving messages 1 to 100...
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
Now retrieving messages 101 to 200...
Now retrieving messages 201 to 300...
Now retrieving messages 301 to 400...
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\xf2smf.php on line 1054
Call Stack
# Time Memory Function Location
1 0.0018 797128 {main}( ) ..\xf2smf.php:0
Now retrieving messages 401 to 467...
Conversations seems to be have been imported ...
Did everything convert already? Welcome to SMF ;)
It seems to be OK. Thanks Margarett. I just have to find a way to made custom BBCODE and restore my permissions. ;)
Yeah, the permission is really something I can't handle, mostly due to my "non-experience" with XF.
What custom BBC are you using, that SMF doesn't know about?
Yes, the permissions are really differents from xf to smf, but it should be great feature if you could add the groups in the converter (without permissions).
I've BBCODE for videos like [media="youtube"]dfdf1d22sd1[/media] or [media="dailymotion"]dfdf1d22sd1[/media] and [ATTACH=full][/ATTACH] for attached files that don't work.
I've tried aeva mods but it doesn't work.
For the attach bbcode, it's particular, attached files have a number who is incremented, it doesn't use the link of the file but this number. it shouldn't be easy to make it works without modify posts ...
Also, i've a small issue perhaps, you'll be able to help me : the WYSIWYG editor is missing. I've the default template and others : same issue.
I might be able to help you on the media BBC, but please open a new topic for it in Coding board. With some search and replace and one of the automatic embeder MODs that exist here, we might fix it for you ;)
The groups... Aren't they converted? :o
Quote from: margarett on March 19, 2014, 07:52:48 AM
The groups... Aren't they converted? :o
They aren't ... :)
I have to check. Thank you for using the converter and reporting issues ;)
I can send you my SQL files if you want.
Another suggest : converting smilies ;)
Thanks for your help and your quick answers !
Quick answers: phone power ;D
I'm not sure if I can convert smileys, the original ones are probably copyrighted...
Quote from: margarett on March 19, 2014, 09:47:54 AM
I'm not sure if I can convert smileys, the original ones are probably copyrighted...
It was mostly for custom ones that i add ;)
To far out of my ability, maybe someday day they will create a converter.
I really hate XF, never should have left.
If you are talking about converting to smf I will say this is very easy compared to some I have done. Biggest them to remember is to put SMF in to the same datebase as the Xenforo, then run the script.
Hi there, not sure if I even know how to do that :)
I'm not sure I understand your question, sorry...
Do you have XF? Do you wish to convert to SMF? Can't you do it? Need help? Having issues?
Sorry, we really need more to help you in whatever problem you're having...
Quote from: AllanD on April 30, 2014, 08:05:23 PM
If you are talking about converting to smf I will say this is very easy compared to some I have done. Biggest them to remember is to put SMF in to the same datebase as the Xenforo, then run the script.
Hi sorry , I have 1.25 Xenforo. Been using SMF along time and migrated the current SMF in 2/14 and I really hate XF .
The support is horrible for a paid product and XF is not even close to SMF productivity. I am wanting to go back to SMF.
I have an active forum with 7000+ posts . I was intrigued in this topic. But seems way beyond what I can do.
" to put SMF in to the same datebase as the Xenforo, then run the script."
Made no sense to me I barely understand how Mysqls work. I am old school webmaster since 1996 used to HTML and Java, then along came PHP and MYsqls and I never caught up. Had Smf back in 2005 and loved it then, reopened another two sites this year.
One is SMF and I have it working well. The other was one I converted and went DOH!
I would like to go back to SMF but no idea where to even start to take XF to SMF.
1.25 is your XF version?
1.2.5 . Left a period out ooops :-)
The database schema should be the same, so it should work.
You only need to install SMF in the same database as XF. Then run the converter
Quote from: margarett on May 01, 2014, 05:26:57 PM
The database schema should be the same, so it should work.
You only need to install SMF in the same database as XF. Then run the converter
The " should be " part is what worries me.
Just take a backup of the database, before you do anything. This way you can always put it back.
And, like with any other converter, the original setup is untouched, which means there is no risk ;)
A backup is always nice to have, nevertheless. :P
Quote from: margarett on May 01, 2014, 07:57:29 PM
And, like with any other converter, the original setup is untouched, which means there is no risk ;)
A backup is always nice to have, nevertheless. :P
I just thought about this and came back to post it :P
I'm attempting to convert a very, very large forum. Members did fine. But, when it went to nodes:
step=2
Database Error: Duplicate entry '255' for key 'PRIMARY'
I checked the node ids we have no two copies of 255
Tried a few more times. Anyways,
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FgUUTwwN.png&hash=368ea5f4de2e03040f8b49abd9f008b6d1844505)
Any time it gets to 255 no matter what or if I change the node type it stops there. Is there a 255 limit?
That's a different problem. It's something SMF/MySQL related.
In step 2 we convert categories. In SMF, they are stored in smf_categories table and the column "id_cat" is a "tinyint", which means that it can only store values up to 255. Two or more of your categories have an ID larger that this and, when MySQL tries to add that ID to the database, it is limited to and written as 255. There lies your issue.
You need to ALTER the table "smf_categories" and make "id_cat" an "int" or "smallint" field instead of tinyint.
Thanks. We have over 500 nodes =X
I'm not entirely sure how to do the alter. But, in the backup of categories
CREATE TABLE IF NOT EXISTS `smf_categories` (
`id_cat` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
`cat_order` smallint(4) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`can_collapse` smallint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id_cat`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=256
Would the 256 also pose a problem?
What's the highest node ID you have?
That auto-increment=256 just tells the server what's the next AI value it should use.
650 is the biggest node_id
That backup you indicate above... Is it a backup from the current conversion after it ran?
after it ran. I don't know how to change it regularly as I never changed anything from tinyint to something else before.
That's strange, the column is already a smallint, which means you shouldn't get the error again... Did you try to re-run the converter after the error?
Ran it the export for categories is:
CREATE TABLE IF NOT EXISTS `smf_categories` (
`id_cat` tinyint(4) unsigned NOT NULL AUTO_INCREMENT,
`cat_order` tinyint(4) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`can_collapse` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id_cat`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=256 ;
Sorry. I tried running again same error. I tried uploading it changed to smallint that didn't work.
Ah, tinyint! :)
So, go to your SMF database, go to "SQL" tab and paste this:
ALTER TABLE smf_categories CHANGE id_cat id_cat SMALLINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ;
ALTER TABLE smf_boards CHANGE id_board id_board SMALLINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ;
Thank you margarett! I searched Google and these forums for that error, out of many, many threads, you were the first to post a fix. It worked :)
Hi again.
step=4
Database Error: Duplicate entry '419876-270' for key 'last_message'
Do we have too many topics/threads now?
our highest topic and post id:
68503 topics 610101 posts
No, that's a different error... That's a duplicate error content
The easiest way to fix it is to tell the converter to ignore that... Open the file, find this
$smcFunc['db_insert']('insert',
$prefix_smf . 'topics',
Replace with:
$smcFunc['db_insert']('ignore',
$prefix_smf . 'topics',
Trying again. Thank you so much! <33. You are awesome.
It froze at Now retrieving posts 85701 to 85750...
I'm upping the queries to see if it helps. that was 1715 attempts at data at 50.
Increased the queries up a bit. Got it up to 630000. :(. Still need to go about another 300,000 the script just quits. Is there a way to resume from where it left off?
What do mean by "quits"? Is there any error?
As for resume, not really...
It just pauses for me :( The page just simply stops loading. There's no more loading symbol, no new retrieving posts status. I tried it around 6 times before finally I got it to do every post on the test database. It's doing the same on poll votes.
Here's a screenshot: http://i.imgur.com/HgUQ1JX.png
Sorry. It just seems to freeze at a few random times. Happened most commonly with the actual posts retrieving. We're using a test database that has around 200k less posts then the live one does.
Edit: Tried again. It quits on the now retrieving poll votes 1 - xx query number.
That's either a PHP error (should cause a white page, though...) or a MySQL "dead" connection, I think. Can you check for any PHP error logs you might have? I'm thinking maybe a "time limit" error, maybe, but unlikely...
You should really increase the "$max_queries" variable, though... 50 at a time with so many content should take you ages...
I'm sorry, with the current form of the converter, there isn't much more debug we can do. If you had a problem with the conversion script (say, eg, "duplicate entry") you would see an error, like you already did. This seems to me more a server issue than a script problem...
Anyway, you can increase the number of queries and also increase the time the script pauses between each "batch". You can find, throughout the file, some "sleep(1);" instructions. This is 1s pause between each batch of search/inserts. Try to increase that, it should reduce some load on the server, but it will take you more time to do the conversion...
Database Error: Unknown column 'p.last_edit_date' in 'field list'
Any chance you know how to fix that error? :/
Which XF version are you running?
1.1. It worked on the web interface. But, I was trying to do it offline on wampserver.
Oooh I see. Some difference. Forgot I upgraded the test site to 1.2
1.2 posts table http://i.imgur.com/vAZrseH.png
1.1 posts table: http://i.imgur.com/leD5HxL.png
Edit: I'll upgrade the database later after I get some sleep. >< Thanks margarett! Any chance it'd be possible to skip over edit date, etc? That's not really neccessary for us. We really just care about getting the posts on SMF ^_^
Yes, that's the issue. I've never seen a 1.1 database.
Can you update your XF install?
Edit: yes, it is. I need to have a look at the code ;)
Thanks! Anything you'd like to see of XenForo let me know. ^_^. Though my database is about 3.5 GB. Takes a while to do anything, haha. I also love how simple your converter is.
Edit: Got it converting posts now \o/
I upgraded to 1.2 and tried again. Damn.
Warning: Invalid argument supplied for foreach() in C:\wamp\www\smf\xf2smf.php on line 1054
Getting that on step 5. >< Sorry I'm having errors :( I'm also trying this on offline mode so I can import thousands at a time.
Hey margarett, I still have to thank you for this awesome converter.
I used it to get back to SMF.
Woohot!
Quote from: ashkir on June 12, 2014, 01:32:02 PM
Warning: Invalid argument supplied for foreach() in C:\wamp\www\smf\xf2smf.php on line 1054
Hummm that is weird... Can you have PMs without recipients? :o
Can you please add, before line 1054:
echo '<pre>';
echo $value['recipients'];
print_r($temp);
echo '</pre>';
And try again? It will give you the same error but some new info should be given. Depending on the number of PMs you have, it's possible it fills your screen with info :P I just need some lines before the actual error.
Quote from: XaR on June 12, 2014, 03:42:16 PM
Hey margarett, I still have to thank you for this awesome converter.
I used it to get back to SMF.
Woohot!
Thanks :)
I don't think I will ever use it since I am already on SMF but I wanted to say congrats for creating such a difficult thing and also for supporting it like this. You are awesome, my respect for you is very high, for this and for many other things you have done here, for me and not only for me.
Thanks a lot for this, I'm currently getting stuck on step 3 on a XenForo 1.2.2 install.
Here's a full transcript of whats shown:
Boards cleared from SMF table. Next step, how many boards are in XF "node" table and whose category id is "Forum"/"ForumLink"? 6 boards and 0 "redirect boards" were found in XF.
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
Notice: Undefined offset: 0 in /home2/billybob/public_html/smf_forum/xf2smf.php on line 547
An Error Has Occurred!
The database value you're trying to insert does not exist: id_cat
Any help would be greatly appreciated!
Thanks again
Don't you have any categories? I mean, all your boards are directly on the root?
Can I have a link to your XF forum? (via PM if you don't want to post it here)
Thank you for the referral going to take me some research I do not work allot with the DB on my server so when it says install withing it ,
the thought went beyond my pay grade. I do like the possibilities of doing this. But I was semis lost from the beginning using database installs as you mentioned.
Well, you always need to install SMF in order to convert (or any other software, for that matter :P ).
In this case you are just required to have it in the same database as XF is running (which should normally be painless ;) )
30 minutes-run:
* Set XF in "maintenance mode" (so that no one can access/post/etc).
* backup everything. If you have cPanel it should allow you to generate a full backup in minutes
* install SMF in the same DB where XF is.
* try the converter
If the conversion is successful and if your forum is big, it should take you more than 30 minutes :P But you can only know by trying
In either case, your XF setup should be left untouched ;)
On this page I didnt see a converter ?
http://download.simplemachines.org/?converters
Nop, this is not an official converter sorry... Read the first post of this topic carefully. Everything you need to know is there ;)
Ok I saw it under the attachments you posted , great I will look carefully thank you,
Hello!
The converter has stoper
QuoteNow retrieving posts 46801 to 46850...
I would assume that the converter stopped because the server didn't answer. You might need to increase the wait time between operations...
Bonjour!
How should I do ?
Find this code
//Did we finish or WHAT?!
if ($counter >= $num_posts)
$done = true;
else
sleep(1);
See the sleep(1)? Increase it to a higher value. Do note that will make the conversion much slower.
You can also decrease the variable $max_queries = 50; at the beginning of the file. Both operations will make the converter "lighter", while significantly increasing the time it takes...
Thank you very much
:'(
Hello! I have an error message
QuoteErreur de base de données
Go to phpmyadmin and check your smf_log_errors. The last entry should be what cause that error
Erreur de base de données: Duplicate entry '134291-59' for key 'first_message'
I still have the same error message at the same location
Erreur de base de données: Duplicate entry '134291-59' for key 'first_message'
Sorry I've been out of the computer for several days. As soon as I get back to it I'll suggest a fix for you
can you me help is it you please :'(
QuoteErreur de base de données: Duplicate entry '134291-59' for key 'first_message'<br /><br /><br /> INSERT INTO `db598946955`.smf_topics(`id_topic`, `is_sticky`, `id_board`, `id_first_msg`, `id_last_msg`, `id_member_started`, `id_member_updated`, `id_poll`, `id_previous_board`, `id_previous_topic`, `num_replies`, `num_views`, `locked`, `unapproved_posts`, `approved`)<br /> VALUES<br /> (13410, 0, 68, 134593, 134593, 1, 1, 0, 0, 0, 0, 69, 1, 0, 1),<br /> (13411, 0, 68, 134594, 134594, 1, 1, 0, 0, 0, 0, 71, 1, 0, 1),<br /> (13412, 0, 68, 134595, 134595, 1, 1, 0, 0, 0, 0, 76, 1, 0, 1),<br /> (13413, 0, 68, 134596, 134596, 1, 1, 0, 0, 0, 0, 79, 1, 0, 1),<br /> (13414, 0, 68, 134597, 134597, 1, 1, 0, 0, 0, 0, 88, 1, 0, 1),<br /> (13415, 0, 68, 134598, 134598, 1, 1, 0, 0, 0, 0, 77, 1, 0, 1),<br /> (13416, 0, 68, 134599, 134599, 1, 1, 0, 0, 0, 0, 60, 1, 0, 1),<br /> (13417, 0, 68, 134600, 134600, 1, 1, 0, 0, 0, 0, 61, 1, 0, 1),<br /> (13418, 0, 68, 134601, 134601, 1, 1, 0, 0, 0, 0, 65, 1, 0, 1),<br /> (13419, 0, 68, 134602, 134602, 1, 1, 0, 0, 0, 0, 55, 1, 0, 1),<br /> (13420, 0, 68, 134603, 134603, 1, 1, 0, 0, 0, 0, 83, 0, 0, 1),<br /> (13421, 0, 73, 134604, 134604, 926, 926, 0, 0, 0, 0, 70, 0, 0, 1),<br /> (13422, 0, 59, 134606, 134613, 219, 1, 0, 0, 0, 7, 245, 0, 0, 1),<br /> (13424, 0, 53, 134615, 134893, 929, 1027, 0, 0, 0, 3, 88, 0, 0, 1),<br /> (13425, 0, 63, 134616, 134756, 929, 929, 0, 0, 0, 4, 180, 0, 0, 1),<br /> (13426, 0, 53, 134617, 134665, 929, 942, 0, 0, 0, 3, 131, 0, 0, 1),<br /> (13427, 0, 59, 134618, 134703, 929, 929, 0, 0, 0, 6, 270, 0, 0, 1),<br /> (13428, 0, 53, 134623, 134625, 931, 1, 0, 0, 0, 1, 69, 0, 0, 1),<br /> (13430, 0, 54, 134629, 134631, 932, 932, 0, 0, 0, 2, 114, 0, 0, 1),<br /> (13435, 0, 53, 134637, 134664, 934, 942, 0, 0, 0, 3, 128, 0, 0, 1),<br /> (13436, 0, 59, 134638, 134899, 934, 1, 0, 0, 0, 16, 734, 0, 0, 1),<br /> (13437, 0, 68, 134648, 134648, 1, 1, 0, 0, 0, 0, 103, 1, 0, 1),<br /> (13438, 0, 54, 134650, 134656, 1, 942, 0, 0, 0, 1, 95, 0, 0, 1),<br /> (13439, 0, 63, 134653, 134654, 936, 1, 0, 0, 0, 1, 113, 0, 0, 1),<br /> (13441, 1, 52, 134658, 134658, 1, 1, 0, 0, 0, 0, 211, 0, 0, 1),<br /> (13442, 0, 68, 134660, 134660, 1, 1, 0, 0, 0, 0, 18, 0, 0, 1),<br /> (13443, 0, 68, 134661, 134661, 1, 1, 0, 0, 0, 0, 26, 0, 0, 1),<br /> (13446, 0, 53, 134668, 134693, 924, 9, 0, 0, 0, 3, 701, 0, 0, 1),<br /> (13447, 0, 60, 134669, 134724, 924, 1, 0, 0, 0, 18, 282, 0, 0, 1),<br /> (13448, 0, 68, 134676, 134676, 1, 1, 0, 0, 0, 0, 38, 0, 0, 1),<br /> (13450, 0, 59, 134689, 134704, 929, 929, 0, 0, 0, 5, 201, 0, 0, 1),<br /> (13451, 0, 54, 134706, 134706, 1, 1, 0, 0, 0, 0, 47, 0, 0, 1),<br /> (13455, 0, 54, 134711, 134715, 130, 1, 0, 0, 0, 4, 106, 0, 0, 1),<br /> (13457, 0, 68, 134717, 134717, 1, 1, 0, 0, 0, 0, 51, 0, 0, 1),<br /> (13458, 0, 59, 134291, 134916, 130, 1, 0, 0, 0, 15, 663, 0, 0, 1),<br /> (13459, 0, 59, 134722, 134759, 924, 1, 0, 0, 0, 9, 87, 0, 0, 1),<br /> (13460, 0, 63, 134726, 134729, 1017, 1, 0, 0, 0, 1, 66, 0, 0, 1),<br /> (13461, 0, 59, 134730, 134737, 1018, 1, 0, 0, 0, 3, 73, 0, 0, 1),<br /> (13462, 0, 60, 134738, 134748, 1020, 1, 0, 0, 0, 3, 86, 0, 0, 1),<br /> (13464, 0, 68, 134740, 134740, 1020, 1020, 0, 0, 0, 0, 26, 0, 0, 1),<br /> (13465, 0, 60, 134739, 134739, 1020, 1020, 0, 0, 0, 0, 38, 0, 0, 1),<br /> (13466, 0, 68, 134742, 134742, 1, 1, 0, 0, 0, 0, 28, 0, 0, 1),<br /> (13468, 0, 68, 134744, 134744, 1, 1, 0, 0, 0, 0, 30, 0, 0, 1),<br /> (13469, 0, 68, 134745, 134746, 1, 1, 0, 0, 0, 1, 62, 0, 0, 1),<br /> (13470, 0, 60, 134749, 134750, 1019, 1, 0, 0, 0, 1, 75, 0, 0, 1),<br /> (13471, 0, 56, 134751, 134751, 1, 1, 0, 0, 0, 0, 38, 0, 0, 1),<br /> (13472, 0, 59, 134752, 134755, 929, 929, 0, 0, 0, 3, 58, 0, 0, 1),<br /> (13473, 0, 68, 134760, 134760, 1, 1, 0, 0, 0, 0, 8, 0, 0, 1),<br /> (13474, 0, 68, 134761, 134761, 1, 1, 0, 0, 0, 0, 26, 0, 0, 1),<br /> (13475, 0, 68, 134762, 134762, 1, 1, 0, 0, 0, 0, 12, 0, 0, 1)
Hello.
Sorry for the late reply, I've been extremely busy...
Edit the converter file, find:
$smcFunc['db_insert']('insert',
$prefix_smf . 'topics',
Replace with:
$smcFunc['db_insert']('ignore',
$prefix_smf . 'topics',
thank you very much :D
2 New error message
QuoteWarning: unlink(/homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/attachments/Avatars): Is a directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1157
Attachments folder is now empty. Now we will start the copy operation.
Depending on the number of files you have, this can take some time...
Copying attachments 1 to 50...
Warning: copy(/internal_data/attachments/0/1726-d84ddc27854255da454ecafd94dac5e6.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
Warning: copy(/internal_data/attachments/0/1725-4d3172945cf1a53077f8f886f7058f4e.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
Warning: copy(/internal_data/attachments/0/1724-67f93a08db21ab6e29c403adc9b03525.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
QuoteThis is the seventh step of the conversion. We will now copy and convert User Avatars
Please make sure that you've reached here from the sixth step (Post Attachments) as both work the same
table in SMF's structure so it's really important the sequence is maintained.
We will now try and fetch all existing avatars datas, from XF's data/avatars/l sub-folders
It can happen that this results in a huge array. If memory is exceeded, this will need a serious overhaul...
Warning: dir(/data/avatars/l): failed to open dir: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 2071
Fatal error: Call to a member function read() on a non-object in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 2073
Copie d'ecran
You didn't set XF's path. Check the instructions on the first post ;)
I still have the error message for the parts attached
It lacks all the latest topics and messages posted in December and January.
Missing also all users registered in the December and January
Forum xenforo
http://www.scooter-chinois-4t.com/forum/
vs
Forum smf
http://www.scooter-chinois-4t.com/smf
pseudo: margarett
Passe: 123456
But did you fix XF's path in the converter?
As for the latest posts I have no idea. I'd need to check in place, sorry. If you are comfortable with the idea PM me (do NOT post in this topic) access to your cPanel or other control panel you might be using. I need to check the databases and run the converter myself to understand what's wrong...
Private message send :)
Thank you. I've seen it but I can only work on it later tonight
Quote from: sc4t on January 20, 2016, 04:54:01 AM
I still have the error message for the parts attached
It lacks all the latest topics and messages posted in December and January.
Missing also all users registered in the December and January
Forum xenforo
http://www.scooter-chinois-4t.com/forum/
vs
Forum smf
http://www.scooter-chinois-4t.com/smf
pseudo: margarett
Passe: 123456
Missing also the
archive forum created in January
http://www.scooter-chinois-4t.com/forum/forums/archives.79/
I now checked in place. I didn't check the attachments issue but the converter worked just fine regarding topics.
The last topic in XF's database (table xf_thread) is ID 13586, also the last in SMF's converted database
http://www.scooter-chinois-4t.com/forum/threads/probleme-dans-les-monte.13586/
http://www.scooter-chinois-4t.com/smf/index.php?topic=13586.0
There are some newer topics in your forum which are not converted over to SMF because, well, I don't know where XF is storing them ??? They are NOT in xf_thread and xf_post tables!
Same for posts. The last post ID stored in xf_post is 134923, as it's also in SMF's smf_messages...
http://www.scooter-chinois-4t.com/forum/threads/probleme-dans-les-monte.13586/#post-134923
http://www.scooter-chinois-4t.com/smf/index.php?topic=13586.msg134923#msg134923
My guess is that this "archive" you created moved database content to another database. And that is not supported by this converter (not by any other converter I know)
As far as I can tell, the converter is working fine. It's your database setup which seems kinda odd :(
About the attachments. There are several hundred attachments in SMF's "attachments" folder so I guess it worked for the most part...
QuoteWarning: unlink(/homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/attachments/Avatars): Is a directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1157
This suggests that you had a folder inside "attachments" named "Avatars" which the converter doesn't really expect. Anyway it's a harmless warning.
QuoteWarning: copy(/internal_data/attachments/0/1726-d84ddc27854255da454ecafd94dac5e6.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
Warning: copy(/internal_data/attachments/0/1725-4d3172945cf1a53077f8f886f7058f4e.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
Warning: copy(/internal_data/attachments/0/1724-67f93a08db21ab6e29c403adc9b03525.data): failed to open stream: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 1258
This simply means that a file which is referenced in XF's attachments table doesn't actually exist in the respective folder. Not a big deal, it happens ;)
This, however
QuoteWarning: dir(/data/avatars/l): failed to open dir: No such file or directory in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 2071
Fatal error: Call to a member function read() on a non-object in /homepages/46/d569266866/htdocs/clickandbuilds/ScooterChinois4T/smf/xf2smf.php on line 2073
Is odd. User avatars *were* converted so the step actually worked.
Bottom line: overall the converter did its job just fine :)
Hello!
Thanks for your help...
It still lacks the subjects and message December January :o
That's what I was trying to explain: these recent posts are NOT in the database. They should be stored in another database or table. I would advise you to check with XF's support now to undo that "archive" you did, because it seems to me that the missing posts were created after this.
The problem of ghost subjects is resolved. :)
Une erreur s'est produite !
Wrong value type sent to the database. Integer expected. (id_member)
The problem with private messages is resolved.
Now I have a new error with polls
QuoteThis is the eight step of the conversion. We will now convert Polls
First, let's trash the actual contents of SMF "polls", "poll_choices" and "log_polls" tables....
Polls cleared from SMF tables. Next step, count what's there to move?? 0 polls, 0 poll responses and 0 poll votes were found in XF.
Now retrieving polls 1 to 0...
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back
Eh :P Never thought about that... When there's nothing to convert it still tries to insert an empty row. I'll fix that shortly
at step 5 get this error
QuotePMs cleared from SMF tables. Next step, count what's there to move?? 164076 PMs were found in XF.
Now retrieving messages 1 to 350...
Warning: Invalid argument supplied for foreach() in C:\Winginx\home\site.com\public_html\smf\xf2smf.php on line 1054
another error
Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back
Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 346 Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 347 Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 348 Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 351 Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 352 Warning: Cannot modify header information - headers already sent by (output started at C:\Winginx\home\site.com\public_html\smf\xf2smf.php:34) in C:\Winginx\home\site.com\public_html\smf\Sources\Errors.php on line 353
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
@sc4t, please try the new converter attached to the first post. I don't have any XF data anymore so I can't test it though :( Fingers crossed :P
It seems you found and fixed some errors, would it be possible for you to let me know if you changed something in the converter in that process?
@anon228, the file I just uploaded won't be of use for you because it doesn't touch anything related to PMs. In version you're using, line 1054 is:
$temp = unserialize($value['recipients']);
>>>>>>>> foreach ($temp as $key2 => $value2)
{
if (($key2 != $value['last_message_user_id']) && ($key2 != $value['id_starter'])) //prevent duplicates
$recipients[] = $key2;
}
unset($temp);
It seems that the fetched value isn't serialized as expected. I would suggest you change that bit to:
$temp = unserialize($value['recipients']);
if (is_array($temp))
{
foreach ($temp as $key2 => $value2)
{
if (($key2 != $value['last_message_user_id']) && ($key2 != $value['id_starter'])) //prevent duplicates
$recipients[] = $key2;
}
}
unset($temp);
Bonjour!
Always the same error message with the polls.
QuoteThis is the eight step of the conversion. We will now convert Polls
First, let's trash the actual contents of SMF "polls", "poll_choices" and "log_polls" tables....
Polls cleared from SMF tables. Next step, count what's there to move?? 0 polls, 0 poll responses and 0 poll votes were found in XF.
Now retrieving polls 1 to 0...
Erreur de base de données
Merci de r�essayer. Si l'erreur se reproduit, signalez cette erreur � un administrateur.
Retour.
There is also a problem with the file attachments.
http://www.scooter-chinois-4t.com/smf/tutoriels/comment-enlever-la-rouille-de-piece-metallique/msg134165/#msg134165
http://www.scooter-chinois-4t.com/forum/threads/comment-enlever-la-rouille-de-piece-metallique.13196/
That cannot happen. If there are no polls it should now skip that part completely. Can you please attach your current file?
Oui
Your file is still the old version, make sure you re-download the zip file on the first post ;)
I download the new file and still the problem with attachments
Xenforo: http://www.scooter-chinois-4t.com/forum/threads/le-carburateur-de-a-a-z.13524/
SMF: http://www.scooter-chinois-4t.com/smf/tutoriels/le-carburateur-de-a-a-z-13524/msg134813/#msg134813
That's a different problem altogether... I can look into that issue for you but I need access to your files and databases...
Attachments are converted over a simple method:
a) check XF's posts table and fetch posts with attachments
b) for each of these posts, get the respective attachment name, hash, etc. This allows to identify the file on disk.
c) directly copy it from XF_FOLDER/internal_data/attachments/0/ to SMF_FOLDER/attachments
//Now, we need to get the hashed file name from XF and convert it to a lovely filename. One we can actually use, ya know? :)
$oriname = $xf_dir . '/internal_data/attachments/0/' . $temp2['data_id'] . '-' . $temp2['file_hash'] . '.data';
//Destination (temporary) name
$destname = $smf_dir . '/attachments/' . $temp2['filename'];
$test = copy($oriname, $destname);
d) perform some SMF-specific hash/rename operations and add it to SMF's attachments table.
That's it.
If the file copy operation fails, that's because the file cannot be found. In order to check that I need to see in place which files are in place and where they are located.
The post body content isn't really touched. So it seems that XF is using some kind of "inline attachments" to show the image through a BB Code that SMF can't understand. That might be "convertible" but I am really not sure, I need to check in place.
Thank you! I give you the password via private message :)
I was forgotten :'(
Hello Margarett
You new to the script ??
Quick question and for some reason I can't remember how to define the root directory for the xenforo install.
Quote from: margarett on October 06, 2013, 05:09:45 PM
How to use this converter:
(...)
3 - Download the attached "xf2smf.php" file to you computer and edit it with a decent editor (eg: Notepad++). The small edits that are needed are all localized in this part here:
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=512266.0;attach=225037;image)
3.1 - You need to define the folder where XF is installed. By folder, I mean the server path where XF's installation is located. SMF's path is automatically discovered (because you will put the file there :P ). If you don't know it, please upload the attached "whats_the_path.php" file to XF's folder and run it via browser. It will tell you the path you should add.
It's the variable $xf_dir
anyone can help me out. I want to update from xenforo to smf.
I can pay for the right solution as well.
I am a noob when it comes to programming and coding, It just pass away from my mind.
Anyone can help me out?
Did you try to run the converter? Do you get any errors?
What is your XF version?
does this work for xenforo 1.5.10? I want to move to SMF instead since xenforo keeps giving us problems... .-.
Hello margarett!
What's new for the conversion script xenforo 1.5.10??
The import script works all the way but when it start to import the posts it gives a error:
xenForo 1.5.10
An Error Has Occurred!
The database value you're trying to insert does not exist: id_board
I know this is an old thread, but I have a question on the converter.
I'm an active mod on a forum that has about 1500 registered users and over 15,000 posts. The current forum owner wants to 'retire' but needs to keep the domain for professional reasons. He offered to shift the existing forum to one of the mods, if we wanted to take it on, and I decided to give it a try. He currently uses Xenforo but I'd prefer to try SMF. I have a new domain and hosting set up already. I also have SMF installed along with this converter. From the instructions, it looks like I only need the current xenforo database and not a full install of xenforo. I believe I can put the xenforo database anywhere as long as I link to the path. Is this a correct assumption? Or do I need to install xenforo in order for this converter to function correctly?
Questions regarding conversion:
Quote3.2 - You need to adjust my "$max_queries" variable. This defines how many registers the converter tries to move at once. A low number takes a LOT of time, a large number will hammer your server and may cause it to become unresponsive.
What number am I entering for this step: I'm not sure what the queries represents, is it number of users, posts, or some code detail that I don't understand?
Quote3.3 - As my image above states, I didn't find a way to change XF's table prefix, so it shouldn't be necessary to change anything else. But, in case your prefix isn't "xf_" please edit the corresponding line.
I asked for a copy of the current database to test it and he sent me a file called xenforo.sql. Is this the correct file to use? If so, do I need to rename it xf.sql? Or should I request a different file type?
Thank you for any help you can provide.
Christa
do you have a web server? you need to upload the backup to the database server. you would also need whatever xf's version of Settings.php is that will let SMF connect to the database.
I do have a web server. I suspected I needed a php file as well but didn't see it specifically listed in the instructions.
Sorry for the simplistic questions. As you can tell, I don't write code and I only have a very (VERY) basic understanding of files and structures and how they link.
Quote from: novice68 on May 07, 2018, 10:13:12 AM
I asked for a copy of the current database to test it and he sent me a file called xenforo.sql. Is this the correct file to use? If so, do I need to rename it xf.sql? Or should I request a different file type?
I don't know the answer to your first question (try reading the thread, there might be an answer there), but to your second one, yes, that's the forum's database. I suggest you zip it when uploading it through the database manager (phpMyAdmin). The files usually have to end with .sql.zip. For example, if you zip the xenoforo.sql database, your file should be named xenoforo.sql.zip.
You could name it however you like, as long as the name is not too long and it doesn't contain special characters (i.e., regular ANSI letters and numbers are allowed).
Quote from: novice68 on May 07, 2018, 11:40:29 AM
I do have a web server. I suspected I needed a php file as well but didn't see it specifically listed in the instructions.
There's an attachment in the first post in the thread, xf2smf.ZIP (https://www.simplemachines.org/community/index.php?action=dlattach;topic=512266.0;attach=247283). Download it, extract the content and use the xf2smf.php file.