You can check table store_group
and make sure the root catagories (root_category_id
field) is assigned to the store (website_id
field)
In case: Root Catalog (ID 1) & Default Category (ID 2) has been deleted in the database. You can re-add it by running the following SQL commands:
INSERT INTO `catalog_category_entity` (`row_id`, `entity_id`, `created_in`, `updated_in`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES
(1, 1, 1, 2147483647, 3, 0, '2018-08-30 07:14:33', '2018-08-30 09:40:41', '1', 0, 0, 5),
(2, 2, 1, 2147483647, 3, 1, '2018-08-30 07:14:33', '2018-08-30 07:14:33', '1/2', 1, 1, 0);
INSERT INTO `catalog_category_entity_int` (`value_id`, `attribute_id`, `store_id`, `row_id`, `value`) VALUES
(1, 69, 0, 1, 1),
(2, 46, 0, 2, 1),
(3, 69, 0, 2, 1);
INSERT INTO `catalog_category_entity_varchar` (`value_id`, `attribute_id`, `store_id`, `row_id`, `value`) VALUES
(1, 45, 0, 1, 'Root Catalog'),
(2, 45, 0, 2, 'Default Category'),
(3, 52, 0, 2, 'PRODUCTS');