Commands out of sync Error

Phoca Cart - complex e-commerce extension
ch2856
Phoca Member
Phoca Member
Posts: 20
Joined: 17 Apr 2010, 13:41

Commands out of sync Error

Post by ch2856 » 29 Jun 2022, 09:58

Hi,

J4.1.5 and Phoca 4.0.1
When I try to edit a product I get this error "Commands out of sync; you can't run this command now"
Thanks

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 45242
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Commands out of sync Error

Post by Jan » 30 Jun 2022, 18:24

Hi, can you enable debug mode and paste here the full error message including call stack?

Jan
If you find Phoca extensions useful, please support the project

drmenzelit
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 24 Jan 2018, 11:45

Re: Commands out of sync Error

Post by drmenzelit » 25 Jul 2022, 15:46

Hi Jan,
I'm experiencing the same issue, the error appears in frontend when one click on a product and also in backend when trying to edit a product

Code: Select all

2014 Commands out of sync; you can't run this command now 

Call stack
# 	Function 	Location
1 	() 	JROOT/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:525
2 	Joomla\Database\Mysqli\MysqliStatement->fetch() 	JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:760
3 	Joomla\Database\DatabaseDriver->fetchObject() 	JROOT/libraries/vendor/joomla/database/src/DatabaseDriver.php:1378
4 	Joomla\Database\DatabaseDriver->loadObjectList() 	JROOT/administrator/components/com_phocacart/libraries/phocacart/related/related.php:163
5 	PhocacartRelated::getRelatedItemsById() 	JROOT/components/com_phocacart/views/item/view.html.php:131
6 	PhocaCartViewItem->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:697
7 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT/components/com_phocacart/controller.php:53
8 	PhocaCartController->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:735
9 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT/components/com_phocacart/phocacart.php:16
10 	require_once() 	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
11 	Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() 	JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
12 	Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() 	JROOT/libraries/src/Component/ComponentHelper.php:389
13 	Joomla\CMS\Component\ComponentHelper::renderComponent() 	JROOT/libraries/src/Application/SiteApplication.php:204
14 	Joomla\CMS\Application\SiteApplication->dispatch() 	JROOT/libraries/src/Application/SiteApplication.php:243
15 	Joomla\CMS\Application\SiteApplication->doExecute() 	JROOT/libraries/src/Application/CMSApplication.php:278
16 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT/includes/app.php:63
17 	require_once() 	JROOT/index.php:32

christine
Phoca Hero
Phoca Hero
Posts: 2395
Joined: 28 Nov 2010, 17:20

Re: Commands out of sync Error

Post by christine » 25 Jul 2022, 17:53

Nice to see you here Viviana,

In the meantime, until Jan answers here.
Found something similar here, not the same, but maybe?

https://forum.joomla.org/viewtopic.php?f=831&p=3665741

PHP Version?

Kind regards
Christine

drmenzelit
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 24 Jan 2018, 11:45

Re: Commands out of sync Error

Post by drmenzelit » 26 Jul 2022, 19:11

Code: Select all

Datenbanktyp 	mysql
Datenbankversion 	5.7.38-log
Datenbankzeichensatz 	utf8_general_ci
Datenbankverbindungszeichensatz 	utf8mb4_general_ci
PHP-Version 	7.4.30

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 45242
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Commands out of sync Error

Post by Jan » 27 Jul 2022, 13:18

Hi, thank you for the info, this is a very unusual error. I don't get such problem on any of my test servers:

Image

I will try to search further

Jan
If you find Phoca extensions useful, please support the project

christine
Phoca Hero
Phoca Hero
Posts: 2395
Joined: 28 Nov 2010, 17:20

Re: Commands out of sync Error

Post by christine » 27 Jul 2022, 13:27

Hi,

even if possibly not relevant, nevertheless I post it here:

https://codehunter.cc/a/codeigniter/mys ... ommand-now
https://community-auth.com/blog-posts/c ... procedures

Kind regards
Christine

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 45242
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Commands out of sync Error

Post by Jan » 27 Jul 2022, 13:33

The only one info from mysql is: https://dev.mysql.com/doc/refman/8.0/en ... -sync.html but the problem is that these methods are managed by Joomla database object so in fact this cannot be influenced from the component :idea:

Do you get the same result when you try to run the SQL query manually in phpMyAdmin:

Code: Select all

SELECT DISTINCT a.id as id, a.title as title, a.image as image, a.alias as alias, a.description, a.description_long, SUBSTRING_INDEX(GROUP_CONCAT(c.id ORDER BY c.parent_id), ',', 1) as catid, SUBSTRING_INDEX(GROUP_CONCAT(c.title ORDER BY c.parent_id), ',', 1) as cattitle, SUBSTRING_INDEX(GROUP_CONCAT(c.alias ORDER BY c.parent_id), ',', 1) as catalias, GROUP_CONCAT(c.title SEPARATOR " ") AS categories_title FROM jos_phocacart_products AS a LEFT JOIN jos_phocacart_product_related AS t ON a.id = t.product_b LEFT JOIN jos_phocacart_product_categories AS pc ON pc.product_id = a.id LEFT JOIN jos_phocacart_categories AS c ON c.id = pc.category_id WHERE t.product_a = 1 GROUP BY a.id, a.title, a.alias, a.image, a.description, a.description_long;
Change prefix "jos_" to your own.
If you find Phoca extensions useful, please support the project

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 45242
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Commands out of sync Error

Post by Jan » 27 Jul 2022, 13:35

Hi Christine, thank you for the links, now I see there is "Datenbanktyp mysql", maybe if this will be changed to mysqli (mysql -> mysqli), it can help :idea:

EDIT: But I am testing it with mysql on my test server, even, there is everything OK :idea:
If you find Phoca extensions useful, please support the project

christine
Phoca Hero
Phoca Hero
Posts: 2395
Joined: 28 Nov 2010, 17:20

Re: Commands out of sync Error

Post by christine » 27 Jul 2022, 13:44

Jan wrote:
27 Jul 2022, 13:35
Hi Christine, thank you for the links, now I see there is "Datenbanktyp mysql", maybe if this will be changed to mysqli (mysql -> mysqli), it can help :idea:
No Jan :-) The screenshot from Viviana is correct, as Databank Typ = MySQL.

But in Configuration > Server you can see, if there is: MySQLi or MySQL (PDO)

Christine

Post Reply