Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall not removing attribute #24

Open
p24-max opened this issue Sep 14, 2023 · 2 comments
Open

Uninstall not removing attribute #24

p24-max opened this issue Sep 14, 2023 · 2 comments

Comments

@p24-max
Copy link

p24-max commented Sep 14, 2023

Preconditions (*)

  1. Version 1.2.0
  2. Magento 2.4.5

Steps to reproduce (*)

  1. Install the extension with composer
  2. Run setup upgrade
  3. (Verify: Attribute google_product_category is created)
  4. Uninstall the module: bin/magento module:uninstall --remove-data --non-composer -v Meta_Catalog -> Attribute is still remaining
  5. Remove the module with composer remove
  6. Open a product in edit mode in catalog admin, will result in error
Type Error occurred when creating object: Meta\Catalog\Model\Config\Source\Product\GoogleProductCategory, Meta\Catalog\Model\Config\Source\Product\GoogleProductCategory::__construct(): Argument #1 ($sourceData) must be of type array, null given, called in ...

Expected result (*)

  1. That it can be safely uninstalled

Actual result (*)

  1. Removing the module causes errors in the magento admin (edit product page):
Type Error occurred when creating object: Meta\Catalog\Model\Config\Source\Product\GoogleProductCategory, Meta\Catalog\Model\Config\Source\Product\GoogleProductCategory::__construct(): Argument #1 ($sourceData) must be of type array, null given, called in ...
@willfreeze
Copy link

Got the same issue on Magento 2.4.6
Can I manually remove the google_product_category to resolve the problem?

@PhiIipp
Copy link

PhiIipp commented May 3, 2024

@willfreeze did you find a way ?

ChatGPT propose the following, and i see the record in the db.

SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'google_product_category';
DELETE FROM catalog_product_entity_* WHERE attribute_id = [attribute_id];
DELETE FROM eav_attribute WHERE attribute_id = [attribute_id];

but i dont want to crash my DB schema , or run in problems when I install a new versions once meta plugin compatible with magento 2.4.7 and php 8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants