
02-17-2014, 09:18 PM
|
|
Advanced Staff Users
|
|
 X-Cart team
|
|
Join Date: Dec 2008
Posts: 928
|
|
|
Re: X-Cart 4.6.1 released
Quote:
Originally Posted by elmirage001
When module "Product Options" is turned off and I try to delete a product the product deletes and then I go to a blank screen and the following error
Line 869 in Red
Code:
// Product options module
if (func_is_defined_module_sql_tbl('Product_Options', 'class_options')) {
$classes = func_query_column("SELECT classid FROM $sql_tbl[classes] WHERE productid='$productid'");
db_query("DELETE FROM $sql_tbl[classes] WHERE productid='$productid'");
if (!empty($classes)) {
$options = func_query_column("SELECT optionid FROM $sql_tbl[class_options] WHERE classid IN ('".implode("','", $classes)."')");
db_query("DELETE FROM $sql_tbl[class_lng] WHERE classid IN ('".implode("','", $classes)."')");
if (!empty($options)) {
db_query("DELETE FROM $sql_tbl[class_options] WHERE classid IN ('".implode("','", $classes)."')");
db_query("DELETE FROM $sql_tbl[product_options_lng] WHERE optionid IN ('".implode("','", $options)."')");
db_query("DELETE FROM $sql_tbl[product_options_ex] WHERE optionid IN ('".implode("','", $options)."')");
db_query("DELETE FROM $sql_tbl[variant_items] WHERE optionid IN ('".implode("','", $options)."')");
db_query("DELETE FROM $sql_tbl[variant_backups] WHERE optionid IN ('".implode("','", $options)."')");
}
}
db_query("DELETE FROM $sql_tbl[product_options_js] WHERE productid='$productid'");
$vids = db_query("SELECT variantid FROM $sql_tbl[variants] WHERE productid='$productid' AND " . XCVariantsSQL::isVariantRow($productid));
if ($vids) {
while ($row = db_fetch_array($vids)) {
func_delete_image($row['variantid'], "W");
}
db_free_result($vids);
}
db_query("DELETE FROM $sql_tbl[variants] WHERE productid='$productid'");
}
If I turn "Product Options" back on and I delete a product everything works fine.
I don't know if this happens on a stock 4.6.1 or not as I upgraded my database from 4.4.5 to 4.6.1
I reported on bug tracker but maybe someone else would like to test also. Thanks!
Paul
|
The fix_fatal_error_on_product_delete.diff patch has been attached
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
|
The following user thanks aim for this useful post:
|
|
|