Sequences table not being properly updated.

altf4 - May 30, 2008 - 08:52
Project:vBulletin to Drupal
Version:5.x-1.0
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Liam McDermott
Status:closed
Description

there seems some issue
after Migration is finished ..

all importet threads are not updated anymore

mean if somone post to a importet thread, the new post does not show on the forum pages.

any way to clean this up ?

#1

Liam McDermott - May 30, 2008 - 10:36
Status:active» postponed (maintainer needs more info)

This sounds like a bug. I'm testing on a just-imported vBulletin forum now however, and it's working. What--exactly--isn't updating:

  1. The topic itself (where you read the posts)?
  2. The topic list?
  3. The forum home page?

Did you see any errors when importing the data?

#2

chrism2671 - June 1, 2008 - 09:10

I also have this issue.

When a new post is made in drupal to a thread that was imported from drupal, it doesn't update the "posted xxx ago" on the forum pages (it sticks with the old thread).

Furthermore, when comments is set to flat (i.e. chronological, unthreaded), if a new post is made on an old thread, it appears at the top of the thread, rather than at the bottom, despite displaying the correct date. I'm still trying to track down the source of this problem, however I suspect it is to do with the 'thread' field in the 'comments' table. The imported threads have a thread field that reads like this:

thread
.01/                1st post
.01.01/             2nd post
.01.01.01/          3rd post

whereas new threads have

thread
.01/                1st post
.02/                2nd post
.03/                3rd post

and mixed threads (i.e. the ones with the display problem)

thread
.01/                1st post - vb
.01.01/             2nd post - vb
.02/                3rd post - drupal

The timestamp field appears to be correct, so I'm a little stumpted as to the source of the problem. I'm considering modifying the thread field so that it is all in the new format, but I haven't established whether this will work or not.

Absolute class module by the way, a real gem!

#3

Liam McDermott - June 2, 2008 - 03:42
Assigned to:altf4» Liam McDermott
Status:postponed (maintainer needs more info)» active

When a new post is made in drupal to a thread that was imported from drupal, it doesn't update the "posted xxx ago" on the forum pages (it sticks with the old thread).

Thanks this is what I needed to identify the issue. :)

As for the thread stuff, I knew there was a problem with it, but didn't realise it was this serious. I'll have a look at this at some point, haven't got much time at the moment, patches would be really welcome in the meantime!

#4

chrism2671 - June 2, 2008 - 09:24

Hi Liam,

I've tested the thread order problem I described above by modifying the database directly (in the thread field) to correct the order but it doesn't appear have made a difference- unless I have made a mistake, it would appear that this isn't the source of the issue, although I can't currently say what might be!

I will examine the inside of the comments module to see if I can find out what else it's using to sort comments. Will report back.

#5

chrism2671 - June 2, 2008 - 09:33

OK I've figured out the source of this issue too. The reason is because the comments imported from vbulletin are cid= 1000000,1000001...etc. Replies to these start at 1,2,3...

The comments module, when operating in 'flat' mode (in my case oldest first), sorts old posts from new by sorting on cid, not on timestamp.

This is easily changed on line 992 on comments.module
by changing:

          $query .= ' ORDER BY c.cid';

to

          $query .= ' ORDER BY c.timestamp';

It does leave me slighly concerned as to what happens when the comments cross the 1 million line

#6

Liam McDermott - June 2, 2008 - 23:31

Think I know what the problem is here. There is a sequences table that contains the last post id, vbtodrupal is supposed to update this, but it seems like it didn't in your case.

Rather than hack comment.module, find what the last cid is and update the sequences table manually. Let me know if you need any guidance. I'll set to work, finding out why that table isn't being updated, on this end. :)

#7

Liam McDermott - June 3, 2008 - 07:47
Title:"cleanup" after import» Sequences table not being properly updated.
Status:active» postponed (maintainer needs more info)

I've committed a fix for this. The 6 -dev download -- on the vbtodrupal project page -- should update itself some time in the next 12 hours.

Please mark this issue fixed if it works for you. :)

#8

chrism2671 - June 4, 2008 - 08:54

I'm not sure I can do the vbdrupal import again- I mean, I've already done the import and the site has had a lot of comments on threads since, plus in cases where a vb thread had a poll in it, the fisrt post was deleted and replaced with a poll instead (on drupal), so I had to go around and fix all those. I think the risk of me trying to do the import again is too great!

#9

Liam McDermott - June 4, 2008 - 09:45
Status:postponed (maintainer needs more info)» fixed

You mean you're not doing this on a test site first?! :)

I'm going to mark this as fixed. Re-open if this is still a problem.

#10

chrism2671 - June 8, 2008 - 10:05

Haha life's too short! Live dangerously!

#11

Anonymous (not verified) - June 22, 2008 - 10:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.