google-code-export / redmine-dmsf

Automatically exported from code.google.com/p/redmine-dmsf
1 stars 1 forks source link

Route fail for development Redmine #188

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to Project -> Setting -> Module  to enable DMSF
2. Click "Save"

What is the expected output? What do you see instead?

DMSF tab to appears in current Project. Instead there is a HTTP 500 Internal 
Server Error.

Use back and reload the page will show the DMSF tab but unable to use it.

Going back to Settings will result in the same HTTP 500 problem.
Thus, unable to uncheck DMSF module.

All existing projects will DMSF module enabled are no longer working.
Same HTTP 500 error.

What version of the DMSF and Redmine are you using? On what browser and
operating
system?

Redmine 1.3.0.devel.8414 (MySQL) from trunk
DMSF 1.2.2 from svn co 
http://redmine-dmsf.googlecode.com/svn/tags/release_1.2.2/redmine_dmsf/

Please provide any additional information below.

Content of Production.log

Processing ProjectsController#modules (for 192.168.1.155 at 2011-12-29 
15:33:24) [POST]
  Parameters: {"commit"=>"Save", "action"=>"modules", "authenticity_token"=>"wHxF9FEySEwprxCOCbts316uk2epn18AUDx/wMG19ww=", "id"=>"u-boot", "controller"=>"projects", "enabled_module_names"=>["issue_tracking", "time_tracking", "news", "documents", "files", "wiki", "repository", "boards", "calendar", "gantt", "dmsf"]}
Redirected to http://192.168.1.155/redmine/projects/u-boot/settings/modules
Completed in 117ms (DB: 87) | 302 Found 
[http://192.168.1.155/redmine/projects/u-boot/modules]

Processing ProjectsController#settings (for 192.168.1.155 at 2011-12-29 
15:33:24) [GET]
  Parameters: {"action"=>"settings", "id"=>"u-boot", "controller"=>"projects", "tab"=>"modules"}
Rendering template within layouts/base
Rendering projects/settings

ActionView::TemplateError (No route matches {:action=>"user_pref_save", 
:id=>#<Project id: 20, name: "U-Boot", description: "", homepage: "", 
is_public: true, parent_id: 3, created_on: "2011-10-12 17:45:35", updated_on: 
"2011-10-12 17:45:35", identifier: "u-boot", status: 1, lft: 40, rgt: 41, 
dmsf_description: nil>, :controller=>"dmsf_state"}) on line #3 of 
vendor/plugins/redmine_dmsf/app/views/dmsf_state/_user_pref.html.erb:
1: <p><strong><%=l(:link_user_preferences)%></strong></p>

2: <div class="box">

3:  <% form_tag({:controller => "dmsf_state", :action => "user_pref_save", :id 
=> @project},

4:      :method=>:post) do %>

5:  <div>

6:      <% 

    vendor/plugins/redmine_dmsf/app/views/dmsf_state/_user_pref.html.erb:3
    app/views/common/_tabs.html.erb:24
    app/views/common/_tabs.html.erb:23:in `each'
    app/views/common/_tabs.html.erb:23
    app/helpers/application_helper.rb:225:in `render_tabs'
    app/views/projects/settings.html.erb:3
    passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) helper-scripts/passenger-spawn-server:99

Rendering /usr/local/lib/redmine/public/500.html (500 Internal Server Error)

Original issue reported on code.google.com by angweiy...@gmail.com on 29 Dec 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Hi, my config is the same, and i have the same problem. DMSF do not work when i 
updated to redmine 1.3.0. Please help. We have too many documents, and now 
redmine fails. The only solution is uninstall DMSF.

The log in production.log:
Processing DmsfController#show (for 10.34.104.21 at 2012-01-06 02:14:01) [GET]
  Parameters: {"action"=>"show", "id"=>"prueba-dmsf12", "controller"=>"dmsf"}
Rendering template within layouts/base
Rendering dmsf/show

