MyBB Community Forums

Full Version: My forum post view count is zero, help me solve it please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(2021-09-20, 09:28 PM)Laird Wrote: [ -> ]
(2021-09-20, 09:19 PM)obeyafriday Wrote: [ -> ]Damned it!!!!!

Does that mean no one here who can help me fix this issue?  Or my English language is not clear enough?

Huh? Nixer55 offered a thoughtful observation and asked you some relevant questions. Why didn't you answer them?

(2021-09-20, 09:19 PM)obeyafriday Wrote: [ -> ]OK, help me this way, where and how in the whole code of mybb forum can I edit this code: UPDATE mybb_forums SET usepostcounts = '0';
As you can see, where you are seeing 0 needs to be changed to 1 for the view on each thread to work normally.

I want to edit that code, where can I locate and edit it please?

Thanks

That query will not help fix the problem. That usepostcounts column of the mybb_forums table determines whether posts in the given forum contribute to the poster's post count, not to the thread's view count. It is the latter that you seem to be having a problem with, not the former.

OK, I understand you. How can I fix this issue please?
See the screenshot of the issue below. The views always remain zero.
(2021-09-20, 09:49 PM)obeyafriday Wrote: [ -> ]How can I fix this issue please?

You can start by answering nixer55's questions...
(2021-09-20, 10:57 AM)nixer55 Wrote: [ -> ]You mention visitors.  Do you mean guests?  Visited your board as a guest - but didn't notice any increase in views of the threads I opened - even after a hard page refresh.

What are your settings for Increment Thread View Count on Guest Visits in config Show Thread Options?

All the settings are set to "Yes" but it still doesn't work.
See the screenshot of the issue below
(2021-09-20, 09:58 PM)obeyafriday Wrote: [ -> ]All the settings are set to "Yes" but it still doesn't work.

Please share a screenshot of the last fivefour settings in the ACP Configuration under Show Thread Options: that is, the settings from Delayed Thread View Updates down to Increment Thread View Count on Thread Author Visits?.

(2021-09-20, 09:58 PM)obeyafriday Wrote: [ -> ]See the screenshot of the issue below

Yes, you've shared that image with us multiple times already. There's no need to share it again.
(2021-09-20, 10:04 PM)Laird Wrote: [ -> ]
(2021-09-20, 09:58 PM)obeyafriday Wrote: [ -> ]All the settings are set to "Yes" but it still doesn't work.

Please share a screenshot of the last fivefour settings in the ACP Configuration under Show Thread Options: that is, the settings from Delayed Thread View Updates down to Increment Thread View Count on Thread Author Visits?.

(2021-09-20, 09:58 PM)obeyafriday Wrote: [ -> ]See the screenshot of the issue below

Yes, you've shared that image with us multiple times already. There's no need to share it again.
Here is the screenshot of the settings:
(2021-09-21, 12:18 AM)obeyafriday Wrote: [ -> ]Here is the screenshot of the settings

Thank you!

This is kind of speculative, but does changing "Increment Thread View Count on Spider Visits?" from "No" to "Yes" resolve the problem for you?

If so, we will need to investigate why.
I have done so but it still doesn't work.
This issue makes my forum looks useless somehow.
It doesn't motivate me to make more posts, because it looks as if no body is visiting the site.

I thought maybe it was a theme problem, I changed it to mybb default theme, still it is not working.
What else can I do to solve this issue please?

Can any of the admins help me forward this issue to a higher support room please?
Kindly check my forum and see what I am saying.

Thanks.
Go to ACP > Configuration > General Configuration > set Disable All Plugins to yes. I remember a problem from about 10 year ago of a plugin preventing views increasing but can't remember which one it was.
(2021-09-21, 11:14 AM)Matt Wrote: [ -> ]Go to ACP > Configuration > General Configuration > set Disable All Plugins to yes. I remember a problem from about 10 year ago of a plugin preventing views increasing but can't remember which one it was.

OK, Thank you sir,

(2021-09-21, 11:14 AM)Matt Wrote: [ -> ]Go to ACP > Configuration > General Configuration > set Disable All Plugins to yes. I remember a problem from about 10 year ago of a plugin preventing views increasing but can't remember which one it was.

Sir, I have done exactly what you said but I doesn't solve the problem. See the screenshot of all the plugins, I disabled them all but, no positive result.

Sir, you were once mentioned of editing this or similar code: UPDATE 
mybb_forums
 SET 
usepostcounts
 = '0'; to change the zero to "1" . where can I do the settings please? Direct me on how to locate this code, maybe the issue will be solved by changing the zero to 1.

Thank you sir.
On your server is easiest, especially if your host provides cPanel access.
Log in to your accounts cpanel, start up phpmyadmin, select your database, select the table, mybb_forums.

Browse first, look at the values for usepostcounts. If it's already set to 1, there's nothing to change.

Otherwise, click the SQL tab and enter your update query.

UPDATE mybb_forums SET usepostcounts = 1;

There will be an button to SIMULATE QUERY so you can see how many records will be changed. If all is as you expect, click the Go button to make it happen.

All that said, I don't believe you will fix your problem that way. Your problem is views, not post count.
The new 1.8.27 added some conditionals that influence the forum view count.
I'm still on 1.8.26 and do not have experience with the new settings yet.

I observe that, with 2 exceptions, all threads in NEWS DEPARTMENTS forums created or posted to before 9/16 approximately 12:54pm have view counts. Threads and posts after that date have zero views. Something changed on that date. Whether it was a plugin or something else, I can't see. But there's your first clue. I did not continue to look in the other forum groups.

Your next clue might be in seeing what core files have been changed. (whether a manual edit or changed by a plugin). AdminCP / Tools and Maintenance / File Verification.

Your next answer might be from asking of the community in general "Has anyone seen the view count not change in forumdisplay with a new installation of 1.8.27?"

I can't answer that, I have not yet updated.

Finally, I also observe that guest views don't count, but neither do member views. I signed up, viewed the truck overturn news item, replied to the thread, and the view count did not change.

So, if file verification shows no changes to forumdisplay.php or showthread.php, then the only other place I could think is in the templates.

AdminCP / Templates and Style, click Templates, then tab Find Updated Templates. Look for forumdisplay_thread in your current theme. If it is not listed there, then it is most likely unchanged. But you could go and look at its coding. You're looking for 2 lines similar to

	<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a>{$unapproved_posts}</td>
	<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>

{$thread['views']} is the variable that shows the thread views currently being counted.

Since some older thread views are not zero, then the template is most likely ok.

Showthread.php is where the views count gets updated.

In AdminCP / Configuration / Show Thread Options, what is your setting for Delayed Thread View Updates? Is it On or Off? Set it to Off. If it is On, thread view update occurs every 15 minutes with the Task Manager / Thread Views.

If it is supposed to update as a task, and your theme has been edited to delete the required code at the bottom, then the task is not running, hence no update.

Try this as a double check. AdminCP / Tools and Maintenance / Task Manager / Scheduled Tasks, locate Thread Views task and click the associated Run Task link. View the forum to see if it updated.

If that's the case, you need to fix the theme or change the Showthread option I mentioned earlier.
Pages: 1 2 3 4