Jump to content
prime1974

Multistore - Impossible to select a root category for new store

Recommended Posts

Hi there.

We are running for the second time into problems creating a new store with multistore activated.

The problem we run into is the following error message:
"You need to select at least the root category."

 

The source of the problem is located in what you see here:
post-18579-0-96656400-1467050918_thumb.png

You will notice that the checkbox is missing for the root category "Online print shop".

Once I change the category root to the original category root of the general store category (start - prestashop default), I am able to select the root category as visible in here:
post-18579-0-77051400-1467050927_thumb.png

You will notice that the checkbox to select the root category is available for selection, which in the other case wasn't.

 

The root category which I want to select ("Online print shop") is the root category of another online shop which is already working with that root category.

Can somebody please help?

Thank you very much in advance!

Share this post


Link to post
Share on other sites

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

  • Like 1

Share this post


Link to post
Share on other sites

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

No, there was no important update from the old versions. We use prestashop since version 1.6.0.

I'll go for the DB entry on monday and let you know what's in there.

 

Cheers.

Share this post


Link to post
Share on other sites

I am have to same problem, after i change my strutured of categories the presta return this error, in the back office, only while i select one shop,  while i set all shops he work normaly, i already try set root category, create home category, change db and other things but not work. if someone cn help me , i need help... thanks and i'm sorry for my bad english.

[PrestaShopException]

Root category must be an integer value
at line 212 in file classes/helper/HelperTreeCategories.php

207.     }208. 209.     public function setRootCategory($value)210.     {211.         if (!Validate::isInt($value)) {212.             throw new PrestaShopException('Root category must be an integer value');213.         }214. 215.         $this->_root_category = $value;216.         return $this;217.     }

Share this post


Link to post
Share on other sites

I'm having the same issue, can't create a new multishop even thou I added a new root category. My Presta was updated from 1.4 to 1.6

Share this post


Link to post
Share on other sites

I can't reproduce this issue on my PrestaShop v1.6.1.6 website. My guess is that you've upgraded from an old version of PrestaShop before Multistore was added and your category structure has a "Home" category of 1 instead of 2. Can you check your ps_category_lang table to see what's there? Each of your shops should have the "Root" category with an ID of 1 and a "Home" category with an ID of 2.

 

Should I change the category_id in ps_category_lang and ps_category from 1 to 2?

 

What will this change break?

Share this post


Link to post
Share on other sites

I experience the same problem. I started with a fresh installation 1.6.1.0 now upgraded to 1.6.1.11. And the error persists.

When activating multi-store and adding a new shop, it fails to save with error "select root category".

The issue here is that the default root category is not selectable because there is no checkbox.

 

I've seen an aritcle:

https://www.hostknox.com/tutorials/prestashop/1.5-1.6/multistore#add-shops

with sscreenshot:

https://www.hostknox.com/content/images/tutorials/prestashop/1.5-1.6/multistore/10.jpg

 

Showing that in prestashop-v1.6.0.x, the default home root category is selectable with a checkbox.

 

Why in version 1.6.1.x it is not available, is a mystery to me.

Edited by jordifs (see edit history)

Share this post


Link to post
Share on other sites

This post is just to inform others.

 

Warning:

There are more bugs linked to feature multi-store.

 

Briefing on my scenario:

In theory the system does not allow to migrate from one shop. With the intend to:

- enable feature multi-store

- then move the existing configuration to shop group

- then add other shops to the group using shop cloning.

That was not seen as allowed in version 1.6.1.[1-11]. Nonetheless can say this is possible with some hacks. Some involve changing database records. Cannot recommend my pathway.

 

Details on my path:

Did the trickery to enable multi-store preserving the initial shop. Had feature multi-store enabled for 12-18 months. In that period new bugs appeared. After much looking around, and reading the program source routines. Encountered what I perceived as bugs. Some obvious to me in design. The are some routines that appeared not up for the task of a full-featured multi-store behaviour. In a way it was comprehensible. It is complex and difficult. No bad feelings on programmers. But after much looking around, multiple issues led me to conclusions:

- feature multi-store was not ready for production (v1.6.1)

- it is a very bad idea (better to separate multiple installations; or to have one installation being able to really operate with multiple domains)

- it is badly designed (the programming is tricky, with query parameters that change the output depending on external arguments, shop vs shop_group and sql-joins)

- has some evident GUI pitfalls. Shop owner wants to add one product shared in multi-domains, not having differents shops with the same product. The stock quantity can be shared. But the product created through cloning is inherently bad, and needs post cloned action to edit and correct. This means doing that for multiple text fields, multiple languages, and multiples shops (5-10, one for each domain). The amount of backoffice work is untenable for the admin person. So the idea of using multi-domain through multi-store is unusable. Please consider some numbers: 5 domains/shops, with 4k-5k products, with 5 languages, with up to 200 custom attributes for each product. Having to edit so many fields, for each language, and repeat the process for each shop, is untenable.

 

This lead me to a situation in which: I perceived new bugs that seem to be unreported and unsolved. I compared that scenario to a previous one without multi-store, and without some bugs. So decided to go back. To undo the multi-store feature. And return to one shop one domain. It kind of works.

 

The summary:

Avoid using feature multi-store at all costs.

If multi-domain feature is the objective. Then better to add it through small hacks. To trick the system. To use the domain present in the web-browser instead of the one configured in database. Doing that is easy. But other issues might arise (me still working on this).


 

Hope this clarifies my stance around this issue-bug and provides a contextual interpretation around the feature and its use.

Share this post


Link to post
Share on other sites
Posted (edited)

If goal is return to single store (disable the bugged multistore) fix is on this query

INSERT INTO `ps_category_shop` ( `id_category` , `id_shop` , `position` )
SELECT id_category, 1, 0
FROM `ps_category`
WHERE id_category NOT
IN (
SELECT id_category
FROM `ps_category_shop`
)

Edited by devecschool (see edit history)

Share this post


Link to post
Share on other sites
9 minutes ago, devecschool said:

If goal is return to single store (disable the bugged multistore) fix is on this query

INSERT INTO `ps_category_shop` ( `id_category` , `id_shop` , `position` )
SELECT id_category, 1, 0
FROM `ps_category`
WHERE id_category NOT
IN (
SELECT id_category
FROM `ps_category_shop`
)

About your insight. Can guarantee it is not so easy. There is other stuff. Like advanced stock management, which links stock quantities to shop_group or shop. There is also other bugs, like having the same customer with same email address, present in ps_customer with multiple records. There is weird stuff going on that require careful approach. Also some modules are installed saving configuration linked to shop_group. So the rollback affects, for instance, the payment module. A platform with such a diversity, makes it too difficult to recommend an easy solution.

Eventhough, it is feasible to rollback changes.

Share this post


Link to post
Share on other sites
1 minute ago, jordifs said:

About your insight. Can guarantee it is not so easy. There is other stuff. Like advanced stock management, which links stock quantities to shop_group or shop. There is also other bugs, like having the same customer with same email address, present in ps_customer with multiple records. There is weird stuff going on that require careful approach. Also some modules are installed saving configuration linked to shop_group. So the rollback affects, for instance, the payment module. A platform with such a diversity, makes it too difficult to recommend an easy solution.

Eventhough, it is feasible to rollback changes.

the problem is that a serious bug reported in 2016 is still open :( also on 1.7.x

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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