Jump to content

Categories id from 1.6 to 1.7 question


Recommended Posts

Hello,

I have just one question about the categories ids when upgrading from 1.6 to 1.7.

In my 1.6 version I have the ids :

Id 225 is the root category and coded with is_root_category =1

Id 1 is Home categoy with id_parent=225

Id 2 is one of the categories

etc...

This codification works in 1.6 but I have a lot of troubles when I upgrade to 1.7.

I have an error when I want to add category home to a product :

This value is not valid. tree
Symfony\Component\Validator\ConstraintViolation

Object(Symfony\Component\Form\Form).children[step1].children[categories].children[tree] = [0 => 1, 1 => 2, 2 => 19]

Caused by:
Symfony\Component\Form\Exception\TransformationFailedException

The choices "1" do not exist in the choice list.

Does this mean that category 1 is not available for Home ?

Can somebody confirm these configuration will not be a problem after the upgrade.

Thanks for helping me,

Jean-Marie

 

Edited by polaije (see edit history)
Link to comment
Share on other sites

It is bizzare that you have a root category with an ID 225, its not wrong but it is also not normal.  Based on the error you received, it is likely that PS developers did not anticipate this occurring in PS v1.7.

I'm also not sure how you went about upgrading your store from 1.6 to 1.7, as I do not believe the autoupgrade module truly supports that yet.

I would think your best bet would be to open a forge ticket to Prestashop, as I feel they really should support such a scenario.

In the meantime, I would suggest going to the database (take a back up first), and perhaps change the root category ID back to 0, and then relink the home category to ID 0.  There may be numerous places in the database where you would have to do this.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

A root category of 225 is very normal. It happens when you upgraded from Prestashop 1.4 or older. 1.4 had no root, only a home. So when you upgraded to 1.5 it had to create a root and that became the next free number.

Prestashop does not use id numbers of zero. So setting the number to zero is not a good idea. It will lead to unpredictable errors. 

Link to comment
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
×
×
  • Create New...