Whenever you try to uninstall the IceCat module, it gives you an error, as shown in "Screenshot - 1" , and you cannot uninstall the module. Also, whenever you disable the IceCat module and run the setup:upgrade command, five out of six tables in the database, generated through the "db_schema.xml" file by this module, get deleted. However, the remaining table named "icecat_queue_schedule"' in the database didn't get deleted, as shown in "Screenshot - 2".
Screenshot - 1
Screenshot - 2
Steps To Reproduce
Get the clone of Magento Shop .
Install the “ IceCat ” module. After that run the setup:upgrade command .
(e.g. composer require icecat/magento2-extension after that php bin/magento setup:upgrade)
Disable the module, and after that, run the setup:upgrade command.
(e.g. php bin/magento module:disable Icecat_DataFeed after that php bin/magento setup:upgrade)
After that , open the database and search just "icecat" and the table named “icecat_queue_schedule” will appear there. As you
can see in the "Screenshot - 2".
After enabling the above module try to uninstall the module , then the error occurs and the module cannot be uninstalled. As
you can see in the "Screenshot - 1".
(e.g. php bin/magento module:enable Icecat_DataFeed after that php bin/magento module:uninstall -r Icecat_DataFeed)
Expected Result
The module should get uninstalled , and all the tables should get deleted after disabling the module.
Actual Result
The module didn't get uninstalled , and one out of six tables didn't get deleted after disabling the module.
Reason
As I have checked in this file "icecat/magento2-extension/Setup/Patch/Data/CreateProductAttribute.php" , there is unnecessarily commented the whole line no. 220 to 224 . Due to this, the data of the connection variable wasn't received ahead as its previous part was commented. Also this part [ $this->categoryRepository->deleteByIdentifier($categoryId); ] is placed at the wrong place in the line no. 244 . As you can see in the "Screenshot - 3" . As a result , it throws an error while uninstalling this module . Also , I have I checked in this file "icecat/magento2-extension/etc/db_schema_whitelist.json" , there is missing part regarding "icecat_queue_schedule" table. So for that reason this table didn't get deleted.
Preconditions
Magento Version : 2.4.6-p2 Module Version : 2.0.0
Description
Whenever you try to uninstall the IceCat module, it gives you an error, as shown in "Screenshot - 1" , and you cannot uninstall the module. Also, whenever you disable the IceCat module and run the setup:upgrade command, five out of six tables in the database, generated through the "db_schema.xml" file by this module, get deleted. However, the remaining table named "icecat_queue_schedule"' in the database didn't get deleted, as shown in "Screenshot - 2".
Screenshot - 1
Screenshot - 2
Steps To Reproduce
Expected Result
The module should get uninstalled , and all the tables should get deleted after disabling the module.
Actual Result
The module didn't get uninstalled , and one out of six tables didn't get deleted after disabling the module.
Reason
As I have checked in this file "icecat/magento2-extension/Setup/Patch/Data/CreateProductAttribute.php" , there is unnecessarily commented the whole line no. 220 to 224 . Due to this, the data of the connection variable wasn't received ahead as its previous part was commented. Also this part [ $this->categoryRepository->deleteByIdentifier($categoryId); ] is placed at the wrong place in the line no. 244 . As you can see in the "Screenshot - 3" . As a result , it throws an error while uninstalling this module . Also , I have I checked in this file "icecat/magento2-extension/etc/db_schema_whitelist.json" , there is missing part regarding "icecat_queue_schedule" table. So for that reason this table didn't get deleted.
Screenshot - 3