Yet another interesting discovering has been made in the world of Magento product creation and management.
We have a client that was unable to access specific categories from the drop down list in the Category tab on the product edit page in the backend of Magento. The list would show many parent categories with that tiny little plus expansion image but there were a few parent categories that we knew had children would just not let us expand the category and discover what was inside. That plus image just wasn’t available. However, it was available in the Category management section in Magento.
So the question was . . . Why are parent categories letting us expand them in the Category Managment section in Magento, but not in the product edit section?
After exploring many vast and spacious lands within Magento and upgrading to the latest version of Magento there was nothing leading us to a resolution . . . that is . . . until now!
Turns out we had to do some spelunking in the depths of Magento’s storage system to resolve the issue.
Within the catalog_category_entity table we noticed that the children_count of some of the categories had negative numbers in them. We thought that was just plan odd. How could a category have negative categories when the entire system is based on there is x children or there simply is not.
So, like brave soles that we are we changed that children_count of the parent category to a positive number that was physically counted.
Whaaalllaaaa! Categories that prevented us from accessing their children were now free and openly sharing access to their kids!
Can’t you just feel the love