Notifications
Clear all

wpForo 1.x.x [Closed] Unread topics

20 Posts
5 Users
0 Likes
765 Views
Posts: 10
 Bono
Topic starter
(@bono)
Active Member
Joined: 3 years ago

We have some troubles with topics already read

The span.wpf-new-button showing if there is a new post since last topic visit is "reset" every week for all our topics...

It's difficult to know where is the problem as it is not so evident to describe

 

Do you have any idea about this problem ? Is it linked to cookies settings ?

Thanks in advance

19 Replies
Robert
Posts: 10498
Admin
(@robert)
Support Team
Joined: 8 years ago

@bono,

Please click the [Mark all read] button located in the forum footer and check it again in a week.

7 Replies
 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@robert Thanksss but we disabled this button as some users got some troubles with topics completely re initialized to "unread topics" and all the markers are lost 

So it's not possible to reach the last post read, when they open these topics, they are only redirected to the first post

 

Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 986

@bono,

Please enable and click it. This is a very important button and this doesn't have any issue in current version.

 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@martin I tried... but in the "Recent topics" view we still have the same problem, some topics currently viewed are re initialized and the link which enable to go to the last viewed post does no longer work...

We can't reach the last post viewed and we are sent to the first post of the topic

We have 2 forums, for test and for our prod

In the test forum, wpforo is up to date with 1.9.9 version...

You can see and test just here : link

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10498

@bono,

I just checked and didn't find any issues. All topics work fine, the [new] indicator is removed when I read  the topic. And all [new] indicators have been removed once I clicked the [Mark all read] button.

 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@robert yes, this scenario works for the main forum

But after clicking the "Mark all read button" if you click on "Sujets récents" (Recent topics) option menu, the [new] indicator is reset (as you can see we customize this label, just showing the number of unread posts)

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@bono,

The core function works in the same way for all pages. It's not possible to have different result on different view. However, I see different behavior on different pages, this means you've done some customization in the core or in the template files. I also see a different view of the [new] indicator. So you should find the developer who does this customization and try to fix the issue. It's better to clone the website (using the Duplicator plugin) and test it with the vanilla wpForo files.

 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@chris I worked on these improvements but I haven't modified the core, just the php code where the "new" label was displayed

 

The problem is for some topics, as in our forum we have thousand topics and when new ones are created and read, all our users have troubles concerning "previous" read topics which are totally reset and the "last post read" is not retrieved

 

Is there a limit in the database concerning the number of read topics saved ?

it's difficult to find in the code where the "read topics" are managed to understand why we face this problem

May you give us the php or js files concerned and if possible the methods 

 

Thanks in advance

Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

@bono,

Please try deleting the cache and exclude wpForo from the cache plugin, Please check the topic below:

https://wpforo.com/community/faq/wpforo-and-cache-plugins/

If this would not help you, please make a video where we can see the problem you have and give us admin credentials that we could find a solution and send the admin credentials to info[at]gvectors.com

 

10 Replies
 Befa
(@befa)
Joined: 3 years ago

New Member
Posts: 3

@chris Hello, I'm working with @Bono to try to maintain our forum.

I can confirm we have wiped the cache and excluded the forum from our cache plugin so the problem doesn't lie there.

In our forum we have tons of threads and tons of messages in each. Could it be that when you create/update the cache file for each user there is some overflow that crops the array of data loaded into the cache file?

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

Hi @befa,

For now, we have two types of cache, Cache from a plugin for WordPress and wpForo built in cache.

WordPress cache plugins can't cache wpForo forum page, because wpForo is not based on WordPress Custom Post Types and those plugins have no idea what they should cache and what not.

These plugins cache the whole forum page and always display the same content. You'll not be able to see new topics and posts information. And all other information on forum page cannot be updated, because of cached/static forum page. You'll always see outdated and wrong information. 

But wpForo built-in cache system does a very well cache for your forum, so it doesn't need other cache plugins, and it works as you mentioned above.

 Befa
(@befa)
Joined: 3 years ago

New Member
Posts: 3

Hey @chris  thanks for answering.

We already took care of removing the forum from our wordpress cache system, so there is no issue related with other cache system messing with the files.

But we still experience our issue.

As mentioned before this isn't happening on our test forum where we have few topics, but only on the production one where we have thousands of topics. And since this issue doesn't seem to happen on some other forums we were wondering if it could be related to the huge amount of topics we have here. 

Correct me if I'm wrong but actually your cache data in wp-contents/uploads/wp-foro/cache/item/ where you store serialized array of data. I am not aware of any limitation on serialization but maybe I'm missing something here which could cause the array to be truncated before being serialized?

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10498

@befa,

Again, I'd ask you to enable the wpForo footer and click the [Mark all read] button.

Also, if we cannot see the issue in the test website, then please provide with the live website URL.

 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@robert the main forum is https://tennis2table.com/forum/

I enabled the footer link => "Mark all read"

When we click, no problem all topics are set as read, but when someone add a new post in any topic, the number of "posts read" is reset, even though just before clicking on the "Mark all read" we were reading this topic

Sometimes, when we read a new topic or a topic never read before, another topic get its "number of posts read" reset

As we have thousand topics, is there any limit of number of topics with posts read ? In the cache ? In the database ?

Thanks in advance

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10498

@bono,

I think this is a cookie conflict. Some plugin manipulates with cookies and affects wpForo cookies. It's hard to register in your website, so I have to ask you to register a simple user and leave the login details here. I've set this topic as private.

 Bono
(@bono)
Joined: 3 years ago

Active Member
Posts: 10

@robert I don't really understand this cookie conflict... For a simple user, you can create one on our forum

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10498

@bono,

The read/unread data initiation comes from the cookies. wpForo has wpf_read_forums and wpf_read_topics cookie variables, they contain data of current user, so if the cookies are conflicted and reset then the read/unread tracking will be stopped.

Also, you should make sure the wpForo Cookies are not disabled in Dashboard > Forums > Tools > Privacy and Rules tab.

 Befa
(@befa)
Joined: 3 years ago

New Member
Posts: 3

@robert Hello, just a quick comment on this bug since we came back to fix it few weeks earlier.

As we suspected it was definitely connected to a certain amount of messages in our forum. We finally found out that you hardcoded in wpf-includes/class-logs.php to 100 the number of messages which are loggued and marked as already read...

If you really need to fix the maximum number of logged posts, this "feature" should be defined in some configuration file and not directly hardcoded in the PHP class file in my opinion.

 

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10498

@befa,

It's not hard-coded. It's passed through filter hook:

$max = apply_filters( 'wpforo_max_logged_topics', 100 );

I assume you know how WordPress hooks work and how easy to change the values passed through filter hooks: https://www.wpbeginner.com/glossary/hooks/