Resolve issues with HTML minification
Resolve issues with HTML minification
This topic discusses solutions to typical issues you might experience by HTML minification.
Website load errors after scd-dump, build, and deploy
After using the command php bin/magento magento-cloud:scd-dump
to generate config.local.php, your website may encounter errors after build and deploy. When accessing the site, you may recieve the error “failed to open stream: No such file or directory” for a series of files.
The issue is due to an issue of enabling HTML minification and the setting in config.local.php
when using bin/magento magento-cloud:scd-dump
.
As a work-around, complete the following:
- Copy the file
app/etc/config.local.php
to your local. -
Edit and remove the minify section from
config.local.php
:‘template’ => array ( ‘allow_symlink’ => ‘0’, ‘minify_html’ => ‘1’, ),
-
Modify the setting for minify in the database with this command:
update core_config_data set value=0 where path =’dev/template/minify_html’
-
Flush all caches.
php bin/magento cache:flush redis-cli -h <> -p <> flushall
- Remove all
base_url
related items inconfig.local.php
. - Save changes and complete full deployment of
config.local.php
: push to Git branch, build and deploy, and deploy across environments as needed.