Anomalie #220

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

Ajouté par Oleg K. il y a plus de 6 ans. Mis à jour il y a plus de 6 ans.

Statut:FerméDébut:16/02/2011
Priorité:NormalEchéance:17/02/2011
Assigné à:Romain GEORGES% réalisé:

100%

Catégorie:-Temps estimé:2.00 heures
Version cible:1.4.0Temps passé:-

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

Historique

#1 Mis à jour par Romain GEORGES il y a plus de 6 ans

  • Statut changé de Nouveau à Assigné
  • Assigné à mis à Romain GEORGES

#2 Mis à jour par Romain GEORGES il y a plus de 6 ans

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 Mis à jour par Romain GEORGES il y a plus de 6 ans

  • Statut changé de Assigné à Confirmé
  • Version cible mis à 1.4.0

solution found predicted for release 1.4.0

#4 Mis à jour par Anonyme il y a plus de 6 ans

  • Statut changé de Confirmé à Réalisé
  • % réalisé changé de 0 à 100

Appliqué par commit r13.

#5 Mis à jour par Romain GEORGES il y a plus de 6 ans

  • Echéance mis à 17/02/2011
  • Statut changé de Réalisé à Fermé
  • Temps estimé mis à 2.00

Formats disponibles : Atom PDF