Converting from Mercuryboard 1.1.5 to SMF 2.0.1

Started by Buck00, November 30, 2011, 10:34:07 PM

Previous topic - Next topic

Buck00

I am in the process of trying to convert from Mercuryboard 1.1.5 to SMF 2.0.1 .  I am having issues converting the Poll Options and Attachments.  Can someone assist me in converting?  I am using the smf_2-0_mercuryboard_converter.zip.

Thanks in advance for the assistance!

----------

Below is what I am getting for the Poll options:

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...
Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smfconvert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/<path>/smf/Sources/Subs-Db-mysql.php on line 624
The database value you're trying to insert does not exist: id_poll


I commented out the poll Options and then hit a roadblock at the attachment conversion:

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting attachments...
Notice: Undefined variable: ID_ATTACH in /home/<path>/smf/convert.php(1254) : eval()'d code on line 11
The database value you're trying to insert does not exist: id_attach

Oldiesmann

Can you attach a copy of the data from your topics table so I can investigate the poll issue? It appears, from a quick glance at the converter code, that SMF isn't accounting for reaching the end of the poll options.

I'm not sure what's going on with the attachments. The variable in question should be "$id_attach" (lowercase), but I can't find any reference to a capitalized version of it in convert.php or the actual converter file. You can try this though, just on the off chance that the id_attach variable isn't being set by convert.php for some reason:

mercuryboard_to_smf.sql

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

Add before that
// Make absolutely sure we have an id_attach...
if (empty($id_attach))
    $id_attach = 1;

Buck00

Oldiesmann --

I sent you a email last evening with my topics data and the results from adding the code you provided for the attachments section.

Thanks for the help.

Oldiesmann

I see what's messing up the poll things...

One topic has this for the poll options:
Yes
No
What is MS & MG?



While another has this:
Prefer Black and White

Prefer Color




You'll need to fix those before the conversion, as you can't have empty poll options.

Still looking into the attachments things and will post a reply here when I figure that out.

Buck00

I removed the blank lines and trailing spaces.  When I run the converter i get the following:

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...
Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: -1 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Notice: Undefined offset: 2 in /home/<path>/smf/convert.php(1254) : eval()'d code on line 12

Warning: array_combine() expects parameter 2 to be array, string given in /home/<path>/smf/Sources/Subs-Db-mysql.php on line 624
The database value you're trying to insert does not exist: id_poll

Oldiesmann

I will take another look at it when I have a chance and see what I can figure out.

Buck00

#6
I only had 4 polls in my database so I eliminated the polls.  The only obstacle i need to overcome now is the Attachments.

UPDATE:   12/5 - I still receive the error below, however when I browse the data in the attachments table i see there is 500 records there.  Is it possible we hit some kind of threshold?

Fatal error: Cannot break/continue 1 level in /home/<path>/convert.php(1254) : eval()'d code on line 4

Buck00

Has anyone had similar issues where they could not convert more than 500 attachments using the convert.php program? 

Oldiesmann

Sorry for the delayed response. I've been fairly busy lately. I'll take another look at it when I get home from work tonight and see if I can figure out what's going on.

Buck00


Buck00

Oldiesmann -- have you had a chance to see what my attachment issue might be related to?

ledaladdin.com

I sent you a email last evening with my topics data and the results from adding the code you provided for the attachments section

alderson


Secureas


Matthew75

I'm having the same problem today. Yes, here in 2015.

Is there any way to fix this import script?

margarett

Hi and welcome to sm.org ;)

Are you using the converter from the downloads page? What is the error you're getting, this one?
QuoteFatal error: Cannot break/continue 1 level in /home/<path>/convert.php(1254) : eval()'d code on line 4
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

Matthew75

Yes, that is the one.

PHP Fatal error:  Cannot break/continue 1 level in /var/www/html/mydomain/beta/convert.php(1254) : eval()'d code on line 4, referer: hxxp:localhost/mydomain/beta/convert.php?step=1&substep=9&start=380400 [nonactive]

Oddly enough, I had to get the error from my log file. It didn't output anything on the webpage itself:

Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting attachments...

That's how the webpage left it.

margarett

That should be easy to fix, I fixed it recently in another converter I worked on. It has to do with the way PHP changed the handling of stuff in more recent versions.

I'll try to check it tonight (can't promise though, I already scheduled a zillion things for tonight ;D ;D ;D )
Give me a nudge in 2-3 days if I forget it ;)
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

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

Advertisement: