Magento Theme'的键不符合所需的格式


Magento Theme's key does not correspond to required format

我正在为magento 2创建一个新的主题,我已经为它创建了必要的文件。但是当我打开管理面板时,它给出了错误,错误日志显示以下错误"主题的键不对应所需的格式"

my theme.xml code:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
 <title>WPIINC</title> <!-- your theme's name -->
 <media>
     <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
 </media>
</theme>

作曲家。json代码:

{
"name": "wpiinc/wpiinc",
"description": "N/A",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/theme-frontend-blank": "100.0.*",
    "magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [
        "registration.php"
    ]
}
}

registration.php代码:

<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
'Magento'Framework'Component'ComponentRegistrar::register(
'Magento'Framework'Component'ComponentRegistrar::THEME,
'wpiinc/wpiinc',
__DIR__
);

文件夹结构为app->design->frontend->wpiinc->wpiinc

如何解决这个错误?当我运行php bin/magento setup:static-content:deploy这个命令时,我在cmd提示符中得到以下错误"主题键不符合要求的格式'区域/供应商/名称'"

请帮

请将registration.php Code替换为

<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
'Magento'Framework'Component'ComponentRegistrar::register(
'Magento'Framework'Component'ComponentRegistrar::THEME,
'frontend/wpiinc/wpiinc',
__DIR__
);

进入管理面板,并通过以下操作禁用整个页面缓存系统->缓存管理->设置页面缓存并关闭页面缓存之后刷新缓存

稍后用这个命令检查你的模式。PHP bin'magento deploy:mode:show

如果mode为'default',则使用此命令将其转换为developer modePHP bin'magento deploy:mode:set developer

最后尝试修改theme.xml文件,添加标题标签后空白