1140 Error backend when clicking on hikashop in components menu

  • Posts: 20
  • Thank you received: 0
6 years 11 months ago #283332

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.2
-- PHP version -- : 5.0.51
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
/home/web1487/www/dindyrlege.com/libraries/joomla/database/driver/mysqli.php:650

Hi,

Getting an error when clicking on Hikashop in the components menu backend.

If I click on any of the submenus, everything is fine.

An ideas?

Regards Kjeld

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 11 months ago #283358

Hello,

You should see to edit temporally the Joomla core file to have more information regarding the processed query.
www.hikashop.com/forum/install-update/89...-version.html#277684

Unfortunately, without knowing what is the processed query ; it will be difficult to fix it (since we cannot reproduce it in our end)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 0
6 years 11 months ago #283368

Tx so much for the quick answer.

This is what I am getting. Perhaps something wrong with the order status?

Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause SELECT SUM(hk_order.order_full_price) as value, hk_order.order_currency_id as currency FROM c6l9m_hikashop_order AS hk_order WHERE (hk_order.order_type = 'sale') AND (hk_order.order_status IN ('confirmed','shipped')) AND (hk_order.order_invoice_created >= 1509321600 AND (1511999999 <= 0 OR hk_order.order_invoice_created <= 1511999999))

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
6 years 11 months ago #283380

Hi,

I think that it's either because you're using an old version of MySQL or that you have the ONLY_FULL_GROUP_BY setting of MySQL activated:
dev.mysql.com/doc/refman/5.7/en/sql-mode...e_only_full_group_by

Add the code:

,'group' => 'hk_order.order_id'
after the code:
'get' => 'object',
				'select' => array(
					'SUM(hk_order.order_full_price) as value',
					'hk_order.order_currency_id as currency'
				),
				'tables' => hikashop_table('order') . ' AS hk_order ',
				'filters' => array(
					'order_type' => 'hk_order.order_type = '.$order_type.'',
					'order_status' => ('hk_order.order_status IN ('.implode(',', $valid_order_statuses).')'),
					'order_created' => ($created_status ?
						'hk_order.order_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_created <= {DATE_END})':
						'hk_order.order_invoice_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_invoice_created <= {DATE_END})'),
				)
in the file administrator/components/com_hikashop/classes/statistics.php and that should fix the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 0
6 years 11 months ago #283458

Hi,

Tx again.

I put the code in like this:

				'get' => 'object',
				'select' => array(
					'SUM(hk_order.order_full_price) as value',
					'hk_order.order_currency_id as currency'
				),
				'tables' => hikashop_table('order') . ' AS hk_order ',
				'filters' => array(
					'order_type' => 'hk_order.order_type = '.$order_type.'',
					'order_status' => ('hk_order.order_status IN ('.implode(',', $valid_order_statuses).')'),
					'order_created' => ($created_status ?
						'hk_order.order_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_created <= {DATE_END})':
						'hk_order.order_invoice_created >= {DATE_START} AND ({DATE_END} <= 0 OR hk_order.order_invoice_created <= {DATE_END})'),
				),
				'group' => 'hk_order.order_id'

Still the same error :-(

Im also looking into an SQL update.

Last edit: 6 years 11 months ago by Jerome. Reason: [code] is nice !

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 0
6 years 11 months ago #283483

SQL update solved the problem together with the above.

Thanks for the great help.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum