Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Trouble with ajax loaded admin grid. 
 
wired_mugen
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-07-15
Tagantog
 

Hi all.
This morning i had a trouble(bug?) with Mage_Adminhtml_Block_Widget_Grid.
Here is what i do:
1. Go to admin - customers - manage customers
2. Filter customer grid by some name
3. Checking some customers from filtered grid and do “mass delete” action.
4 ...
5. Nothing happends. If you watch on your grid, checked customers was not deleted.

After do some researching i mentioned that the problem was in ‘widget/grid/massaction.phtml’. The hidden field ‘form_key’ is not included when i do a request via ajax.

By some magic this code is working:

<form action="" id="<?php echo $this->getHtmlId() ?>-form" method="post">
     <!--  
Formkey FixThis was writen cuz hidden field 'formkey' did not appear when do createBlock from ajax -->
     
<?php //echo $this->getBlockHtml('formkey')?>
      
<div><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /></div>
      <!--  
Formkey Fix! -->
      . . .

Hope this will be solved in future versions.

WBR

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top