Project

General

Profile

Actions

Defect #6255

closed

Error deleting enumeration

Added by Jose Javier Sianes Ruiz over 13 years ago. Updated over 12 years ago.

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

100%

Estimated time:
Resolution:
Invalid
Affected version:

Description

We have an enumeration created on our production Redmine enviroment (version 0.9.6). Trying to delete the last one on Activities enumeration list (named as Documentación) we get a URL redirect to enumeration list without any change (look at the image attached for more information). Also, on production.log Redmine logfile this error is showed:

Processing EnumerationsController#destroy (for 10.240.193.158 at 2010-08-31 12:01:49) [GET]
  Parameters: {"action"=>"destroy", "id"=>"19", "controller"=>"enumerations"}
Redirected to http://our_redmine_server/enumerations/list
Filter chain halted as [#<Proc:0x00002aaaac235790@/opt/redmine-0.9.6/vendor/rails/actionpack/lib/action_controller/verification.rb:82>] rendered_or_redirected.
Completed in 4ms (DB: 1) | 302 Found [http://our_redmine_server/enumerations/destroy/19]

Processing EnumerationsController#list (for 10.240.193.158 at 2010-08-31 12:01:49) [GET]
  Parameters: {"action"=>"list", "controller"=>"enumerations"}
Rendering template within layouts/admin
Rendering enumerations/list
Completed in 540ms (View: 534, DB: 3) | 200 OK [http://our_redmine_server/enumerations/list]

Files

redmineerror.png (50.2 KB) redmineerror.png Error Redmine deleting an enumeration Jose Javier Sianes Ruiz, 2010-08-31 12:16
Actions #1

Updated by Jose Javier Sianes Ruiz over 13 years ago

Aditional information on production.log:

Processing EnumerationsController#destroy (for 10.240.193.158 at 2010-08-31 12:53:51) [POST]
  Parameters: {"action"=>"destroy", "authenticity_token"=>"Y66JzAdVI3Dc/HjMt+VMd8xDKMlf2jIUuLjS+OmNRjU=", "id"=>"19", "controller"=>"enumerations"}

RuntimeError (Can't delete enumeration):
  app/models/enumeration.rb:126:in `check_integrity'
  app/models/enumeration.rb:81:in `destroy'
  app/models/enumeration.rb:81:in `destroy'
  app/controllers/enumerations_controller.rb:76:in `destroy'
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /opt/redmine-0.9.6/public/500.html (500 Internal Server Error)

The error also can be reproduced on Redmine 1.0.1.

Actions #2

Updated by Holger Just over 13 years ago

This error is caused in an attempt to protect the data integrity of Redmine. The activity you want to delete is still used by at least one time entry somewhere and thus can't be deleted.

You are right that the communication of this error and the presented alternatives could somehow improved a bit.

Actions #3

Updated by Jose Javier Sianes Ruiz over 13 years ago

Could you give me a SQL statement in order to find where is used this enumeration?

Actions #4

Updated by Jose Javier Sianes Ruiz over 13 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

That is. But if you could give me some code for trying to trace the enumeration on Redmine could be useful in order to remove it. Thanks for your help.

Actions #5

Updated by Etienne Massip over 12 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF