In this article, you going to see quick fix regarding ‘Magento_Theme’ Error which is occurring during the installation of Magento 2 .

Magento theme Error
Magento theme Error

In the above image you will see the issue which is getting during installation process of of Magento 2.

Same issue you will also might be get during the installation of Magento 2 via composer.

if you don’t about what is a composer and from where you can download install the composer on your local system.

Then you can check with this link: COMPOSER

On the above link give the full detail regarding download and install composer.

After downloading and installation done on local system you can check on your local system about composer is installed or not by executing command in cmd or git bash.

It will give output composer version, this is totally regarding composer.

You can also download and install Magento 2 on your local system using composer via executing command on cmd or git bash.

Same Error Occur if you install Magento 2 via composer : ‘Magento_Theme’ Error

if you don’t know how to download and install Magento 2 then you can follow the below link.

So that you come to how to download and install Magento 2 step by step in detail.

Magento 2 Installation Using Composer

Now point is how to fix the above error called ‘Magento_Theme’ Error In Magento 2 :

To fix this error you have to check with file Gd2.php. You have made a small change in that file.

File path  vendor\magento\framework\Image\Adapter\Gd2.php is the solution.

So go through the file and edit below function on line no 96 are as follow as :

private function validateURLScheme(string $filename) : bool { $allowed_schemes = ['ftp', 'ftps', 'http', 'https']; $url = parse_url($filename); if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) { return false; } return true; }

After changes made in this file, then execute below command if you are installing Magento 2 via composer.

php bin/magento setup:upgradephp bin/magento setup:static-content:deploy

I hope you liked my this article. If you have any queries or any question regarding this, Feel free to comment on Me.