Defect #33954

Can't delete project

Added by Sebastian Paluch over 2 years ago. Updated over 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:4.1.1


Trying to delete project from administration/projects end with internal error:

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.

From log file:

Started DELETE "/redmine/projects/***" for at 2020-09-03 11:02:52 +0200
Processing by ProjectsController#destroy as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"IHCKqOic5+PLq03iO1T5sDfR7maM8YWyq6fHeg9sLbtWIhfcPIHv9FM1vVzi9S0n0ktLx5PZqCYnZ1ZXLW2Lsg==", "confirm"=>"1", "commit"=>"Delete", "id"=>"***"}
  Current user: *** (id=164)
Completed 500 Internal Server Error in 14099ms (ActiveRecord: 14003.6ms)

NoMethodError (undefined method `-' for nil:NilClass):

lib/redmine/nested_set/project_nested_set.rb:100:in `destroy_children'
app/controllers/projects_controller.rb:264:in `destroy'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'
Redirected to http://***/redmine/admin/projects
Completed 302 Found in 47600ms (ActiveRecord: 47557.1ms)
  Redmine version                4.1.1.stable
  Ruby version                   2.5.8-p224 (2020-03-31) [x64-mingw32]
  Rails version        
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
  Subversion                     1.14.0
  Git                            2.26.1


#1 Updated by Mizuki ISHIKAWA over 2 years ago

When I read the error message, it looks like rgt - lft + 1 in project_nested_set.rb has failed.
However, I could not reproduce the case where rgt and lft become nil.

Also available in: Atom PDF