Jump to content

deleting any product will truncate cats_idx table


Recommended Posts

There is a bug in admin/products/index.php that means when you delete a product it will delete all rows from the cats_idx table. This has also been posted on bugs.cubecart.com so brooky is aware of it, hopefully will be fixed in new point release.

Fix below:

Existing Line 54:

$where = $record['productId'] = $db->mySQLSafe($_GET["delete"]);

New Line 54:

$where = "productId=".$db->mySQLSafe($_GET["delete"]);

hope this helps anyone who wonders where there products have gone.

If you've already deleted a product and are stuck with products that arent getting displayed you can manually repopulate the cats_idx table with:

INSERT INTO **PREFIX**CubeCart_cats_idx

SELECT NULL,cat_id,productId

FROM **PREFIX**CubeCart_inventory

Suggest this thread gets pinned, as its a real pain to delete all products and start again.



Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...