سؤال

After activating developer mode the fronend an backend delivers a white page.

Edit: I can switch to Production Mode but not back to Developer Mode.

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 88

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 89

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 90

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 801


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 88

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 89

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 90

Element 'script', attribute 'data-requiremodule': The attribute 'data-requiremodule' is not allowed.
Line: 801

#0 /var/www/clients/client1/web19/web/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /var/www/clients/client1/web19/web/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/var/www/client...', '%message%\nLine:...')
#2 /var/www/clients/client1/web19/web/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /var/www/clients/client1/web19/web/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /var/www/clients/client1/web19/web/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Model/Layout/Update/Validator.php(141): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Model/Layout/Merge.php(464): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)
#7 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Model/Layout/Merge.php(445): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<referenceConta...')
#8 /var/www/clients/client1/web19/web/generated/code/Magento/Framework/View/Model/Layout/Merge/Interceptor.php(193): Magento\Framework\View\Model\Layout\Merge->load(Array)
#9 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge\Interceptor->load()
#10 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#11 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Layout.php(253): Magento\Framework\View\Layout\Builder->build()
#12 /var/www/clients/client1/web19/web/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#13 /var/www/clients/client1/web19/web/generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('page_content_he...')
#14 /var/www/clients/client1/web19/web/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout\Interceptor->getBlock('page_content_he...')
#15 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#16 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Helper\Page\Interceptor->___callParent('prepareResultPa...', Array)
#17 /var/www/clients/client1/web19/web/vendor/amasty/shopby/Plugin/Cms/Helper/Page.php(102): Magento\Cms\Helper\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#18 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\Shopby\Plugin\Cms\Helper\Page->aroundPrepareResultPage(Object(Magento\Cms\Helper\Page\Interceptor), Object(Closure), Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#19 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Helper\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#20 /var/www/clients/client1/web19/web/generated/code/Magento/Cms/Helper/Page/Interceptor.php(26): Magento\Cms\Helper\Page\Interceptor->___callPlugins('prepareResultPa...', Array, NULL)
#21 /var/www/clients/client1/web19/web/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page\Interceptor->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#22 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Cms\Controller\Index\Index->execute()
#23 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('execute', Array)
#24 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}()
#25 /var/www/clients/client1/web19/web/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(26): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('execute', Array, Array)
#26 /var/www/clients/client1/web19/web/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index\Interceptor->execute()
#27 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#29 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 /var/www/clients/client1/web19/web/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#31 /var/www/clients/client1/web19/web/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#34 /var/www/clients/client1/web19/web/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#35 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /var/www/clients/client1/web19/web/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#37 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#38 /var/www/clients/client1/web19/web/vendor/amasty/aminvisiblecaptcha/Plugin/Predispatch.php(93): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#39 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\InvisibleCaptcha\Plugin\Predispatch->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#41 /var/www/clients/client1/web19/web/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#42 /var/www/clients/client1/web19/web/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#43 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#44 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#45 /var/www/clients/client1/web19/web/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#46 /var/www/clients/client1/web19/web/generated/code/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#47 /var/www/clients/client1/web19/web/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#48 /var/www/clients/client1/web19/web/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#49 {main}
هل كانت مفيدة؟

المحلول

I was actually wrong, I could switch to developer mode but thought the errors in the frontend showed me that the developer mode is not active.

So the whole question was wrong.

To help other here the basic informations you need:

Show current Mode:

bin/magento deploy:mode:show

Switch to Production Mode:

bin/magento deploy:mode:set production

Switch to Default mode:

bin/magento deploy:mode:set default

Switch to Developer Mode: Delete "generated" folder in you magento folder first:

rm -rf generated/metadata/* generated/code/*

Then switch to Developer Mode

bin/magento deploy:mode:set developer

Default mode

As its name implies, default mode is how the Magento software operates if no other mode is specified. Default mode enables you to deploy the Magento application on a single server without changing any settings. However, default mode is not as optimized for production as is production mode. To deploy the Magento application on more than one server or to optimize it for production, change to one of the other modes. In default mode: Errors are logged to the file reports at server, and never shown to a user A symlink to a static view file is published to the pub/static directory for each requested file Default mode is not optimized for a production environment, primarily because of the adverse performance impact of static files being dynamically generated rather than materialized. In other words, creating static files and caching them has a greater performance impact than generating them using the static files creation tool.

Developer mode

You should run the Magento software in developer mode when you're extending or customizing it. In developer mode: A symlink to a static view file is published to the pub/static directory for each requested file Uncaught exceptions display in the browser System logging in var/report is verbose An exception is thrown in the error handler, rather than being logged An exception is thrown when an event subscriber cannot be invoked

Production mode

You should run the Magento software in production mode when it's deployed to a production server. After optimizing the server environment (database, web server, and so on), you should run the static view files deployment tool to write static view files to the Magento pub/static directory. This improves performance because static files don't go through the fallback mechanism; instead, URLs for static files are created as needed. In production mode: Static view files are not materialized, and URLs for them are composed on the fly without going through the fallback mechanism. (Static view files are served from cache only.) errors are logged to the file system and are never displayed to the user

نصائح أخرى

1.Check permission first:

find . -type f -exec chmod -c 644 {} \; && find . -type d -exec chmod -c 755 {} \;

Permission command from here

  1. Run this command and check lines in this files.

    grep -rl "data-reqiuremodule" .

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top