Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
760 stars 339 forks source link

Area code not set: Area code must be set before starting a session #1111

Closed tukker01 closed 5 years ago

tukker01 commented 5 years ago

Preconditions Magento Version : 2.2.6

ElasticSuite Version : ElasticSuite 2.6.x

Environment : Ubuntu 16.04.3 LTS

Third party modules :

List of enabled modules: Magento_Store Magento_Directory Magento_Eav Magento_Theme Apptrian_FacebookCatalog Apptrian_FacebookPixel Magento_Backend Magento_Customer Magento_AdminNotification Magento_Indexer Ho_nl_NL Magento_Cms Magento_Catalog Magento_Quote MSP_CmsImportExport Magento_Config Magento_AdvancedPricingImportExport Magento_Security Magento_Authorization Magento_Rule Magento_CatalogRule Magento_Backup Magento_SalesSequence Magento_Bundle Magento_BundleImportExport Magento_CacheInvalidate Magento_Payment Magento_CatalogInventory Magento_User Magento_CatalogImportExport Magento_Sales Magento_Cron Magento_Msrp Magento_Search Magento_CatalogUrlRewrite Magento_Widget Magento_Checkout Magento_CheckoutAgreements Fooman_EmailAttachments Magento_CmsUrlRewrite Afterpay_Payment Magento_ConfigurableImportExport Magento_ConfigurableProduct Magento_ConfigurableProductSales Magento_Contact Magento_Cookie Magento_Email Magento_CurrencySymbol Magento_Integration Magento_CustomerImportExport Magento_DataMigrationTool Magento_Deploy Magento_Developer Magento_Dhl Magento_Newsletter Magento_Downloadable Magento_ImportExport Magento_Vault Magento_ProductAlert Magento_EncryptionKey Magento_Fedex Magento_GiftMessage Magento_GoogleAdwords Magento_GoogleAnalytics Magento_Ui Magento_GroupedImportExport Magento_GroupedProduct Magento_DownloadableImportExport Magento_Paypal Magento_InstantPurchase Magento_Analytics Magento_LayeredNavigation Magento_Marketplace Magento_MediaStorage Magento_CatalogRuleConfigurable Magento_Multishipping Magento_NewRelicReporting Ebizmarts_MailChimp Magento_OfflinePayments Magento_SalesRule Magento_PageCache Klarna_Core Magento_Braintree Magento_Persistent Magento_Reports Magento_ProductVideo Magento_Authorizenet Magento_QuoteAnalytics Magento_ReleaseNotification Magento_Review Magento_RequireJs Magento_SendFriend Magento_ReviewAnalytics Magento_Robots Magento_Rss Klarna_Ordermanagement Magento_Captcha Magento_SalesAnalytics Magento_SalesInventory Magento_OfflineShipping Amazon_Core Magento_UrlRewrite Magento_CatalogSearch Magento_CustomerAnalytics Magento_Shipping Magento_Wishlist Magento_Signifyd Magento_Sitemap Amazon_Login Magento_Webapi Magento_SwaggerWebapi Magento_Swatches Magento_SwatchesLayeredNavigation Magento_Tax Magento_TaxImportExport Amazon_Payment Magento_Translation Magento_GoogleOptimizer Magento_Ups Magento_SampleData Magento_CatalogAnalytics Magento_Usps Magento_Variable Klarna_Kp Magento_Version Magento_Swagger Magento_WebapiSecurity Magento_Weee Magento_CatalogWidget Dotdigitalgroup_Email Magento_WishlistAnalytics Mageplaza_Core Mageplaza_AbandonedCart Mageplaza_DeliveryTime Mageplaza_Osc Magetrend_Email Magetrend_NewsletterPopup Magetrend_PdfTemplates Magetrend_StockNotification MultiSafepay_Connect OlegKoval_RegenerateUrlRewrites SendCloud_SendCloud Solwin_Bannerslider Solwin_Cpanel Solwin_Flickr Solwin_Instagram Solwin_Megamenu Solwin_Newsletter Solwin_Ourblog Solwin_ProductWidget Solwin_ScrolltoTop Solwin_Verticalmenu Temando_Shipping Vertex_Tax WaPoNe_CookieNotification Webkul_Pos

List of disabled modules: Fooman_PrintOrderPdf MyParcelNL_Magento

Steps to reproduce

  1. $composer require smile/elasticsuite
  2. $bin/magento module:enable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteSwatches Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteVirtualCategory Smile_ElasticsuiteThesaurus Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker $bin/magento setup:upgrade

After the upgrade action the following error appears

  1. Module 'Smile_ElasticsuiteCore': Module 'Smile_ElasticsuiteCatalog': Installing data... Area code not set: Area code must be set before starting a session.
tukker01 commented 5 years ago

disabling all thirt part extensions correct the problem

romainruaud commented 5 years ago

Did you disable all third party extensions except Elasticsuite ?

If yes, the problem is due to one of these third party extension.

In this case, we cannot provide more help here since third-party extension troubleshooting is not part of our Open Source Support that we provide here for free.

tukker01 commented 5 years ago

Correct I disabled all modules except after that enabled Elasticsuite.

romainruaud commented 5 years ago

Ok, so you might have a third-party module which is tring to instantiate a session. Maybe it's just a side effect (could happen when instantiating a product collection, or things like this, since the collection resource is embedding the customer session to fit with customer_group_id).

I cannot give you more insight here since it does not seem to be related to Elasticsuite (raw magento + elasticsuite is working properly).

Best regards,