ActionView::TemplateError (No route matches {:action=>"edit_root", 
:id=>#<Project id: 24, name: "prueba dmsf12", description: "", homepage: "", 
is_public: false, parent_id: nil, created_on: "2012-01-06 02:09:40", 
updated_on: "2012-01-06 02:09:40", identifier: "prueba-dmsf12", status: 1, lft: 
19, rgt: 20, dmsf_description: nil>}) on line #6 of 
vendor/plugins/redmine_dmsf/app/views/dmsf/show.html.erb:
3: <div class="contextual">
4:      <% if User.current.allowed_to?(:folder_manipulation, @project) %>
5:              <% if @folder.nil? %>
6:                      <%= link_to("", {:action => "edit_root", :id => 
@project},
7:                                      :title => l(:link_edit, :title => 
l(:link_documents)), :class => "icon icon-edit") %>  
8:              <% else @folder.nil? %>
9:                      <%= link_to("", {:action => "edit", :id => @project, 
:folder_id => @folder },

    vendor/plugins/redmine_dmsf/app/views/dmsf/show.html.erb:6
    passenger (3.0.5) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.5) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.5) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.5) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.5) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
    passenger (3.0.5) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    passenger (3.0.5) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.5) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.5) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.5) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    passenger (3.0.5) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.5) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    passenger (3.0.5) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    passenger (3.0.5) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.5) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.5) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.5) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.5) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.5) helper-scripts/passenger-spawn-server:99

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)

Original comment by jol...@gmail.com on 6 Jan 2012 at 12:44

GoogleCodeExporter commented 9 years ago
Revision trunk:8162 breaks routes -> 500 internal server error
http://www.redmine.org/boards/3/topics/27899

My revision is 8542. Is possible than DMSF 1.2.2 is affected for that problem?
Thanks.

Original comment by scamposo...@gmail.com on 7 Jan 2012 at 11:58

GoogleCodeExporter commented 9 years ago
Hi, the problem happens with the trunk version of 1.3.0.
With the stable version of 1.3.0 works pretty good.
If routes.rb >=8162 DMSF gives the error.
Plugins will now have to declare their own routes in routes.rb in config dir.

Original comment by jol...@gmail.com on 8 Jan 2012 at 6:19

GoogleCodeExporter commented 9 years ago

Original comment by vit.jo...@gmail.com on 12 Jan 2012 at 12:37

GoogleCodeExporter commented 9 years ago
So what is the fix for this?
DMSF breaks when upgrading Redmine to 1.4.0

Original comment by RafiGree...@gmail.com on 17 Apr 2012 at 1:00

GoogleCodeExporter commented 9 years ago
Try edit routes.rb by adding these lines in it:

ActionController::Routing::Routes.draw do |map|
  map.resources :dmsf
  map.resources :dmsf_files
  map.connect 'dmsf/:id/:action', :controller => 'dmsf'
  map.connect 'dmsf/:id/dmsf_files/:action', :controller => 'dmsf_files'
  map.connect 'dmsf/:id/dmsf_state/:action', :controller => 'dmsf_state'
  map.connect 'dmsf/:id/dmsf_detail/:action', :controller => 'dmsf_detail'
  map.connect 'dmsf/:id/dmsf_upload/:action', :controller => 'dmsf_upload'
  map.connect 'dmsf/:id/dmsf_files_copy/:action', :controller => 'dmsf_files_copy'
  map.connect 'dmsf/:id/dmsf_folders_copy/:action', :controller => 'dmsf_folders_copy'
end

Hope, it helps.

Original comment by anna.asc...@gmail.com on 8 May 2012 at 11:41

GoogleCodeExporter commented 9 years ago
Hi, i have same problem. 

I have already made ​​the changes n routes.rb but nothing has changed. Any 
idea? Thanks

Original comment by Toti8...@gmail.com on 17 May 2012 at 5:39

GoogleCodeExporter commented 9 years ago
Same problem

Original comment by tuxin...@googlemail.com on 31 May 2012 at 9:59

GoogleCodeExporter commented 9 years ago
Changed the code in routes.rb to:

ActionController::Routing::Routes.draw do |map|
  map.resources :dmsf, :only => [:new, :create, :show, :edit], :member => {
    'edit_root' => :get,
    'entries_operation' => :post,
    'notify_activate' => :post,
    'notify_deactivate' => :post,
    'save_root' => :post,
    'delete_entries' => :post,
    'delete' => :post,
    'save' => :post
  }
  map.resources :dmsf_files
  map.connect 'dmsf/:id/dmsf_files/:action', :controller => 'dmsf_files'
  map.connect 'dmsf/:id/dmsf_state/:action', :controller => 'dmsf_state'
  map.connect 'dmsf/:id/dmsf_detail/:action', :controller => 'dmsf_detail'
  map.connect 'dmsf/:id/dmsf_upload/:action', :controller => 'dmsf_upload'
  map.connect 'dmsf/:id/dmsf_files_copy/:action', :controller => 'dmsf_files_copy'
  map.connect 'dmsf/:id/dmsf_folders_copy/:action', :controller => 'dmsf_folders_copy'
  map.connect 'dmsf/:id/user_pref_save/:action', :controller => 'user_pref_save'
end

Original comment by beurtvaa...@gmail.com on 31 May 2012 at 12:54