View Full Version : phpBB2 to 3.03 Migration Issue with Post Table
MrDegree
Sun 14th Nov '04, 4:51am
I have done a new install of vBulletin and I am running phpBB2 2.0.10 (no mods).
Installation and migration went fine without any glitches via the impex API.
However, my thread titles "title" field in the post table is off by one record so I have:
Postid 2 Title = Title from Postid 1
postid 3 Title = Title from Postid 2
Has this been reported any where?
I was thinking of probably dumping the postid and title fields to a new table
do like an update on the postid decrementing the value (ID 2 becomes 1)
Then doing an update from my new table to title updating the new column.
I'm an MS-SQL guy, I have access to phpMyadmin and I noticed there's a little Query Analyzer type of tool there...
Anyone see why I couldn't do this 1-shot fix?
Is this a reported bug anywhere so I don't have to spin my wheels?
Thanks.
All the best,
Steve Machol
Sun 14th Nov '04, 2:04pm
I've helped with a number of phpBB imports and have never run into this problem. Not sure what would cause this. I assume you updated the thread and forums counters after importing, right?
Jerry
Sun 14th Nov '04, 3:46pm
Same here ........ its a new one to me.
Have you trailed a few imports to prove a consistent outcome ?
MrDegree
Sun 14th Nov '04, 5:14pm
Same here ........ its a new one to me.
Have you trailed a few imports to prove a consistent outcome ?
Yes, I've done it 2x now with the exact same issue, I posted my message here after the second time it happened. I rebuilt entities from the utilities and it didn't help but it filled out the stats for the board. The title values are still shifted off by 1 record.
Is there any documentation on the API where I can see if it's an extract or insertion problem? I can look at the code and see where the issue is. Unfortunately I am a MS-SQL developer and I'm still getting the hand of MySQL.
for now I just did:
update post
set title = ''
I guess I can live with that, I have 220 titles that are shifted up 1 record out of 600 posts (the rest were blank anyways).
The main Title of the thread is in the 'thread' table so it doesn't look too bad when people look at the board.
I made my extension table with the fixed postid column but for some reason it doesnt work with his SQL Statement.
update post
set post.title = fixed.title
where post.positid = fixed.postid
I keep getting in phpMyAdmin about it can't find the "fixed" table yet it's there so I don't know. I can do a select * from fixed no problem in phpMyAdmin.
Jerry
Sun 14th Nov '04, 5:29pm
I have just done 3 phpBB imports with the latest version of impex and diffrent versions of a phpBB database and can't re-create this.
Do the post.importpostid and post.title in the vBulletin database match the phpbb_posts_text.post_id and phpbb_posts_text.post_subject in the phpBB database ?
Yes, the API documentation is released with the impex download.
MrDegree
Sun 14th Nov '04, 6:05pm
I have just done 3 phpBB imports with the latest version of impex and diffrent versions of a phpBB database and can't re-create this.
Do the post.importpostid and post.title in the vBulletin database match the phpbb_posts_text.post_id and phpbb_posts_text.post_subject in the phpBB database ?
Yes, the API documentation is released with the impex download.
The post.ImportPostID are all '0's for all 600 records. I just did like a conversion 2x now again and it is the same thing, prior to running the rebuild utils too.
Here are the boards and a thread example, notice the titles of the posts in the same thread of the two boards if you want to see:
vBulletin: http://www.degreeboard.com/Area51/
http://www.degreeboard.com/Area51/showthread.php?t=389
phpBB2: http://www.degreeboard.com/phpBB2
http://www.degreeboard.com/phpBB2/viewtopic.php?t=134
Jerry
Mon 15th Nov '04, 5:40am
Well I can see the miss matching there, though the post_subject for each post is stored in the posts_text table in phpBB and that is retrieved by ImpEx using the post_id.
For it to be able to get the wrong title for a post, it would have to change the post_id between 2 SQL queries, using the same variable.
Also it doesn't look that consistent.
The only thing I can think of right now with out more testing is "loop variable reuse". i.e. as the posts are imported the variable isn't clear each time with new data.
Try adding this :
unset($page_text);
To line 141 of impex/systems/phpBB2/009.php
i.e. just before where it gets assigned.
That will ensure that the variable that stores the title and post text will have to be destroyed and re-created each time.
MrDegree
Mon 15th Nov '04, 1:20pm
Well I can see the miss matching there, though the post_subject for each post is stored in the posts_text table in phpBB and that is retrieved by ImpEx using the post_id.
For it to be able to get the wrong title for a post, it would have to change the post_id between 2 SQL queries, using the same variable.
Also it doesn't look that consistent.
The only thing I can think of right now with out more testing is "loop variable reuse". i.e. as the posts are imported the variable isn't clear each time with new data.
Try adding this :
unset($page_text);
To line 141 of impex/systems/phpBB2/009.php
i.e. just before where it gets assigned.
That will ensure that the variable that stores the title and post text will have to be destroyed and re-created each time.
It doesn't look consistent looking at the titles via the front end. But it really is all shifted up one post, but up one post in the post table means it crosses threads too, not just shifted up 1 record within the same thread.
I have to travel on a Business trip in a few hours, but will try your code snippet on Tuesday evening USA-PST from the hotel.
Thanks for your help.
Best wishes,
Jerry
Mon 15th Nov '04, 2:59pm
It would be intresting to see how it goes as I've not come accross this before !
MrDegree
Sat 20th Nov '04, 6:39pm
Just wanted to follow-up and not leave you hanging. My admins got itchy to do the upgrade so they just did the upgrade without your suggestion. The "go-live" conversion converted with the Titles shifted 1 record once again. We extracted the data from phpBB2 in a working table with the fixed titles and we're planning on doing an update to the post table to fix them. I appreciate your help.
All the best,
Jerry
Sun 21st Nov '04, 8:04am
Most bizarre, I'm glad you got it fixed though.
I wasn't able to re-create it though ........ its going to bug me though, I know that much ! :)
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.