Our Feature Items: SM Market // SM AutoStore // SP Revo
Shopping cart (0)

How To Fix Theme Switching Error Message In Magento 2.2.4?

Rate this item
(1 Vote)
Written by  Sarah
Monday, 28 May 2018 14:52
How To Fix Theme Switching Error Message In Magento 2.2.4? - 5.0 out of 5 based on 1 vote

Did you try to install/upgrade Magento 2.2.4 version? We sure that you also met the "Something went wrong while saving this configuration: Area is already set" error message in you back-end while trying to change the default theme. The problem came from the core of Magento.

Magento 224 Issue

Luckily, the solution to fix this is quite easy. But please note that this is Magento 2.2.4 know issue and below fix is just a temporary fix, you should not directly change Magento core file (override or create a plugin).

You can apply "How To Fix Theme Switching Error Message In 2.2.4" to fix it now and remove it after Magento developers fix the core issue.

Change in Magento\Email\Model\AbstractTemplate.php this:

public function setForcedArea($templateId)
{
if ($this->area) {
throw new \LogicException(__('Area is already set'));
}
$this->area = $this->emailConfig->getTemplateArea($templateId);
return $this;

For this:

public function setForcedArea($templateId)
{
if (!isset($this->area)) {
$this->area = $this->emailConfig->getTemplateArea($templateId);
}
return $this;
}

Thanks for reading!

Google+
Joomla TemplatesFree Joomla TemplatesVirtuemart TemplatesK2 TemplatesJoomShopping TemplatesHikaShop TemplatesSobiPro TemplatesOpenCart Themes
Quà Tết Cao Cấp Hộp quà tết Giỏ quà tết Túi quà tết