Project

General

Profile

Actions

Defect #24746

closed

Template::Error after project and issue rebuild

Added by del med over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello,
i had a issue with projects tree. i found a 'solution' in this forum to rebuild the tree:

ruby bin/rails runner 'Project.rebuild_tree!' RAILS_ENV=production
ruby bin/rails runner 'Issue.rebuild_tree!' RAILS_ENV=production

now projects tree a re fine, but when i would like to enter in the project-issue page, i have an error:

Started GET "/projects/xxx/issues" for xx.xx.xx.xx at 2017-01-03 18:11:11 +0100
Processing by IssuesController#index as HTML
  Parameters: {"project_id"=>"xxx"}
  Current user: xx(id=xx)
  Rendered queries/_filters.html.erb (24.9ms)
  Rendered issues/index.html.erb within layouts/base (26.5ms)
Completed 500 Internal Server Error in 128ms (ActiveRecord: 44.7ms)

ActionView::Template::Error (comparison of NilClass with 218 failed):
    3: var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
    4: var availableFilters = <%= raw_json query.available_filters_as_json %>;
    5: var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
    6: var allProjects = <%= raw_json query.all_projects_values %>;
    7: $(document).ready(function(){
    8:   initFilters();
    9:   <% query.filters.each do |field, options| %>
  app/models/project.rb:784:in `sort_by'
  app/models/project.rb:784:in `project_tree'
  app/models/query.rb:336:in `all_projects_values'
  app/views/queries/_filters.html.erb:6:in `block in _app_views_queries__filters_html_erb__928470405_121460600'
  app/views/queries/_filters.html.erb:1:in `_app_views_queries__filters_html_erb__928470405_121460600'
  app/views/issues/index.html.erb:19:in `block in _app_views_issues_index_html_erb__380465873_120187980'
  app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb__380465873_120187980'
  app/controllers/issues_controller.rb:77:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:76:in `index'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

i note the the number 218 is always the same even if i change project.
can someone help me please.

Environment:
  Redmine version                3.2.0.stable
  Ruby version                   1.9.3-p194 (2012-04-20) [i486-linux]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2

thanks.
Actions

Also available in: Atom PDF