I have copied magento-frontend-luma theme
and change vendortheme name and paste in design folder
magento2appdesignfrontendWebmynepruthvi
In registration.php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::THEME,
'frontend/Webmyne/pruthvi',
__DIR__
);
In theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Webmyne Pruthvi</title>
<parent>Magento/blank</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
</theme>
In composer.json
{
"name": "webmyne/pruthvi",
"description": "N/A",
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/theme-frontend-blank": "100.2.*",
"magento/framework": "101.0.*"
},
"type": "magento2-theme",
"version": "100.2.3",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
But when I try to change theme
from CONTENT > Design > Configuration
I am getting the error
‘Area is already set’
2
Answers
I think the problem is in your
registration.php
filetry changing it this way
so deleting the
frontend
part in the declaration. There is no need to specify the area if you’re inheriting from a theme that has already declared is for the frontend area.This is a re-owned issue of Magento 2.2.4 C.E.
Magento has been fixed by Daniel Ruf at https://github.com/magento/magento2/commit/7019a0a1392095185505ff3ca7b97dd3e9cb4ef2 at PR #15137 and already merge at 2.2-develop branch
You need to modify the code of setForcedArea method and Replace that method code using below one.
Reference: