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
Moderators and Topics counts not updated in footer
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 13, 2012 - 4:51 am

The footer on my forum still displays old moderators and are not mods anymore. Same for forum and users stats that does not seem to be up to date.

A quick look in SP code took me to the sp-site-cron.php file which does crontab like stuff to refresh the some stats (mods list, forums and members stats). I believe this part does not refresh on my site, is there a way to make sure it's triggered properly or a way to force it (from the web client or command line shell on the server) ?

 

Thank you.

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 13, 2012 - 6:07 am

Ok, I just found the existence of a cron system inside WP confused and the manual execution thru wp-cron.php

Just tried it: php wp-cron.php

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in ... wp-content/plugins/simple-press/sp-api/sp-api-common-display.php on line 405

I have tried to raise the memory limit for php5 cli, no effect yet, I'll continue searching...

 

Edit: Ok, I finally got wp-cron working, it looks like my changes for php.ini cli weren't taken into consideration.

I now got it OK when I execute with php5 -d memory_limit=128M wp-cron.php

 

Unfortunately, it does not seem to recalculate the counts in the footer, all numbers are still the same.

Any idea ?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 13, 2012 - 7:42 pm

what did you actually run?  I dont think calling wp-cron.php will actually run cron jobs...

I would deactivate sp and then reactivate... this will restart the cron jobs... and everything should be updated in 1 hour... 

but all the stats are updated at once, so if some are updating, they all are...  not sure I know which stats you say are not updating - sorry, confused...

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 14, 2012 - 3:16 am

Mr Papa said

what did you actually run?  I dont think calling wp-cron.php will actually run cron jobs...

I would deactivate sp and then reactivate... this will restart the cron jobs... and everything should be updated in 1 hour... 

but all the stats are updated at once, so if some are updating, they all are...  not sure I know which stats you say are not updating - sorry, confused...

Thanks for your answer Mr Papa.

I did run wp-cron.php, which should, according to what I read forces the execution of cron tasks from WP.

I tought it would also affect SP, due to the error I got (located in SP code) when I first ran it.

It's been one hour and half I have desactivated SP and reactivated it, the numbers hasn't changed confused

 

About stats, I mean most of the info that are located in the footer:

- moderators name (currently hidden on my forum as the wrong names are shown) 

- # of posts and # of members. I believe the other forum stats counts and member stats counts are out of date too, but I have not monitored the numbers yet. 

As you say, all the stats are probably affected, so my problem is why aren't they updated and how to fix it ?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 14, 2012 - 8:39 pm

so look in the sfmembers table and see for a particular user what the posts column is. does it match what's in the stats?  same for names matching display_name in sfmembers...

any errors listed in the site error log?

not sure what is going on since we have never had any other reports of the stats not running...

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 15, 2012 - 6:51 am

I checked wp_sfposts for a particular user_id that is in the top posters, I get 153 rows, the value 153 is in the posts column for this user_id in wp_sfmembers table, but there is still a value of 100 showing in the forum footer.

The users having moderator=1 in the wp_sfmembers table aren't the ones listed as moderators in the forum footer.

 

My forum is running version 7944, I have been on SP5 beta since built 7474 that was upgraded from 4.4.5 (build 6398).

I have found a few php notices and warnings in SP error log, but nothing apparently related to cron updates.

If this is a very odd problem to fix, in the meantime do you have any idea how I can force the footer data to update ? 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2012 - 7:22 pm

dont know of any problem yet... still trying to understand your issue...  it is a singular report that we cannot duplicate yet...

in your sp theme template file spFunctions.php, try adding this line:

sp_cron_generate_stats()

that should force a rebuild...

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 16, 2012 - 3:10 am

Mr Papa said

dont know of any problem yet... still trying to understand your issue...  it is a singular report that we cannot duplicate yet...

in your sp theme template file spFunctions.php, try adding this line:

sp_cron_generate_stats()

that should force a rebuild...

Thanks a bunch, just forced a call to sp_cron_generate_stats() in my footer, that fixed it !

I just modified my footer to call the crontab few times each day.

I'm available if you want me to investigate more on what's causing the crontab not to be run.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 16, 2012 - 7:56 am

are any of your wp cron jobs running?? nothing in sever error logs?  or on forum - toolbox - error log?

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Feb 24, 2012 - 5:39 am

Mr Papa said

are any of your wp cron jobs running?? nothing in sever error logs?  or on forum - toolbox - error log?

I gave it a few days testing.

The sp_cron_generate_stats() addition is working fine, but the updates are stopping if I remove the call.

I have few notices in the SP toolbox error log, but it doesn't seem to be related with that cron issue.

(just for reference:

file: /simple-press/forum/library/sp-post-support.php
line: 46
function: sp_email_notifications
Notice | Trying to get property of non-object

 

How can I check for the WP cron job ? I have installed Cron GUI WP plugin, I see SP related tasks (sph_stats_cron,sph_transient_cleanup_cron) but it does not report if the tasks execute or not. 

 

Thank you.

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