Support

Pre-sales

#40711 Fix for Akeeba Ticket System (ticket #40260)

Posted in ‘Pre-sales and Account Questions’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by nicholas on Thursday, 16 May 2024 23:54 CDT

lefteriskavadas

Hi,

I apologize in advance for posting this here but I couldn't find a public repository to submit a pull request.

This is a fix for ticket #40260 for Akeeba Ticket System: https://www.akeeba.com/support/akeebatickets/40260-my-tickets-menu-item-shows-the-application-has-stopped-responding-error-to-users.html

Edit file components/com_ats/src/Model/CategoryModel.php and update lines 286 - 292

from:

$query->extendWhere('AND', [ $db->quoteName('t.public') . ' = :public', $db->quoteName('t.created_by') . ' = :myUserId', $db->quoteName('i.user_id') . ' = :myUserId', ], 'OR') ->bind(':public', $public, ParameterType::INTEGER) ->bind(':myUserId', $myUserId, ParameterType::INTEGER);

to:

$query->extendWhere('AND', [ $db->quoteName('t.public') . ' = :public', $db->quoteName('t.created_by') . ' = :myUserId', $db->quoteName('i.user_id') . ' = :myUserId2', ], 'OR') ->bind(':public', $public, ParameterType::INTEGER) ->bind(':myUserId', $myUserId, ParameterType::INTEGER) ->bind(':myUserId2', $myUserId, ParameterType::INTEGER);

 

Regards

Lefteris Kavadas

https://www.firecoders.com

nicholas
Akeeba Staff
Manager

Hi Lefteris! Long time no see :)

That's a good catch.

Can you please tell me with which DB driver you ran into it? Was it MySQLi or PDO MySQL? I have a suspicion about the problem being with Joomla's \Joomla\Database\Mysqli\MysqliStatement::prepareParameterKeyMapping() preparing the statement only by half, i.e. creating all the placeholders for the named parameters, but not duplicating the values correctly.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

lefteriskavadas

Hi Nicholas,

Long time indeed! I hope you are doing well!

I am using MySQLi. To be honest, I didn't troubleshoot this in depth, I just had the idea to pass a second parameter with the same value and it worked. So this is more a workaround than a fix.

I think that this is probably caused by prepareParameterKeyMapping as you pointed out.

 

Regards

 

Lefteris Kavadas

https://www.firecoders.com

nicholas
Akeeba Staff
Manager

Thank you, Lefteris! I am doing great :)

Thank you for the confirmation. I now have that loose thread to start pulling on Joomla's database driver sweater and see where that leads me.

Have a wonderful day!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

lefteriskavadas

You're welcome! I'm glad to hear you're doing great.

Good luck with Joomla's database driver.... If you need any further assistance, feel free to reach out.

Have a wonderful day as well!

Lefteris Kavadas

https://www.firecoders.com

nicholas
Akeeba Staff
Manager

Thank you!

FYI, I made a PR here: https://github.com/joomla-framework/database/pull/301 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!