0

For some reason my category structure on the frontend and admin panel show different results. Check image below:

On the frontend my category "DATORER" have 4 subcategories but in the admin panel I only have 2 active subcategories.

I'm importing the products and category structure from a system called IcePim and one thing to be noted is that the frontend are displaying the correct category structure I've set up in IcePim while it's being displayed wrong from the Admin panel.

Is there something I have missed to why they show different results?

I have run tried

  • rm -rf var/di var/generation
  • php bin/magento cache:flush
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento indexer:reindex
  • optimze database

Frontend enter image description here

Admin panel

enter image description here

enter image description here

1 Answer 1

0

I believe it's a matter of value scoping. What I think happens is that during your data import, the values are set on the store view level, but when you enter the admin you don't see that directly from the start as you are initially browsing the Scope: All Store Views which is the default store (different than the store view that holds your data).

If you change the scope to be the store view (from the upper left corner of your category admin page), you should now see your category as enabled.

Please check and let me know if you need more details.


LE: we need to identify the values stored in your db:

let's retrieve the values stored on the category for the status attribute (replace <category_id> with the ID of your category of interest):

COMMERCE

select * from catalog_category_entity_int where row_id in (select row_id from catalog_category_entity where entity_id = <category_id>) and attribute_id in (select attribute_id from eav_attribute where attribute_code='is_active' and entity_type_id='3');

OPEN SOURCE

select * from catalog_category_entity_int where entity_id = <category_id> and attribute_id in (select attribute_id from eav_attribute where attribute_code='is_active' and entity_type_id='3');
10
  • Hi! Thanks for the reply. I changed the Store View in the upper left corner to the specific Store View that's being displayed on the frontend but it's stil the same problem. Feb 4, 2021 at 8:02
  • ok, now that's weird... normally, on a default menu only active / enabled categories should appear. so my next question is - are you using magento default menu OR a 3rd party extension OR a CMS block rendered as a menu where categories are added manually?
    – Diana
    Feb 4, 2021 at 8:31
  • Yeah I would agree on that... The category structure is being imported from IcePim's own custom extensions that they have added to my website. Feb 4, 2021 at 8:33
  • It's the default menu block :) Feb 4, 2021 at 8:55
  • please check the edit on my answer and run the query (depending on your Magento edition) and see if you can catch the idea on what store the values are stored.
    – Diana
    Feb 4, 2021 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.