Support » Plugin: SportsPress - Sports Club & League Manager » Box Score data not totaling or showing in player stats.

  • Resolved TNG1



    This is a single-team setup for a very competitive girls’ travel soccer team. The site’s purpose is in part to act as an online profile showcase for the players for college recruiters to access.

    In that light, we only wanted to track and show positive stats (goals, assists, saves) so I deleted the yellow & red cards, and the own goal variables from the Player Performance section of the Configure page.

    When I enter in stats for individual players in a game (again goals, assists, and saves) in the Box Score section of a Match, only the assists tally up to a total at the bottom of the Box Score.

    More problematic, is that although the column headings of Goals, Assists, and Saves show up on the individual player’s pages in the Stats section, none of this data flows through. If you go look at the link I provided you will see no data for the player performance variables, nor for # of appearances, but the win-draw-loss ratios do show up.

    In addition, if you view the page for a match you will see that goals, assists, and saves show up for individual players in the form of the associated icons. That said, only the assists show a total at the bottom of that section. Here is a good example of what I’m trying to explain

    So that is where I am stuck at, any and all help will be greatly appreciated.


    • This topic was modified 2 months, 2 weeks ago by TNG1.
    • This topic was modified 2 months, 2 weeks ago by TNG1.
    • This topic was modified 2 months, 2 weeks ago by TNG1. Reason: edited for purpose of clarity and adding info missed on the first posting

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Roch


    Hi there!

    Thanks for reaching out.

    That’s an odd issue.

    Can you please take screenshots of the full pages of your SportsPress > Configure screen, of the player edit screen and of one of your events?

    You can upload them to your site or to an image sharing service and send us some links.


    Thread Starter TNG1


    Hi Roch,

    I put the screenshots together that you asked for, plus others showing where data does show, and where it does not. I hope this is helpful for your troubleshooting…

    Cheers, and thanks again for your assistance.

    • This reply was modified 2 months, 2 weeks ago by TNG1.
    Plugin Contributor Roch


    Hi there!

    Thanks for your reply and for the detailed screenshots!

    Let’s focus on one issue at a time, so it won’t get too confusing. We can focus on the variables not summing up to a total here. We can check the player profile in a new topic or after this one is resolved.

    One thing I’d check under SportsPress > Configure is to make sure that no 2 items have the same variable.

    For example, you have goals as player performance and player stats. Make sure that each one has their own variable name (goals stat can be something like “goalsstat” so it won’t be confused with the goals player performance field).

    You can find the variable name (key) in the edit screen of each of these items. For stats they are in the right column.

    You don’t need these stats though. The player performance variables are available in the player profiles and player lists.

    If that doesn’t fix it, please briefly disable all plugins (but SportsPress and the classic editor), then switch to a default theme (Rookie or Twenty Twenty).

    Then under SportsPress > Configure, go to the “goals” player performance, edit it, and hit update again.

    Then go to one of your events and update it again to see how it works.

    If it starts summing it all up, do the same with the saves.

    If it doesn’t work, please create a new player performance field (such as test), just so you can see if a new field is calculated correctly.

    Let us know how it works for you.


    Thread Starter TNG1


    Thanks again for the prompt replies and for working with me on this.

    Short story none of the steps outlined in your last reply solved the issue.

    More detailed version:
    I looked at the variable for Goals – Assists – Saves in both the Player Performance and Player Stats. The variables(key) are the same for each, i.e. for goals in both sections the value was goals. I changed the goals variable in the stats section to goalsstats as you suggested. This did not solve the issue, I tried it for Saves as well with the same results. Curiously the Assists, again the only one totaling at the bottom of the Box Score section of the Edit Match field has the same variable in both Player Performance and Player Stats.

    I downloaded and installed Classic Editor, followed by deactivating all the plugins except for the Classic Editor, SportsPress, and SportsPress for Football(Soccer). I also switched to the default theme of Twenty Twenty One.

    I then went back to Configure and edited Goals in Player Performance. To try to ensure it wrote new values, I added a character to the name and updated it, then removed the added character and updated it again.

    No change in the issue.

    I then created TEST as a new field in the Player Performance section and then edited one of the matches adding numbers to the TEST field, they did not total at the bottom of the page either.

    Where do we go from here?

    Plugin Contributor Roch


    Hi there!

    Thanks for your reply.

    That’s so odd!

    This is the first time I see an issue like this, and it’s very hard to troubleshoot it without admin access (and we can’t request admin access in the public forums – that’s against the WP rules).

    I’d check a couple of things:
    1) If the variables are saved correctly (you can use a plugin such as JSM’s show post meta), double check if the SportsPress variables are correct, if the values are saved.

    2) Check if there are any JS errors. Do the totals auto-calculate when you add numbers at all? For example, check what happens with the assists (the one that is working), when you add one, the total changes. Do you see that with the other fields? Do you see any JS errors in the console? (use the browser’s developer tools – in most browsers the shortcut for it is F12).

    If it still won’t work, I’d debug things directly in your plugin files, such as in this file:

    around line 413-436 is where the totals are set up.

    I’d debug each of these variables to see what could be blocking the totals there. Check if they have the values that they were supposed to have.

    I know this is quite hard to do, but since this is an edge case, I’m trying to guide you on what I would do if I was troubleshooting this in the Pro channel.

    BTW – You can rule out server-related issues by creating a new install using a local server. You can mirror your current site (using all in one WP migration or similar) or just create a new blank install and see how the formulas should work.


    Thread Starter TNG1


    To anyone reading this.

    The SportsPress team, and especially Plugin Contributor Roch (@rochesterj) did a fantastic job solving my issues and bringing real value to the plugin.

    If like me, you are a cheap SOB and could probably squeak by on their free offerings, I highly suggest you consider pulling out the wallet and purchasing whatever license level your finances make possible. Let’s keep quality developers…in both the end product of their work and their commitment to customer support…motivated, compensated, and afloat so they can continue to innovate and produce the products we need.

    Cheers all…

    Plugin Contributor Roch


    That’s really kind of you @tng1

    You just made my day!


Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.