Project

General

Profile

Actions

Defect #26702

closed

Getting an internal error when I tried to open up a project.

Added by Chung Ley over 6 years ago. Updated over 6 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Currently, if I logged on as regular user to my redmine installation of 3.4.1; I can see the list of projects, but when I tried to open any "Project", I got the following:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

If I opened the log, I see this "error":
NoMethodError (undefined method `accessor' for #<ActiveRecord::Type::Value:0x000000036cfce8>):

  app/models/role.rb:229:in `permissions_all_trackers'
  app/models/role.rb:238:in `permissions_all_trackers?'
  app/models/tracker.rb:61:in `block (2 levels) in <class:Tracker>'
  app/models/project.rb:217:in `block in allowed_to_condition'
  app/models/project.rb:216:in `each'
  app/models/project.rb:216:in `allowed_to_condition'
  app/models/tracker.rb:60:in `block in <class:Tracker>'
  app/controllers/projects_controller.rb:152:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I then logged on as "Admin", I can then open the project. I then tried to looking inside "Settings" to see if there is something peculiar but got the internal error again, and this time the error in the log file is a little different:

  ActionView::Template::Error (undefined method `default_assigned_to_id' for #<Project:0x007f4611fb2878>
Did you mean?  default_assigned_to
               default_assigned_to=):
    25: <% end %>
    26: 
    27: <% if @project.safe_attribute?('default_assigned_to_id') && (default_assigned_to_options = project_default_assigned_to_options(@project)).present? %>
    28:   <p><%= f.select :default_assigned_to_id, default_assigned_to_options, include_blank: true %></p>
    29: <% end %>
    30: 
    31: <%= wikitoolbar_for 'project_description' %>
  lib/redmine/views/labelled_form_builder.rb:38:in `select'
  app/views/projects/_form.html.erb:28:in `_app_views_projects__form_html_erb__2072855206031296453_69969313185660'
  app/views/projects/_edit.html.erb:2:in `block in _app_views_projects__edit_html_erb___116871158613782057_69969313241060'
  app/helpers/application_helper.rb:1188:in `labelled_form_for'
  app/views/projects/_edit.html.erb:1:in `_app_views_projects__edit_html_erb___116871158613782057_69969313241060'
  app/views/common/_tabs.html.erb:17:in `block in _app_views_common__tabs_html_erb__1006688546081786105_69969313437680'
  app/views/common/_tabs.html.erb:16:in `each'
  app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__1006688546081786105_69969313437680'
  app/helpers/application_helper.rb:343:in `render_tabs'
  app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb___3324488570488824154_69969313523340'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I installed Redmine using "regular" account that does not have superuser privilege. I am pretty sure it was working before and I don't remember making any changes to the setup/configuration except for the attempt with starting on Apache/Tomcat which basically did a copy of public/dispatch.fcgi.example to public/dispatch.fcgi; but I had already removed that file and restart Redmine and the problem persisted.

Below is my environment.

[<user>@<server> redmine-3.4.1]$ RAILS_ENV=production bin/about

sh: darcs: command not found
sh: hg: command not found
sh: bzr: command not found
Environment:
  Redmine version                3.4.1.stable
  Ruby version                   2.4.1-p111 (2017-03-22) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.19
  Cvs                            1.12.13
  Git                            2.13.0
  Filesystem                     
Redmine plugins:
  no plugin installed

[<user>@<server> redmine-3.4.1]$ uname -a
Linux <server> 2.6.32-642.6.2.el6.x86_64 #1 SMP Mon Oct 24 10:22:33 EDT 2016 x86_64 GNU/Linux
Actions #1

Updated by Toshi MARUYAMA over 6 years ago

  • Category deleted (Projects)
  • Status changed from New to Closed
  • Priority changed from High to Normal
  • Resolution set to Invalid

See #26485.

Actions #2

Updated by Chung Ley over 6 years ago

  • Status changed from Closed to Reopened

This is not an upgrade from an earlier release of Redmine...

I installed Redmine 3.4.1; it was working and it stopped working "suddenly" in the sense that I don't recall any changes except that one change with copying the public/dispatch.cgi.sample which I had already reverted.

I didn't modify anything that should touch the model and I had been connected to the same MySQL server (so, I wouldn't think that a migrate is needed either too).

Actions #3

Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from Reopened to Needs feedback

Make sure projects table has default_assigned_to_id column.

Actions #4

Updated by Toshi MARUYAMA over 6 years ago

  • Resolution deleted (Invalid)
Actions #5

Updated by Chung Ley over 6 years ago

This is strange... The "projects" table has the following columns: name, description, homepage, is_public, parent_id, created_on, updated_on, identifier, status, lft, rgt, interit_members and default_version_id.

I swore that I didn't remove any column! Are there something that I might have inadvertently done that caused this? How can I fix this? Do I just add a new column (what is the spec for this column)? And is there a way that I can "validate" that there aren't any other missing column?

Thanks and Regards,

Actions #6

Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Check your schema_migrations table.

Actions #7

Updated by Chung Ley over 6 years ago

Just want to apologize.... The database was "initialized" with an earlier version of Redmine. There were so many things that happened in between that I didn't even remember it.

Actions

Also available in: Atom PDF