Magento 2.2.4: Something went wrong while saving this configuration: Area is already set
![[Fix Lỗi] Magento 2: Area Is Already Set | (Hình 2) [Fix Lỗi] Magento 2: Area Is Already Set | (Hình 1)](https://i.imgur.com/Qoq3GWR.png)
Magento 2.2.4 bị lỗi khi thay theme:
Something went wrong while saving this configuration: Area is already setLỗi này được được phát hiện sau khi nâng cấp từ Magento 2.2.3 lên, sẽ làm ta không thể thay đổi Themes Magento được. Vậy cách xử lý như thế nào?
Cách xử lý tạm thời như sau:
- Edit file này
/vendor/magento/module-email/Model/AbstractTemplate.phptừ
public function setForcedArea($templateId)
{
if ($this->area) {
throw new \LogicException(__('Area is already set'));
}
$this->area = $this->emailConfig->getTemplateArea($templateId);
return $this;
}thành
public function setForcedArea($templateId)
{
if (!isset($this->area)) {
$this->area = $this->emailConfig->getTemplateArea($templateId);
}
return $this;
}Lưu lại và Test thử nhé
![[Hướng Dẫn] Rebake All Posts Discourse? | (Hình 3) [Hướng Dẫn] Rebake All Posts Discourse? | (Hình 2)](https://cdn11.gafaba.com/wp-content/uploads/2024/08/rake-posts-rebake-750x375-1-120x86.jpeg)
![[Magento 2.X] Fix Lỗi Không Hiển Thị Đơn Hàng Trong Admin Order | (Hình 4) Magento](https://cdn11.gafaba.com/wp-content/uploads/2019/04/magento.jpg)








![Hướng Dẫn Cài Đặt &Amp; Cấu Hình Bot Telegram Rose Cực Nhanh Dành Cho Người Chưa Biết Gì | (Hình 14) [Gafaba] Huong Dan Cai Telegram Bot Rose Cuc Nhanh 1](https://cdn11.gafaba.com/wp-content/uploads/2021/08/Gafaba-Huong-dan-cai-Telegram-BOT-ROSE-cuc-nhanh-1.webp)



