Magento 2

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

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!

Click to rate this post!
[Total: 8 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

Magento 2: Add Quantity Increment and Decrement on Category Page

Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…

24 hours ago

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

4 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

6 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

6 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

1 week ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

1 week ago