Application Error #401

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
fredckp
Posts: 4
Joined: 01 Jun 2005, 05:50

Application Error #401

Post by fredckp »

Hi,

Need some help here..

I just installed 1.0.0a3 on a RedHat server.

I managed to login to administrator account, with an error prompt stated below.

I got the same error when accessing My View, View Issues, Manage Custom Views.

Please kindly advise. Thanks.

Cheers,
Fred


APPLICATION ERROR #401
Database query failed. Error received from database was #1064: You have an error in your SQL syntax near 'on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on' at line 3 for the query: SELECT distinct cft.id as id, cft.name as name
FROM mantis_custom_field_table as cft
JOIN mantis_custom_field_project_table as cfpt on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on cfpt.project_id = pt.id
LEFT JOIN mantis_project_user_list_table as pult
on cfpt.project_id = pult.project_id and pult.user_id = 2
JOIN mantis_user_table as ut on ut.id = 2
WHERE pt.view_state = 10 OR
( pt.view_state = 50 and pult.user_id = 2 ) OR
( pult.user_id is null and ut.access_level >= 90 )
ORDER BY name ASC

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.
mivaca
Posts: 2
Joined: 01 Jun 2005, 23:16

Same problem here

Post by mivaca »

Hello:

I have just finished an Upgrade from 0.19 to 1.0.0a3 on a Fedora Core 3 system, executed ALL the upgrade scripts WITHOUT getting errors.

The moment I log on with any account that was previously working, I get the following error message every time I try to "view issues" or acces "my view" or "manage custom views".

Any help will be greatly appreciated. Thanks.

Marco V.


APPLICATION ERROR #401
Database query failed. Error received from database was #1064: You have an error in your SQL syntax near 'on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on' at line 3 for the query: SELECT distinct cft.id as id, cft.name as name
FROM mantis_custom_field_table as cft
JOIN mantis_custom_field_project_table as cfpt on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on cfpt.project_id = pt.id
LEFT JOIN mantis_project_user_list_table as pult
on cfpt.project_id = pult.project_id and pult.user_id = 4
JOIN mantis_user_table as ut on ut.id = 4
WHERE pt.view_state = 10 OR
( pt.view_state = 50 and pult.user_id = 4 ) OR
( pult.user_id is null and ut.access_level >= 90 )
ORDER BY name ASC
rickje
Posts: 2
Joined: 02 Jun 2005, 07:58

Post by rickje »

I have the same problem.
Just installed Mantis on a Debian/PHP5.05DEV/MySQL 3.23.58 system.

Database query failed. Error received from database was #1064: You have an error in your SQL syntax near 'on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on' at line 3 for the query: SELECT distinct cft.id as id, cft.name as name
FROM mantis_custom_field_table as cft
JOIN mantis_custom_field_project_table as cfpt on cft.id = cfpt.field_id
JOIN mantis_project_table as pt on cfpt.project_id = pt.id
LEFT JOIN mantis_project_user_list_table as pult
on cfpt.project_id = pult.project_id and pult.user_id = 1
JOIN mantis_user_table as ut on ut.id = 1
WHERE pt.view_state = 10 OR
( pt.view_state = 50 and pult.user_id = 1 ) OR
( pult.user_id is null and ut.access_level >= 90 )
ORDER BY name ASC
mivaca
Posts: 2
Joined: 01 Jun 2005, 23:16

Solution !

Post by mivaca »

Hi:

I browsed through the forums and bug tracker yesterday and I found the solution. You have to download the file:

mantisbt/core/custom_field_api.php -> 1.53

from the CVS. That fixes the problem.

Hope it helps.
Jimmy

still doesnt work for me

Post by Jimmy »

tried replacing that file with the version you pointed out to us in cvs, not sure if its just me but this file did not seem to fix the problem? let me know if anyone else still has this problem or not so i can determine if its my fault, thanks
Guest

Post by Guest »

my fault, it works now
fredckp
Posts: 4
Joined: 01 Jun 2005, 05:50

Re: Solution !

Post by fredckp »

mivaca wrote:Hi:

I browsed through the forums and bug tracker yesterday and I found the solution. You have to download the file:

mantisbt/core/custom_field_api.php -> 1.53

from the CVS. That fixes the problem.

Hope it helps.
Hi,

Pardon me for being new to this environment.

Please guide me to the link to retrieve this file. Thanks.

Regards,
Fred
rickje82

Re: Solution !

Post by rickje82 »

fredckp wrote:
mivaca wrote:Hi:

I browsed through the forums and bug tracker yesterday and I found the solution. You have to download the file:

mantisbt/core/custom_field_api.php -> 1.53

from the CVS. That fixes the problem.

Hope it helps.
Hi,

Pardon me for being new to this environment.

Please guide me to the link to retrieve this file. Thanks.

Regards,
Fred
Just click here: http://cvs.sourceforge.net/viewcvs.py/m ... isbt/core/

and download the file mentioned
rickje
Posts: 2
Joined: 02 Jun 2005, 07:58

Post by rickje »

The update works. Thanks!
fredckp
Posts: 4
Joined: 01 Jun 2005, 05:50

Post by fredckp »

Thanks!

It works fine now.

Regards,
Fred
false404
Posts: 2
Joined: 27 Jun 2005, 18:00

Post by false404 »

Thanks for the tip... I replaced the custom_field_api.php file with the 1.53 version from CVS. This fixed the Application Error 401 that I was getting after logging in to the system.

Now when I log out and try to log back in again, I get a completly blank page (no HTML source at all). If I change the custom_field_api.php file back to stock, I get the login page again but the 401 database error comes back. Any ideas?

I'm running:

PHP 4.3.2
MySQL 3.23.58
fresh install of Mantis 1.0.0a3

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

Post by thraxisp »

Are there any errors in your apache error_log?
false404
Posts: 2
Joined: 27 Jun 2005, 18:00

Post by false404 »

thraxisp wrote:Are there any errors in your apache error_log?
Nope. The access_log file shows some normal GET requests for the directory, but error_log is not showing anything.

Also, for more information, I'm running Apache 2.0.40 on a modified Red Hat 9 server (it's hosted...)

Thanks!
Post Reply