Jump to content

Category problem 1.7.6 [PrestaShop\PrestaShop\Core\Domain\Category\Exception\CategoryConstraintException code 6]


Recommended Posts

Hello. Today I installed update from Presta 1.7.4 to 1.7.. Past that i have a lot of problem with categories. I can t create or modify. Any time I have an error :

[PrestaShop\PrestaShop\Core\Domain\Category\Exception\CategoryConstraintException code 6]

here is the log 

https://pastebin.com/dQt43WNu

How can I repair it ? :(

Best Regards 

  • Like 1

Share this post


Link to post
Share on other sites

  • 2 weeks later...

First you have to clear LiteSpeed Cache Plugin after update. Secound you have to recreate default and root categories. If you don t have that two categories nothing gona work. Third you have to delate cache in var folder. 

image.thumb.png.6e0af51639af36a5bc7df6bb18da0406.png

  • Like 1

Share this post


Link to post
Share on other sites

  • 2 months later...

Hello, i have the same but for the customers, cannot change password by back office. And reset password by front office, is directly expired, cannot change too.

[PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]

Share this post


Link to post
Share on other sites

  • 4 weeks later...
On 10/21/2019 at 3:10 PM, Mélody said:

Hello, i have the same but for the customers, cannot change password by back office. And reset password by front office, is directly expired, cannot change too.

[PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]

Check if the customer has any 'invalid' names or info.
I had the same, my customer had a . (dot) in his name.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Solution : Go to home category > display = yes Or Enable = Yes  > refresh page all set.

 

Reason : While Migrate DB or if Home category is not enable this error reflect.

 

PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0

Share this post


Link to post
Share on other sites

i have a solution for those people having this issue

first of all go to "Traffic & SEO" section and be sure you have turned on both "Friendly URL" and "Accented URL" then log out and log in again and after that be sure if you have multilingual website enabled even though you have some languages disabled, fill related name for category name

this solution worked for me

  • Like 1

Share this post


Link to post
Share on other sites

  • 2 months later...

For anyone having problems with the "[PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]" error, I've just been experiencing that whilst trying to change customer details, passwords etc on PS 1.7.6.2

This was due to an upgrade from an older version and the "date_upd" column in the ps_customer table was set to "0000-00-00 00:00:00" for some customers, and that was causing the issue.

As a quick fix, for any customers with a blank date_upd column, I copied the value of the date_add column with an SQL query:

UPDATE ps_customer
SET date_upd = date_add
WHERE date_upd = '0000-00-00 00:00:00'

Hope that helps somebody out!

  • Thanks 3

Share this post


Link to post
Share on other sites

I got the same error message and it was simply because in the url of my category there was a character that was not authorized by PS ( "é" ) .

I edited the url of the category I wanted to create without this character and i could save right after. Hope it helps

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Bonjour,

J'ai directement téléchargé le fichier "theme enfant " dézipper dans le répertoire "theme", ensuite réinitailiser l'ensemble des modules...

Si cela peut vous être utile.

Share this post


Link to post
Share on other sites

  • 3 weeks later...
On 2/18/2020 at 5:29 PM, CYGM said:

For anyone having problems with the "[PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]" error, I've just been experiencing that whilst trying to change customer details, passwords etc on PS 1.7.6.2

This was due to an upgrade from an older version and the "date_upd" column in the ps_customer table was set to "0000-00-00 00:00:00" for some customers, and that was causing the issue.

As a quick fix, for any customers with a blank date_upd column, I copied the value of the date_add column with an SQL query:

UPDATE ps_customer
SET date_upd = date_add
WHERE date_upd = '0000-00-00 00:00:00'

Hope that helps somebody out!

You've just saved my night 🙂

Thanks!

Share this post


Link to post
Share on other sites

  • 1 month later...

Hello, 

I have the same problem as everybody else ... and despite the information above cannot manage to correct this issue ... 

My problem appears when I try to change the name of a page or a category. Many of the current categories I have do not display any bugs but some do... 

Would anyone have any advice on possibilities to correct this ?

ps: I am on 1.7.6.5

Many thanks and nice evening, 

Share this post


Link to post
Share on other sites

  • 1 month later...

I had the same problem, when saving details from a customer in the admin I got this error; [PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]. After reading this topic I checked the first name, which had A.B.C. as initials filled in. Customer was already a customer in the shop for years, but now she couldn't change the password. I tried helping from the backend, resulting in the code 0 error.

After changing the initials A.B.C. to ABC in the "first name" field the problem was solved for me and all changes were saved without a problem. 

 

Share this post


Link to post
Share on other sites

  • 4 months later...
On 12/9/2019 at 1:54 PM, farzzin said:

i have a solution for those people having this issue

first of all go to "Traffic & SEO" section and be sure you have turned on both "Friendly URL" and "Accented URL" then log out and log in again ...

I tried them all. The only one that worked on the first try was this one !!

Of course it doesn't hurt to delete cache:

1. Advanced Parameters> Performance

2. / var / cache

Share this post


Link to post
Share on other sites

  • 3 months later...

ENGLISH

Hello,
I have solved it by following one of the steps discussed here and another that I have tried and fixed, I am attaching the answer in case someone can use my process.

Trouble:
The problem happened when I exported data (products and categories) from Prestashop 1.6 and imported it into a clean Prestashop 1.7 of 0.

When trying to enter to modify the categories it failed, it also failed when I entered an imported article and reviewed the associated categories, the product associations appeared to 0, and for any change it forced me to place the product in a category, this was an error given that when importing each product had its category.

Solution:
1) Check that it had 2 Root categories, but the newly imported one (called Category1) had no Parent Category, assign the category that already exists called "home"

