News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

YABb 2.1 conversion errors

Started by vfrjon, August 06, 2008, 09:48:14 PM

Previous topic - Next topic

SleePy

The converter doesn't currently support getting ones from the outbox, I haven't had much time to digg into this, it would be a complicated process to do this as the converter basically may have to do it in a second step and see if it exists in the database first and if it does update the pm info in the database to let it know the sender has not deleted the pm.

Give this file a try though. I think I made it support both formats with a quick numeric check on the first item in the array to see if its numeric or not.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

getting......
Quote
Notice: Undefined index: formName in mywebsite/forum/yabb22-pms_to_smf.php on line 188
Notice: Undefined index: in mywebsite/forum/yabb22-pms_to_smf.php on line 188
.
.
lots of these! Too many to count ;)
.
.
Notice: Undefined index: formName in mywebsite/forum/yabb22-pms_to_smf.php on line 188
Notice: Undefined index: in mywebsite/forum/yabb22-pms_to_smf.php on line 188

Then the big sql error

Database has no "from name" on any of the rows. Nor do my PM's state who they are from. These could be populated from the .msg filename perhaps? Other than that it looks good.

I'll look at the .outbox files and do some experimenting. I have a feeling they get a flag added when deleted........

vfrjon

Ahh looks like a typo.  formname should be fromname

I read post after I sent it and saw that.
Going to fix it and rerun it.........

vfrjon

Yeah that was it.

Got froms in messages and in all database records now.

Still getting
QuoteNotice: Undefined offset: 7 in mywebsite/forum/yabb22-pms_to_smf.php on line 182
on quite a few lines still. Is this an issue?

Also TempToName is still in table.


Jon

vfrjon

Would be good to get the ones from the outbox tho, even if means that members have to delete them again.

Would make the convert complete


SleePy

Those errors shouldn't cause an issue, but I fixed them just in case.

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

vfrjon

Sleepy,

That file gives an error about unexpected t variable on line 182. Cant remember the exact wording.

But its OK, I have the inboxes populated with all the correct data, and I played around with the file that achieved this and had it work on the .outbox files

I changed the following.....

Quoteif (strrchr($entry, '.') != '.outbox')
            continue;

         $userData = file($yabb['memberdir'] . '/' . $entry);
         foreach ($userData as $i => $v)
         {
            $userData[$i] = explode('|', rtrim($userData[$i]));
            if (count($userData[$i]) <= 2 || empty($userData[$i]))
               continue;

            // Figure out the format.
            $use = 'old';
            if (is_numeric($userData[$i][0]))
               $use = 'new';

            if ($use == 'old' && substr($userData[$i][7], -10) == '#nosmileys')
               $userData[$i][7] = substr($userData[$i][7], 0, -10);
            elseif ($use == 'new' && $userData[$i][11] == 's')
               $userData[$i][11] = $userData[$i][11];

            $row = array(
               'temp_toName' => substr(htmlspecialchars($userData[$i][$format[$use]['fromName']]), 0, 255),
               'subject' => substr($userData[$i][$format[$use]['subject']], 0, 255),
               'msgtime' => !empty($userData[$i][$format[$use]['msgtime']]) ? (int) $userData[$i][$format[$use]['msgtime']] : '0',
               'body' => substr($userData[$i][$format[$use]['body']], 0, 65534),
               'ID_MEMBER_FROM' => 0,
               'deletedBySender' => 0,
               'fromName' => htmlspecialchars(substr($entry, 0, -7)),
            );



So, now I have inbox and outbox populated with what I can see is the correct data. Of course the sent PM's that had been deleted by the sender are back in their outbox, but I dont see that as a big issue, they can delete them again.

temp_toName is still in the _personal_messages table
Is it OK to drop this column now?

I think my conversion is complete. YAY!

SleePy

If everything is completed and working fine then you can.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

OK, Ill drop that column.

Thanks again for all your assistance with this.


SleePy

You are welcome

I would suggest though, make a backup of your new SMF database, and then download the one of the upgrade packages for the version of SMF you are using (I assume 1.1). Then just upload the upgrade.php and the two sql scripts.

This will hopefully go through and fix any issues that the conversion might of created and add back any missing indexes hopefully.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: