View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
5368 | Composr | leader_board | public | 2023-02-24 23:49 | 2024-11-23 03:57 |
Reporter | PDStig | Assigned To | PDStig | ||
Priority | normal | Severity | major | ||
Status | resolved | Resolution | fixed | ||
Product Version | 11.beta4 | ||||
Summary | 5368: Leader-board: Not generating | ||||
Description | Leader-boards are not generating. Scheduler does not show any errors when running the hook. Likely, the leader-board times are being miscalculated. | ||||
Tags | Roadmap: v11 | ||||
Attach Tags | |||||
Attached Files | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
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. |
|
"strtotime is possibly getting removed in PHP 9 anyway, so we should consider a different approach." - I think you're thinking of strftime. |
|
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). - 6001: Monthly generation is now supported again and working according to our tests - 5992: 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]). |
|
Fixed in Git commit f5b1f89825 (https://gitlab.com/composr-foundation/composr/commit/f5b1f89825 - link will become active once code pushed to GitLab) |
|
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/). |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-02-24 23:49 | PDStig | New Issue | |
2023-02-24 23:49 | PDStig | Status | Not Assigned => Assigned |
2023-02-24 23:49 | PDStig | Assigned To | => user4172 |
2023-02-26 18:29 | Chris Graham | Category | General => General / Uncategorised |
2023-11-04 07:38 | PDStig | Note Added: 0008012 | |
2023-11-04 07:39 | PDStig | Note Edited: 0008012 | |
2023-11-04 07:39 | PDStig | Note Edited: 0008012 | |
2024-07-30 19:27 | Chris Graham | Note Added: 0009005 | |
2024-11-23 03:54 | PDStig | Tag Attached: Roadmap: v11 | |
2024-11-23 03:56 | PDStig | Relationship added | related to 6001 |
2024-11-23 03:57 | PDStig | Relationship added | related to 5992 |