Support Forum

Error in import from SMF

PG Phil Gordemer
Phil Gordemer
Member

I am trying to  import an SMF 2.0.14 in Simple:Press. Once the users are in, the process starts with the messages and dies. Here is the error from the logs:

 

file: /home/canvascampers.net/public_html/wp-content/plugins/sp-import/engine/spimport.php
line: 234
function: sp_build_post_index
error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ post_count=0, post_id_held=0, post_count_held=0 WHERE topic_id=’ at line 2

UPDATE wp_sftopics SET post_id=, post_count=0, post_id_held=0, post_count_held=0 WHERE topic_id=170

16 Answers

New Answer

MP Mr Papa
Mr Papa
Member

does anything get imported?   

I notice this is MariaDB… not sure it matters, but doubt we have tested on that specific app… 

what is the version of SMF?  and its a clean database moving into from simple press perspective?

may need to wait for @yellow-swordfish tomorrow since he wrote the importer…

YS Yellow Swordfish
Yellow Swordfish
Member

There is no value for the post_id (‘ID_MSG’ in the “messages’ table in SMF V1 – or ‘id_msg’ in SMF version 2). Perhaps the first thing to check is that these column names are still correct and, if so, all are populated.

And the question @mr-papa asked above as well – did anything get imported after the users?

PG Phil Gordemer
Phil Gordemer
Member

It got the users, all the forum categories and the first 2 forums under the first category with all the topics and replies.

 

SMF 2.0.14

I could do it an ugly way and import in bbpress, then import into Simple:press but rather not do that headache.

 

Source: http://canvascampers.com/index.php?action=community

Development Destination: http://canvascampers.net/forum/

I deleted the empty categories and reindexed. What comes over works.

YS Yellow Swordfish
Yellow Swordfish
Member

Not sure I much like the sound of converting to bbPress first. That could potentially introduce it’s own set of unwanted problems!

Short of using a service such as http://gconverters.com – the only way we could probably help diagnose the issue would be to have a complete copy of the current SMF database so that we could test it.

PG Phil Gordemer
Phil Gordemer
Member

Its not a huge database, if you send me FTP information I will sent you a copy.

Its a 13mb zip, so I could just email it also.

YS Yellow Swordfish
Yellow Swordfish
Member

Try the email. support at simple-press dot com

Or copy up to a public folder on your site and I can download from there…

PG Phil Gordemer
Phil Gordemer
Member

Send via email, referenced this thread in the email.

Thanks

YS Yellow Swordfish
Yellow Swordfish
Member

Screen-Shot-2017-08-31-at-10.08.00-am.pngAs you can see – went through first time – no errors. I believe we got it all as well. But – I was surprised at how long it took for what was, as you said, quite a small database. I think it is likely that what you have there is a timeout – at least that is the only likelihood I can come up with. All the data constructs look just fine.

The importer tool rally does need rewrite – it is just pretty low on the priority list at the moment. But it does try and do too much in each session if there are many, many topics in a forum. So I think that is the problem.

Do you have a local and up to date version of your website because that should get through it OK. Else forcing a much longer and temporary timeout in the server might do it but that might still be pushing it.

PG Phil Gordemer
Phil Gordemer
Member

How high do you think I should bump the  timeout – its a self managed VPS, so I can modify almost anything.

PG Phil Gordemer
Phil Gordemer
Member

So it is not a timeout issue. I gave PHP a 512MB memory limit, upped the WP_Memory in wp config to 512, change PHP timeout to 600. Dies with exact same error in the exact same place. When it goes to start the 3rd forum under the first grouping.

I had a thought I would test, in that this script hadn’t been updated in a while, I changed my PHP default from 7.0 to 5.6. Cleared the database and tried again. No luck, same error in same place.

PG Phil Gordemer
Phil Gordemer
Member

I seemed to have gotten it to work. Still running.  Its looks like the scripts doesn’t like to read the database when it in use in the forum. I made a copy of the database in the same server, then ran the conversion. So far so good. PHP memory to 512, timeout to 6000