Find the file \vendor\magento\module-email\Model\AbstractTemplate.php and on line number 672 replace the if condition if ($storeId) with if ($storeId !== false)


When you are saving the Global Configuration for the Store, you can see in the url that the current scope id is 0 (admin/theme/design_config/edit/scope/default/scope_id/0/) This is important.

Now, when you save the configuration, Magento will try to validate the Header and Footer templates whether you change them or not, using the class Magento\Theme\Model\Design\Config. While doing so, Magento instantiates an object of class \Magento\Email\Model\Template which actually extends the class \Magento\Email\Model\AbstractTemplate.

Using this template class, Magento tries to emulate the template for the current scope. This is where the issue lies. You can find the code for this at line 670 of \Magento\Email\Model\AbstractTemplate.

Since the scope_id for the Global scope is 0 (Note: scope_id is being passed as storeId here), false is returned and Magento starts to look into adminhtml for the templates. Now all you have to do is change the if condition from if ($storeId) to if ($storeId !== false) and you will be able to save the configuration.


Mahendra Paladiya
Mahendra is a Web Developer whose passions includes web development, technical blog writing, and database management. His passion for web development pushed him into learning how to handle different platforms like Core PHP, Magento, Prestashop, WordPress, CodeIgniter, CakePHP and Oracle.