Flyspray - The bug killer!

“If debugging is the process of removing bugs, then programming must be the process of putting them in.” – Edsger Dijkstra

This is the Bug Tracking System for the Flyspray project. This is not a demo! Before opening a new task, please read the guidelines!

Do not issue bugs reports against versions earlier than 0.9.9.6

Security problem? Check the security section.

| Tasklist |

FS#1618 - Error upgrade 0.9.9.6 to 1.0

Attached to Project: Flyspray - The bug killer!
Opened by Thierry Hugue (ThierryH) - Friday, 25 December 2009, 13:18 GMT+1
Task Type Bug Report
Category Installer
Status Unconfirmed
Assigned To No-one
Operating System Linux
Severity Medium
Priority Normal
Reported Version 1.0.0 devel
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

Fresh install of latest 0.9.9.6 version. Setup. Use.
⇒ OK

Download latest SVN version (1.0), remove previous version files (except config file), replace with new ones, and upgrade (http://localhost/flyspray/setup/upgrade.php).
All precondition checks were green.

When I clicked on “Perform Upgrade” button, I get an error message:

Failed!

Details about the error:

MDB2 Error: unknown error: 
_doQuery: [Error message: Could not execute statement]
[Last executed query: ALTER TABLE `projects` ADD `project_prefix` VARCHAR(20),
ADD `override_user_lang` INT DEFAULT 0 NOT NULL, ADD `anon_group` INT DEFAULT 0
NOT NULL, CHANGE `intro_message` `intro_message` VARCHAR(65532), CHANGE
`notify_email` `notify_email` TEXT, CHANGE `notify_jabber` `notify_jabber` TEXT,
CHANGE `notify_reply` `notify_reply` TEXT, CHANGE `feed_img_url` `feed_img_url`
TEXT, CHANGE `feed_description` `feed_description` TEXT, CHANGE `lang_code`
`lang_code` VARCHAR(10) DEFAULT 'en' NOT NULL, CHANGE `default_task`
`default_task` TEXT]
[Native code: 1118]
[Native message: Row size too large. The maximum row size for the used table
type, not counting BLOBs, is 65535. You have to change some columns to TEXT or
BLOBs]

Note: I saw another bug (#1530) on the same upgrade process, but is was a different error description...

This task depends upon

Comment by Mike Norrish (Minouris) - Friday, 01 January 2010, 01:54 GMT+1

This can be worked around by removing the line "<default></default>" from setup/upgrade/1.0.0/prefix.xml before upgrading.

Comment by Thierry Hugue (ThierryH) - Friday, 01 January 2010, 12:03 GMT+1

Which section ?
I have several sections where this field is empty:
- project_prefix
- intro_message
- visible_columns
Should I remove them all ?

Comment by Mike Norrish (Minouris) - Friday, 01 January 2010, 20:32 GMT+1

*forehead slap* Sorry, forgot to specify which field...

'intro_message' is the one to remove it from.

Comment by Thierry Hugue (ThierryH) - Saturday, 02 January 2010, 21:37 GMT+1

Hi,
Works now, removing this entry...

Unfortunately, I'm facing additional problems:
- Swift.php missing: indeed, this PHP module is not available in the SVN.
⇒ I copied it from my previous version (0.9.9.6), from directory includes/external/swift-mailer.
Works fine
- color_field: preference definition unknown (exact message is : "Notice: Undefined index: color_field in /home/www/flyspray/includes/class.project.php on line 30"). I checked the "prefs" table, and, indeed, there is no "color_field" definition.
⇒ Is it an upgrade bug ? I can create it manually, but how ? What should I enter ?

Thanks again !

Comment by Mike Norrish (Minouris) - Saturday, 02 January 2010, 23:37 GMT+1

I had the Swift.php problem, but not the undefined colour problem...

Comment by Thierry Hugue (ThierryH) - Saturday, 02 January 2010, 23:39 GMT+1

Any idea on the "prefs" table setting I should use for this color ?

Comment by Mike Norrish (Minouris) - Saturday, 02 January 2010, 23:40 GMT+1

I had the Swift.php problem, but not the undefined colour problem.

Basically, this is what I did from start to finish:

1. Installed 0.9.9.6, following through the whole setup process
2. Removed all of 0.9.9.6 from the filesystem EXCEPT the config file
3. Copied over all the files from 1.0.0-dev
4. Copied back the includes/external/swift-mailer folder
5. Edited prefix.xml to remove the default value from intro_message
5. Ran the upgrade script

After that it all seemed to work.

Comment by Mike Norrish (Minouris) - Saturday, 02 January 2010, 23:48 GMT+1

From the error message, it sounds like it's structure missing (a database index) rather than missing rows, or a missing column (color_index being the name of an index, not a column- at least that's my humch, from the context and wording)...

I'd say your database hasn't been installed correctly, probably from fiddling around trying to fix the intro_message problem (that's how I broke it a couple of times ;)). I'd start from scratch with fresh downloads / a fresh checkout of the code, to make sure everything's pristine before applying any fixes.

Comment by Thierry Hugue (ThierryH) - Sunday, 03 January 2010, 11:55 GMT+1

I completely re-installed from clean version 0.9.9.6, to make sure there is no such problem...

So I looked at the code to investigate, and I found a script that should have ran during the upgrade process: setup/upgrade/1.0.0/upgrade_severity.php:

if (!isset($fs->prefs['color_field'])) {
$db->x->execParam('INSERT INTO {lists} (list_name, list_type, project_id) VALUES(?,?,?)', array('Severities', 1, 0));
(...)
$db->x->execParam('UPDATE {prefs} SET pref_value = ? WHERE pref_name = ?', array($field_id, 'color_field'));

As you can see in this script, a new entry in the "prefs" table should have been created/updated if not already existing. This entry name should be "color_field", but, in my table, it does not exist after upgrade... But a new table, named "lists" has been created, and contains an entry "Severities" as expected (this shows setup script is going through this upgrade_security.php file)...

I wonder if the problem is not related to the SQL syntax for this "color_field" creation we can see in this file: when a record does not exist in an SQL table, I thought you could not "UPDATE" it, but you'd rather "INSERT" it... Am I wrong ?
In that case, should we modify the last line with the following:

$db->x->execParam('INSERT INTO {prefs} (pref_name, pref_value) VALUES(?,?)', array('color_field', $field_id ));

Thanks for your feedback,

Comment by Thierry Hugue (ThierryH) - Monday, 04 January 2010, 09:07 GMT+1

I confirm that the last correction I suggested is working fine.

So, to sum up, I did the following:
1. Installed 0.9.9.6, including DB creation and configuration setup
2. Removed all of 0.9.9.6 files EXCEPT the config file
3. Copied over all the files from 1.0.0-dev
4. Copied the directory includes/external/swift-mailer from version 0.9.9.6 onto 1.0.0-dev
5. Edited setup/upgrade/1.0.0/prefix.xml to remove the default value from intro_message section
6. Edited setup/upgrade/1.0.0/upgrade_severity.php to replace last line as explained above
7. Ran the upgrade script

Unfortunately, there are still problems, one of the most important is the fact I'm always disconnected after each action (so I cannot use it): I need to investigate this new issue further more.

Comment by Eric Blade (eblade) - Thursday, 18 November 2010, 14:09 GMT+1

I followed these instructions, and then had to change line 10 of class.notify.php, to read:

class NotificationsThread extends Swift_Events_Listener {

instead of class .. implements ...

Not being able to stay logged in for very long, though, as you pointed out.

Comment by Eric Blade (eblade) - Thursday, 18 November 2010, 14:34 GMT+1

ok, logging out and back in, solved that problem. now my only problems are that several buttons do nothing (!) and the Admin toolbox throws an error.

Comment by Eric Blade (eblade) - Wednesday, 24 November 2010, 14:43 GMT+1

The comments here + on task 1619, allowed me to get installed. woot.

Loading...