Magento Grid 容器块未加载网格
我刚刚使用模块创建器设置了一个带有网格视图的管理模块,它工作得很好,但现在我需要在同一模块中添加另一个网格视图。
我复制并重命名了与网格视图相关的所有文件(控制器和块文件,但不是模型,因为我正在做的事情不需要它们),并将新创建的块添加到句柄下的布局 xml 中,因为它是新控制器。
使用 Firephp,我发现我的新视图的一切加载都很好,直到 Grid.php 无法加载,并且最终输出只是一个空白页面。
据我所知,除了名称之外,这个新视图在所有方面都与模块生成的原始工作网格视图相同,那么什么可能导致它无法识别或加载 Grid.php?
I just set up an admin module with a grid view using the module creator, and it works great, but now I need to add another grid view within the same module.
I copied and renamed all the files relevant to the grid view(controllers and block files, but not models, as they are not needed for what I'm doing) , and added the newly created block to the layout xml under the handle for it's new controller.
Using Firephp, I've worked out that everything loads fine for my new view up until the Grid.php which doesn't load, and the end output is just a blank page.
As far as I'm aware, this new view is identical to the original working grid view generated by the module in all aspects except name, so what could be causing it to not recognize or load the Grid.php?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在网格容器块中查看
$_blockGroup
和$_controller
的值。容器使用它们来查找和加载网格块。如果您确实想了解发生了什么,请查看parent::_prepareLayout()
方法。PS:
$_blockGroup
是您的模块名称。$_controller
是网格块的路径。PPS:
如果这还不够,请将其放入
.htaccess
中:如果网格的集合 SQL 或其他问题出现问题,您应该获得更多信息。
In the grid container block look at the values for
$_blockGroup
and$_controller
. These are used by the container to find and load the grid block. If you really want to see what is going on look at theparent::_prepareLayout()
method.PS:
$_blockGroup
is your module's name.$_controller
is the path to your grid block.PPS:
If that's not enough put this in your
.htaccess
:You should get a lot more information if the grid is having problems with it's collection's SQL or something.