Page 1 of 1

Sort by can't handle more than one custom field in combinan

Posted: 12 Sep 2012, 11:32
by shanthini
Hi

We are using Mantis 1.2.0 and we got the same error as in the link http://www.mantisbt.org/bugs/view.php?id=5859. To resolve this we deleted MANTIS_VIEW_ALL_COOKIE cookie and the error gone away.

In the same link http://www.mantisbt.org/bugs/view.php?id=5859 another solution is given. That is to change the code in core\filter_api.php. But when we looked in to core\filter_api.php file we could not able to find the code. Only first part of the code we could able to see as below. Please advice.

# if sorting by a custom field
if( strpos( $c_sort, 'custom_' ) === 0 ) {
$t_custom_field = utf8_substr( $c_sort, utf8_strlen( 'custom_' ) );
$t_custom_field_id = custom_field_get_id_from_name( $t_custom_field );

$c_cf_alias = str_replace( ' ', '_', $t_custom_field );
$t_cf_table_alias = $t_custom_field_string_table . '_' . $t_custom_field_id;
$t_cf_select = "$t_cf_table_alias.value $c_cf_alias";

Also we understand that in latest versions this issue is resolved. But we do not want to do the upgrade. Please advice where to change the code in Mantis version 1.2.0 to solve this issue.

Thanks in advance!

Re: Sort by can't handle more than one custom field in combi

Posted: 14 Sep 2012, 12:30
by Lapinkiller
hello

Why you can change code but not upgrade ?

Re: Sort by can't handle more than one custom field in combi

Posted: 17 Sep 2012, 04:33
by shanthini
Hi,

Actually we are using Mantis version 1.2.0 for the past 2 years. In that some customizations we did as per our requirement. If we go for an upgrade we may loose all our customization work.

So in the existing source it self we want to correct the error. So could you please guide in which file we need to include the correction and how to change the code.

Thanks