zfdatagrid / grid

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

Notice when using filters #858

Closed imonteiro closed 11 years ago

imonteiro commented 11 years ago

Original author: m.ha...@gmail.com (October 23, 2008 21:25:22)

What steps will reproduce the problem?

  1. Create grid $grid = new Bvb_Grid_Deploy_Table( $db );
  2. Add filter $grid->filters = array( 'definition_status' => array( 'distinct' => array( 'field' => definition_status', 'name' => 'definition_status' ) )

3.

What is the expected output? What do you see instead? Notice: Undefined index: distinct in C:\Documents and Settings\mhaket\My Documents\workspace\cm\library\Bvb\Grid\DataGrid.php on line 1842

What version of the product are you using? On what operating system? beta 0.1

Please provide any additional information below.

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

imonteiro commented 11 years ago

From pao.fre...@gmail.com on October 23, 2008 21:50:17 I was not able to reproduce the notice. I've tried several differences settings, but none of them give that error.

However, I made some changes that may, or may not, solved this issue.

Update to the latest SVN revision (39), and then let me know if this issue remains.

Note: Please for now on, to define filters use this format

$filters = new Bvb_Grid_Filters ( ); $filters->addFilter('definition_status', array( 'distinct' => array('field' => 'definition_status','name' => 'definition_status' )) ); ->addFilter('definition_status2', array( 'distinct' => array('field' => 'definition_status2','name' => 'definition_status2' )) ); ->addFilter('definition_status3', array( 'distinct' => array('field' => 'definition_status3','name' => 'definition_status3' )) ); $grid->addFilters ( $filters );

Thanks for this report.

imonteiro commented 11 years ago

From m.ha...@gmail.com on October 24, 2008 10:20:02 Notices gone but new ones arrived :-)

Notice: Undefined index: values in C:\Documents and Settings\mhaket\My Documents\workspace\cm\library\Bvb\Grid\DataGrid.php on line 1429

Notice: Undefined index: limit in C:\Documents and Settings\mhaket\My Documents\workspace\cm\library\Bvb\Grid\Deploy\Table.php on line 1580

imonteiro commented 11 years ago

From pao.fre...@gmail.com on October 24, 2008 17:51:09 Are you using the latest SVN revision?

I think this has already been solved

imonteiro commented 11 years ago

From m.ha...@gmail.com on October 25, 2008 08:06:28 Updated to latest version and notice has disappeared. => close issue

imonteiro commented 11 years ago

From pao.fre...@gmail.com on October 25, 2008 13:24:41 Fixed