ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: Antechinus on March 23, 2017, 07:25:40 pm

Title: Latest post on board index: borked in 1.09
Post by: Antechinus on March 23, 2017, 07:25:40 pm
Screenshot attached. It's a weird one. Any ideas?
Title: Re: Latest post on board index: borked in 1.09
Post by: sherif on March 23, 2017, 07:55:32 pm
Are you talking about the same issue discussed here : Forum Index Display (http://www.elkarte.net/community/index.php?topic=4316.0) ??
Title: Re: Latest post on board index: borked in 1.09
Post by: ahrasis on March 23, 2017, 08:42:39 pm
I think his talking about the avatar which is not uninanimous in size.
Title: Re: Latest post on board index: borked in 1.09
Post by: Antechinus on March 23, 2017, 09:24:44 pm
No. I am talking about the latest post in the info centre.

The two orange arrows point to that post: once in the info centre, and once in the actual board.
The blue arrow points to a post which was made much later than that.
That later post should be showing in the info centre, but isn't.

This is borken. :)
Title: Re: Latest post on board index: borked in 1.09
Post by: ahrasis on March 23, 2017, 09:26:02 pm
Oo ok then. It's clearly broken.
Title: Re: Latest post on board index: borked in 1.09
Post by: emanuele on March 24, 2017, 05:53:04 am
IIRC it was discussed at least another 3 or 4 times, and each time the answer is  always the same: cache.
Title: Re: Latest post on board index: borked in 1.09
Post by: Antechinus on March 24, 2017, 07:35:39 am
Ok, that's all cool and groovy, but the result is still that you have a so-called latest post feature which doesn't do what it says on the tin. It's always lagging behind the actual latest posts. It's something that should not be cached.

IOW, it's borked.

So, wotcha wanna do about it?
Title: Re: Latest post on board index: borked in 1.09
Post by: emanuele on March 24, 2017, 08:20:17 am
/me doesn't care. :P
Title: Re: Latest post on board index: borked in 1.09
Post by: Antechinus on March 24, 2017, 02:46:19 pm
Ok. :D I can dig that.

In that case, since it doesn't work and you don't care about it, wouldn't the sensible option be to just remove the bloody thing? That way there is no debugging to worry about, and you have less crud to deal with.
Title: Re: Latest post on board index: borked in 1.09
Post by: Frenzie on March 24, 2017, 03:26:08 pm
Or you could just rename it to "one of the latest posts" :P (Not caching it seems like a bit of a wasted query. Basically you just need to flush the cache when a new post is made. But maybe that's much easier said than done?)
Title: Re: Latest post on board index: borked in 1.09
Post by: emanuele on March 24, 2017, 06:03:17 pm
No, wait, I do not RC: the issue is that usually the one complaining is ignoring the board.
If the board is ignored, it doesn't count towards the "latest post/s" and so it happens that you have results like that.
Title: Re: Latest post on board index: borked in 1.09
Post by: Antechinus on March 24, 2017, 07:41:58 pm
Not the issue in this case. I didn't have those boards on ignore.

I did have a couple of whole categories collapsed on the board index, but that was all.
Title: Re: Latest post on board index: borked in 1.09
Post by: live627 on March 25, 2017, 04:59:24 am
QuoteNo, wait, I do not RC: the issue is that usually the one complaining is ignoring the board.
wutevah you say, bozz....
Title: Re: Latest post on board index: borked in 1.09
Post by: emanuele on March 25, 2017, 09:22:02 am
This is the relevant code:
			// Determine a global most recent topic.
if ($this->_options['set_latest_post'] && !empty($row_board['poster_time']) && $row_board['poster_time'] > $this->_latest_post['timestamp'] && !$ignoreThisBoard)
$this->_latest_post = &$this->_current_boards[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'];

if:
the latest_post is show, and
there is a poster_time associated to the latest post of a certain board, and
this poster_time is higher than the previous latest_post found, and
the board is not in ignore[1]
Code: [Select]
$ignoreThisBoard = in_array($row_board['id_board'], $this->_user['ignoreboards']);

then that post from that board becomes the next latest post.
This is inside the loop that populates the board index list.
I tend to think the only thing that could fail is the ignored board, because the time is show on both the posts, but it's there.

I spent also a bit of time following in real time the forum, and as expected the "recent posts" list is slightly slower to catch up (cache), but the latest post is always correct.
Dunno.
If you can identify a series of steps to reproduce the issue it would be best. :D
$ignoreThisBoard is set as
Title: Re: Latest post on board index: borked in 1.09
Post by: Antechinus on March 25, 2017, 05:05:03 pm
I don't have any boards on ignore. I'm not use what information would be useful here. It's just a forum with a bunch of boards, and the info centre "latest" lags behind by a substantial margin at times.

The recent posts don't lag. They work as they should.

If it helps: the caching is set to Level 1, file based. The server supports XCache, but that option is not currently selected in admin.