News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

phpbb 2.0.16 to 1.1beta4 "shadow post" issues

Started by ThomasJ, September 08, 2005, 01:55:09 AM

Previous topic - Next topic

ThomasJ

I finally got some time to try and convert the first of my phpBB based forums over to SMF again, hoping that the new converter for 1.1 would have eliminated my old problem. Unfortunately i seem to have run into a new one :)

Im fairly confident ive used the latest files, although there is a few different phpbb2_to_smf.sql files floating around here (and ive tried with a few of them)

Quote
Converting ranks...Successful.
Converting groups...Successful.
Converting members...Successful.
Converting additional member groups...Successful.
Converting categories...Successful.
Converting boards...Successful.
Converting topics... Unsuccessful!
This query:

    INSERT INTO `srcweb_shadowrealm`.smf11_topics

    (ID_TOPIC, isSticky, ID_FIRST_MSG, ID_LAST_MSG, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_BOARD, ID_POLL, locked, numReplies, numViews)

    VALUES ('559', '0', '2048', '2075', '505', '214', '3', '', '0', '6', '261'),

    ('560', '0', '2058', '2103', '350', '350', '5', '', '0', '11', '236'),

    ('561', '0', '2067', '2285', '350', '214', '5', '', '0', '27', '1087'),

   ---- [Cut due to post lenght] ---

('585', '0', '2219', '2230', '-1', '1', '3', '', '0', '1', '109'),

('586', '0', '2227', '2250', '101', '214', '3', '', '0', '19', '359'),

('587', '0', '2227', '2250', '101', '214', '3', '', '0', '19', '5'),

('589', '0', '2227', '2250', '101', '214', '5', '', '0', '19', '19'),

('591', '0', '2256', '2287', '518', '518', '5', '', '0', '9', '432'),

   ---- [Cut due to post lenght] ---

     ('1128', '0', '4334', '6737', '1', '940', '15', '', '0', '1', '147'),

    ('1129', '0', '4337', '8577', '925', '1231', '7', '', '0', '8', '633'),

    ('1130', '0', '4340', '4345', '927', '1', '3', '', '0', '1', '131'),

    ('1131', '0', '4341', '4371', '928', '928', '5', '', '0', '6', '207');

Caused the error:

    Duplicate entry '2250-3' for key 2

Any help is appreciated :)
Whoops! Did i break that?

ThomasJ

Ok. Ive gotten some pointers from a kind community member :) and have dug around a bit.

The offending topics, or topic rather is a single topic that has been moved twice.
This results in 3 posts whos topic id's are respectively: 586, 587 and 588, where 586 is the original post, and 587 and 588 are so called "shadow posts" left in the old forum location to point to the new location. All 3 topic id's of course have the same topic_first_post_id (2227).
Oddly enough however, it seems the converter is complaining about topic_last_post_id which is 2250 for the actual topic and the 2 shadows.

Any chance of getting an update that can handle shadow posts or do i have to do a manual prune of all shadow posts?
Whoops! Did i break that?

[Unknown]

In the phpbb2_to_smf.sql file, find:

FROM {$from_prefix}topics AS t
LEFT JOIN {$from_prefix}posts AS p ON (p.post_id = t.topic_last_post_id)
LEFT JOIN {$from_prefix}vote_desc AS v ON (v.topic_id = t.topic_id)
GROUP BY t.topic_id
HAVING ID_FIRST_MSG != 0
AND ID_LAST_MSG != 0;


Replace:

FROM {$from_prefix}topics AS t
LEFT JOIN {$from_prefix}posts AS p ON (p.post_id = t.topic_last_post_id)
LEFT JOIN {$from_prefix}vote_desc AS v ON (v.topic_id = t.topic_id)
WHERE t.topic_moved_id = 0
GROUP BY t.topic_id
HAVING ID_FIRST_MSG != 0
AND ID_LAST_MSG != 0;


-[Unknown]

ThomasJ

Whoops! Did i break that?

msibm


Advertisement: