APPLICATION ERROR #401

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
SystemCorp
Posts: 13
Joined: 21 Mar 2011, 06:23

APPLICATION ERROR #401

Post by SystemCorp »

Mantis version 1.2.3

Got the following error message in our MantisBT. I looked into other reported Application Error 401's and database 1064 error's, but they seem to have been related to the name of the custom field including special characters ( parenthesis and hyphens). In this case however it was the string in the custom field that seems to be causing an issue. It's a little odd though, as the error only occurs on one login.

Code: Select all

Database query failed. Error received from database was #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''OSI (North America' at line 1 for the query: SELECT Count( DISTINCT mantis_bug_table.id ) as idcnt FROM mantis_project_table, mantis_bug_table LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_5 ON mantis_custom_field_string_table_5.bug_id = mantis_bug_table.id AND mantis_custom_field_string_table_5.field_id = 5 WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id = 288 ) AND (mantis_custom_field_string_table_5.value = 'OSI (North America?)').
To replicate the error, we select the project that has the custom field enabled and select View Issues. This causes the error to pop up 100% of the time for the user. This does not happen if he selects All Projects, but no matter the order of selected pages etc, the combination of the specific project and the View Issues page generates the issue.

The entry in the database has since been changed to data without the '(', ')' or the '?' and no other users can generate the fault. The fault is generated regardless of physical machine he is connecting from ( ie logged into a laptop and tried it there too) so I assume that it is somehow related to his account. I have since tried re-setting the users preferences back to default, but this did not make a difference. Is there a manual way to reset the view issues page for the user without losing any other associated settings.
SystemCorp
Posts: 13
Joined: 21 Mar 2011, 06:23

Re: APPLICATION ERROR #401

Post by SystemCorp »

*poke*

Anyone got an ideas on how to resolve this?
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: APPLICATION ERROR #401

Post by Lapinkiller »

Hi
Have you seen the bugs in bugtacker ? i think there was a bug declared about custom field and special char
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
SystemCorp
Posts: 13
Joined: 21 Mar 2011, 06:23

Re: APPLICATION ERROR #401

Post by SystemCorp »

I looked into other reported Application Error 401's and database 1064 error's, but they seem to have been related to the name of the custom field including special characters ( parenthesis and hyphens). In this case however it was the string in the custom field that seems to be causing an issue.
But thank you for that anyway, any help is good help!
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: APPLICATION ERROR #401

Post by Lapinkiller »

Only one user got the problem ?

Is this user using the custom field in filter or in viewed columns ?

If yes, bugs about custom fields and colums/filters have been resolved between 1.2.3 and 1.2.5
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
SystemCorp
Posts: 13
Joined: 21 Mar 2011, 06:23

Re: APPLICATION ERROR #401

Post by SystemCorp »

That sounds like the problems we are seeing, thanks for that!
atrevino
Posts: 1
Joined: 30 May 2011, 15:57

Re: APPLICATION ERROR #401

Post by atrevino »

I did an upgrade from Ubuntu's repo version to the current one (1.2.5) and got this issue:

APPLICATION ERROR #401
Ha fallado la consulta a la base de datos. El error devuelto por la base de datos fue #1054: Unknown column 'p.inherit_global' in 'field list' para la consulta: SELECT DISTINCT p.id, ph.parent_id, p.name, p.inherit_global, ph.inherit_parent
FROM mantis_project_table p
LEFT JOIN mantis_project_hierarchy_table ph
ON ph.child_id = p.id
WHERE p.enabled = ?
ORDER BY p.name




Any suggestions?
Post Reply