I have a table defined as follows:
>
$tables['table_name'] = array('name' => 'table_name',
'join' => array('type' => 'inner',
'left' => array('table' => 'node', 'field' => 'nid'),
'right' => array('field' => 'nid')),
'filters' => array('num' => array('name' => 'a number',
'help' => 'a number',
'operator' => 'views_handler_operator_gtlt',
'value' => 'integer'
)
)
);
When I select this field to add it as a filter, I consistently get this error message
Fatal error: Cannot use string offset as an array in ./includes/form.inc on line 676
I'm guessing that I don't have my array correctly defined, but from reading the docs and looking at other code, I can't see a problem.
Comments
Comment #1
merlinofchaos commentedJust leave off 'value' there -- if 'value' is set it is expected to be a form widget; it defaults to a basic textfield, which is what you want there.
Comment #2
gsally commentedThat worked. Thank you!
Comment #3
ankur commentedI get the exact same error, except I want to be using integer. My table array looks like:
Comment #4
merlinofchaos commentedNot to repeat myself, but:
if 'value' is set it is expected to be a form widget; it defaults to a basic textfield
Comment #5
KentBye commentedankur: If that worked for you, then go ahead and mark the status of issue from fixed to closed.
Or re-activate it if you need more info.
Comment #6
KentBye commentedComment #7
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.