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

Moving Magento 2 after ElasticSuite Install breaks added theme #670

Closed
timstoel opened this issue Dec 24, 2017 · 2 comments
Closed

Moving Magento 2 after ElasticSuite Install breaks added theme #670

timstoel opened this issue Dec 24, 2017 · 2 comments

Comments

@timstoel
Copy link

Preconditions

Nginx 1.10.3
PHP 7.0.22
MariaDB 10.0.31
Ubuntu 16.04 LTS
ElasticSearch 2.4.6
Dedicated server, SSD array, 16 cores, 48GB memory

Magento Version : 2.2.0 CE

ElasticSuite Version : 2.4.0

Environment : Devloper for install, trying to deploy to production is the problem

Third party modules : ShipStation, MailChimp, SMTP module

Steps to reproduce

  1. Magento 2.2.0 installation
  2. Install and activate Porto theme
  3. Install ElasticSearch following documentation, verify using curl localhost:9200
  4. Install module and deploy Magento 2 in production mode with the following steps
bin/magento deploy:mode:set developer
composer require smile/elasticsuite ^2.4.0
bin/magento module:enable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteSwatches Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteVirtualCategory Smile_ElasticsuiteThesaurus Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento index:reindex
bin/magento deploy:mode:set production

Expected result

  1. Magento 2 should deploy in production mode

Actual result

  1. These two files get deleted from the installation:
pub/static/frontend/Smartwave/porto/en_US/css/styles-m.css
pub/static/frontend/Smartwave/porto/en_US/css/styles-l.css
  1. The system.log shows:
Deploy using quick strategy
frontend/Magento/blank/en_US            2160/2160           ============================ 100% %  9 secs
adminhtml/Magento/backend/en_US         2121/2121           ============================ 100% %  10 secs
frontend/Magento/luma/en_US             2175/2175           ============================ 100% %  11 secs
frontend/Smartwave/porto/en_US          2060/2332           ========================>--- 88% %   3 secs
Compilation from source: /var/www/magento2/vendor/magento/theme-frontend-blank/web/css/styles-m.less
variable @autocomplete-item__border is undefined in file /var/www/magento2/var/view_preprocessed/pub/static/frontend/Smartwave/porto/en_US/Smile_ElasticsuiteCore/css/source/_module.less in _module.less on line 30, column 34
28|                 border-bottom: 0;
29|             }
frontend/Magento/blank/en_US            2160/2160           ============================ 100% %  9 secs
adminhtml/Magento/backend/en_US         2121/2121           ============================ 100% %  10 secs
frontend/Magento/luma/en_US             2175/2175           ============================ 100% %  11 secs
frontend/Smartwave/porto/en_US          2064/2332           ========================>--- 88% %   6 secs
Compilation from source: /var/www/magento2/vendor/magento/theme-frontend-blank/web/css/styles-l.less
variable @autocomplete-item__border is undefined in file /var/www/magento2/var/view_preprocessed/pub/static/frontend/Smartwave/porto/en_US/Smile_ElasticsuiteCore/css/source/_module.less in _module.less on line 30, column 34
28|                 border-bottom: 0;
29|             }
frontend/Magento/blank/en_US            2160/2160           ============================ 100% %  9 secs
adminhtml/Magento/backend/en_US         2121/2121           ============================ 100% %  10 secs
frontend/Magento/luma/en_US             2175/2175           ============================ 100% %  11 secs
frontend/Smartwave/porto/en_US          2067/2332           ========================>--- 88% %   7 secs


  [Magento\Framework\Exception\FileSystemException]
  Cannot read contents from file "/var/www/magento2/pub/static/frontend/Smartwave/porto/en_US/css/styles-m.css" Warning!file_get_contents(/var/www/magento2/pub/static/frontend/Smartwave/por
  to/en_US/css/styles-m.css): failed to open stream: No such file or directory


setup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>]...
 [] []
[2017-12-24 20:00:06] main.INFO: Too late for the schedule Schedule Id: 1299228 Job Code: indexer_reindex_all_invalid [] []
[2017-12-24 20:04:04] main.INFO: Too late for the schedule Schedule Id: 1299484 Job Code: indexer_reindex_all_invalid [] []

I tried re-uploading the files and re-reploying in production again, but running bin/magento deploy:mode:set production removes them again. Before installing ElasticSuite deploying was not a problem.

I also found this issue related to the warnings:
#222

@timstoel
Copy link
Author

Found the solution in issue #91 !

@pawanguleria
Copy link

Install the Patch for Magento 2.X and after that clear your cache and static folder and then upgrade and deploy, you will get everything fine.

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

2 participants