Hello David,
I hope all is well. I noticed this morning that the table pt_products was deleted from my database. I do use cron.php daily to fetch and update all feeds and I did notice something odd when feeds were showing no products in the admin page yet they were still there on the website. Can you shed any light on what could have caused the deletion and how Ican prevent it from happening again? Thanks
Allan
Hi David,
Thanks for the quick reponse. When you refer to feeds tables is that pt_feeds as that was still in the db this morning and I just check it was fine. Also if I use 'setup.php?installDB=1' will that overwrite any tables that are fine? Thanks
Hi Allan,
Running setup.php?installDB=1 will only replace missing tables; any existing tables won't be affected as the CREATE TABLE sql will fail - so no problem!
Cheers,
David.
--
PriceTapestry.com
Hi David, I ran cron.php again. I noticed that a table called pt_products_import is created and filled. Then when it is finished pt_products and pt_products_import are deleted. No products are available to view as a result. Does this indicate a corrupt feed on import? Thanks
Hi Allan,
I see you've added the zero down-time mod and it looks like something is not quite right in the final part of the process where the products table is dropped and the import table renamed to become it.
Could you check the changes in scripts/import.php and make sure that it contains the following code:
$sql = "DROP TABLE `".$config_databaseTablePrefix."products`";
database_queryModify($sql,$result);
$sql = "RENAME TABLE `".$config_databaseTablePrefix."products_import` TO `".$config_databaseTablePrefix."products`";
database_queryModify($sql,$result);
(search for the DROP TABLE ... products line) and make sure that the RENAME TABLE line is in place. If everything looks according to the modification if you could email me the modified scripts/import.php and I'll check it out...
Cheers,
David.
--
PriceTapestry.com
Hi Allan,
If no products are showing in /admin/ but products are still accessible on your website that would indicate a problem with the feeds table rather than the products table. If tables for whatever reason have been dropped you can always re-create by browsing to:
setup.php?installDB=1
What may have happened is that the feeds table has crashed. If you create the following file as dbfix.php in your main Price Tapestry installation folder and then browse to dbfix.php that will repair the table if that is indeed the problem.
<?php
require("includes/common.php");
$sql = "REPAIR TABLE `".$config_databaseTablePrefix."feeds`";
database_queryModify($sql,$result);
print "Done.";
?>
Cheers,
David.
--
PriceTapestry.com