PDA

View Full Version : [FIXED][3] in split thread function (postings.php)


Mystics
Sun 15th Dec '02, 5:52pm
Hi,

one of our members reported the following problem:

If you split a thread and automatically move the new thread to an other forum, the last post info of the old forum doesn't get updated.

So if the splitted thread was the newest thread in the old forum, you only get an error when you try the "Go to last post"-function (because the last post info is outdated).

One possible solution:

Edit postings.php and find: if ($newforumid!="") {
$threadinfo[forumid] = $newforumid;
}Replace it with: if ($newforumid!="") {
$oldforumid = $threadinfo[forumid];
$threadinfo[forumid] = $newforumid;
}Then look for (in the same function): updatethreadcount($threadid);
updatethreadcount($newthreadid);
updateforumcount($threadinfo[forumid]);and add below it: if ($oldforumid > 0) updateforumcount($oldforumid);Mystics

Brad.loo
Mon 16th Dec '02, 7:14pm
is this a confirmed bug in 2.2.9?

Mystics
Wed 25th Dec '02, 5:12pm
OK, after 10 days of waiting:
*bump* :rolleyes:

Mystics
Sun 5th Jan '03, 11:34am
OK, last bump before I give up :rolleyes:

Steve Machol
Sun 5th Jan '03, 1:18pm
I couldn't duplicate this problem in my unhacked 2.2.9 test forum.

Mystics
Sun 5th Jan '03, 1:34pm
Originally posted by Steve Machol
I couldn't duplicate this problem in my unhacked 2.2.9 test forum. I can duplicate this in every forum I want... ;)

1. Make 2 Forums, Forum1 and Forum2.
2. Open a thread in Forum1 at 06:00pm
3. Answer to this thread at 07:30pm.
4. Split this thread by moving the second posting (your answer) to Forum2
5. After that, Forum2 has got a new lastpostinfo: 07:30pm
6. But Forum1 also has this lastpostinfo 07:30pm. Correct would be 06:00pm

I even have tested this right now in the vbulletin.com Admindemo...(Yes, I know that this is vB 2.2.7.....it works in every version....)
http://www.vbulletin.com/admindemo/index.php?s=

Maybe it's still there if you look fast enough :D
Forum1 & Forum2 have both the lastpostinfo 05:31 PM (Forum1 should have 05:30 PM.......and the post number of Forum1 ist (of course wrong, too!))

The "Go to last post" Link of Forum1 only results to this message:
No thread specified. If you followed a valid link, please notify the webmaster

Mystics

Steve Machol
Sun 5th Jan '03, 1:46pm
Hmmm...this only seems to happens when the times on the two posts are different. The first time I tried it, the times were the same and it worked like it should. This time I waited a minute before making the reply and was able to duplicate the problem.

Moving to Bugs.

Paul
Sun 5th Jan '03, 2:04pm
Originally posted by Steve Machol
Hmmm...this only seems to happens when the times on the two posts are different.

Well duh ;)

Steve Machol
Sun 5th Jan '03, 2:07pm
Why 'duh'? This does not seem to be an obvious conculsion to me.

Mystics
Sun 5th Jan '03, 2:10pm
Hm, I think we also found a bug in vB3 ;)

http://people.freenet.de/vbhacks/vBBugs.gif

My thread is shown twice (same threadid)!?

@Steve Machol
IMO it should happen always, even with the same time you can see the wrong "Posts in Forum"-Value.

Steve Machol
Sun 5th Jan '03, 2:15pm
Honestly, in my first test the post tuimes were the same (I posted the reply immediately after the new thread) and everything worked just as it should. However based on your follow-up message I did another test in which I allowed at least a minute to elapse between the two posts and this time I duplicated the problem.

Paul
Sun 5th Jan '03, 2:16pm
Originally posted by Steve Machol
Why 'duh'? This does not seem to be an obvious conculsion to me. Hi Steve,

Saying it "only happens" when posts are at a different time is a bit of an illusion. The information is not being updated regardless, however you don't notice the problem unless posts were made at significantly different times.

Comparing unix timestamps or adding seconds to the time display would show the problem more clearly.

Therefore, 'duh' ;) No offense or anything.

Best wishes,
Paul

Steve Machol
Sun 5th Jan '03, 2:20pm
But the issue is that in my first test the 'Go to last posts' links worked exactly as they should - each one went to the post it was supposed to. In the second test with different times, I got the 'Invalid thread' error just as Mystics predicted.

Given the differences in how this bug manifested itself, I still don't see how this is a 'duh' situation. ;)

Mystics
Sun 5th Jan '03, 2:34pm
Originally posted by Steve Machol
But the issue is that in my first test the 'Go to last posts' links worked exactly as they should - each one went to the post it was supposed to. IMO because the lastpost-function is very tolerant:[...]AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");So if your reply was within 30 seconds after the thread start, everything is ok (aside the value of the posts number) :rolleyes:

OK, I think now we have analyzed the bug enough :D

Mystics

Erwin
Mon 10th Feb '03, 8:10am
This is a great fix. I've had this problem for a while when removing individual posts from threads, with the last poster details not being changed. Thanks for the fix! :)

Boofo
Fri 14th Mar '03, 2:07am
This is a great fix. I've had this problem for a while when removing individual posts from threads, with the last poster details not being changed. Thanks for the fix! :)

Erwin, where were you with this fix info on vb.org when I was having this same problem a few weeks ago? ;)

Erwin
Sun 16th Mar '03, 9:06pm
Erwin, where were you with this fix info on vb.org when I was having this same problem a few weeks ago? ;)

I just saw this. LOL! I can't remember what fix is from where for what... if you know what I mean. :)