2) Go to "Traffic and SEO" and make sure that I have "Active friendly URLs" (I already had it by default) but I gave it a save again.

Done these two changes it worked.

 

SPANISH

Hola,
Yo lo he solucionado siguiendo un paso de los que comentan aquí y otro que he probado y se ha arreglado, adjunto la respuesta por si alguien le sirve mi proceso.

Problema:
El problema paso cuando exporte datos (productos y categorías) de Prestashop 1.6 y los importe en un Prestashop 1.7 limpio de 0.

Al intentar entrar a modificar las categorías fallaba, también fallaba cuando entraba a un artículo de los importados y revisaba las categorías asociadas, me aparecían a 0 las asociaciones del producto, y para cualquier cambio me obligaba a colocar el producto en una categoría, esto era un error dado que al importarlos cada producto tenía su categoría.

Solución: 
1) Revise que tenía 2 categorías Raiz, pero la recién importada (llamada Categoria1) no tenia Categoría Padre, le asigne la categoría que ya existe llamada "inicio"

2) Ir a "Tráfico y SEO" y asegurarme que tengo "URL amigables Activas" (por defecto ya lo tenia) pero le di guardar nuevamente.

Hecho estos dos cambios funciono.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hi Guys, if anyone does the same I did - i.e. migrated 1.3 or such to 1.7.7 here is my experience:

Did the transfer of category and _lang as well as the category_product linkage. However in the newer version, there is a "Root" category id = 1, which is not present in older versions of the database. So I had to modify it and create a "Home" category relating to id=1 and mark as root category then update the connections (id_parent) from id=1 to that new home category (for me I had space for id=2) and the depth needs to be managed accordingly (in my case I needed to increase all by one, leaving category 1 to depth of 0). If you are moving form version without category_shop table, you will need copy the content table category into that  category_shop with the appropriate shop id (I only have the default =1). Also dont worry about the nleft and nright also position columns, those get updated by the system the moment you make a change to a category position in the Admin UI.

This re-arranged all the categories and showed them in the interface as well as in the shop.

Here is my 1.3 category table:

1725285927_Screenshotfrom2021-03-3114-28-44.png.ff7308dd0af089e12711f9a9a61dd27c.png

And here is my 1.7.7 category table:

165247909_Screenshotfrom2021-03-3114-31-10.thumb.png.4032e91e051b5ad98ca8a1a7264ac911.png

Hope that helps someone else. 🙂

NB - to the post of @HackID1 (above) - I only have one category marked root - and that is my category 2 (the home category - not id=1 the root category)

Share this post


Link to post
Share on other sites

  • 4 weeks later...
Posted (edited)
On 3/31/2021 at 1:36 PM, batevladi said:

Hi Guys, if anyone does the same I did - i.e. migrated 1.3 or such to 1.7.7 here is my experience:

Did the transfer of category and _lang as well as the category_product linkage. However in the newer version, there is a "Root" category id = 1, which is not present in older versions of the database. So I had to modify it and create a "Home" category relating to id=1 and mark as root category then update the connections (id_parent) from id=1 to that new home category (for me I had space for id=2) and the depth needs to be managed accordingly (in my case I needed to increase all by one, leaving category 1 to depth of 0). If you are moving form version without category_shop table, you will need copy the content table category into that  category_shop with the appropriate shop id (I only have the default =1). Also dont worry about the nleft and nright also position columns, those get updated by the system the moment you make a change to a category position in the Admin UI.

This re-arranged all the categories and showed them in the interface as well as in the shop.

Here is my 1.3 category table:

1725285927_Screenshotfrom2021-03-3114-28-44.png.ff7308dd0af089e12711f9a9a61dd27c.png

And here is my 1.7.7 category table:

165247909_Screenshotfrom2021-03-3114-31-10.thumb.png.4032e91e051b5ad98ca8a1a7264ac911.png

Hope that helps someone else. 🙂

NB - to the post of @HackID1 (above) - I only have one category marked root - and that is my category 2 (the home category - not id=1 the root category)

Hi @batevladi!

I'm having the same issue after upgrading, but even I've made the same changes you said, my backoffice is still showing the category with id 1 and level_depth = 0 as root and the new one marked a is_root_category as a subcategory (I've also changed the PS_HOME_CATEGORY config to the new ID):


1734614601_Screenshot2021-04-25at19_38_15.thumb.png.92f4610828a5a366f111421fdbda7df9.png

125653493_Screenshot2021-04-25at19_38_38.thumb.png.e90cd89922880901ab6d57cadd5e101a.png

Is there something else I should do? I've tried everything and nothing have worked…

 

Edited by Coluccini (see edit history)

Share this post


Link to post
Share on other sites

  • 6 months later...
On 8/14/2019 at 2:57 PM, Cawe said:

First you have to clear LiteSpeed Cache Plugin after update. Secound you have to recreate default and root categories. If you don t have that two categories nothing gona work. Third you have to delate cache in var folder. 

image.thumb.png.6e0af51639af36a5bc7df6bb18da0406.png

Hi,

What is the table on your picture?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More