When I toggle Client Side Less Compilation
and save it on a Magento 2.2.2 site, it throws the following error:
500 internal server error
This is the log:
[Fri Jul 27 13:13:36.324051 2018] [:error] [pid 20125] [client 5.255.250.135:46655] PHP Fatal error: Uncaught TypeError: Argument 4 passed to Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation::processContent() must be an instance of Magento\Framework\View\Asset\File\FallbackContext, instance of Magento\Framework\View\Asset\File\Context given, called in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php on line 90 and defined in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php:107nStack trace:n#0 /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php(90): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->processContent('15859f29777d5d9...', '@import 'third-...', '', Object(Magento\Framework\View\Asset\File\Context))n#1 /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/PreprocessorStrategy.php(74): Magento\Developer\Model\View\Asset\PreProcessor\FrontendCompilation->process(Object(Magento\Framework\View\As in /var/www/html/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php on line 107
I only have access to SSH and SFTP, how can I try to fix this?
I appreciate any answer.
2
Answers
run
php bin/magento setup:di:compile
command from your magento root directory.Find the path
dev/front_end_development_workflow/type
and if the value isclient_side_compilation
then change it toserver_side_compilation
. Clear all caches again and runrm -rf var/cache/*