1062 Duplicate entry 'XYWZ' for key 'group_key' only in control panel

  • Posts: 56
  • Thank you received: 1
4 years 7 months ago #317204

-- HikaShop version -- : 3.4.1
-- Joomla version -- : 3.9.10
-- PHP version -- : 5.6.6
-- Error-message(debug-mod must be tuned on) -- : 1062 Duplicate entry 'XYWZ' for key 'group_key'

Hi,
I know I have an old php and hikashop version but I'm still waiting to update php on my hosting to update all. With this configuration, it works everything's well for 1 year until some days ago. All hikashop works perfectly only in the control panel appear this error: 1062 Duplicate entry 'XYWZ' for key 'group_key' the number XYWZ change at any login. I search this value in all DB but without a result.
How can i resolve the problem ?

Many thanks and best regards.

Luca

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
4 years 7 months ago #317208

hi,

It's likely an issue with Joomla:
forum.joomla.org/viewtopic.php?t=858744
I would recommend to first activate the debug mode and error reporting settings of the Joomla configuration.
Also, do this change:
www.hikashop.com/support/forum/product-c...eld-list.html#304882
That way, when you reproduce the problem, you should see the MySQL query linked to that error and that will tell you better where the problem comes from.
If the error doesn't involve hikashop tables, then it's likely not related to your HikaShop.

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

  • Posts: 56
  • Thank you received: 1
4 years 7 months ago #317229

Hi Nicolas,
the trick of modify /libraries/joomla/database/exception/executing.php to print the query is very useful, trying this the query is:

SELECT *, SUM( case when o.order_currency_id = '1' then o.order_full_price end ) AS Total, COUNT(o.order_id) AS order_number FROM k4x6e_hikashop_order as o LEFT JOIN k4x6e_hikashop_user as a ON o.order_user_id=a.user_id LEFT JOIN k4x6e_users as u ON u.id=a.user_cms_id LEFT JOIN k4x6e_users AS b ON a.user_cms_id=b.id WHERE a.user_partner_activated=0 AND o.order_status IN ('shipped') AND a.user_id IS NOT NULL AND o.order_type='sale' GROUP BY a.user_id ORDER BY Total DESC LIMIT 10

If I try to execute this query in PhpMyAdmin I get #1062 - Duplicate entry error. How is it possible in a SELECT ?

Where is the problem ?

Many thanks

Luca

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
4 years 7 months ago #317230

Hi,

Apparently, this means that you're running out of disk space and / or the processing of that query requires more memory than allowed in the settings of your MySQL server.
Here are some links regarding this:
stackoverflow.com/questions/26725772/dup...ry-for-key-group-key
bugs.mysql.com/bug.php?id=58081

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

Time to create page: 0.057 seconds
Powered by Kunena Forum