-
Notifications
You must be signed in to change notification settings - Fork 115
Error searching order grid #7
Comments
Currently the BL_CustomGrid_Helper_Collection::prepareGridCollectionFiltersMap() method is responsible for ensuring that such cases don't happen, by preparing a complete filters map for grids that have custom columns (some of which may join tables having same fields), but it then seems that it can't handle yet grid rewrites coming from third-party extensions, eg here Innoexts_Warehouse (or maybe there is yet another reason). Could you paste here the grid informations that can be found under "Grid Customization" > "Grid Infos" ? Thanks ! |
Uhm, I don't know which site this happened at :p. I can reproduce a similar error (without a grid rewrite, column is added by the observer).
The When viewing the orders page everything is fine, when filtering a normal column, everything is fine. When filtering without ever having set up the custom grid I can filter the created_by_role column. After adding a order column (payment method in this instance) and when I filter on the My first guess was that I added the column not as needly as I should, this is my addColumn code and my code to add it to the collection: $block->addColumn('created_by_role', array(
'header' => Mage::helper('sales')->__('Created By Role'),
'index' => 'created_by_role',
'type' => 'options',
'options' => Mage::getModel('ho_permissions/attribute_source_createdbyrole')->toOptionHash()
)); But I can't really find anything wrong with / don't know how to set the table. |
Is the
Regarding the options filter, you could either use the "Options" renderer along with an options source set to your model ( Anyway, the new 1b94e4c commit brought a new experimental feature that should prevent almost all the problems of this kind, by detecting which applied filters may lead to an ambiguous column, and search in the joined tables for a proper alias to prepend to them. However it still need to be tested in various cases, so tell me what it gives for you :) |
Indeed it is, that is probably what is causing the SQL error.
This fixes it.
Cool :) 👍
Will test this later on, it is fixed for now. |
The text was updated successfully, but these errors were encountered: