No, what it means is that when the remove was performed, the code did everything it was programmed to do; however, there were three keys that had been added that were not incorporated into the remove process. Therefore, the keys remain in the database. Further, the install has not been written to allow such failures, but instead to provide an error like what you provided. As a result of the error, program execution of the installation stopped dead in its tracks and therefore, the table has not been recreated which is why this latest error is seen. So… Below is the code to incorporate into the removeDynDropdownsConfiguration function inside of admin/stock_by_attr_install.php (in SBA version 1.5.4 this is around line 113) I would suggest adding the code below (three sets of lines) after this line:
Code:
array_push($resultMmessage, '• Deleted STOCK_SET_SBA_NUMRECORDS ' . $msg);
The following three sets of lines need to be added into the function removeDynDropdownsConfiguration()
Code:
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted PRODINFO_ATTRIBUTE_DYNAMIC_STATUS ' . $msg);
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'SBA_ZC_DEFAULT'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted SBA_ZC_DEFAULT ' . $msg);
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK ' . $msg);
After adding this code, if you uninstall again and then reinstall, it should reinstall successfully… Otherwise, one could place the following code in the install SQL patches window found in the admin panel under tools:
Code:
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS';
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'SBA_ZC_DEFAULT';
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK';
And then be able to install again; however, without the above additional code then a subsequent removal will result in the same condition again until the code can be updated on github.
Bookmarks