fecmall二次开发 后台新增模块

文档问题 · tesren · 于 4年前 发布 · 1909 次阅读

我是按照这个文档一步一步操作的。 http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-appadmin-developer.html# Fecmall Admin 二次开发 Appadmin 新增本地模块 示例 但是操作完成后出现两个问题,一个是用户菜单里面原来的菜单“账号管理”不见了 我是本地增加的新菜单

                'sales' => [
                    'label' => 'Mall Manager',
                    'child' => [
                        'customer' => [
                            'label' => 'Customer',
                            'child' => [
                                'account' => [
                                    'label' => 'Manager Person',
                                    'url_key' => '/person/person/index',
                                ],
                            ],
                        ],
                    ],
                ],

第二个问题,模块添加完成后,点击这个新菜单出错误提示

Http status: 500 Internal Server Error ajaxOptions: error thrownError: Internal Server Error Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Setting unknown property: appadmin\local\local_modules\Person\Module::blockNamespace'

in D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Component.php:209

Stack trace: #0 D:\wamp\www\fecshop\appadmin\local\local_modules\Person\Module.php(25): yii\base\Component->__set('blockNamespace', 'appadmin\local\...') #1 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): appadmin\local\local_modules\Person\Module->init() #2 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Module.php(158): yii\base\BaseObject->construct(Array) #3 [internal function]: yii\base\Module->construct('person', Object(yii\web\Application), Array) #4 D:\wamp\www\fecshop\vendor\yiisoft\yii2\di\Container.php(392): ReflectionClass->newInstanceArgs(Array) #5 D:\wamp\www\fecshop\vendor\yiisoft\yii2\di\Container.php(159): yii\di\Container->build('\appadmin\local...', Array, Array) #6 D:\wamp\www\fecshop\vendor\yiisoft\yii2\BaseYii.php(365): yii\di\Container->get('\appadmin\local...', Array, Array) #7 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Module.php(427): yii\BaseYii::createObject(Array, Array) #8 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Module.php(586): yii\base\Module->getModule('person') #9 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Module.php(522): yii\base\Module->createController('person/index') #10 D:\wamp\www\fecshop\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('person/person/i...', Array) #11 D:\wamp\www\fecshop\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request)) #12 D:\wamp\www\fecshop\appadmin\web\index.php(50): yii\base\Application->run() #13 {main}

刚接触 fecmall,纯小白,我这是哪里操作有问题?

共收到 9 条回复
Fecmall#14年前 0 个赞

问题1: 配置中,菜单使用新的key,你把原来的菜单覆盖了

问题2:这不是有报错嘛:'yii\base\UnknownPropertyException' with message 'Setting unknown property: appadmin\local\local_modules\Person\Module::blockNamespace'

blockNamespace是在controller中的参数

无论白还是黑,报错信息得看吧?

tesren#24年前 0 个赞

这个错误看到了,只是不知道怎么解决。 还是基础知识欠缺 要不我先去面壁思过。。

Fecmall#34年前 0 个赞

@tesren #2楼 去看你的配置参数,把blockNamespace去掉。

注入一个不存在的类变量,报错!报错信息都写的很清楚

tesren#44年前 0 个赞

好的,thanks

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics