2

after upgrading a shop from 2.1.14 to 2.1.15 I'm getting the following exception when visiting any page via the browser:

1 exception(s):
Exception #0 (Exception): Notice: Undefined index:  in /src/vendor/magento/module-developer/Model/View/Page/Config/RendererFactory.php on line 64

Exception #0 (Exception): Notice: Undefined index:  in /src/vendor/magento/module-developer/Model/View/Page/Config/RendererFactory.php on line 64
#0 /src/vendor/magento/module-developer/Model/View/Page/Config/RendererFactory.php(64): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/src/vendor/mag...', 64, Array)
#1 /src/vendor/magento/framework/View/Result/Page.php(149): Magento\Developer\Model\View\Page\Config\RendererFactory->create(Array)
#2 /src/vendor/magento/framework/View/Result/Page.php(139): Magento\Framework\View\Result\Page->initPageConfigReader()

I suspect there is something wrong with writing the cache. The homepage for example renders fine the first time, and on a refresh this exception is shown. When I then clear the cache and refresh the page shows again. Also, everything works fine when disabling the Magento cache completely.

It happens in both developer and production modes, and also in 2.1.16.

What could possibly cause this?

0

Try to remove this directories manually

rm -rf var/cache/* var/page_cache/* var/session/* var/view_preprocessed/pub/static/* pub/static/frontend/* generated/code/*

Set correct permissions to directories and run

magento setup/upgrade

Check permissions again.

If this not help maybe

https://github.com/magento/magento2/issues/8619

and

Magento 2 Notice: Undefined index RendererFactory.php on line 64

0

See this line caused the error

https://github.com/magento/magento2/blob/2.1.16/app/code/Magento/Developer/Model/View/Page/Config/RendererFactory.php#L61

The path of configuration was defined here

https://github.com/magento/magento2/blob/2.1.16/app/code/Magento/Developer/Model/Config/Source/WorkflowType.php#L21

So quick fix for this, you could run the mysql command

DELETE FROM `core_config_data` WHERE `core_config_data`.`path` LIKE '%dev/front_end_development_workflow/type%';

Redeploy and clear the cache for the site.

Hope this help

  • Unfortunately that doesn't help, there is no setting in the database for that path and it's using the system default (serverside). I've also checked if it makes a difference to have this setting in the database or not, but no difference. Also, this is a development only setting and as mentioned I'm getting the same error in production. – Richard Tuin Jan 14 at 16:09
  • In that case you could add 2 types of this value to see how the server goes. Insert to that path value: client_side_compilation or server_side_compilation – Tuyen Nguyen Jan 15 at 3:12
  • Tried both, but no dice. As mentioned this error also occurs in production mode, and production mode does not use this setting at all (as it's a development setting). – Richard Tuin Jan 15 at 9:59
0

I had a similar issue with my first Magento store. The problem was that my Full Page Cache was set to Varnish, but Varnish was not properly configured. If you are using something other than the default FPC, make sure it's operating properly.

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.