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? #299

Closed
shamoon opened this issue Jan 19, 2017 · 4 comments
Closed

Uninstall? #299

shamoon opened this issue Jan 19, 2017 · 4 comments

Comments

@shamoon
Copy link

shamoon commented Jan 19, 2017

Sadly I've had to uninstall this module for the moment (for reasons out of my control), once I've disabled the module and I go to edit a category the page throws:

Fatal error: Uncaught Error: Class 'Smile\ElasticsuiteVirtualCategory\Model\Category\Attribute\Backend\VirtualRule' not found in /public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 Stack trace: #0 /public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Smile\\Elasticsu...', Array) #1 /public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Smile\\Elasticsu...', Array) #2 /public_html/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('Smile\\Elasticsu...', Array) #3 /public_html/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAt in /public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

This is after disabling the module, etc. Is there something I'm missing?
Thanks!

@romainruaud
Copy link
Collaborator

Hello @nikonratm ,

you will have to delete the attributes the module adds to the categories.

Especially the virtual_rule one which has a custom backend model that can lead to your issue when ElasticSuite is removed.

Try this query to remove it : DELETE FROM eav_attribute where attribute_code='virtual_rule'. This should do the trick for you.

@shamoon
Copy link
Author

shamoon commented Jan 19, 2017

EDIT: flushing Mag cache after doing this fixed it, thanks!

@orbitrod
Copy link

orbitrod commented Jun 7, 2018

Run the following SQL queries in order to completely remove Smile Elasticsuite from the db.

DELETE FROM setup_module where module='Smile_ElasticsuiteCore';
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalog';
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogRule';
DELETE FROM setup_module where module='Smile_ElasticsuiteSwatches';
DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogOptimizer';
DELETE FROM setup_module where module='Smile_ElasticsuiteThesaurus';
DELETE FROM setup_module where module='Smile_ElasticsuiteTracker';
DELETE FROM setup_module where module='Smile_ElasticsuiteVirtualCategory';

DELETE FROM eav_attribute where attribute_code='virtual_rule';
DELETE FROM eav_attribute where attribute_code='is_virtual_category';
DELETE FROM eav_attribute where attribute_code='virtual_category_root';
DELETE FROM smile_elasticsuite_optimizer;
DELETE FROM smile_elasticsuite_optimizer_search_container;

DROP TABLE smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer;
DROP TABLE smile_elasticsuite_relevance_config_data;
DROP TABLE smile_elasticsuite_thesaurus_expanded_terms;
DROP TABLE smile_elasticsuite_thesaurus_reference_terms;
DROP TABLE smile_elasticsuite_thesaurus_store;
DROP TABLE smile_elasticsuite_thesaurus;
DROP TABLE smile_virtualcategory_catalog_category_product_position;
DROP TABLE smile_elasticsuitecatalog_search_query_product_position;
DROP TABLE smile_elasticsuitecatalog_category_filterable_attribute;

ALTER TABLE catalog_eav_attribute DROP COLUMN is_displayed_in_autocomplete;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_used_in_spellcheck;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_min_coverage_rate;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_max_size;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_sort_order;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_pattern;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_precision;

Taken from this page https://github.com/Smile-SA/elasticsuite/wiki/ModuleUninstall

@bepixeld
Copy link

For uninstall elasticsuite 2.10 there are some more tables and attributes to delete.
Here are the SQL queries for this

DELETE FROM setup_module where module='Smile_ElasticsuiteAdminNotification';
DELETE FROM setup_module where module='Smile_ElasticsuiteAnalytics';

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalog';
DELETE FROM eav_attribute where attribute_code='use_name_in_product_search';
DELETE FROM eav_attribute where attribute_code='is_displayed_in_autocomplete';
ALTER TABLE catalog_eav_attribute DROP COLUMN is_displayed_in_autocomplete;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_used_in_spellcheck;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_min_coverage_rate;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_max_size;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_sort_order;
ALTER TABLE search_query DROP COLUMN is_spellchecked;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_pattern;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_precision;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_asc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_desc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_boolean_logic;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_display_rel_nofollow;
ALTER TABLE catalog_eav_attribute DROP COLUMN include_zero_false_values;
DROP TABLE smile_elasticsuitecatalog_category_filterable_attribute;
DROP TABLE smile_elasticsuitecatalog_search_query_product_position;

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogGraphQl';

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogOptimizer';
DELETE FROM smile_elasticsuite_optimizer;
DELETE FROM smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer_limitation;
DROP TABLE smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer;

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogRule';

DELETE FROM setup_module where module='Smile_ElasticsuiteCore';
DROP TABLE smile_elasticsuite_relevance_config_data;

DELETE FROM setup_module where module='Smile_ElasticsuiteIndices';
DELETE FROM setup_module where module='Smile_ElasticsuiteSwatches';

DELETE FROM setup_module where module='Smile_ElasticsuiteThesaurus';
DROP TABLE smile_elasticsuite_thesaurus_expanded_terms;
DROP TABLE smile_elasticsuite_thesaurus_reference_terms;
DROP TABLE smile_elasticsuite_thesaurus_store;
DROP TABLE smile_elasticsuite_thesaurus;

DELETE FROM setup_module where module='Smile_ElasticsuiteTracker';
DROP TABLE elasticsuite_tracker_log_event;
DROP TABLE elasticsuite_tracker_log_customer_link;

DELETE FROM setup_module where module='Smile_ElasticsuiteVirtualCategory';
DELETE FROM eav_attribute where attribute_code='is_virtual_category';
DELETE FROM eav_attribute where attribute_code='virtual_category_root';
DELETE FROM eav_attribute where attribute_code='virtual_rule';
DROP TABLE smile_virtualcategory_catalog_category_product_position;
DELETE FROM eav_attribute where attribute_code='use_store_positions';
DELETE FROM eav_attribute where attribute_code='generate_root_category_subtree';

Extended from this page https://github.com/Smile-SA/elasticsuite/wiki/ModuleUninstall

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

4 participants