Plugins - Filter - Data Type mismatch

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
lbayle
Posts: 20
Joined: 25 Jul 2012, 08:03
Contact:

Plugins - Filter - Data Type mismatch

Post by lbayle »

-- Mantis v1.3_RC1 --

Hi,
I am trying to create a new filter with combobox (FILTER_TYPE_MULTI_STRING) and can't figure out what I am doing wrong.
The error thrown is : "Data Type mismatch. Enable detailed error messages for further information."

the detailed error message reports:

Code: Select all

Filename	Line			Function	Args
C:\xampp\htdocs\mantis13\core\helper_api.php	213	-	-	trigger_error	( <string>'26', <integer>256 )
C:\xampp\htdocs\mantis13\core\helper_api.php	284	-	-	helper_check_variables_equal	( <string>'522', <integer>0, <boolean>true )
C:\xampp\htdocs\mantis13\core\filter_api.php	4090	-	-	check_selected	( <array> { [0] => '522' }, <integer>0 )
C:\xampp\htdocs\mantis13\view_filters_page.php	481	-	-	print_filter_plugin_field	( <string>'CodevTT_command', <Object><FilterCommandField> ( [field] => 'command', [title] => 'Command', [type] => 3, [default] => NULL, [size] => 1, [colspan] => 3 ) )
I could patch filter_api.php (line 4089, 4093) to remove the 'strict' type compare, but this is of course not the solution !

Code: Select all

// check_selected( $g_filter[$p_field_name], META_FILTER_ANY)
check_selected( $g_filter[$p_field_name], META_FILTER_ANY, false )
the code of the filter is available here:
https://github.com/lbayle/codev/blob/ma ... .class.php


I did browse many existing plugins on gitHub/mantisbt-plugins but could not find any sample combobox filter.

Please help,
best regards
Louis
Post Reply