XMB-to-SMF converter leaves backslashes

Started by Misanthrope, December 09, 2004, 08:11:04 PM

Previous topic - Next topic

Onsite

I received no errors on the other versions but got a couple with this one...

Converting personal messages... successful.
Converting personal messages (step 2)...Unknown column 'pm.new' in 'field list'Column count doesn't match value count at row 1 successful.
and
Converting attachments...
Error: Could not copy Midwest_Skydiving_Challenge.pdf
successful.


And still nothing is populating the smf_im_recipients table.
All of the u2u meessages appear to have been imported into the smf_instant_messages table though.
There's also a slight problem with the "Last post" column data on the start page, but that will be quickly resolved with new posts.

Thanks for working on this...

[Unknown]


Onsite

Sweet...
That looks like it got the job done. All u2u's are there and viewable.
The last post data is still inaccurate, but that's a non-issue for my use.
I'll go through the rest of the forums later and see if anything is missing or wrong.

Thanks for the help.

[Unknown]

Quote from: Onsite on December 22, 2004, 07:28:19 AM
The last post data is still inaccurate, but that's a non-issue for my use.

Darn, I tried to fix that one too.  How innacurate is it?  Are the posts it names at least in the right board?

-[Unknown]

Onsite

It's actually way off...
It lists users who never even posted in those forums and dates from two years ago.

For example, SlipStream isn't even allowed to post in this forum and the last post was 4 days ago.

January 31, 2003, 10:25:52 pm
in N/A
by SlipStream


[Unknown]

Can you try changing this:

// Make the last topic correct.
$result = mysql_query("
SELECT fid
FROM {$from_prefix}forums");
while ($row = mysql_fetch_assoc($result))
{
$result2 = mysql_query("
SELECT tid
FROM {$from_prefix}threads
WHERE fid = $row[fid]
ORDER BY tid DESC
LIMIT 1");
list ($newTopic) = mysql_fetch_row($result2);
mysql_free_result($result2);

mysql_query("
UPDATE {$to_prefix}boards
SET ID_LAST_MSG = $newTopic
WHERE ID_BOARD = $row[fid]
LIMIT 1");
}
mysql_free_result($result);


To:
// Make the last topic correct.
$result = mysql_query("
SELECT fid, MAX(tid) AS tid
FROM {$from_prefix}threads
GROUP BY fid");echo mysql_error();
while ($row = mysql_fetch_assoc($result))
{
mysql_query("
UPDATE {$to_prefix}boards
SET ID_LAST_MSG = $row[tid]
WHERE ID_BOARD = $row[fid]
LIMIT 1");echo mysql_error();
}
mysql_free_result($result);


Any difference?

-[Unknown]

Onsite


[Unknown]

Grrr.... I wish I had a big enough database to test this with.

I'll stop bothering you, since it's not a huge deal.  I'll have to look at it a bit later.

Thanks again,
-[Unknown]

Onsite

Hey no bother...
I'll keep my XMB database after I go live with SMF, so if you want to test the converter some more I'll be happy to run it for ya.

[Unknown]


Onsite

That worked...
The Last Post column is accurate now.

I did find another bug, if you still want to work them out.
The BB code [align=center][/align] doesn't convert to
.

[Unknown]

 ! The XMB converter now properly parses the [align] bbc tag. (xmb_to_smf.php)

(hopefully...)

Anything else?

-[Unknown]

Onsite

Just ran the new converter and got this error:
Converting polls...
Notice: Undefined offset: 1 in /usr/home/www/htdocs/forum_smf/xmb_to_smf.php on line 853

And the last post column is wrong again.
I'll run the previous converter to see if it works later.

Thanks

[Unknown]


Onsite

Well no errors this time, and the latest posts column is correct, but I checked on some of the old polls and none of the votes or totals converted over.

Onsite

Alrighty....
Here are some more noticed glitches.
  • Only about 60% of the u2u messages are converted
      I just did a convert and 560 out of 1070 where converted, I haven't figured out the pattern yet
  • Any attachments with odd characters like spaces or slashes in the filename are lost
      I went into XMB and renamed them and it worked 100%
  • Forum titles, and signatures still have backslashes
      I posted a request to have the users edit their profiles

Other than the lose of u2u messages it's easy to work around the other problems.
I only have one other account to switch over, so if an updated converter pops up soon I'll wait to see how it works and report back.


[Unknown]

Hmm... u2u... strange.  Is it possible these were in the outbox at all?

Please try the attached.

-[Unknown]

Onsite

Quote from: [Unknown] on January 27, 2005, 09:50:55 PM
Hmm... u2u... strange.  Is it possible these were in the outbox at all?

Yeah I'm not real sure what the issue is.
I see how SMF stores the messages in mysql and that XMB tags an separate id on both incoming and outgoing, but I can't seem to figure out which ones are not converting.
I went into XMB's database and deleted all the messages that where in the outbox, which seems to have fixed the problem.

Advertisement: