3

I don't know how to fix this and I have an idea what might caused it. Here is what happened

I went on production mode. On production mode everything works fine. But when I try to go back to developer mode I get a warning on browser. To change to developer mode I did this

rm -rf generated/code generated/metadata

and

bin/magento deploy:mode:set developer 

Here is the error I get when I try to check the website.

1 exception(s):
Exception #0 (Exception): Warning: file_put_contents(/chroot/home/.../.../html/pub/static/frontend/presiden/presiden_fashion_home2/el_GR/css/style.css): failed to open stream: No such file or directory in /chroot/home/.../.../html/vendor/oyejorge/less.php/lessc.inc.php on line 177

Exception #0 (Exception): Warning: file_put_contents(/chroot/home/.../.../html/pub/static/frontend/presiden/presiden_fashion_home2/el_GR/css/style.css): failed to open stream: No such file or directory in /chroot/home/.../.../html/vendor/oyejorge/less.php/lessc.inc.php on line 177
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'file_put_conten...', '/chroot/home/br...', 177, Array)
#1 /chroot/home/.../.../html/vendor/oyejorge/less.php/lessc.inc.php(177): file_put_contents('/chroot/home/br...', '@-webkit-keyfra...')
#2 /chroot/home/.../.../html/app/code/Plazathemes/Layout/Block/Layout.php(43): lessc->compileFile('/chroot/home/br...', '/chroot/home/br...')
#3 /chroot/home/.../.../html/app/design/frontend/presiden/presiden_fashion_default/Plazathemes_Layout/templates/html/header.phtml(1): Plazathemes\Layout\Block\Layout->renderFileLessToCss()
#4 /chroot/home/.../.../html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/chroot/home/br...')
#5 /chroot/home/.../.../html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Plazathemes\Layout\Block\Layout), '/chroot/home/br...', Array)
#6 /chroot/home/.../.../html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/chroot/home/br...')
#7 /chroot/home/.../.../html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#8 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#9 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('custom_header')
#10 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('custom_header')
#11 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('custom_header')
#12 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('custom_header', false)
#13 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('custom_header', false)
#14 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#15 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#16 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#17 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#18 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('root', false)
#20 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#21 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#22 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#23 /chroot/home/.../.../html/vendor/magento/framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#24 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#25 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#26 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#27 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#28 /chroot/home/.../.../html/vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#29 /chroot/home/.../.../html/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#30 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#31 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#32 /chroot/home/.../.../html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#33 /chroot/home/.../.../html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#34 /chroot/home/.../.../html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#35 /chroot/home/.../.../html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#36 /chroot/home/.../.../html/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#37 /chroot/home/.../.../html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#38 {main}

Can this be because I changed the sizes of an image in /chroot/home/.../.../html/pub/static/frontend/presiden/presiden_fashion_home2/el_GR/css/style.css this file? How can I fix this ? Any idea? Thank you in advance

0

You need to run php bin/magento setup:static-content:deploy el_GR for your specific locale, because M2 by default generates for en_US.

| improve this answer | |
0

I resolved this givin chmod -R 777 in pub/static/ and rm -rf generated/

| improve this answer | |
  • Smaller line are writing on comment section . – Msquare Mar 9 at 3:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.