Project

General

Profile

Upgrade to 2.2.0, can no longer view issues.

Added by Garrett Marone about 11 years ago

Hi there, I've been using redmine since 0.9.3, and we're currently running 1.3.0. I've got a test server that I upgraded from 1.3.0 to 2.1.0 -> 2.2.0. 2.1.0 was working just fine, but I wanted some of the enhancements from 2.2.0 so I upgraded. Now I cannot list issues.

Below is the error Im seeing, anyone have any ideas? Thanks.

-Garrett Marone

Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead. (called from <class:RbIssueHistory> at /data/redmine/plugins/redmine_backlogs/app/models/rb_issue_history.rb:4)
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead. (called from <class:RbSprintBurndown> at /data/redmine/plugins/redmine_backlogs/app/models/rb_sprint_burndown.rb:5)
Backlogs printable cards: problem loading labels: undefined method `merge' for #<BacklogsPrintableCards::CardPageLayout:0x00000006b46e90>
Started GET "/projects/proactivstorefront/issues" for 12.158.238.190 at 2013-01-04 12:29:17 -0500
Processing by IssuesController#index as HTML
  Parameters: {"project_id"=>"proactivstorefront"}
  Current user: gmarone_admin (id=26)
  Rendered queries/_filters.html.erb (68.3ms)
  Rendered issues/index.html.erb within layouts/base (244.8ms)
Completed 500 Internal Server Error in 2652ms

ActionView::Template::Error (comparison of Array with Array failed):
    20: </td>
    21: <td class="add-filter">
    22: <%= label_tag('add_filter_select', l(:label_filter_add)) %>
    23: <%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
    24: </td>
    25: </tr>
    26: </table>
  app/helpers/queries_helper.rb:27:in `sort'
  app/helpers/queries_helper.rb:27:in `filters_options'
  app/helpers/queries_helper.rb:22:in `filters_options_for_select'
  app/views/queries/_filters.html.erb:23:in `_app_views_queries__filters_html_erb__3018053260605247715_54284000'
  app/views/issues/index.html.erb:18:in `block in _app_views_issues_index_html_erb___564656306637710407_53995520'
  app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb___564656306637710407_53995520'
  app/controllers/issues_controller.rb:84:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:83:in `index'


Replies (15)

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Rick Barrette about 11 years ago

I am having the same/similar issue upgrading from 1.4.4 to 2.x. Everything seems to work, but I receive an Internal error error when I try to access any issues

EDIT here my production.log

Started GET "/redmine/projects/location-ringer/issues?set_filter=1&tracker_id=2" for 173.69.5.132 at 2013-01-06 14:48:32 -0500
Processing by IssuesController#index as HTML
  Parameters: {"set_filter"=>"1", "tracker_id"=>"2", "project_id"=>"location-ringer"}
  Rendered queries/_filters.html.erb (78.4ms)
  Rendered queries/_columns.html.erb (4.2ms)
  Rendered issues/_list.html.erb (98.7ms)
  Rendered issues/_sidebar.html.erb (9.4ms)
  Rendered issues/index.html.erb within layouts/base (276.7ms)
Completed 500 Internal Server Error in 5259ms

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'IssueQuery'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Query.inheritance_column to use another column for that information.):
    13: <% end %>
    14: <%= call_hook(:view_issues_sidebar_planning_bottom) %>
    15: 
    16: <%= render_sidebar_queries %>
    17: <%= call_hook(:view_issues_sidebar_queries_bottom) %>
  app/helpers/issues_helper.rb:134:in `sidebar_queries'
  app/helpers/issues_helper.rb:157:in `render_sidebar_queries'
  app/views/issues/_sidebar.html.erb:16:in `_app_views_issues__sidebar_html_erb___1294024629678794915_44402940'
  app/views/issues/index.html.erb:90:in `block in _app_views_issues_index_html_erb__3214605239218921127_29510940'
  app/helpers/application_helper.rb:1117:in `content_for'
  app/views/issues/index.html.erb:89:in `_app_views_issues_index_html_erb__3214605239218921127_29510940'
  app/controllers/issues_controller.rb:83:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:82:in `index'

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Rick Barrette about 11 years ago

I solved my issue by deleting my queries from the database

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Garrett Marone about 11 years ago

Your resolution sounds good for the error message you have, but doesnt quite sound the right answer for me, as I can view individual issues, but I cant view the issues tab/list in a project.

Glad you found your answer though!

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Garrett Marone about 11 years ago

Im no ruby developer, but I tried changing this

def filters_options(query)
options = [[]]
sorted_options = query.available_filters.*sort* do |a, b|
ord = 0

to

def filters_options(query)
options = [[]]
sorted_options = query.available_filters.*sort_by* do |a, b|
ord = 0

and I get a different error

Completed 500 Internal Server Error in 1300ms

