zfdatagrid / grid

A DataGrid library for Zend Framework
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

Grid error when deleting #566

Closed imonteiro closed 11 years ago

imonteiro commented 11 years ago

Original author: Guus.Te...@gmail.com (June 17, 2010 13:49:43)

What steps will reproduce the problem? 1.Create Grid 2.Specify only setDelete(true) 3.Try to delete a record

What is the expected output? What do you see instead? Expected: Records gets deleted. Got:

An error occurred Application error Exception information:

Message: Resource 'comm' not found Stack trace:

0 /usr/local/share/ZendFramework/library/Zend/Acl.php(774): Zend_Acl->get('comm')

1 /usr/local/share/vhosts/machWeb/application/plugins/AccessCheck.php(25): Zend_Acl->isAllowed('admin', 'comm', 'mode:delete;[lo...')

2 /usr/local/share/ZendFramework/library/Zend/Controller/Plugin/Broker.php(309): Application_Plugin_AccessCheck->preDispatch(Object(Zend_Controller_Request_Http))

3 /usr/local/share/ZendFramework/library/Zend/Controller/Front.php(941): Zend_Controller_Plugin_Broker->preDispatch(Object(Zend_Controller_Request_Http))

4 /usr/local/share/ZendFramework/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()

5 /usr/local/share/ZendFramework/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()

6 /usr/local/share/vhosts/machWeb/public/index.php(29): Zend_Application->run()

7 {main}

Request Parameters:

array ( 'controller' => 'comm', 'action' => 'mode:delete;[loginHist.loginHistID:2]', 'module' => 'default', )

User : support@maa.nl Zend version :1.10.5 Bvb_Grid version : $Rev: 1246 $

Please insert the appropriate values; Zend Framework version: ZFDatgrid Version (Bvb_Grid::getVersion()): Operating system: PHP Version: Database Server and version: Source Adatapter:

Please provide any additional information below.

Original issue: http://code.google.com/p/zfdatagrid/issues/detail?id=336

imonteiro commented 11 years ago

From bento.vi...@gmail.com on June 17, 2010 14:05:32 Hi,

Can you please provide the url created when trying to delete the record.

Are you using Ajax?

Best Regards, Bento Vilas Boas

imonteiro commented 11 years ago

From Guus.Te...@gmail.com on June 18, 2010 06:51:29 As shown in the error message: http://mach.mhs.nl/comm/mode:delete;[loginHist.loginHistID:101]

No Ajax.

imonteiro commented 11 years ago

From Guus.Te...@gmail.com on June 22, 2010 07:58:02 Hello Bento,

I just found out that deleting through the mass updates does work.

imonteiro commented 11 years ago

From Guus.Te...@gmail.com on June 22, 2010 10:28:28 FYI: the error comes from the Zend_Acl not knowing the called resource 'comm'. So it looks like you are implementing a delete through a public defined controller/action that is not known to the site. I guess there is some lacking $grid->getUrl() in front of the uri or something like that.

imonteiro commented 11 years ago

From bento.vi...@gmail.com on June 22, 2010 13:30:35 Hi,

Are you using routes?

Best Regards, Bento Vilas Boas