After pressing the Flush Static Files Cache on Magento 2 my whole frontend website is showing an error. On the admin panel i can still login and there is no problem but on the frontend it says this error:
1 exception(s):
Exception #0 (Exception): Warning: file_put_contents(/var/www/vhosts/domain.com/httpdocs/pub/static/frontend/Sm/emarket/el_GR/css/config_1.css): failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/app/design/frontend/Sm/emarket/Magento_Theme/templates/html/compile_less.phtml on line 103
Exception #0 (Exception): Warning: file_put_contents(/var/www/vhosts/domain.com/httpdocs/pub/static/frontend/Sm/emarket/el_GR/css/config_1.css): failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/app/design/frontend/Sm/emarket/Magento_Theme/templates/html/compile_less.phtml on line 103
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'file_put_conten...', '/var/www/vhosts...', 103, Array)
#1 /var/www/vhosts/domain.com/httpdocs/app/design/frontend/Sm/emarket/Magento_Theme/templates/html/compile_less.phtml(103): file_put_contents('/var/www/vhosts...', 'body {\n backgr...')
#2 /var/www/vhosts/domain.com/httpdocs/app/design/frontend/Sm/emarket/Magento_Theme/templates/html/header.phtml(19): include('/var/www/vhosts...')
#3 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/vhosts...')
#4 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Theme\Block\Html\Header), '/var/www/vhosts...', Array)
#5 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/var/www/vhosts...')
#6 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Template->_toHtml()
#7 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()
#8 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('header.content')
#9 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('header.content')
#10 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.content')
#11 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('header.content', true)
#12 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('header.content')
#13 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#14 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#15 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#16 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#17 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#18 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('root')
#19 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#20 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#21 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#22 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Layout.php(938): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#23 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\View\Layout->getOutput()
#24 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#25 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Result/Page.php(243): Magento\Framework\View\Layout\Interceptor->getOutput()
#26 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#27 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#28 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#29 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-varnish-...')
#30 /var/www/vhosts/domain.com/httpdocs/vendor/magento/module-page-cache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#31 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#32 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-builtin-...')
#33 /var/www/vhosts/domain.com/httpdocs/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#34 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#35 /var/www/vhosts/domain.com/httpdocs/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#36 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#37 /var/www/vhosts/domain.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#38 /var/www/vhosts/domain.com/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#39 {main}
Does anyone know how can I fix this, I tried to run on SSH the command
bin/magento setup:static-content:deploy
and bin/magento setup:static-content:deploy el_GR
but nothing changed. Does anyone knows how to solve this? Thank you so much!
sm emarket
theme related error, check if there's any option to compile css in its configuration options