ActionView::Template::Error (can't convert Symbol into Integer):
    20: </td>
    21: <td class="add-filter">
    22: <%= label_tag('add_filter_select', l(:label_filter_add)) %>
    23: <%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
    24: </td>
    25: </tr>
    26: </table>
  app/helpers/queries_helper.rb:29:in `[]'
  app/helpers/queries_helper.rb:29:in `block in filters_options'
  app/helpers/queries_helper.rb:27:in `each'
  app/helpers/queries_helper.rb:27:in `sort_by'
  app/helpers/queries_helper.rb:27:in `filters_options'
  app/helpers/queries_helper.rb:22:in `filters_options_for_select'
  app/views/queries/_filters.html.erb:23:in `_app_views_queries__filters_html_erb__3285958123099808666_239984340'
  app/views/issues/index.html.erb:18:in `block in _app_views_issues_index_html_erb__4069856417075469706_239897420'
  app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb__4069856417075469706_239897420'
  app/controllers/issues_controller.rb:83:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:82:in `index'

any ideas?

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Michael Kechinov about 11 years ago

I have this problem too.

Redmine 2.2.1 (same problems in Redmine 2.1.6).
Was installed plugin Redmine_Backlogs, but I tried to remove it and problem still exists.

Started GET "/projects/tourdeforce/issues" for 92.100.5.127 at 2013-01-11 01:03:40 +0400
Processing by IssuesController#index as HTML
  Parameters: {"project_id"=>"tourdeforce"}
  Current user: mkechinov (id=1)
  Rendered queries/_filters.html.erb (3.9ms)
  Rendered queries/_columns.html.erb (1.1ms)
  Rendered issues/_list.html.erb (21.6ms)
  Rendered issues/_sidebar.html.erb (2.8ms)
  Rendered issues/index.html.erb within layouts/base (34.5ms)
Completed 500 Internal Server Error in 76ms

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'IssueQuery'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Query.inheritance_column to use another column for that information.):
    13: <% end %>
    14: <%= call_hook(:view_issues_sidebar_planning_bottom) %>
    15: 
    16: <%= render_sidebar_queries %>
    17: <%= call_hook(:view_issues_sidebar_queries_bottom) %>
  app/helpers/issues_helper.rb:176:in `sidebar_queries'
  app/helpers/issues_helper.rb:199:in `render_sidebar_queries'
  app/views/issues/_sidebar.html.erb:16:in `_app_views_issues__sidebar_html_erb___2432295123627496819_70259296077220'
  app/views/issues/index.html.erb:89:in `block in _app_views_issues_index_html_erb__1655260441853268629_34505820'
  app/helpers/application_helper.rb:1178:in `content_for'
  app/views/issues/index.html.erb:88:in `_app_views_issues_index_html_erb__1655260441853268629_34505820'
  app/controllers/issues_controller.rb:82:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:81:in `index'

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Michael Kechinov about 11 years ago

SOLVED BY this SQL-query (notice: this is PostgreSQL query, use right quotes for your database)

update queries set "type" = null where "type" = 'IssueQuery';

For MYSQL it will be:

update queries set `type` = null where `type` = 'IssueQuery';

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Intrad Acebo about 11 years ago

Thank you Michael!, this change in database worked for me too!.

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Rajko Albrecht about 11 years ago

I could not do this change to Database, 'cause the column 'type' does not exists in queries table. Even after empty the queries table this error occurs.

What I did for get it running:

in app/helpers/queries_helper.rb changed line 27

sorted_options = query.available_filters.sort do |a, b|

to

sorted_options = query.available_filters do |a, b|

I'm running Redmine version 2.2.2.stable.11334

I think this isn't nice, but it helps for the first time. I have no idea whats going wrong in query.available_filters. Hopefully this get fixed.

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Michael Kechinov about 11 years ago

Just do this in SQL:

DELETE * FROM queries;

This will DELETE all your saved queries (like "all issues assigned to me"), but website will work. After that you can create new "saved queries".

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Sylvain Hamel about 11 years ago

Emptied the queries table. Still getting the 500 error. The rest of the site works but some areas like /issues and /issues/gantt give me the 500 error.

---------------------
Started GET "/projects/rita/issues?fixed_version_id=26&set_filter=1&status_id=c" for 207.96.162.26 at Tue Mar 12 09:27:53 -0400 2013
Processing by IssuesController#index as HTML
Parameters: {"set_filter"=>"1", "project_id"=>"rita", "fixed_version_id"=>"26", "status_id"=>"c"}
Current user: hamelsyl (id=3)
Rendered queries/_filters.html.erb (18.4ms)
Rendered issues/index.html.erb within layouts/base (19.5ms)
Completed 500 Internal Server Error in 335ms

ActionView::Template::Error (comparison of Array with Array failed):
20: </td>
21: <td class="add-filter">
22: <%= label_tag('add_filter_select', l(:label_filter_add)) >
23: <
= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
24: </td>
25: </tr>
26: </table>
app/helpers/queries_helper.rb:27:in `sort'
app/helpers/queries_helper.rb:27:in `filters_options'
app/helpers/queries_helper.rb:22:in `filters_options_for_select'
app/views/queries/_filters.html.erb:23:in `_app_views_queries__filters_html_erb__355050116_95454640'
app/views/issues/index.html.erb:18:in `_app_views_issues_index_html_erb__51660297_95671890'
app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb__51660297_95671890'
app/controllers/issues_controller.rb:83:in `index'
app/controllers/issues_controller.rb:82:in `index'

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Sylvain Hamel about 11 years ago

Did /etc/init.d/apache2 restart
and now it works.

Probably a cache thing.

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Sylvain Hamel about 11 years ago

It seems this is something that was fixed in 2.3.0 .

Replaced :
sorted_options = query.available_filters.sort do |a, b|
with
sorted_options = query.available_filters do |a, b|

to make it work.

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Garrett Marone about 11 years ago

I wonder if that would have fixed my original issue. My issue turned out to be a plugin that we had installed earlier, that created a custom issue field name, which didnt have all the correct attributes in the array used in query.available_filters.sort do |a, b|.

After removing this custom issue, all worked properly!

RE: Upgrade to 2.2.0, can no longer view issues. - Added by Sylvain Hamel about 11 years ago

It is possible.

The only 2 plugins I have installed are Backlog and wk-time .

    (1-15/15)