bubifengyun
- bubifengyun 回复了 drodata 的回答
在
frontend/site/index
前面加上/
即可:return $this->redirect('/frontend/site/index');
Guide Handling Requests - Routing and URL Creation - Creating URLs 里面讲到:
If the route has no leading slash, it is considered to be a route relative to the current module and will be prepended with the uniqueId value of the current module.
你可以读读这节内容,了解一下 Yii 将 route 转换成 url 的过程。
谢谢,我是使用别人的模块,配置这个路径的,
'nodeActions' => [ Module::NODE_MANAGE => Url::to(['/treemanager/node/manage']), Module::NODE_SAVE => Url::to(['/treemanager/node/save']), Module::NODE_REMOVE => Url::to(['/treemanager/node/remove']), Module::NODE_MOVE => Url::to(['/treemanager/node/move']), ]
里面配置NODE_SAVE是可以的,但是NODE_MANAGER就不行,我把对方的MODULE拿到自己frontend/modules里来,修改其默认NODE_MANAGER动作,就可以了。现在问题已经解决,我也不知道问题到底出现在哪里,先使用一种变通解决方式吧。
- bubifengyun 回复了 koko 的回答
use frontend\module\xxx
https://github.com/kartik-v/yii2-tree-manager/issues/101
https://github.com/kartik-v/yii2-tree-manager/issues/102
我的问题现在进展成这样了,把tree manager作为frontend的一个子module了,对于正常的save 是可以成功调用响应动作action的,但是可能由于原来插件有问题,或者其他原因,正在努力的摸索中,你说的我也能理解,现在就是无法调用,可能是其他方面的原因吧 - bubifengyun 回复了 bubifengyun 的回答
看错误的信息说的,你更新一下composer呢。
php composer.phar self-update
这个命令可能记错了,我手机上不方便查。你试试。
@lvsui 现在都1.1.1了,建议安装最新的,按照官网说的去下载。我之前也是用的1.0.x的版本,下载yii2.0.6就是不完整版。
- bubifengyun 回复了 bubifengyun 的回答
看错误的信息说的,你更新一下composer呢。
php composer.phar self-update
这个命令可能记错了,我手机上不方便查。你试试。
@lvsui 你可以去官网看看,现在已经是
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
了吧。如果实在不行,我这篇博客,可以看看。http://my.oschina.net/bubifengyun/blog/607161
- bubifengyun 评论了教程 【YII2.0高级模板】安装部署
呵呵,算不算更新完毕了。
- bubifengyun 赞了评论
你不会再更新了,那百分之10的把握
github上有Kartik/gridview功能相当丰富。