Project

General

Profile

Anomalie #220

NoMethodError (undefined method `last' for #<Tree::TreeNode:0x7f1da3562238>) when adding a menu item

Added by Oleg K. over 9 years ago. Updated over 9 years ago.

Status:
Fermé
Priority:
Normal
Target version:
Start date:
02/16/2011
Due date:
02/17/2011
% Done:

100%

Estimated time:
2.00 h

Description

I've just installed the plugin and tried to add a menu item and:

Processing MenutabsController#add (for 94.51.191.221 at 2011-02-16 16:58:04) [POST]
Parameters: {"add"=>"Add", "menutab"=>{"label"=>"sdsd", "user_id"=>"2", "external_link"=>"http://tracker.itkruf.ru/issues?query_id=9", "description"=>"Список назначенных на вас задач", "wiki_type"=>"external"}, "action"=>"add", "authenticity_token"=>"/nIVnFaTydLmMFVVvbNzxXwGvAAfpXPx+wnFg2XrKes=", "controller"=>"menutabs"}
NoMethodError (undefined method `last' for #&lt;Tree::TreeNode:0x7f1da3562238&gt;):
lib/redmine/menu_manager.rb:90:in `remove!'
lib/redmine/menu_manager.rb:378:in `delete'
vendor/plugins/redmine_appmenuadds/app/controllers/menutabs_controller.rb:102:in `delete_all_tab_menu'
vendor/plugins/redmine_appmenuadds/app/controllers/menutabs_controller.rb:101:in `each'
vendor/plugins/redmine_appmenuadds/app/controllers/menutabs_controller.rb:101:in `delete_all_tab_menu'
vendor/plugins/redmine_appmenuadds/app/controllers/menutabs_controller.rb:75:in `refresh_tabs'
vendor/plugins/redmine_appmenuadds/app/controllers/menutabs_controller.rb:33:in `add'
/usr/lib/ruby/1.8/action_controller/base.rb:1331:in `send'
/usr/lib/ruby/1.8/action_controller/base.rb:1331:in `perform_action_without_filters'
/usr/lib/ruby/1.8/action_controller/filters.rb:617:in `call_filters'
/usr/lib/ruby/1.8/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/lib/ruby/1.8/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/action_controller/rescue.rb:160:in `perform_action_without_flash'
/usr/lib/ruby/1.8/action_controller/flash.rb:146:in `perform_action'
/usr/lib/ruby/1.8/action_controller/base.rb:532:in `send'
/usr/lib/ruby/1.8/action_controller/base.rb:532:in `process_without_filters'
/usr/lib/ruby/1.8/action_controller/filters.rb:606:in `process'
/usr/lib/ruby/1.8/action_controller/base.rb:391:in `process'
/usr/lib/ruby/1.8/action_controller/base.rb:386:in `call'
/usr/lib/ruby/1.8/action_controller/routing/route_set.rb:437:in `call'
/usr/lib/ruby/1.8/action_controller/dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/1.8/action_controller/dispatcher.rb:121:in `_call'
/usr/lib/ruby/1.8/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/1.8/active_record/query_cache.rb:29:in `call'
/usr/lib/ruby/1.8/active_record/query_cache.rb:29:in `call'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/1.8/active_record/query_cache.rb:9:in `cache'
/usr/lib/ruby/1.8/active_record/query_cache.rb:28:in `call'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/1.8/action_controller/string_coercion.rb:25:in `call'
/usr/lib/ruby/1.8/rack/head.rb:9:in `call'
/usr/lib/ruby/1.8/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/1.8/action_controller/params_parser.rb:15:in `call'
/usr/lib/ruby/1.8/action_controller/session/cookie_store.rb:93:in `call'
/usr/lib/ruby/1.8/action_controller/failsafe.rb:26:in `call'
/usr/lib/ruby/1.8/rack/lock.rb:11:in `call'
/usr/lib/ruby/1.8/rack/lock.rb:11:in `synchronize'
/usr/lib/ruby/1.8/rack/lock.rb:11:in `call'
/usr/lib/ruby/1.8/action_controller/dispatcher.rb:106:in `call'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61
Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

And "¦ sorry if I amn't supposed to post here :-)

Redmine 1.0.0.stable (MySQL) from Ubuntu package redmine-1.0.0-4
rails-2.3.5-1.1
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
ubuntu-10.10 AMD64

History

#1

Updated by Romain GEORGES over 9 years ago

  • Status changed from Nouveau to Assigné
  • Assignee set to Romain GEORGES
#2

Updated by Romain GEORGES over 9 years ago

This is an kown bug, restart your Apache server or touch tmp/restart.txt, but before ensure you don't have twice records of your first insertion attempt.

Adding links after the first works but delete need a Redmine restart

The Redmine::menu_manager don't provide simple way to clear menu and re-render it.

Its work for creation an not for the first, but it don't work for removing tabs..

I work on it since a long time, but, I do not change really often my menu so when I add one, I relead my Redmine.

#3

Updated by Romain GEORGES over 9 years ago

  • Status changed from Assigné to Confirmé
  • Target version set to 1.4.0

solution found predicted for release 1.4.0

#4

Updated by Anonymous over 9 years ago

  • Status changed from Confirmé to Réalisé
  • % Done changed from 0 to 100

Appliqué par commit r13.

#5

Updated by Romain GEORGES over 9 years ago

  • Due date set to 02/17/2011
  • Status changed from Réalisé to Fermé
  • Estimated time set to 2.00 h

Also available in: Atom PDF