How to fix an error while uploading a logo from admin in Latest Magento 2.2.4

How to fix an error while uploading a logo from admin in Latest Magento 224

The business logo is something that makes you stand for either it is store, email, banners or anything. And Magento is constantly working towards improving & topping new ranges to features so can be always the first pick for the store owners.

Recently on 4th May, Magento has released its new version Magento 2.2.4 with some new cool features. But no system is perfect, with tons of new features there are also minor bugs that can be resolved in future but as of now, we need to fix it manually with a power of the small piece of code. We came across the news that lots of people are facing an issue while uploading a logo from store backend and even lots of customer asked for the same in messages and email. So, we decided to write a blog on fixing an error while uploading a logo from admin backend of Magento 2.2.4.

Basically while uploading logo via admin panel and click on save configuration button at that time it throws an exception like…
SOMETHING WENT WRONG WHILE SAVING THE CONFIGURATION AREA IS ALREADY SET
Well. it’s the Magento issue! for that, we have to change the code of Magento\Email\Model\AbstractTemplate setForcedArea method.
Simply navigate to magento-root\vendor\magento\module-email\Model\AbstractTemplate.php and Replace that method code with following.

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

Don’t forget to smash that stars if the code works for you and comment down below if you are looking for a help regarding this code.
Happy Fixing!

Previous Article

How to set a Meta robot values for Custom extension page in Magento 2

Next Article

How to add Radio button in Admin System Configuration of Magento 2

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