Support Forum

Mark all topic as read function

WE Weltall
Weltall
Member

Hi there

I have a little issue with mark all topic as read function. There are 2 kind of users on my forum:

1- users where the function works smoothly but icons turn off only after page refresh (work as intended?)

2- users where the function doesn’t work at all

What could be the problem?

20 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

1- users where the function works smoothly but icons turn off only after page refresh (work as intended?)

What icons?

2- users where the function doesn’t work at all

What sort of users? What do they have in common?

WE Weltall
Weltall
Member

Hi, I mean the forums icons. I have grey icons when there are no new message in forum, and colored ones when there are new messages.

I edited the first message with additional informations, please take a look

YS Yellow Swordfish
Yellow Swordfish
Member

Yes – it needs a page reload. That is something we are taking a closer look at at some point soon although it may not change, We do change the main icon for reference.

I see no edits on the first post so the second question still stands…

WE Weltall
Weltall
Member

Oh sorry, i didn’t sumbit other infos xD

Okay, this example:

I have 30 unread message on forum, then click on mark all posts as read, the counts shows me 0. When I refresh page, I have 6 unread message (down to 30), i press mark all post as read, the counts drop to 0 again. After page refresh, i have again 6 unread messages, and they won’t go lower.

This is totally random, since sometimes it refresh correctly and keep 0 messages, other times It has the above behavior.

The tests are run all from admins who can read all forums

YS Yellow Swordfish
Yellow Swordfish
Member

The answer I was after is that these users are all admins.

So you are probably using the SP Admin Bar plugin which creates the Admin ‘PostBag’. It means that the 6 posts you see remaining after the refresh are held in the postbag and still need your attention. They will be in the admin bar list and need marking as read or dealign with in any other way. Possibly need approval.

Non admins will not have this facility of course.

WE Weltall
Weltall
Member

I did few other tries.

First I empty admin post bag, then mark all topics as read, then refresh. I have 0 posts in admin post bag, but the counter still say me 8 message unread.

Then, I just deactivated admin bar, marked again all topics as read, refresh and still 8 unread messages

WE Weltall
Weltall
Member

Also other non admin users have this problem by the way

YS Yellow Swordfish
Yellow Swordfish
Member

OK – here is what you do. Next time you believe you see this anomaly.

  1. Go to forum admin > toolbox > error log: Clear the error log from the button at the bottom.
  2. Load a forum page and click on the ‘mark all as read’ button.
  3. Back to the error log – refresh. Are there any errors? As it clearly states, errors are shaded pink. And Warnings are yellow. Any of either? And please – ignore the notices (blue).
  4. If errors – then paste them here.

It goes without saying that we have no other reports of this behaviour at this time and I certainly can not replicate any issues on test and our live sites.

WE Weltall
Weltall
Member

Ok. Seems no error, just 3 notices. The first one appears only when I press on mark as read.

maggio 5, 2015 1:53 pm | spaErrNotice | 1 | php

file: /simple-press/forum/content/classes/sp-forum-view-class.php
line: 526
function: sp_forumview_query
Notice | Undefined offset: 1

maggio 5, 2015 1:54 pm | spaErrNotice | 8 | php

file: /wordpress/wp-content/sp-resources/forum-plugins/topic-redirect/library/sp-redirect-components.php
line: 23
function: sp_do_redirect_groupview_records
Notice | Trying to get property of non-object

maggio 5, 2015 1:54 pm | spaErrNotice | 8 | php

file: /simple-press/forum/content/classes/sp-group-view-class.php
line: 473
function: sp_groupview_query
Notice | Undefined variable: s

As additional information, It seems (but i need more tests) that the numbers of unread messages are the same amount of messages in the admin postbag (a little odd since this happens also with normal users). That count remains still even if I empty the admin postbag. After some time, the if there are no new messages, the count drops to 0.

Example:

10 unread message, 5 message in postbag. After marking all topic/postbag as read ->

5 unread message, even if postbag is empty.

If I go to forum after few hours, the count is 0

IK Ike
Ike
Member

I’m not sure if it’s been asked before, but are you using any caching plugins?

WE Weltall
Weltall
Member

Hi

I’m using WP super cache, but I didn’t included /forum/ to be cached. Also, my cache refresh once every 24h, so if anything on forum would cached I think i would have huge problems..or not?

Also, i’m using cloudflare as CDN

IK Ike
Ike
Member

I think on the whole yes, it would be more noticeable. But I’ve seen it before where people just report a slight delay in some things, not everything.

So, I guess it might be worth disabling for a while to see if it’s that. How did you exclude the forum?

WE Weltall
Weltall
Member

There are some options in the WP super cache plugin where i can add paths that I don’t want to cache.

I disabled cache plugin now, I will give feedback asap

WE Weltall
Weltall
Member

I just tested without cache plugin and after deleting all the cached files.

The problem is still there.

Some users noticed that the messages that keep showing in the count have a negative timer.

This could explain why in few hours the previusly marked as read posts get read status.

Could be this the problem?Immagine-1.jpg