Jump to content
thirty bees forum

Category Controller Broken in BO?


Recommended Posts

Do you have also issues when saving categories?

I had this in my teststore. Now I have it also in the live store. I just saved a category X and now the tree in BO is completly broken. I can't find them anymore there...


@datakick is the complexity with level_depth, nleft, nright, is_root_category any good for? To me this looks overcomplex and that's why it's no wonder, that its kind of broken.

Edited by wakabayashi
Link to comment
Share on other sites

The issue is in public function isParentCategoryAvailable($idShop) in Category Class. IMO it doesn't join the category correctly. I have 3 shops. (id_shop=3 is the default one). But in ps_category I have some entries, that have id_shop_default=1 (don't ask me how I can even controll this as an user). 

In this case isParentCategoryAvailable($idShop) returns false, even if a category is associated to shop with id_shop=3. 


Should be changed to:

->join(Shop::addSqlAssociation('category', 'c', true, null, true))


This is a very edge case, which explains why I am probably the only one suffering from it 🙄

Edited by wakabayashi
  • Like 1
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...