Changing criteria breaks table
-
Hello,
I have installed your plugin and am attempting to use it, however, switching from the default criteria to my created criteria breaks the table, leading to a “There has been a critical error on this website.” page.
Please let me know what information I would need to provide for you to help.
Thanks
-
Hi there @cheesyvibes ,
I am really sorry of hearing this. Please try to disable all plugins except Sportspress and Advances H2H to see if there is any conflict with a 3nd party plugin.
Thanks,
SavvasThanks for your reply.
I have disabled all plugins and the issue persists.
Thanks
Can you also try to temporalily switch to a default theme like “Rookie” or “TwentyTwenty“?
Thanks,
SavvasI have tried that as well, with the same result.
That’s strange. Can you please check your server’s logs to identify exactly which part of the code is causing this error?
Thanks,
SavvasFatal error: Uncaught TypeError: Unsupported operand types: int + string in /home/customer/www/website.com/public_html/wp-content/plugins/advanced-h2h-for-sportspress/includes/class-sah2h-league-table.php:388 Stack trace: #0 /home/customer/www/website.com/public_html/wp-content/plugins/advanced-h2h-for-sportspress/templates/league-table.php(86): SAH2H_League_Table->data() #1 /home/customer/www/website.com/public_html/wp-content/plugins/sportspress-pro/includes/sportspress/includes/sp-core-functions.php(91): include('/home/customer/...') #2 /home/customer/www/website.com/public_html/wp-content/plugins/sportspress-pro/includes/sportspress/includes/shortcodes/class-sp-shortcode-league-table.php(23): sp_get_template('league-table.ph...', Array) #3 /home/customer/www/website.com/public_html/wp-content/plugins/sportspress-pro/includes/sportspress/includes/class-sp-shortcodes.php(70): SP_Shortcode_League_Table::output(Array) #4 /home/customer/www/website.com/public_html/wp-content/plugins/sportspress-pro/includes/sportspress/includes/class-sp-shortcodes.php(205): SP_Shortcodes::shortcode_wrapper(Array, Array) #5 /home/customer/www/website.com/public_html/wp-includes/shortcodes.php(434): SP_Shortcodes::league_table(Array, '', 'team_standings') #6 [internal function]: do_shortcode_tag(Array) #7 /home/customer/www/website.com/public_html/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(event_...', 'do_shortcode_ta...', '<div class="ele...') #8 /home/customer/www/website.com/public_html/wp-content/plugins/elementor/core/base/document.php(1888): do_shortcode('<div class="ele...') #9 /home/customer/www/website.com/public_html/wp-content/plugins/elementor/core/base/document.php(1221): Elementor\Core\Base\Document->print_elements(Array) #10 /home/customer/www/website.com/public_html/wp-content/plugins/elementor/includes/frontend.php(1223): Elementor\Core\Base\Document->print_elements_with_wrapper(Array) #11 /home/customer/www/website.com/public_html/wp-content/plugins/elementor/includes/frontend.php(1105): Elementor\Frontend->get_builder_content(2809) #12 /home/customer/www/website.com/public_html/wp-includes/class-wp-hook.php(341): Elementor\Frontend->apply_builder_in_content('<p>AMERICAN FOO...') #13 /home/customer/www/website.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('<p>AMERICAN FOO...', Array) #14 /home/customer/www/website.com/public_html/wp-includes/post-template.php(256): apply_filters('the_content', '<p>AMERICAN FOO...') #15 /home/customer/www/website.com/public_html/wp-content/themes/my-template/template-parts/single.php(25): the_content() #16 /home/customer/www/website.com/public_html/wp-includes/template.php(816): require('/home/customer/...') #17 /home/customer/www/website.com/public_html/wp-includes/template.php(749): load_template('/home/customer/...', false, Array) #18 /home/customer/www/website.com/public_html/wp-includes/general-template.php(206): locate_template(Array, true, false, Array) #19 /home/customer/www/website.com/public_html/wp-content/themes/my-template/index.php(21): get_template_part('template-parts/...') #20 /home/customer/www/website.com/public_html/wp-includes/template-loader.php(132): include('/home/customer/...') #21 /home/customer/www/website.com/public_html/wp-blog-header.php(19): require_once('/home/customer/...') #22 /home/customer/www/website.com/public_html/index.php(17): require('/home/customer/...') #23 {main} thrown in /home/customer/www/website.com/public_html/wp-content/plugins/advanced-h2h-for-sportspress/includes/class-sah2h-league-table.php on line 388Hi @cheesyvibes ,
It seems like a bug. Give me some time to investigate it in more depth and come back with a solution 🙂
Thanks,
SavvasHi @cheesyvibes ,
Can you please try to update to the latest version 2.1.2 and confirm that solves this bug?
Thanks,
SavvasHello,
Yes, your update has fixed the issue and the tiebreakers are now working correctly, thank you.
A few bits of minor feedback:
I have found that on the displayed table, once the tiebreak is applied, the teams are ordered correctly, but display the same position number on the table, whereas I would prefer the numbers to reflect the current order.
I have also found that on the internal page for the table, the order of the tiebreak/the order of the displayed table is not reflected on this page.
If there is a way to change this that I may not be aware of, please let me know.
This is a great tool that I am happy to use anyway, and thank you for the help and quick response to my questions.
Hi @cheesyvibes ,
I am glad it worked! 🙂
For your first question you will need to go at SportsPress->Settings->Teams->League Table and select the option “Alway increase position number” to not keep the same number when two or more teams are tied.
For the second question, I am afraid this is not possible currently with my plugin. I will try to find some free time in the near future to investigate a workaround without touching the SportsPress source code.
Thanks,
Savvas
You must be logged in to reply to this topic.