joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[4.4] Template Styles filter error #42011

Closed brianteeman closed 1 year ago

brianteeman commented 1 year ago

Steps to reproduce the issue

In either the admin or site template styles conduct a search that has no results Then select a filter

Expected result

Still see the no matching results message

Actual result

The number of variables must match the number of parameters in the prepared statement

.. Function Location
1 () JROOT\libraries\vendor\joomla\database\src\Mysqli\MysqliStatement.php:389
2 mysqli_stmt->bind_param() JROOT\libraries\vendor\joomla\database\src\Mysqli\MysqliStatement.php:389
3 Joomla\Database\Mysqli\MysqliStatement->execute() JROOT\libraries\vendor\joomla\database\src\DatabaseDriver.php:639
4 Joomla\Database\DatabaseDriver->execute() JROOT\libraries\vendor\joomla\database\src\DatabaseDriver.php:1284
5 Joomla\Database\DatabaseDriver->loadObjectList() JROOT\libraries\src\MVC\Model\BaseDatabaseModel.php:164
6 Joomla\CMS\MVC\Model\BaseDatabaseModel->_getList() JROOT\libraries\src\MVC\Model\ListModel.php:271
7 Joomla\CMS\MVC\Model\ListModel->getItems() JROOT\libraries\src\MVC\View\AbstractView.php:159
8 Joomla\CMS\MVC\View\AbstractView->get() JROOT\administrator\components\com_templates\src\View\Styles\HtmlView.php:87
9 Joomla\Component\Templates\Administrator\View\Styles\HtmlView->display() JROOT\libraries\src\MVC\Controller\BaseController.php:697
10 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\administrator\components\com_templates\src\Controller\DisplayController.php:68
11 Joomla\Component\Templates\Administrator\Controller\DisplayController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:730
12 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:143
13 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT\libraries\src\Component\ComponentHelper.php:361
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:150
15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:195
16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:306
17 Joomla\CMS\Application\CMSApplication->execute() JROOT\administrator\includes\app.php:58
18 require_once() JROOT\administrator\index.php:32

System information (as much as possible)

php8.1

Additional comments

the only way to clear the error is to clear the session cookie

HLeithner commented 1 year ago

is this a new error or does it already exists in 4.x?

brianteeman commented 1 year ago

joomla 4.3

.. Function Location
1 () JROOT/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:420
2 mysqli_stmt->bind_param() JROOT/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:420
3 Joomla\Database\Mysqli\MysqliStatement->execute() JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:675
4 Joomla\Database\DatabaseDriver->execute() JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:1375
5 Joomla\Database\DatabaseDriver->loadObjectList() JROOT/libraries/src/MVC/Model/BaseDatabaseModel.php:166
6 Joomla\CMS\MVC\Model\BaseDatabaseModel->_getList() JROOT/libraries/src/MVC/Model/ListModel.php:272
7 Joomla\CMS\MVC\Model\ListModel->getItems() JROOT/libraries/src/MVC/View/AbstractView.php:146
8 Joomla\CMS\MVC\View\AbstractView->get() JROOT/administrator/components/com_templates/src/View/Styles/HtmlView.php:87
9 Joomla\Component\Templates\Administrator\View\Styles\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:645
10 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_templates/src/Controller/DisplayController.php:67
11 Joomla\Component\Templates\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:678
12 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
13 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
18 require_once() JROOT/administrator/index.php:32
richard67 commented 1 year ago

I think I know what the error is. Stay tuned, I am just preparing to test my fix.

richard67 commented 1 year ago

Works. PR will come soon.

richard67 commented 1 year ago

Closing as having a pull request. Please test #42020 . Thanks in advance.