#401 Error when using filter with customs fields

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
hinke
Posts: 23
Joined: 15 Feb 2005, 08:35
Location: Lund, Sweden
Contact:

#401 Error when using filter with customs fields

Post by hinke »

If I sort a custom field column in 1.0.0a1 and then go into to the filter and press "Filter" I recieve a #401 error. This only happens with custom fields.

Any ideas?
hinke
Posts: 23
Joined: 15 Feb 2005, 08:35
Location: Lund, Sweden
Contact:

Post by hinke »

nobody else has this problem?
Hsoj
Posts: 14
Joined: 05 Apr 2005, 19:32

Post by Hsoj »

Hmm... I got this too.. I was trying out a new custom field and put it in the custom_function_default_get_columns_to_view

I was able to sort by my custom field just fine, but when I went to use a filter to change something, and then tried to return to the view all page, I got the 401 error. I had to clear my cookies to get my View All Issues page to display again.
APPLICATION ERROR #401

Database query failed. Error received from database was #1066: Not unique table/alias: 'mantis_custom_field_string_table' for the query: SELECT DISTINCT mantis_bug_table.*, mantis_custom_field_string_table.value
FROM mantis_bug_table
LEFT JOIN mantis_custom_field_string_table ON ( ( mantis_custom_field_string_table.bug_id = mantis_bug_table.id ) AND ( mantis_custom_field_string_table.field_id = 7 ) ) LEFT JOIN mantis_custom_field_string_table ON ( ( mantis_custom_field_string_table.bug_id = mantis_bug_table.id ) AND ( mantis_custom_field_string_table.field_id = 7 ) )
WHERE 1 != 1
ORDER BY sticky DESC, mantis_custom_field_string_table.value ASC, mantis_custom_field_string_table.value ASC, last_updated DESC, date_submitted DESC


Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Hsoj
Posts: 14
Joined: 05 Apr 2005, 19:32

Post by Hsoj »

Another thing to note, the custom field which I was trying to sort is defined in my custom_function_api.php, with different values depending on the project.

Was your custom field also defined in custom_function_api.php, hinke?
hinke
Posts: 23
Joined: 15 Feb 2005, 08:35
Location: Lund, Sweden
Contact:

Post by hinke »

Hi,

I reported the error to Mantis.

No, my custom fields are not defined in custom_function_api.php

Very annoying error for us at least.

-Henrik
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

This is fixed in CVS now and will be in the next release. It is tracked under #5689.
Post Reply