wakabayashi Posted September 8, 2023 Posted September 8, 2023 (edited) 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 September 8, 2023 by wakabayashi
wakabayashi Posted September 8, 2023 Author Posted September 8, 2023 Ok likely the id_parent is not always set, when editing a category. Maybe it's related to multistore. 😶🌫️
datakick Posted September 9, 2023 Posted September 9, 2023 I don't have this issue. Do you have some reprosteps?
wakabayashi Posted September 10, 2023 Author Posted September 10, 2023 Thats what I thought. That's why I asked here and didn't open a github issue. I will investigate this further, to understand, why it happens.
wakabayashi Posted September 10, 2023 Author Posted September 10, 2023 (edited) 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. https://github.com/thirtybees/thirtybees/blob/main/classes/Category.php#L2427 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 September 10, 2023 by wakabayashi 1
datakick Posted September 11, 2023 Posted September 11, 2023 That makes sense. Thanks for investigating, I've pushed the fix to bleeding edge. 1 1
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