Page 1 of 1

SQL error after results

Posted: Sun 9. Feb 2025, 12:11
by geoffrey5
hi Mike,

I just entered the first results after updating the extension.
I get an SQL error when sending the results, and I see that there is no longer the box to use Ultimate Point.

Can you help me ?

Image

Image

Re: SQL error after results

Posted: Sun 9. Feb 2025, 12:25
by geoffrey5
it's weird... The results are visible on the results page but nothing is displayed in the round ranking:
And no Ultimate Point payment was generated on the Bank page for the Daymatch 25 :?

Image

Image

Re: SQL error after results

Posted: Sun 9. Feb 2025, 12:35
by geoffrey5
The Journey 25 of this championship (Matchday 4) is not saved in the phpbb_mot_swb_rank_matchdays table :?

Image

Re: SQL error after results

Posted: Sun 9. Feb 2025, 15:25
by Mike-on-Tour
Sorry, this is due to an unmasked reference to the rank column which is a reserved word in AFAIK MariaDB, please download the attached file, unzip and then upload it to your servers /ext/mot/swb/includes directory and let it overwrite the existing file.

After that, please go to the ACP's "Enter results" tab, select all results and click the "Submit" button. This recalculates the rankings and you should be fine.

Re: SQL error after results

Posted: Sun 9. Feb 2025, 17:26
by geoffrey5
Thank you.. I no longer have any errors and the classification is good.
But Ultimate Point no longer works, we do not receive the points from the predictions.
We can also see in the Bank page the points for match day 25 (journée 25) are not awarded:

Image

And the checkbox for Ultimate Point is no longer present:

Image

Before we had this:

Image

Re: SQL error after results

Posted: Sun 9. Feb 2025, 18:16
by Mike-on-Tour
This I have to check, may take some days.

Re: SQL error after results

Posted: Sun 9. Feb 2025, 18:50
by geoffrey5
Ok no problem ;)

I checked in the adm\style\acp_mot_swb_fixtures_results.html file (in the end) and this line is no longer there... Is this normal?

Code: Select all

		{% if S_CASH_POINTS %}{{ lang('ACP_MOT_SWB_FIXTURES_CASH_POINTS') }} <input name="cash" type="checkbox" class="radio" {% if S_CASH %}"checked"{% endif %}> {% endif %}

Re: SQL error after results

Posted: Mon 10. Feb 2025, 11:47
by Mike-on-Tour
Thanks for the information.
I must have messed with how UP is integrated at some point in the past, although I can't remember it. The relevant changes have been changed back, luckily only 3 files were affected. Please download the attached zip file, unzip it and upload the directories and the files they contain to your server into the /ext directory, give permission to overwrite the existing files when asked and then select all matches of the last round in the "Enter result" tab of the ACP and click the "Submit" button (after selecting the checkbox for UP) and you should be okay.

Re: SQL error after results

Posted: Mon 10. Feb 2025, 15:57
by geoffrey5
Hi Mike,

Thanks but not everything is fixed. I have the checkbox and it is sent without SQL error but UP payments are not made :(

Re: SQL error after results

Posted: Mon 10. Feb 2025, 18:58
by Mike-on-Tour
Hi, that may sound like a dumb question, bus was the checkbox ticked (selected)? The reason for my question is that I haven't seen anything that was changed regarding the call to the UP functions.

Re: SQL error after results

Posted: Tue 11. Feb 2025, 01:01
by geoffrey5
yes all boxes are checked but Ultimate Points payments are not executed (see screen for day 25)

Image

Image

I don't understand, it worked very well with version 1.0.9.
I compared the includes/functions_mot_swb.php file between the two versions and there are apparently changes around line 132.
I don't question the php coding, I don't know much... But for example, there was a change which means that it no longer works correctly :?

Code: Select all

/*		if ($this->ext_manager->is_enabled('dmzx/ultimatepoints') && $this->config['mot_swb_ult_points'])
		{
			// Get an instance of the ultimatepoints functions_points
			$this->functions_points = $phpbb_container->get('dmzx.ultimatepoints.core.functions.points');
		}*/
		$this->functions_points = ($this->ext_manager->is_enabled('dmzx/ultimatepoints') && $this->config['mot_swb_ult_points']) ?
									$phpbb_container->get('dmzx.ultimatepoints.core.functions.points') :
									$mot_swb_functions_points;

Re: SQL error after results

Posted: Tue 11. Feb 2025, 01:11
by geoffrey5
Ok, I understood why.
Ultimate Points payments are made when all match day results are entered into the ACP.
I think version 1.0.9 made payments after each result :|

Sorry... :?

Re: SQL error after results

Posted: Tue 11. Feb 2025, 06:46
by Mike-on-Tour
Okay, I haven't realized that not all results have been entered. There was no change from ver 1.0.9 to 1.0.10 in this behaviour.

And the changes you mentioned are just a shorter way to get either the built-in functions or the UP functions.

Re: SQL error after results

Posted: Wed 12. Feb 2025, 15:36
by geoffrey5
sorry for bothering you with a non-existent problem :roll:

Re: SQL error after results

Posted: Wed 12. Feb 2025, 19:12
by Mike-on-Tour
No problem, it is support.