Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Forum statistics does not update
Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2015 - 3:27 pm

Good evening,

I noticed one minor problem, i have no clue about the cause.

It is not related to 5.6, behaviour was identical with 5.5.

The forum statistics is "Frozen" and does not update automatically, as it should be according to the help text in the admin panel.

My settings in the admin panels general display options are:

update interval (hrs) = 1

top poster: 10

new user: 0 (same behaviour with 1) as i dont want them to show.

Any idea what i might do wrong?

PS: no changes of template in use, 5.6 "out of the box"

Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2015 - 3:48 pm

PPS: Searching in your archive I found the following, which never seemed to be solved. 

https://simple-press.com/suppo.....ng/page-1/

Unfortunately I have more or less the same behaviour. I can update the "Member post count" by hand if I save the parameters again in the admin section. But the number of members and posts stays unchanged and "Frozen"

Checked the Cron Inspector for sph_stats_cron, as I guess this will be your next question wink,but unfortunately, there is no such thing in the list. But other cron jobs from SP are there, just the statistics is missing.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2015 - 4:00 pm

depends... its solved as far as simple press is concerned... the stats update uses wp cron... if wp cron is not running on your site, not much we can do...  you, however, seem to indicate only the stats cron not there... odd, because we do try to load often...

if you want to get the cron running again, try deactivating simple press (not uninstall) and then reactivating it... we load all our crons at activation...

Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2015 - 4:08 pm

Did as you said. This updated all stats data once, even the count of members and posts.

BUT...

Cron job for statistics is still not there. Under the assumption, that all your cron jobs start with "sp", there is only: 

sph_transient_cleanup cron

Before I deactivated, there was a second sph cron, but cant remember the name.

....

Will go to bed, check your answer and followup on it tommorow.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2015 - 5:42 pm

not sure I have any idea...  we dont remove our own cron jobs... 

do you have any plugins active that might be trying to keep wp cron jobs from running?  they auto reload unless something removes...  @yellow-swordfish any thoughts?

we could give you code (probably in that topic you linked to) that force the stats to refresh on page loads...

Avatar
Hari
Member
Free Members
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:13 am

Yeah, before I go through the plugin-drama again, I´ll try code to refresh at page load. My server is idle most of the time so maybe, it will not have an noticable performance impact.

Please tell me what and how to install/change based on 5.6 and Theme reboot.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:46 am

Well - not sure what the 'plugin-drama' is but the following will force the stats to refresh on page loads.

Create a new php/text file in the WordPress 'wp-content' folder named:

sp-user-functions.php

and put the following code in it. Remember to add the opening and closing php tags as well of course...

add_action('sph_BeforeDisplayStart', 'do_page_refresh', 1, 2);
function do_page_refresh() {
    do_action('sph_stats_cron');
}

that should do it

andy-signature.png
YELLOW
SWORDFISH
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Dec 16, 2015 - 8:57 am

I run a crontab event to load wp-cron.php every 10 minutes.

Used to get google trying to crawl urls with doing wp-cron xxxxx added to the end and creating false crawl errors. 

To turn off wordpress auto cron use this command added to wp-config file.

define('DISABLE_WP_CRON', true);

Just a suggestion for whatever it's worth.. wink
 

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626