Project

General

Profile

Actions

Defect #5874

closed

Error after updating trunk

Added by Hannes Horneber almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-07-12
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi there,

I updated our redmine install to the current trunk rev.
After that I get the following error:

ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #16 of app/views/issues/_list.rhtml:
13:     </tr></thead>
14:     <% previous_group = false %>
15:     <tbody>
16:     <% issue_list(issues) do |issue, level| -%>
17:   <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
18:     <% reset_cycle %>
19:     <tr class="group open">

    app/helpers/issues_helper.rb:28:in `issue_list'
    app/helpers/issues_helper.rb:23:in `each'
    app/helpers/issues_helper.rb:23:in `issue_list'
    app/views/issues/_list.rhtml:16:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
    app/views/issues/_list.rhtml:1:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
    app/views/issues/index.rhtml:62:in `_run_rhtml_app47views47issues47index46rhtml'
    app/controllers/issues_controller.rb:83:in `index'
    app/controllers/issues_controller.rb:82:in `index'
    /usr/lib/ruby/1.8/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/1.8/mongrel/rails.rb:74:in `synchronize'
    /usr/lib/ruby/1.8/mongrel/rails.rb:74:in `process'
    /usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'
    /usr/lib/ruby/1.8/mongrel.rb:158:in `each'
    /usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'
    /usr/lib/ruby/1.8/mongrel.rb:285:in `run'
    /usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'
    /usr/lib/ruby/1.8/mongrel.rb:285:in `new'
    /usr/lib/ruby/1.8/mongrel.rb:285:in `run'
    /usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'
    /usr/lib/ruby/1.8/mongrel.rb:268:in `new'
    /usr/lib/ruby/1.8/mongrel.rb:268:in `run'
    /usr/lib/ruby/1.8/mongrel/configurator.rb:282:in `run'
    /usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `each'
    /usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `run'
    /usr/lib/ruby/1.8/mongrel/command.rb:212:in `run'

After updating I did all the db:migration-stuff, so I don't think that
this is the cause of the error.

Some more info:

About your application's environment
Ruby version              1.8.6 (powerpc-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /usr/local/share/redmine
Environment               development
Database adapter          mysql
Database schema version   20100705164950

About your Redmine plugins
Rate Plugin                    0.1.0
Mylyn Connector plugin         2.6.2.stable
Redmine iPhone plugin          0.0.1
Redmine Scrum Plugin           2.1 unstable
Redmine Graphs plugin          0.1.0
Redmine Time Tracker plugin    development
Redmine Scrum Sprints plugin   0.1.4
Redmine Schedules plugin       0.4.2
Redmine Reports plugin         0.1.0
Kanban                         0.2.0
Redmine ezSidebar plugin       0.1.1
Redmine Question plugin        0.3.0
Customer plugin                0.2.0
Timesheet Plugin               0.6.0
Redmine Hudson plugin          1.0.2
Redmine Releases plugin        0.0.1
Redmine Todo Lists plugin      0.0.4.1
Redmine Code Review plugin     0.3.0
Bots filter                    1.02
Bulk Time Entry                0.5.0
Redmine My Widgets plugin      0.1.0

Cheers

Actions #1

Updated by Felix Schäfer almost 14 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Make sure your plugins are up-to-date and compatible with trunk, I suspect the error comes from one of them. If you think this is a bug with redmine, please confirm on a clean install (i.e. without plugins or patches) that you still have the problem and reopen this issue, thanks.

Actions #2

Updated by Hannes Horneber over 13 years ago

  • Status changed from Closed to Reopened

I'm sorry, that I have to reopen the issue again. I tried it with a clean install, without any plugins, but with my old data (I need the data :-) ). But the error remains. Every time I open the issue list the mentioned error is risen. The issue list works, if no issue is in the project, but as soon as there is a open issue in it the error appears. I updated the migrations, I checked the file and directory permissions. But now I don't know any further.
Please help ;-)

Actions #3

Updated by Felix Schäfer over 13 years ago

Hannes Horneber wrote:

with my old data (I need the data :-) )

Did you have the subtasks plugin installed in any previous installations?

Actions #4

Updated by Hannes Horneber over 13 years ago

oh oh... yeah, I had the subtasking plugin installed.

Actions #5

Updated by Felix Schäfer over 13 years ago

Ok, have a look at the corresponding ticket, but the short version is: the data is incompatible, not sure if or how good a solution exists to update it.

Actions #6

Updated by Hannes Horneber over 13 years ago

thanks Felix for your responds. In fact the data of subtasks is not important for me. But the main issues data is. Is there a way to do a clean install and import the data from an old installation? Of course I could do an sql-dump and so on, but if I want to clean up all the fields and relations that I don't need anymore, what can I do?

Actions #7

Updated by Felix Schäfer over 13 years ago

  • Status changed from Reopened to Closed

I'm really sorry, but I don't know enough about the plugin to be of any help, and we don't provide upgrade-paths from third-party plugins. I think there were some ideas of how to tackle it in the original ticket, or contact the author of the original plugin for help. The simplest solution though would be to identify which columns the plugin has added, and delete them after having imported your db-dump before running the migration.

Actions #8

Updated by Hannes Horneber over 13 years ago

hi felix, for your assitance and hints. I actually solved it, by rolling back some migrations.
So what I did is:

rake db:migrate VERSION=20100221100219

and then
rake db:migrate

I think that kind of resets the subtasking fields in the db.
Cheers

Actions #9

Updated by Jean-Baptiste Barth over 13 years ago

Hannes: if you want to uninstall a plugin, you can use rake db:migrate:plugin NAME=<name_of_the_plugin> VERSION=0.

But be VERY careful : actually, if this plugin is not compatible with newest versions of Redmine, I suppose it's because its database structure overlaps redmine's core one. So uninstalling the plugin may corrupt the database structure definitely. If I were you, I'd do this :
  • stop the redmine instance (depends on how you host it)
  • do a backup of my database (sql dump, yaml_db dump, or whatever...)
  • migrate my DB back to "just before subtasking in the core" (I let you find the exact migration number) : rake db:migrate VERSION=XXXXXXXXXXXX
  • uninstall the plugin : rake db:migrate:plugin NAME=<name_of_the_plugin> VERSION=0
  • remove the subtask plugin directory
  • then migrate your database to latest version of core : rake db:migrate
  • restart your redmine instance
Actions #10

Updated by Jean-Baptiste Barth over 13 years ago

Oops, happy you solved it :) Just note that a rollback+migrate only can leave useless fields in your DB. But if you don't plan to reimport the data in a fresh installed instance, it doesn't matter...

Actions

Also available in: Atom PDF