[Pushed] Stats page refreshing issue
#1
Reproduce
  • Admin Control Panel > Configurations > Statistiscs Page > Stats Limit
  • See Stats Limit is 15 by default.
  • Change it to 30.
  • See in Stats Page it's still 15.
  • Go back and change it to 45.
  • See in Stats Page it's 30 now.
  • Go back and change it to 60.
  • See in Stats Page it's 45 now.
  1. It always shows the limit saved one before than actual setting.
  2. If you save the settings twice, it shows the actual value since one before is same as actual one.
Reply
#2
It seems the cache is updated before the new setting has been saved.

I fixed it for my forums by replacing this part in admin/modules/config/settings.php:


if(isset($mybb->input['upsetting']['statslimit']) && $mybb->input['upsetting']['statslimit'] != $mybb->settings['statstopreferrer'])
{
	$cache->update_most_replied_threads();
	$cache->update_most_viewed_threads();
}

rebuild_settings();

with this code:

$statslimit = 0;
if(isset($mybb->input['upsetting']['statslimit']) && $mybb->input['upsetting']['statslimit'] != $mybb->settings['statslimit'])
{
	$statslimit = 1;
}

rebuild_settings();

if($statslimit == 1)
{
	$cache->update_most_replied_threads();
	$cache->update_most_viewed_threads();
}
Reply
#3
I can confirm that!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#4
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2642

Thanks for contributing to MyBB!

Regards,
The MyBB Group
-Ben

Please do not PM me for support. I am looking to be hired for paid services.

You can view my paid services here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)