NickJP
Forum Replies Created
-
Thanks. That was the problem. Now I just need to figure out how to automatically run a cache purge every Sunday.
I’m still having problems with display of metrics that can have a value of zero. We have a handicap player metric that can be positive, negative, or zero. Any positive or negative value can be entered for a player as just the digit (with a possible leading minus sign), and displays correctly in a player list. However, if I enter a zero handicap as just the digit 0, then the player list just displays a dash. I have to surround the zero with quotes to get it to display. Below is the code for the player list, with
stautbiltwofivebeing the handicap.[player_list id="14405" title="Player Stats" number="all" team="0" seasons="102" leagues="109" columns="stautbiltwofive,frameswon,frameslost,winpercentage" orderby="winpercentage" order="DESC" show_all_players_link="0" align="none"]The link below is to a screenshot of the player list. For the first two players, I entered their zero handicap as just the digit 0, for the next three I entered it as “0”, and all the non-zero handicap values were entered as just n or -n, depending on whether positive or negative. This is on a Siteground managed site running WordPress 6.8.1 and Sportspress 2.7.24.
https://bsaact.org.au/wp-content/uploads/2025/05/PlayerStats.jpg
Thanks. I already had the limits of 4 and 5 set in the shortcodes, but found that the global limit in SportsPress->Settings->Events was set to 4. I increased it to 8, and everything now displays correctly.
Here’s screenshot of the formula for calculating a players handicap depending on the number of frames they have won and lost:

In the player metrics, a non-zero starting handicap for a player can be entered just as the digit and the formula works fine for calculating their handicap:

For a player with a starting handicap of zero, if the value is entered just as 0, the handicap formula just outputs zero regardless of the values for Frames W and Frames L. If I surround the 0 with quotes then the formula works correctly.

Thanks. That fixed it.
Thanks. That was the problem. Now sorted.
If I put a check against that value in the player list (it’s actually under the metrics tab, not the performance tab), then the values for high break do appear when I click the “View all players” link. However, although I’ve specified that the player list should be sorted in descending order of high break, when all players are displayed the order shown seems completely random.
Here is a screenshot of the player list showing the six players with the highest breaks, correctly sorted as specified: https://bsaact.org.au/wp-content/uploads/2024/10/topsix.jpg.
And this is what appears when I click the “View all players” link. No sorting by high break: https://bsaact.org.au/wp-content/uploads/2024/10/all.jpg.
Shouldn’t the player list still be sorted by the requested value when all players are shown?
When I publish an event list, the date and time formats shown to the end users are in the correct dd/mm/yyyy and 24-hour format that is configured in WordPress. It’s when I’m viewing events in Sportspress as the site admin while setting them up that the scheduled dates/times in the Date column are in the incorrect format.
I can’t see how to upload a screenshot here, so I uploaded one to Google photos: https://photos.app.goo.gl/m1txBg3XWseXwdJ47. You can see that the dates and times are shown in yyyy/mm/dd and 12-hour format rather than dd/mm/yyyy and 24-hour format.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Event pages Display NO contentI had a similar problem, and found that it was due to caching by my hosting provider (Siteground). They provide a WordPress plugin called Speed Optimiser, and one of the caching options it provides is “memcaching” (caching of database queries). I found that if I had that enabled, then display of event results was inconsistent – sometimes the full results would display correctly, and sometimes not. As soon as I disabled memcaching, the results displayed correctly all the time.
Well, when I checked on the website this morning, the values in the player lists are now there correctly, though I hadn’t touched the website since I posted this query yesterday! Maybe there was some temporary problem with Siteground’s hosting that they fixed in the interim. I just entered another set of match results, and everything is functioning correctly, so problem solved.
p.s. I installed the Show Post Meta plugin, and with that I can see that the gamesw and gamesl values are being populated for each player in the event:
4923 =>
array (
'gamesw' => '',
'gamesl' => '2',
'gamesd' => '',
'frameswon' => '',
'frameslost' => '',
'framesdrawn' => '',
'status' => 'lineup',
'sub' => '0',
),
616 =>
array (
'gamesw' => '',
'gamesl' => '2',
'gamesd' => '',
'frameswon' => '',
'frameslost' => '',
'framesdrawn' => '',
'status' => 'lineup',
'sub' => '0',
),
),
617 =>
array (
'gamesw' => '2',
'gamesl' => '',
'gamesd' => '',
'frameswon' => '',
'frameslost' => '',
'framesdrawn' => '',
'status' => 'lineup',
'sub' => '0',
),
620 =>
array (
'gamesw' => '2',
'gamesl' => '',
'gamesd' => '',
'frameswon' => '',
'frameslost' => '',
'framesdrawn' => '',
'status' => 'lineup',
'sub' => '0',
),And in the player list gamesw and gamesl are two of the columns:
[player_list id=”11966″ title=”Player Stats” number=”all” team=”0″ seasons=”88″ leagues=”10″ columns=”currenttgt,gamesw,gamesl,gameperc” orderby=”gameperc” order=”DESC” show_all_players_link=”0″ align=”none”]
But those two values are showing up as zero in the player list.
Thanks, setting up a new stat like that enables the player list to be correctly sorted.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Non-numeric value warningYes, that was the Sportspress setting I changed to get rid of the error. I have the value set to 0 minutes.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Non-numeric value warningSame error has just appeared again. I updated more events with their results, and I get the same non-numeric value warning unless I enter a value of zero in the Full Time field. This problem did not happen when entering event results with the previous version of Sportspress.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Non-numeric value warningOK, I have found the cause of the problem. When I view an event, there is a field under Details named Full Time, given in minutes. In the five or so years that I have been using Sportspress, I’ve never bothered to populate this field when importing events, as it’s irrelevant to our competitions, which are played to a target and not a time, and this has not caused a problem until the latest version of Sportspress. Now, as soon as I enter the results for an event that has been completed, I have to put a value in this field, which shows as blank (I just put 0) or I get the non-numeric value warning.
When I view older events for which results were entered using an older version of Sportspress, this Full Time field has been automatically populated with a value of zero, whereas the new version leaves it blank and generates the warning. Why the change in behaviour?