Page 1 of 1
Application error #401 ?
Posted: 04 Oct 2010, 10:49
by khali91
Hi,
Today, I upgrade Mantis from 1.2.2 to 1.2.3. But I have a problem with my database. In fact, I imported my database, but when I logged, I have this error message :
APPLICATION ERROR #401
Database query failed. Error received from database was #1054 : Unknown column 'obsolete' in 'where clause' for the query : SELECT *
FROM mantis_project_version_table
WHERE project_id=0 AND obsolete = ? ORDER BY date_order DESC.
It's a problem with my MySQL database but I don't know what is the problem. When I upgrade to 1.2.2, I hadn't this problem, all worked find.
I tried to use the function
REPAIR TABLE mantis_project_version_table, but it don't worked. Any idea about this problem ?
Thank you for your help.
Re: Application error #401 ?
Posted: 04 Oct 2010, 12:02
by atrol
Maybe you are connected to an older version. (maybe an upgrade from 1.1.x ?)
Check config_inc.php for your database connect.
Re: Application error #401 ?
Posted: 04 Oct 2010, 12:18
by khali91
Hi,
No, I am connected on Mantis 1.2.3. I imported an other database (it's my test database) and Mantis works. But when I import my true database, I have this error.
I modified my config_inc.php (line $g_database_name). It's the good name of my database. When I upgraded to 1.2.2, I hadn't problem. I use the same method to upgrade on 1.2.3. I don't know why I have this problem.
It's not about e problem with column on one of my table of my database (Unknown column 'obsolete' in 'where clause' for the query) ?
Re: Application error #401 ?
Posted: 04 Oct 2010, 12:45
by atrol
connect to the database with mysql command line tool (or phpMyAdmin)
Enter the following statement
Code: Select all
select * from mantis_version_table;
Is there a column "obsolete" or not?
Re: Application error #401 ?
Posted: 04 Oct 2010, 13:13
by khali91
When I enter select * from mantis_project_version_table;
Empty set (0.00 sec)
When I enter "desc mantis_project_version_table;"
+-------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| project_id | int(10) unsigned | NO | MUL | 0 | |
| version | varchar(64) | NO | | | |
| date_order | datetime | NO | | 1970-01-01 00:00:01 | |
| description | longtext | NO | | NULL | |
| released | tinyint(4) | NO | | 1 | |
+-------------+------------------+------+-----+---------------------+----------------+
The column obsolete don't exist. I create it ?
Re: Application error #401 ?
Posted: 04 Oct 2010, 14:30
by atrol
I still think that you are working on another database which has not been updated to 1.2.x
Run tthis statement
Code: Select all
select value from mantis_config_table where config_id = 'database_version';
If value is lesser than 183 , your database has not been updated to 1.2.3
Re: Application error #401 ?
Posted: 04 Oct 2010, 14:36
by khali91
I have add the column "obsolete". All work but when I click on a bug, I have a new error :
APPLICATION ERROR #401
Database query failed. Error received from database was t #1054 : Unknown column 'p.inherit_global' in 'field list' pour la requĂȘte : 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.
I tried to create the column p.inherit_global, but don't work.
I enter select value from mantis_config_table where config_id = 'database_version';
and I have 63...
Re: Application error #401 ?
Posted: 04 Oct 2010, 14:50
by atrol
khali91 wrote:I have add the column "obsolete". All work but when I click on a bug, I have a new error :
Just my 2 Cents: You should stop with trying such changes.
Believe me: You are working on a database which has not been upgraded to latest version!
khali91 wrote:
I enter select value from mantis_config_table where config_id = 'database_version';
and I have 63...
Just what I am saying: You are working on a 1.1.x database schema
Re: Application error #401 ?
Posted: 04 Oct 2010, 15:05
by khali91
Ok so I go to Mantis 1.1.x, I install my database and I upgrade to 1.2.3 ? May be should be work it ?
Re: Application error #401 ?
Posted: 04 Oct 2010, 15:15
by atrol
It's very confusing for me what you have written until now:
I can't imagine that you ever worked with 1.2.2 without any problem.
If it's true, there must be somewhere a database with version 183 which should work also with 1.2.3 without any problems.
If you don't have this database available any more, you should undo your manually database changes (the database with version 63), or even better recover your backup (if there is one)
After that, follow the instructions given in file doc/INSTALL of MantisBT 1.2.3 to do the upgrade.
Re: Application error #401 ?
Posted: 04 Oct 2010, 15:52
by khali91
Sorry for my bad english.
So, I installed Mantis 1.1.8 and it's, my Mantis work very well. I followed the doc to upgrade to Mantis 1.2.3. When I go to
http://myser/mantis/admin/install.php, I click on "Upgrade database". All it's "GOOD" except "Schema create Table SQL"; I have this error :
BAD
CREATE TABLE mantis_plugin_table ( basename VARCHAR(40) NOT NULL, enabled TINYINT NOT NULL DEFAULT '0', PRIMARY KEY (basename) )ENGINE=MyISAM DEFAULT CHARSET=utf8
Table 'mantis_plugin_table' already exists
Re: Application error #401 ?
Posted: 05 Oct 2010, 07:05
by atrol
I am wondering again: The table mantis_plugin_table should not exist before upgrading
The best way is to setup a fresh 1.1.8 and to compare this database schema with your database schema before upgrading
Re: Application error #401 ?
Posted: 05 Oct 2010, 10:09
by khali91
Hi,
In fact, I returned to 1.1.8 and I upgrade to Mantis 1.2.3. The upgrade of my database is now OK. Mantis works.
The problem was the bad upgrade of my database like you told.
Thank you for your help.