Support

Akeeba Ticket System

#40260 "My Tickets" menu item shows "The application has stopped responding" error to users

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

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

Environment Information

Joomla! version
4.4.2
PHP version
8.1.14
Akeeba Ticket System version
5.3.4

Latest post by [email protected] on Thursday, 08 February 2024 09:19 CST

[email protected]

 Hello,

I am not sure when this issue has surfaced, but users who are NOT "Support Staff" are receiving the error "The application has stopped responding" when attempting to view the "My Tickets" menu item.

I have attached a screenshot of the error.

Any assistance or guidance is greatly appreciated.

Thank you,

Eric

tampe125
Akeeba Staff

Hello,

can you please enable the debug on your website, so we can get more info about the error?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]

Davide,

Here is the debug info.

Let me know if you need additional info.

Eric

 

Akeeba Ticket System - An unhandled Exception has been detected 500 The number of variables must match the number of parameters in the prepared statement

File <root>/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php Line 420

 The content below this point is for developers and power users.

Joomla 4.4.2 – PHP 8.1.14 on Linux

Debug information

Exception type: ArgumentCountError

#0 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php(420): mysqli_stmt->bind_param()
#1 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/vendor/joomla/database/src/DatabaseDriver.php(675): Joomla\Database\Mysqli\MysqliStatement->execute()
#2 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/vendor/joomla/database/src/DatabaseDriver.php(1375): Joomla\Database\DatabaseDriver->execute()
#3 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/MVC/Model/BaseDatabaseModel.php(166): Joomla\Database\DatabaseDriver->loadObjectList()
#4 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/MVC/Model/ListModel.php(271): Joomla\CMS\MVC\Model\BaseDatabaseModel->_getList()
#5 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/components/com_ats/src/Model/CategoryModel.php(142): Joomla\CMS\MVC\Model\ListModel->getItems()
#6 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/MVC/View/AbstractView.php(152): Akeeba\Component\ATS\Site\Model\CategoryModel->getItems()
#7 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/components/com_ats/src/View/My/HtmlView.php(129): Joomla\CMS\MVC\View\AbstractView->get()
#8 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/MVC/Controller/BaseController.php(660): Akeeba\Component\ATS\Site\View\My\HtmlView->display()
#9 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/components/com_ats/src/Controller/MyController.php(56): Joomla\CMS\MVC\Controller\BaseController->display()
#10 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/administrator/components/com_ats/src/Mixin/ControllerEventsTrait.php(74): Akeeba\Component\ATS\Site\Controller\MyController->display()
#11 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/Dispatcher/ComponentDispatcher.php(143): Akeeba\Component\ATS\Site\Controller\MyController->execute()
#12 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/administrator/components/com_ats/src/Dispatcher/Dispatcher.php(74): Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
#13 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/Component/ComponentHelper.php(361): Akeeba\Component\ATS\Administrator\Dispatcher\Dispatcher->dispatch()
#14 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/Application/SiteApplication.php(208): Joomla\CMS\Component\ComponentHelper::renderComponent()
#15 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/Application/SiteApplication.php(249): Joomla\CMS\Application\SiteApplication->dispatch()
#16 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/libraries/src/Application/CMSApplication.php(293): Joomla\CMS\Application\SiteApplication->doExecute()
#17 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#18 /mnt/CMS_DATA/www/community.shorecrest.org/public_80/index.php(32): require_once('...')
#19 {main}
System information
Operating System (reported by PHP) Linux
PHP version (as reported by your server) 8.1.14
PHP Built On Linux ip-172-30-0-83.ec2.internal 5.14.0-381.el9.aarch64 #1 SMP PREEMPT_DYNAMIC Tue Oct 31 00:50:53 UTC 2023 aarch64
PHP SAPI fpm-fcgi
Server identity Apache
Browser identity Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Joomla! version 4.4.2
Database driver name mysqli
Database driver type mysql
Database server version 10.6.11-MariaDB
Database collation latin1_swedish_ci
Database connection collation utf8mb4_general_ci
PHP Memory limit 512M
Peak Memory usage 4.31M
PHP Timeout (seconds) 60
Request information $_GET
Array
(
)
$_POST
Array
(
)
$_COOKIE
Array
(
    [7c152df795553c15b0099b9c65210896] => a05u14k4nqrnur06gok1i097h6
    [joomla_user_state] => logged_in
)
$_REQUEST
Array
(
)
Session state
Array
(
    [session] => Array
        (
            [counter] => 5
            [timer] => Array
                (
                    [start] => 1707320258
                    [last] => 1707320274
                    [now] => 1707320279
                )

            [token] => 6435c85f9e6275253a87e8d0c3383372
        )

    [registry] => Array
        (
            [data] => Array
                (
                    [users] => Array
                        (
                            [login] => Array
                                (
                                    [form] => Array
                                        (
                                            [data] => Array
                                                (
                                                )

                                            [return] => index.php?Itemid=101
                                        )

                                )

                        )

                )

            [initialized] => 
            [separator] => .
        )

    [user] => Array
        (
            [id] => 8
            [name] => _Teacher 1
            [username] => teacher1
            [email] => [email protected]
            [password] => $2y$10$79NVWI0n0ax/v4sezj49sux91c2DR4Yjy1B7Z7RzXU0doaoFfFx8u
            [password_clear] => 
            [block] => 0
            [sendEmail] => 0
            [registerDate] => 2022-07-29 14:19:09
            [lastvisitDate] => 2024-02-07 15:37:53
            [activation] => 
            [params] => {"admin_style":"","admin_language":"","language":"","editor":"","timezone":"","a11y_mono":"0","a11y_contrast":"0","a11y_highlight":"0","a11y_font":"0"}
            [groups] => Array
                (
                    [2] => 2
                    [19] => 19
                    [71] => 71
                )

            [guest] => 0
            [lastResetTime] => 
            [resetCount] => 0
            [requireReset] => 0
            [aid] => 
            [typeAlias] => 
            [otpKey] => 
            [otep] => 
            [authProvider] => 
            [authCount] => 0
        )

    [mo_first_url] => 
    [mo_relay_state] => 
    [test_url] => https://community.shorecrest.org/login
    [mo_auto_redirect] => 
    [mo_backdoor_url] => 
    [com_users] => Array
        (
            [mfa_checked] => 1
        )

)

