I hope you can help me with this strange error.
Currently, we are working in a store with EE 1.14 and we are seeing a problem with category's url keys and url paths: They always return null. For example, if I execute the following:
$_cat = Mage::getModel('catalog/category')->load($_catId);
echo $_cat->getUrlKey() . '<br />';
echo $_cat->getUrlPath() . '<br />';
Both return me null. If I disable the Category Flat in the store, the error is fixed and both values are printed correctly. However, while it is enabled in the store, this persists.
I checked the table catalog_category_flat_store_1 and I noticed that, indeed, url_key and url_path fields have NULL value for all categories of the store. But in catalog_category_entity_url_key, url keys are stored correctly.
If I go to the backend, I'm going to a category, and manually save it, the url_key is stored and reflected in catalog_category_flat_store_1 correctly. However, if I run the reindexing:
php indexer.php --reindex catalog_product_flat
The url_key disappears again (ie, its value changes back to null).
It is noteworthy that only happens with the categories, not products. Do you know what could be causing this and how to fix it?
Greetings and thanks in advance for your support.