0

Preconditions

Magento 2.2.4 PHP 7.1

Steps to reproduce

Go to Content > Design > Configuration Edit the Store View and try to change the "Applied theme" to another Save Configuration

Expected Result

Change the theme

Actual result

Appears the error: "Something went wrong while saving this configuration: Area is already set"

4 Answers 4

1

I recommend to apply the patch which is provided by Magento. So please don't make direct changes in the core files of the Magento. It is not correct approach to resolve the core issues. Always apply the patch if Magento has provided and If not and they have resolved the issue in latest version then kindly upgrade your Magento to the latest version step by step. And do your end to end testing for the website before moving to production.

For the above issue, Kindly apply MAGETWO-93036 patch. You can download the patch file from here: https://magento.com/tech-resources/download#download2224

You can see GitHub-14968 reported issue in GitHub for further information.

Kindly read suggestion and instruction provided by Magento before applying patches. If you will ignore it then you might get an issue after applying patches.

0

This is a know bug in magento 2 https://github.com/magento/magento2/commit/7019a0a1392095185505ff3ca7b97dd3e9cb4ef2 You can fix this file doing below changes:

Goto the below file:

vendor/magento/module-email/Model/AbstractTemplate.php

Find and replace the function setForcedArea with below code:

public function setForcedArea($templateId)
{
    if (!isset($this->area)) {
        $this->area = $this->emailConfig->getTemplateArea($templateId);
    }
    return $this;
}
1
  • This is not a standard way to apply a patch to the core file. Magento has provided the patch for this (MAGNETO-93036). Aug 30, 2018 at 13:29
0

Do following changes in vendor/magento/module-email/Model/AbstractTemplate.php or you can create and apply patch

public function setForcedArea($templateId)
{
    if (!isset($this->area)) 
    {
        $this->area = $this->emailConfig->getTemplateArea($templateId);
    }
    return $this;
}
1
  • Hi Hiren, Magento has provided the patch for this (MAGNETO-93036). So we don't need to create a separate patch file. Aug 30, 2018 at 13:32
0

Solution: -

Magento-93036 This patch provides a fix for problems that merchants experienced when trying to change a storefront’s applied theme in Magento 2.2.4 or 2.2.5.

See GitHub-14968 for more information. Merchants who are running Magento 2.2.4 should upgrade to 2.2.5 and then apply this patch. Merchants who are running 2.2.5 should apply this patch or upgrade to 2.2.6 when it becomes available. Download

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.