ElkArte Community

Project Support => Support => Topic started by: Jorin on June 03, 2018, 01:55:32 am

Title: [1.1.3] unread and unread replies
Post by: Jorin on June 03, 2018, 01:55:32 am
On my mobile action=unread and action=unreadreplies is reversed.

The right icon should show unread replies and the URL is action=unreadreplies, but it shows only unread posts from topics I never posted in. The second icon from the right shows unread replies to my posts, but the URL is action=unread.  :o

Yes, I am totally sure that the second icon from the right shows the unread answers to my posts!  ;)

Edit: On my desktop I can't test right now, but I will keep an eye on it. On my desktop the same. The both buttons are reversed.
Title: Re: [1.1.3] unread and unread replies
Post by: Spuds on June 03, 2018, 08:17:39 am
I have not seen that behavior, but @emanuele noted a bug with this function for forums with > 100K posts which I believe yours does.

Could you try an experiment for me?  in Unread.class.php (sources/subs),  make this change
Code: (find) [Select]
			$board = !empty($this->_query_parameters['boards'][0]) ? $this->_query_parameters['boards'][0] : 0;
Code: (replace) [Select]
			$board = !empty($this->_query_parameters['boards'][0]) && count($this->_query_parameters['boards']) === 1 ? $this->_query_parameters['boards'][0] : 0;
I know that is one bug but don't know if its the only one.
Title: Re: [1.1.3] unread and unread replies
Post by: Jorin on June 04, 2018, 02:31:50 am
With this new code the problem is solved, thanks!  :)
Title: Re: [1.1.3] unread and unread replies
Post by: Spuds on June 04, 2018, 08:34:31 am
@emanuele do you want to include this in 1.1.4 ?
Title: Re: [1.1.3] unread and unread replies
Post by: emanuele on June 04, 2018, 09:33:02 am
Sure, why not! :D
Title: Re: [1.1.3] unread and unread replies
Post by: Jorin on June 07, 2018, 02:29:59 am
Can it be the problem is back again after a view days now? It seems so, but I have to investigate further to be sure.

Edit: Yes, it is back. Your code is still in the file. But look at the screenshots and their names...
Title: Re: [1.1.3] unread and unread replies
Post by: Spuds on June 07, 2018, 09:29:33 am
Is it just a template error where the little speech bubble is not shown when it should be ??
Title: Re: [1.1.3] unread and unread replies
Post by: Jorin on June 07, 2018, 09:53:06 am
On June 3rd definetely not just the template. Today I have to wait till more posts are made at my board to be clear.
Title: Re: [1.1.3] unread and unread replies
Post by: radu81 on June 07, 2018, 11:32:00 am
@Jorin‍ check also if unread replies are working fine on your forum
Title: Re: [1.1.3] unread and unread replies
Post by: Jorin on June 07, 2018, 04:11:44 pm
Okay, this is very strange.  :o

Earlier this day both lists looked the same with the same threads. I answered all of them some day, so the lists are exactly the same.

Now the lists are different. "New posts" shows more threads (6 to be exact) then before, but in all of them I answered someday. "New replies" shows 9 threads, and I answered in all of them some day. All 6 threads listed under "new posts" are listed under "new replies" too. All of the listed threads include new posts since my last visit.
Title: Re: [1.1.3] unread and unread replies
Post by: radu81 on June 07, 2018, 05:03:06 pm
after updating to 1.1.3 unread replies was not working on my forum (it only showed unread replies from 1 topic). I guess this would be fixed in 1.1.4

=== edit ===
https://github.com/elkarte/Elkarte/issues/3198
Title: Re: [1.1.3] unread and unread replies
Post by: emanuele on June 07, 2018, 05:41:25 pm
@radu81 would you mind trying the change suggested above in place of the workaround I sent you by PM?
Title: Re: [1.1.3] unread and unread replies
Post by: radu81 on June 07, 2018, 05:45:04 pm
just replied on github: https://github.com/elkarte/Elkarte/issues/3198#issuecomment-395574535
I removed the quick fix you suggested, and with the solution posted by Spuds seems to work, but I will confirm in the next days. I don't have many unread replies now.
Title: Re: [1.1.3] unread and unread replies
Post by: emanuele on June 07, 2018, 06:01:15 pm
I get the email just after posting here. :D
Title: Re: [1.1.3] unread and unread replies
Post by: Jorin on June 12, 2018, 01:11:26 am
Since two or three days both lists seem to work fine and show the correct results. I didn't change anything since June 3rd though.  :o
Title: Re: [1.1.3] unread and unread replies
Post by: emanuele on June 12, 2018, 02:29:55 am
https://www.youtube.com/watch?v=m9We2XsVZfc