Resolved: Magento Category Tree not Showing in Admin

1 August 2016| Post by Graham

AuthorGraham

If you’ve ever imported data into Magento without using their API methods, you may have come across a rather annoying bug when there are no categories showing up on the “Category” tab.

This is due to the “children_count” field being out of sync – using the following SQL statement fixes this issue. As always, don’t forget to take a backup of the “catalog_category_entity” table before you run this SQL.

				

UPDATE catalog_category_entity
SET children_count =
(SELECT COUNT(*)
FROM
(SELECT *
FROM catalog_category_entity) AS category_alias
WHERE path LIKE CONCAT(catalog_category_entity.path,”/%”));

Scroll