-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Put grid object in global scope even when loaded via Ajax #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Btw, this also affects Magento 1.x.. |
Please, clarify what exact grid is broken (what steps to replicate this issue, if possible, please, provide error message) that we could go deep into a problem. |
Not sure if there is a grid in core code that is broken due to this issue; I noticed it in a grid in a custom module. Please see my original description for the issue as I think the description and the patch explain it thoroughly enough as long as one understands how Javascript scopes work and that code executed as a part of html from an Ajax response doesn't get executed in the global scope like it does if rendered as part of the page's original HTML.. |
Hi Team. We checked our grids and they worked properly. We close this issue as you didn't mention core modules in the thread. Thank you! |
I don't think the issue exists in core modules, I can't think of any that have mass actions via ajax. I've ran into it several times writing custom modules for 1.X, would be nice to have a fix for this in the base code. |
I believe that the real problem with massaction object is with the next code in class Mage_Backend_Block_Widget_Grid_Massaction_Abstract:
Because of the var keyword, massaction object is not available if you load the content with ajax. |
[South] Sprint 32: Bug fixes
[WebDev + Vanilla] Bugfixes
Mass actions in an ajax-enabled grid are broken when the grid container is loaded via ajax such as in an ajax-enabled tab. Adding window to the variable declaration forces it to be in the global scope so the following ajax requests can access the grid object.