SQL error after results

If you need support and would like to ask your question in English please enter here
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

SQL error after results

Post 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
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post by geoffrey5 »

The Journey 25 of this championship (Matchday 4) is not saved in the phpbb_mot_swb_rank_matchdays table :?

Image
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post 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.
Attachments
functions_mot_swb.zip
(19.34 KiB) Downloaded 1 time
Gruß
Mike
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post by Mike-on-Tour »

This I have to check, may take some days.
Gruß
Mike
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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 %}
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post 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.
Attachments
mot_swb_fix_cash.zip
(18.92 KiB) Downloaded 2 times
Gruß
Mike
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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 :(
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post 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.
Gruß
Mike
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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;
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post 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... :?
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post 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.
Gruß
Mike
User avatar
geoffrey5
Posts: 52
Joined: Mon 18. Nov 2024, 18:16

Re: SQL error after results

Post by geoffrey5 »

sorry for bothering you with a non-existent problem :roll:
User avatar
Mike-on-Tour
Administrator
Posts: 416
Joined: Sat 21. Mar 2020, 19:02
Location: Wittingen

Re: SQL error after results

Post by Mike-on-Tour »

No problem, it is support.
Gruß
Mike
Post Reply