Magento CE 1.4 (also EE 1.8) introduced a new attribute to category entities; include_in_menu. I’ve checked very carefully and no code ever sets it to anything but “1”. The default value is “1”. There isn’t an option to control it. And yet when some of my categories disappeared from the navigation I found this attribute had been cleared.
I can see app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php adds a filter for the attribute, this is how the value is being read. Sure enough, if I forcibly clear the value in the database those records are correctly filtered out and disappear from the front end navigation.
I’ve since reset all the values and it works fine now. However I don’t understand why it went wrong nor how to prevent it happening again. Can anyone please suggest possible causes?
There’s a user control in the admin under Manage Categories on the General Information tab called “Include in Navigation Menu”. Is it possible that this value was toggled manually?