Converting from YaBB 2.2

Started by unpossible, January 03, 2008, 11:15:44 PM

Previous topic - Next topic

baycrew

Being that I'm a very ansy kind of guy I decided to cut and paste the PM code section from the 2.2 converter to the 2.1 converter and it looks as though everything came over correctly EXCEPT for the time stamp of the PM.

I have "December 31st, 1969"

Is this what you see?


SleePy

Find:
                    'msgtime' => empty($userData[$i][6]) ? (int) $userData[$i][6] : '0',

Replace:
                    'msgtime' => !empty($userData[$i][6]) ? (int) $userData[$i][6] : '0',

As well you could use the attached. I did try to fix some of the bbc code. I haven't worked out yet how to deal with the timestamp bbc nor the /me. But I try to change others and fix them up :)

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

baycrew

Sleepy - take a look at this code when you have a moment. I still am getting the SET_ID_TOPIC error, but I think the syntax of your suggested fix isn't correct. It's as though you are adding an enclosure "{" where it doesn't belong (forgive me, I am not a programmer).

Here is what it looks like in your last attachment:

Quote{
         $result = convert_query("
            SELECT ID_TOPIC
            FROM {$to_prefix}log_topics
            GROUP BY ID_TOPIC
            HAVING COUNT(ID_MEMBER) > 1");

         while ($row = mysql_fetch_assoc($result))
            convert_query("
               DELETE {$to_prefix}log_topics
               SET ID_TOPIC = $row[ID_TOPIC]");
         mysql_free_result($result);

         pastTime(-3);
      }

and here is what it would look like with your suggested changes:

Quote{
         $result = convert_query("
            SELECT ID_TOPIC
            FROM {$to_prefix}log_topics
            GROUP BY ID_TOPIC
            HAVING COUNT(ID_MEMBER) > 1");

            while ($row = mysql_fetch_assoc($result))
            {
                convert_query("
                    DELETE {$to_prefix}log_topics
                    WHERE ID_TOPIC = $row[ID_TOPIC]");
         mysql_free_result($result);

         pastTime(-3);
      }

Thoughts?  :D

SleePy

yea.. Remove the extra {.
Sorry about that..

I have been working on converters all day making sure they shouldn't have any issues with 2.0 (when I release the 2.0 versions) and its just been line after line of code needing manual updates.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

heh, got this ...

QuoteConverting...
Converting topics (part 2)... Unsuccessful!
This query:

    DELETE `tnmsv3`.smf_log_topics
    SET ID_TOPIC = 1;

Caused the error:

    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 'SET ID_TOPIC = 1' at line 2

baycrew

Quote from: Gilrod on July 12, 2008, 06:07:03 AM
heh, got this ...

QuoteConverting...
Converting topics (part 2)... Unsuccessful!
This query:

    DELETE `tnmsv3`.smf_log_topics
    SET ID_TOPIC = 1;

Caused the error:

    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 'SET ID_TOPIC = 1' at line 2

And I as well....

ThorstenE


Gilrod

What did you change? as it seems to be doing a lot of thinking.

ThorstenE

i changed
while ($row = mysql_fetch_assoc($result))
convert_query("
DELETE {$to_prefix}log_topics
SET ID_TOPIC = $row[ID_TOPIC]");
mysql_free_result($result);


to
while ($row = mysql_fetch_assoc($result))
convert_query("
UPDATE {$to_prefix}log_topics
SET ID_TOPIC = $row[ID_TOPIC]");
mysql_free_result($result);


i'm not 100% sure, but i think this must be an update of the log_topics-table..

also possible could be

while ($row = mysql_fetch_assoc($result))
convert_query("
DELETE FROM {$to_prefix}log_topics
WHERE ID_TOPIC = $row[ID_TOPIC]");
mysql_free_result($result);


i cannot test myself (i think it's time to install a Yabb for me)

SleePy

It was meant to be a delete :)

The first query before it was finding the duplicate ids. This query is using that information to remove them to prevent the duplicate id error when adding the primary index back :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

well it doesn't work...

After re-doing it all from scratch I just get a "done" in the status bar during topics (2)

:(

SleePy

Does it keep refreshing while its in progress of its work?

What is the querystring (The part after the ? in the url)?
This would let me know exactly what step it is currently on (or possibly a step after that) and such.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

ah balls, I closed it down... will restart it now and report back in like 4hrs...

Stew

Gilrod

Quotehttp://tnmsv3.jawltd.com/convert.php?step=1&substep=26100&cstep=8&start=0

Arriving considerably later than planned, my net connection died at 9am on Sunday!!!!

SleePy

Ok, well you are stuck on step 8.

How many topics do you have on your board?

from the url you gave me it is showing 26,100 topics so far have been converted and fixed.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod


SleePy

Is it still running?

It just hasn't completed yet then. Its only done 26k out of the almost 28k topics you have. It is getting there.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

No dude, this has totally stopped...

And I've no idea why, the status bar = "DONE" and it's been sat at the 26000 for 1/2 a day.

SleePy

any continue button :|
If there is no continue button you can try hitting go in the url and see if you can get it to start again.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

There was no continue button... at all... :(

I'll restart from scratch.

Advertisement: