I've been working with 4.7 for a while now and noted that my forum posts/messages counts were both 0 and the last post column showed something like a week ago, though I had posts and had posted recently.
Anyway, I installed beta 6 and created a fresh database. At first it looked to be fine. I entered a post, the stats incremented to 1 and the last post date was right (though I didn't do another test after that). Today, after I upgraded Mysql from 5.0.1 to the latest 5.0.18 the counts & date column are once again not updating after entering posts. I can't see why upgrading the database version would affect this.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 54098_last_post_2.patch | 1.9 KB | Zen |
| #5 | 54098_last_post_1.patch | 1.86 KB | dan_aka_jack |
| #4 | 54098_last_post_0.patch | 1.85 KB | Zen |
| #3 | 54098_last_post.patch | 1.84 KB | Zen |
Comments
Comment #1
cagg commentedwell, after some further testing involving creating some posts, the count would only update every 2nd entry or the count would skip one. However after I started deleting posts to check the count decreases I eventually got an db error "Incorrect key file for table './drupal/node.MYI'; try to repair it" so it appears my node table was corrupted. I did REPAIR TABLE and now the count appears to be updating.
However I did note that the "last post" column is showing the oldest post not the most recent as I would expect
Comment #2
thinkling commentedI'd like to confirm this bug.
I'm seeing the post count increment correctly, but the "last post" column sticks to the first post made in the forum and does not update.
I'm running a fresh install of 4.7b6 on PHP 4.4.x, MySQL 4.0.23.
Comment #3
Zen commentedPatch attached:
-solves the last post issue.
-removes unnecessary cruft from the query.
-also removes the pointless if statement at the top of the function.
This function is only called once - by forum_page.
Cheers,
-K
Comment #4
Zen commentedJust checked with Cvbge and pgSQL requires the != 0 in the IF.
updated.
-K
Comment #5
dan_aka_jack commentedI found that this patch output the name of the person who created the node, instead of the name of the user who submitted the last post. I've tinkered and I found that altering this section:
to this:
Fixes the problem.
Thanks,
Jack
Comment #6
Zen commentedOne of the JOINs from the original query that I removed needs to be back. Patch attached. I think I was testing this against the wrong page :S
Thanks Dan/Jack.
-K
Comment #7
Zen commentedComment #8
killes@www.drop.org commentedapplied
Comment #9
Zen commented