Defect #33954

Can't delete project

Added by Sebastian Paluch 8 months ago. Updated 8 months ago.

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

0%

Category:Projects
Target version:-
Resolution: Affected version:4.1.1

Description

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 127.0.0.1 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)
Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.5.8-p224 (2020-03-31) [x64-mingw32]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.14.0
  Git                            2.26.1
  Filesystem                

History

#1 Updated by Mizuki ISHIKAWA 8 months 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