tampe125
Akeeba Staff

Ok, this is a PHP bug in the database driver. Please use the MySQL PDO driver inside Joomla Global Configuration and try again, that should fix your issue.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]

Davide,

Since this is a global change, is there a chance that this will cause issues with other extensions or features of Joomla?

Thanks,

Eric

[email protected]

Davide,

Prior to changing the Database driver...I wanted to do some testing to see if I could isolate when this error is introduced. I have confirmed:

 

Joomla 4.3.4/ATS 5.3.3 - "My Tickets" menu item functions normally

Joomla 4.4.2/ATS 5.3.3. - "My Tickets" menu item functions normally

Joomla 4.4.2/ATS 5.3.4 - "My Tickets" menu item bug introduced.

 

In my testing, it seems that ATS 5.3.4 introduced the error. I am hesitant to make a global change of the Database driver to resolve this issue as it may introduce other errors throughout my site.

Can this bug be resolved in a future release of ATS?

Thanks,

Eric

nicholas
Akeeba Staff
Manager

Hello Eric,

This error does not actually come from ATS. It comes for core Joomla! code. And by that, I do not mean the database driver which is technically part of Joomla! itself. I mean the Categories helper which is part of the core Joomla! API.

I have troubleshooted this extensively, and it's really a problem with the PHP MySQLi driver itself. Joomla! sends a prepared statement query with 7 parameters. I can see that Joomla! correctly communicates the number, type, and values of the variables. Then, PHP cocks up. It only sends a fraction of the values to the database server. The database server then complains that the query is invalid.

This did not happen in the past because the query sent by Joomla's Categories helper had fewer parameters in the prepared statement, therefore did not trigger this bug.

Switching to the PDO MySQL (or just plain "MySQL" as Joomla calls it) provider does fix the problem for a very simple reason: PDO does not support "real" prepared statements. Instead, Joomla emulates them in userland PHP code. As a result, the query that hits the server is a plain old query without any parameters, and it executes just fine.

For what it's worth, it's not just Joomla having this problem. I have had the same issue in custom software I have written using mysqli directly. Looking at old PHP bug reports I can see that this has been reported as early as 17 years ago, but nobody seems to know how to reproduce it reliably, nobody fixed it, and everyone affected by it just did some sort of workaround (use a different connector, use a different query, etc). Since we cannot change the query which comes from core code not under our control all we can do is ask you to change the MySQL connector you're using from mysqli to PDO.

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!

[email protected]

Nicholas,

As always you detailed explanation is helpful!

I have changed the driver on our production site. Hopefully there won't be any fallout with the other extensions we run.

Your support is greatly appreciated!

Eric

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!