View Issue Details

IDProjectCategoryView StatusLast Update
0005368Composrleader_boardpublic2024-11-23 03:57
ReporterPatrick SchmalstigAssigned ToPatrick Schmalstig 
SeverityMajor-bug 
Status resolvedResolutionfixed 
Product Version11.beta4 
Fixed in Version 
Summary0005368: Leader-board: Not generating
DescriptionLeader-boards are not generating. Scheduler does not show any errors when running the hook. Likely, the leader-board times are being miscalculated.
TagsRoadmap: v11
Time estimation (hours)
Sponsorship open

Relationships

related to 0006001 resolvedPatrick Schmalstig Composr Support monthly leader-boards 
related to 0005992 resolvedPatrick Schmalstig Composr alpha bug reports Leaderboard does not exist 

Activities

Patrick Schmalstig

2023-11-04 07:38

administrator   ~0008012

Last edited: 2023-11-04 07:39

View 3 revisions

Confirmed they are being miscalculated. There is a condition that results in the calculated dates never meeting the criteria for a new leader-board to generate. I'm not yet sure what the fix is though. PHP has always been very weird about this with strtotime. strtotime is possibly getting removed in PHP 9 anyway, so we should consider a different approach.

Chris Graham

2024-07-30 19:27

administrator   ~0009005

"strtotime is possibly getting removed in PHP 9 anyway, so we should consider a different approach." - I think you're thinking of strftime.

admin

2024-11-23 03:47

administrator   ~0009668

Automated response: Various leader-board bugs

This hotfix resolves a number of problems with how leader-boards generated (or rather, never generated) results:

 - Leader-boards were not generating at all due to weird behaviour with PHP's strtotime. As such, we are no longer using it for leader-boards and instead have our own new methods of calculating time intervals: to_epoch_interval_index and from_epoch_interval_index (both in temporal).
 - 0006001: Monthly generation is now supported again and working according to our tests
 - 0005992: The main_leader_board block is not supposed to require a param, but it was, triggering an error when trying to open a non-param leader-board in the block tool. Also, I modified the block so it wouldn't output the requested leader-board doesn't exist if none was specified to begin with in a param.
 - Fixed bugs with voting power calculations still using points balance in a couple locations
 - Fixed a bug where leader-board was not correctly calculating rank points for its results (via the new is_ranked column on the ledger table)

This has not been thoroughly tested, but with that said, the automated test for leader-boards now passes. And initial testing shows it does generate (new leader-boards may take up to an hour to generate because they generate 2-3 intervals / results before the current one, one at a time per scheduler cycle [15 minutes for the leader-board hook]).

admin

2024-11-23 03:47

administrator   ~0009669

Fixed in Git commit f5b1f89825 (https://gitlab.com/composr-foundation/composr/commit/f5b1f89825 - link will become active once code pushed to GitLab)

admin

2024-11-23 03:47

administrator  

hotfix-5368, 2024-11-23 3am.tar (156,672 bytes)

admin

2024-11-23 03:47

administrator   ~0009670

A hotfix (a TAR of files to upload) has been uploaded to this issue. Only apply this hotfix if you absolutely need it and cannot wait until the next release of Composr (releases are more reliable and strictly tested). As of Composr version 11, the recommended way to apply a hotfix is by following the same steps as an upgrade (https://baseurl/upgrader.php, use the hotfix on the step “Transfer across new/updated files”). The upgrader will automatically skip files belonging to addons you do not have installed or that are newer on disk than in the hotfix. Otherwise, you can manually extract and replace these files (do not replace if your on-disk file is newer than the one in the hotfix). Always take backups of your site or at least files you are replacing before applying a hotfix. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).

Issue History

Date Modified Username Field Change
2023-02-24 23:49 Patrick Schmalstig New Issue
2023-02-24 23:49 Patrick Schmalstig Status non-assigned => assigned
2023-02-24 23:49 Patrick Schmalstig Assigned To => Patrick Schmalstig
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised
2023-11-04 07:38 Patrick Schmalstig Note Added: 0008012
2023-11-04 07:39 Patrick Schmalstig Note Edited: 0008012 View Revisions
2023-11-04 07:39 Patrick Schmalstig Note Edited: 0008012 View Revisions
2024-07-30 19:27 Chris Graham Note Added: 0009005
2024-11-23 03:54 Patrick Schmalstig Tag Attached: Roadmap: v11
2024-11-23 03:56 Patrick Schmalstig Relationship added related to 0006001
2024-11-23 03:57 Patrick Schmalstig Relationship added related to 0005992