[Converter] XenForo 1.2 --> SMF 2.0.x

Started by margarett, October 06, 2013, 05:09:45 PM

Previous topic - Next topic

margarett

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?
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

ashkir

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.

margarett

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 ;
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

ashkir

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 :)

ashkir

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

margarett

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',
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

ashkir

Trying again. Thank you so much! <33. You are awesome.

ashkir

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.

ashkir

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?

margarett

What do mean by "quits"? Is there any error?

As for resume, not really...
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

ashkir

#90
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.


margarett

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...
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

ashkir

Database Error: Unknown column 'p.last_edit_date' in 'field list'

Any chance you know how to fix that error? :/

margarett

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

ashkir

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 ^_^

margarett

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 ;)
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

ashkir

#96
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/

ashkir

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.

Xarkurai

Hey margarett, I still have to thank you for this awesome converter.
I used it to get back to SMF.

Woohot!
Useful paid mod: Badge Awards - Award members for actions

margarett

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 :)
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

Advertisement: