Mantis 1.2.2 upgrade issues! Need help!
Moderators: Developer, Contributor
Mantis 1.2.2 upgrade issues! Need help!
I have version 1.1.8 and I am trying to upgrade to 1.2.2.
Everything has checked out "Good" until I get to Schema CreateTableSQL ( mantis_plugin_table ) and then I get 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
CREATE command denied to user 'mantis'@'localhost' for table 'mantis_plugin_table'
I don't understand this! I copied over my old config_inc file also. Please someone help I have been stuck on this for days!!!!!!
Also, if I select the Print SQL Queries instead of Writing to the Database option I get these errors:
SYSTEM WARNING: htmlentities() expects parameter 1 to be string, array given
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
but then it says that my install was completed! I don't get it!!
Thanks in advance!
Everything has checked out "Good" until I get to Schema CreateTableSQL ( mantis_plugin_table ) and then I get 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
CREATE command denied to user 'mantis'@'localhost' for table 'mantis_plugin_table'
I don't understand this! I copied over my old config_inc file also. Please someone help I have been stuck on this for days!!!!!!
Also, if I select the Print SQL Queries instead of Writing to the Database option I get these errors:
SYSTEM WARNING: htmlentities() expects parameter 1 to be string, array given
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
but then it says that my install was completed! I don't get it!!
Thanks in advance!
Re: Mantis 1.2.2 upgrade issues! Need help!
Are you able to run this statement with another tool (mysql or phpMyAdmin ...)?sdye wrote:I have version 1.1.8 and I am trying to upgrade to 1.2.2.
Everything has checked out "Good" until I get to Schema CreateTableSQL ( mantis_plugin_table ) and then I get 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
CREATE command denied to user 'mantis'@'localhost' for table 'mantis_plugin_table'
This is fixed and will be part of next version 1.2.3sdye wrote: Also, if I select the Print SQL Queries instead of Writing to the Database option I get these errors:
SYSTEM WARNING: htmlentities() expects parameter 1 to be string, array given
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
http://www.mantisbt.org/bugs/view.php?id=11364
But of course this is not your problem when upgrading
Re: Mantis 1.2.2 upgrade issues! Need help!
I am running with MySql. I looked at the patch (the link you provided) and placed it at the bottom of all of the code in my install.php file.
Went back to login screen (new version) and when I clicked the "Warning: The database has not been updated..." link it showed a blank page instead of the installation page which I have been getting to install this version. Does this make any sense?
Went back to login screen (new version) and when I clicked the "Warning: The database has not been updated..." link it showed a blank page instead of the installation page which I have been getting to install this version. Does this make any sense?
Re: Mantis 1.2.2 upgrade issues! Need help!
ok, so I logged in and ignored the warning and now I have this error and it won't let me go back to the log in page...
Database query failed. Error received from database was #1146: Table 'mantisbt.mantis_category_table' doesn't exist for the query: SELECT c.*, p.name AS project_name FROM mantis_category_table AS c
LEFT JOIN mantis_project_table AS p
ON c.project_id=p.id
WHERE project_id=0
ORDER BY c.name .
maybe I should completely delete this version and reinstall it?
Database query failed. Error received from database was #1146: Table 'mantisbt.mantis_category_table' doesn't exist for the query: SELECT c.*, p.name AS project_name FROM mantis_category_table AS c
LEFT JOIN mantis_project_table AS p
ON c.project_id=p.id
WHERE project_id=0
ORDER BY c.name .
maybe I should completely delete this version and reinstall it?
Re: Mantis 1.2.2 upgrade issues! Need help!
sdye wrote:I looked at the patch (the link you provided) and placed it at the bottom of all of the code in my install.php file.

Please revert to your previous version.
As I wrote: "this is not your problem when upgrading"
To go on, just don't set checkbox "Print SQL Queries instead of Writing to the Database"
Re: Mantis 1.2.2 upgrade issues! Need help!
Hi,
After reading all the above, converting the db from latin1 to utf8 and running the db statementes manually the check.php of mantis-1.2.2 reported that everything was okay... but it was not. All database fields that had the type changed were populated with the default values. Which means that all date fields like date_submitted, last_modified and so on are all with the value 01-01-1970.
Did I do something wrong? Is there any way to overcome this? Or do I have to wait for 1.2.3 with the fixed install.php?
I have version 1.1.8.
Thanks in advance.
After reading all the above, converting the db from latin1 to utf8 and running the db statementes manually the check.php of mantis-1.2.2 reported that everything was okay... but it was not. All database fields that had the type changed were populated with the default values. Which means that all date fields like date_submitted, last_modified and so on are all with the value 01-01-1970.
Did I do something wrong? Is there any way to overcome this? Or do I have to wait for 1.2.3 with the fixed install.php?
I have version 1.1.8.
Thanks in advance.
Re: Mantis 1.2.2 upgrade issues! Need help!
The mentioned fix does not fix anything related to date fieldsnbarrocas wrote:Or do I have to wait for 1.2.3 with the fixed install.php?
Re: Mantis 1.2.2 upgrade issues! Need help!
Hi atrol,
I have looked at the patch and understood that, I was just hoping that 1.2.3 would come with a new and fixed install.php
Regarding the date, and other fields, conversion issues, what do you recommend? is there any upgrade path from 1.1.8 to 1.2.2?
Thanks,
Nuno
I have looked at the patch and understood that, I was just hoping that 1.2.3 would come with a new and fixed install.php

Regarding the date, and other fields, conversion issues, what do you recommend? is there any upgrade path from 1.1.8 to 1.2.2?
Thanks,
Nuno
Re: Mantis 1.2.2 upgrade issues! Need help!
I made a test upgrade of one of my installations from 1.1.6 to 1.2.2 and don't see this problem.
Do you use PostgreSQL?
There is a known bug for this http://www.mantisbt.org/bugs/view.php?id=9088
Do you use PostgreSQL?
There is a known bug for this http://www.mantisbt.org/bugs/view.php?id=9088
Re: Mantis 1.2.2 upgrade issues! Need help!
I'm using MySQL.
The 2 lines from the database upgrade script show the problem. At this point during the script a column named date_submitted_int with default value to 1 was created and the submitted dates are on column data_submitted. So the next 2 lines drops the date_submitted and replace it with the new column date_submitted_int which has all values equal to 1. Which means that this must be happening to everyone, right?
-------
ALTER TABLE mantis_bug_table DROP COLUMN date_submitted;
ALTER TABLE mantis_bug_table CHANGE COLUMN date_submitted_int date_submitted INTEGER UNSIGNED NOT NULL DEFAULT 1;
-------
Thanks.
The 2 lines from the database upgrade script show the problem. At this point during the script a column named date_submitted_int with default value to 1 was created and the submitted dates are on column data_submitted. So the next 2 lines drops the date_submitted and replace it with the new column date_submitted_int which has all values equal to 1. Which means that this must be happening to everyone, right?
-------
ALTER TABLE mantis_bug_table DROP COLUMN date_submitted;
ALTER TABLE mantis_bug_table CHANGE COLUMN date_submitted_int date_submitted INTEGER UNSIGNED NOT NULL DEFAULT 1;
-------
Thanks.
Re: Mantis 1.2.2 upgrade issues! Need help!
Not right, as I wrote: My test update was OKnbarrocas wrote:Which means that this must be happening to everyone, right?
Where did you find this statement?nbarrocas wrote: ALTER TABLE mantis_bug_table CHANGE COLUMN date_submitted_int date_submitted INTEGER UNSIGNED NOT NULL DEFAULT 1;
I find the following code, which seems to be OK at first sight
The conversion takes place in line with 'Updatefunction" where function install_date_migrate in file install_functions.php is executed
Maybe the bug can be found in this function (but now it's time to go to bed for me)
Code: Select all
$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_bug_table' ), "
date_submitted_int I UNSIGNED NOTNULL DEFAULT '1' " ) );
$upgrade[] = Array( 'UpdateFunction', "date_migrate", array( 'mantis_bug_table', 'id', array( 'date_submitted', 'due_date', 'last_updated' ), array( 'date_submitted_int', 'due_date_int', 'last_updated_int' ) ) );
$upgrade[] = Array( 'DropColumnSQL', Array( db_get_table( 'mantis_bug_table' ), "date_submitted" ) );
$upgrade[] = Array( 'RenameColumnSQL', Array( db_get_table( 'mantis_bug_table' ), "date_submitted_int", "date_submitted", "date_submitted_int I UNSIGNED NOTNULL DEFAULT '1' " ) );
Re: Mantis 1.2.2 upgrade issues! Need help!
Atrol,
Just got it working.
The problem only appear if you check the "Print SQL Queries instead of Writing to the Database" option. You wrote "DON'T select that option..." and I've read it as "Select...".
All working. Thanks for your help.
Just got it working.
The problem only appear if you check the "Print SQL Queries instead of Writing to the Database" option. You wrote "DON'T select that option..." and I've read it as "Select...".
All working. Thanks for your help.