taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 29 forks source link

Uninstalling the extension breaks functionality on the store - Missing `revert` function implementation. #316

Closed drew7721 closed 2 years ago

drew7721 commented 2 years ago

Prerequisites

Description

Uninstalling the extensions breaks the functionality of the site. Unable to create new customer accounts and multiple areas of the site are broken. This is due to the lack of a revert function in the data patches.

This file https://github.com/taxjar/taxjar-magento2-extension/blob/develop/Setup/Patch/Data/AddExtensionAttributesPatch.php does not implement the revert function. Hence, once the extension is uninstalled, the custom attributes will remain and the code will try to fin the source_model classes that no longer exist. This will cause an exception and break functionality.

@sethobey please see : https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/data-patches.html#revertingDataPatches

You simply need to add the revert function and in the data patch to remove the custom attributes that you've created.

Steps to Reproduce

  1. install extension
  2. uninstall extension
  3. try to create a new user on the store. -

Expected Result

Should work

Actual Result

Site breaks

Versions

sethobey commented 2 years ago

Hi @drew7721, thank you reporting this issue! We should have a fix available hopefully by EOD today in the form of v1.9.5 which is awaiting marketplace approval now.

Thanks again!

sethobey commented 2 years ago

Hello again @drew7721, v1.9.5 is now available and should resolve the issue. Thanks for reporting!

drew7721 commented 2 years ago

Wow, amazing response and fix time! 👍🏻 Good job!

Thank you for fixing this

sethobey commented 2 years ago

You're very welcome, always happy to help. Thanks again for contributing and thank you for choosing TaxJar!