The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store
table inside of it. Also, it might be that there is a table prefix that might or might not be at play here.
Try these first:
- Check your database to ensure there is a
core_store
(or variant) table available.
- Check to make sure your
local.xml
config file is pointing to the right database.
- Ask your host to restore from another restore point.
- Check to ensure your
local.xml
didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
Your magento does not install properly.
May be one or more tables has been missing from your database
.
You need to reinstall your magento system properly.
May be execution time was exceed
during the installation process
. For this case you increase max execution time in php.
Best Answer
If you are running a store with a very small number of products/categories you may want to simply disable the flat tables in
System > Settings > Catalog
. This can also sometimes be the case for very large catalogs as there is an obvious trade off to flattening the EAV tables. 1) It's less indexing that has to happen. 2) It can sometimes be faster if certain scenarios mentioned above are the case.How are you normally re-indexing via the CLI? Do you receive any Exception or error messages when running it from the command line?
php -f shell/indexer.php reindexall
?You should also take a look in
var/log/exception.log
&var/log/system.log
to see if there is any insight into the indexing failing. As what may be occurring is when your integration cron runs for Magmi, a reindex could be triggered that is failing, a normal operation for the*_flat
tables is to drop the table before rebuilding it, it's a temporary table as you mentioned dropping the table manually works briefly. With this in mind, the indexer may start, hit an issue causing the indexer to fail and leaving the_flat
table missing until a manual reindex happens. More details on your store's setup, integrations and reviewing logs to help pinpoint WHEN it happens may help with the process of elimination to locate the issue and fix it. Disabling your Magmi integration briefly may be something to consider as well to determine if the table still is missing or not. Anyhow, hope this helps and here's some further reading on the flat table/indexing:Resources: