[Skip to main content](#vessel-content)

#   Product code MySQL error

##

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago [\#83582](#83582) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83582 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")* was created by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")*

Hi,
When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique.
Hika V. 2.0.0
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#83661](#83661) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83661 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

It's because the debug mode is activated in your website.
Without debug mode, MySQL does not generate a fatal error but the request is not accepted and HikaShop said that there was a problem while saving the product.

Regards,

---

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

The following user(s) said Thank You: [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago [\#83662](#83662) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83662 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

HI Jerome,

No, the debug mode isn't on. What happens is that the product_code is unique (and very well) in the database, but if the user tries to set a duplicate product_code it shouldn't throw an slq error, but a warning message telling the user that product codes must be unique and/or that there is already one product with the same code.
Thanks and happy new year for you and the Hika team
Cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#83668](#83668) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83668 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

Which MySQL version are you using ?
It is strange so I think that we have to remake some tests.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago -  13 years 10 months ago [\#83669](#83669) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83669 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

MySql: 5.0.96
PHP: 5.3.17
Hikashop: 2.0.0
Joomla! 3.0.2

Just tested again on a different installation and the same 500 error occurred, when trying to update a product with a product_code that already exists.

Cheers

Last edit: 13 years 10 months ago by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#83838](#83838) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#83838 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

[ www.joomla.org/technical-requirements.html](http://www.joomla.org/technical-requirements.html)

The MySQL version minimum for Joomla 3.0 is 5.1+

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago -  13 years 10 months ago [\#85114](#85114) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#85114 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi Jerome,
Sorry for not getting back to you earlier but I needed to wait for my isp to update the MySQL server (I didn't want to test this on xampp). Now, on MySQL 5.5.28, the error persists, as I supposed, because this didn't seem like an sql version issue but rather a error throwing instead of warning message as I mentioned earlier. Please correct me if I'm wrong.
Thanks

Last edit: 13 years 10 months ago by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 10 months ago [\#85240](#85240) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#85240 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

What we want to say is that what you say it should do is actually what it is doing for us: when we save a product with a code which already exists on Joomla 3.0 we get the error message "A product with the same code already exists" thrown by HikaShop and not a MySQL error. And that's normal since that's how we coded it.
So there must be something else on your website which produces that but I can't tell you what as we are not able to reproduce the problem on our end with the same server configuration.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago [\#85248](#85248) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#85248 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi Nicolas,
Well, I've tested it on a fresh clean J3 install, adding two products to a fresh clean Hikashop instal (no customization or coding added) and, with no Error reporting (in J3 global config) set on default level and that's what I get - the 500 error.
For me isn't that important, since I know that no dup product codes should be added ![;)](/media/kunena/emoticons/24.png ";)") but I reported it just in case you've missed something. Anyway, if it's working fine on your side, that's great as long as you don't have any reports ![;)](/media/kunena/emoticons/24.png ";)")
Thanks again Nicolas
Cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 10 months ago [\#85250](#85250) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#85250 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi Nicolas,
Note, this happens on update not on new product (sorry if I fooled you ![:(](/media/kunena/emoticons/22.png ":(") )
Try opening a product, and update the product code. There you'll get the 500 error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 10 months ago [\#85531](#85531) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#85531 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi,

Ah indeed, I was always trying with new products. I could indeed reproduce the issue with an existing product and fix it. It will be included in next release of HikaShop.

Thank you for your report.

The following user(s) said Thank You: [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 9 months ago [\#89065](#89065) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#89065 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Hi Nicolas,
Seems like the 2.1 version corrected the mysql error but... now it displays the nice error message for products which in fact do not have the same code.
Add a product with the code HIKA2.1.0. Now add a product with the code SHOP2.1.1. Go back to HIKA2.1.0 and try to change the code to HIKA2.1.1 - you'll get the error message although there's no other product with the code HIKA2.1.1
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

13 years 9 months ago [\#89161](#89161) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#89161 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

Thanks for the feedback. That's fixed.
Download again on our website and update again and that should fix it.

The following user(s) said Thank You: [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")**
- [![mcruip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12482-mcruip "View mcruip's Profile") Topic Author
- [ Offline](/forum/user/12482-mcruip)

Less More

- Posts: 58
- Thank you received: 2
-
-

13 years 9 months ago [\#89165](#89165) by [mcruip](/forum/user/12482-mcruip "View mcruip's Profile")  Replied by *[mcruip](/forum/user/12482-mcruip "View mcruip's Profile")* on topic *[Product code MySQL error](/forum/3-bug-report/77065-product-code-mysql-error#89165 "Hi, When editing a product code in the back-end, if the code is duplicated (not unique) it generates a MySQL error and breaks the page, instead of displaying an error message that product codes should be unique. Hika V. 2.0.0 Thanks")*

![;)](/media/kunena/emoticons/24.png ";)") Fixed! Thank you Nicolas.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzA2NS1wcm9kdWN0LWNvZGUtbXlzcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.099 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
