omusico / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

massActions fail on non-default table schema #854

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable massActions on a grid
2. Load the table with a *non-default* table schema
3. deploy grid

What is the expected output? What do you see instead?
Should see a rendered table. Get following trace:

In trace below, default schema is 'meta' but table is defined as 
'evidence.items'. 'evidence' is getting lost.

#0 C:\wamp\www\Meta\library\Zend\Db\Statement.php(300): 
Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\wamp\www\Meta\library\Zend\Db\Adapter\Abstract.php(479): 
Zend_Db_Statement->execute(Array)
#2 C:\wamp\www\Meta\library\Zend\Db\Adapter\Pdo\Abstract.php(238): 
Zend_Db_Adapter_Abstract->query('DESCRIBE `items...', Array)
#3 C:\wamp\www\Meta\library\Zend\Db\Adapter\Pdo\Mysql.php(169): 
Zend_Db_Adapter_Pdo_Abstract->query('DESCRIBE `items...')
#4 C:\wamp\www\Meta\library\Bvb\Grid\Source\Zend\Select.php(245): 
Zend_Db_Adapter_Pdo_Mysql->describeTable('items', NULL)
#5 C:\wamp\www\Meta\library\Bvb\Grid\Source\Zend\Select.php(1415): 
Bvb_Grid_Source_Zend_Select->getDescribeTable('items')
#6 C:\wamp\www\Meta\library\Bvb\Grid.php(4527): 
Bvb_Grid_Source_Zend_Select->getIdentifierColumns('items', 'evidence')
#7 C:\wamp\www\Meta\library\Bvb\Grid\Deploy\Table.php(3423): 
Bvb_Grid->_getMassActionsDecorator()
#8 C:\wamp\www\Meta\library\Bvb\Grid\Deploy\Table.php(1994): 
Bvb_Grid_Deploy_Table->_buildMassActions()
#9 C:\wamp\www\Meta\library\Bvb\Grid\Deploy\Table.php(1926): 
Bvb_Grid_Deploy_Table->_buildGridRender()

Please insert the appropriate values;
                    Zend Framework version: 1.11.11
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.8
                          Operating system: Win7
                               PHP Version: 5.3.3
               Database Server and version: MySql 5.0.7

To fix:
In Bvb_Grid_Source_Zend_Select:  Select.php, change line 1413 from

    public function getIdentifierColumns($table)
    {
        $pk = $this->getDescribeTable($table);
to
    public function getIdentifierColumns($table, $schema = null)
    {
        $pk = $this->getDescribeTable($table, $schema);

Original issue reported on code.google.com by tom.rearick@gmail.com on 18 Apr 2012 at 3:40

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the fix.

regards,

Original comment by licentia...@gmail.com on 6 May 2012 at 5:07