maniakpresta Posted November 6 Share Posted November 6 Hello. We migrated from Prestashop 1.3 to Prestashop 8. We discovered that we cannot manage the add or edit of categories to products. What we saw is that in the 1.3 database, category 1 is (HOME) and (root). In the Prestashop 8 database, category 2 is (HOME) and (root). In the database of 8 after the migrate, category 1 is (root) and category 2 is (HOME) Also, category 1 has id_parent (582), a category created during migration that did not exist in 1.3 and is not processed in the Prestashop back end (The object cannot be loaded (or found). First of all, I would like to ask if it is possible to migrate from Prestashop 1.3 to 8 and if there is a solution to the above problem. Thank you. Link to comment Share on other sites More sharing options...
ComGrafPL Posted November 6 Share Posted November 6 I did one time 1.3 but to 1.7 and 1.4 to 8. With some issues. Regarding categories. They are working on new products? Issues are only on migrated ones? Link to comment Share on other sites More sharing options...
maniakpresta Posted November 6 Author Share Posted November 6 24 minutes ago, ComGrafPL said: I did one time 1.3 but to 1.7 and 1.4 to 8. With some issues. Regarding categories. They are working on new products? Issues are only on migrated ones? The problem also exists in the new products we add. Link to comment Share on other sites More sharing options...
ComGrafPL Posted November 6 Share Posted November 6 Is it edition version? re do the categories? Link to comment Share on other sites More sharing options...
musicmaster Posted December 3 Share Posted December 3 The new category is "root". It comes below your Home category. It was introduced in version 1.5 together with multi-shop. As it is created during the update to 1.5 it will have a high id number. Your category tree problems signal some problem with the nleft and nright fields. You could try my free Prestools. It has an Integrity Checks function that includes an option to regenerated this tree. I made some upgrade tools (Copy_shopdata and UpgradeHub ) but they won't go further back than 1.4.9 at the moment. Link to comment Share on other sites More sharing options...
Reha Ultimate Posted December 10 Share Posted December 10 In PrestaShop 1.5+ the category structure was changed, and the system expects: ID 1 = Root ID 2 = Home When a shop is migrated from very old versions (like 1.3), these IDs often remain reversed. As a result, the Back Office cannot correctly load or attach categories to products. In your migrated database the structure is incorrect: Category 1 is not Root Category 2 is not Home Category 1 even has an invalid parent (ID 582) This breaks the nested-set structure (nleft / nright) and causes exactly the issue you describe. The fix is: Set category ID 1 to be the real Root category: id_parent = 0 Correct values for nleft, nright, level_depth Set category ID 2 to be the Home category, with: id_parent = 1 Make sure all other categories connect under this tree properly. Regenerate the category nested set (nleft / nright) after correcting IDs. Prestools or the built-in Category::regenerateEntireNtree() can rebuild the tree. Once Root is ID 1 and Home is ID 2—as PrestaShop 8 requires—the product category selector will work normally again. Link to comment Share on other sites More sharing options...
musicmaster Posted December 10 Share Posted December 10 10 hours ago, Reha Ultimate said: In PrestaShop 1.5+ the category structure was changed, and the system expects: ID 1 = Root ID 2 = Home When a shop is migrated from very old versions (like 1.3), these IDs often remain reversed. As a result, the Back Office cannot correctly load or attach categories to products. In your migrated database the structure is incorrect: Category 1 is not Root Category 2 is not Home Category 1 even has an invalid parent (ID 582) This breaks the nested-set structure (nleft / nright) and causes exactly the issue you describe. The fix is: Set category ID 1 to be the real Root category: id_parent = 0 Correct values for nleft, nright, level_depth Set category ID 2 to be the Home category, with: id_parent = 1 Make sure all other categories connect under this tree properly. Regenerate the category nested set (nleft / nright) after correcting IDs. Prestools or the built-in Category::regenerateEntireNtree() can rebuild the tree. Once Root is ID 1 and Home is ID 2—as PrestaShop 8 requires—the product category selector will work normally again. That is not correct. When you upgrade from 1.4 to 1.5 it will create a new category with the name "root" and that category will get the next available id number. Link to comment Share on other sites More sharing options...
Reha Ultimate Posted Wednesday at 01:39 PM Share Posted Wednesday at 01:39 PM On 12/10/2025 at 11:59 PM, musicmaster said: That is not correct. When you upgrade from 1.4 to 1.5 it will create a new category with the name "root" and that category will get the next available id number. My friend, it is Prestashop 1.3 to Prestashop 8 migration, not to 1.5 Link to comment Share on other sites More sharing options...
musicmaster Posted Wednesday at 08:01 PM Share Posted Wednesday at 08:01 PM 6 hours ago, Reha Ultimate said: My friend, it is Prestashop 1.3 to Prestashop 8 migration, not to 1.5 Prestashop's autoupgrade module works step by step, processing sql files that list what must be changed in the database for the next version. And at some point during that process it will cross the 1.4-1.5 border and add the root category. Those files are found in the /install/upgrade/sql directory (up to 1.7.0) and /modules/autoupgrade/upgrade/sql (after 1.7) Of course third party tools can choose to work in another way. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now