Reputation: 397
We have installed a fresh copy of magento 2.2.4 however it is not allowing us to change the theme and throwing the exception "Something went wrong while saving this configuration: Area is already set"
Upvotes: 1
Views: 228
Reputation: 397
Please make changes given below Magento\Email\Model\AbstractTemplate.php
public function setForcedArea($templateId)
{
if ($this->area) {
throw new \LogicException(__('Area is already set'));
}
$this->area = $this->emailConfig->getTemplateArea($templateId);
return $this;
}
Replace above code with :-
public function setForcedArea($templateId)
{
if (!isset($this->area)) {
$this->area = $this->emailConfig->getTemplateArea($templateId);
}
return $this;
}
Using this code problem will be fixed however it is not a good practice to make changes in vendor files of magento. You can also update to latest version of magento i.e. magento 2.2.5 onwards to fix this problem
Upvotes: 1