Magento admin category tree shows no sub categories

Ever had that the category tree does not show specific subcategories that are present though?

Than follow these steps:

1. Make a backup for if anything goes wrong (running all the steps is on your own risk of course).

2. Run this query

SELECT c.entity_id, c.children_count as original_children_count, COUNT(c2.children_count) as `children_count`, c.level as original_level, (LENGTH(c.path)-LENGTH(REPLACE(c.path,'/',''))) as `level`
FROM catalog_category_entity c
LEFT JOIN catalog_category_entity c2 ON c2.path like CONCAT(c.path,'/%')
GROUP BY c.path

3. Check if there are still minus children_count categories with:

SELECT c.entity_id, c.children_count as original_children_count, COUNT(c2.children_count) as `children_count`, c.level as original_level, (LENGTH(c.path)-LENGTH(REPLACE(c.path,'/',''))) as `level`
FROM catalog_category_entity c
LEFT JOIN catalog_category_entity c2 ON c2.path like CONCAT(c.path,'/%')
GROUP BY c.path

If anything went right, it should show a + sign before the category in the category tree in the Magento admin again. Good luck

This error is likely caused by a category copy/duplicate plugin.

Thanks to: http://magento.stackexchange.com/questions/34730/not-showing-sub-categories-in-category-tree-in-manage-products-page

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top