Advertisement:

Author Topic: YABb 2.1 conversion errors  (Read 61901 times)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: YABb 2.1 conversion errors
« Reply #80 on: September 08, 2008, 11:29:41 PM »
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
Support the SMF Support team!
Profiles:
GitHub

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #81 on: September 09, 2008, 12:04:06 AM »
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........

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #82 on: September 09, 2008, 12:06:00 AM »
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.........

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #83 on: September 09, 2008, 12:21:58 AM »
Yeah that was it.

Got froms in messages and in all database records now.

Still getting
Quote
Notice: 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

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #84 on: September 09, 2008, 01:09:22 AM »
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


Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: YABb 2.1 conversion errors
« Reply #85 on: September 09, 2008, 01:35:08 PM »
Those errors shouldn't cause an issue, but I fixed them just in case.

Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #86 on: September 09, 2008, 09:26:51 PM »
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.....

Quote
if (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!

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: YABb 2.1 conversion errors
« Reply #87 on: September 11, 2008, 10:40:00 PM »
If everything is completed and working fine then you can.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline vfrjon

  • Semi-Newbie
  • *
  • Posts: 56
Re: YABb 2.1 conversion errors
« Reply #88 on: September 11, 2008, 10:52:37 PM »
OK, Ill drop that column.

Thanks again for all your assistance with this.


Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: YABb 2.1 conversion errors
« Reply #89 on: September 11, 2008, 11:22:55 PM »
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
Support the SMF Support team!
Profiles:
GitHub