Magento网格容器块不加载网格 [英] Magento Grid Container Block not loading grid

查看:171
本文介绍了Magento网格容器块不加载网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是使用模块创建者设置了一个带有网格视图的管理模块,它运行良好,但现在我需要在同一模块中添加另一个网格视图。



我复制并重命名所有与网格视图相关的文件(控制器和块文件,但不是模型,因为它们不是我需要的),并将新创建的块添加到布局xml下处理它的新控制器。

使用Firephp,我已经发现,一切正常加载我的新视图,直到没有加载的Grid.php,并且最终输出只是一个空白页面。

据我所知,这个新视图与模块在名称之外的所有方面生成的原始工作网格视图相同,因此可以导致它无法识别或加载Grid.php?

解决方案

在网格容器块中查看 $ _ blockGroup $ _ controller 。这些容器用于查找和加载网格块。如果你真的想看看 parent :: _ prepareLayout()方法正在发生什么。



PS:
$ _ blockGroup 是您的模块名称。 是网格块的路径。



PPS:

如果这还不够,请将它放在 .htaccess
$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $'$ $ $ $'



如果网格存在与集合的SQL有关的问题,您应该获得更多信息。


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?

解决方案

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 the parent::_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:

php_flag display_errors on
SetEnv MAGE_IS_DEVELOPER_MODE true

You should get a lot more information if the grid is having problems with it's collection's SQL or something.

这篇关于Magento网格容器块不加载网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