AdamLantos / redmine_http_auth

HTTP Authentication plugin for redmine
MIT License
37 stars 47 forks source link

Redmine 1.4 error: New users can't autoregister after httpauth (with solution) #14

Open ghost opened 12 years ago

ghost commented 12 years ago

I think this might be a issue regarding Redmine 1.4 and not my configuration.

I switched to Redmine 1.4.x and new users couldn't autoregister anymore (Error 500).

Processing WelcomeController#index (for 132.252.ip.ip at 2012-05-22 12:52:02) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to https://my.domain.com/redmine/httpauth-selfregister
Filter chain halted as [:user_setup] rendered_or_redirected.
Completed in 0ms (DB: 0) | 302 Found [https://my.domain.com/]

Processing RegistrationController#autoregistration_form (for 132.252.ip.ip at 2012-05-22 12:52:02) [GET]
  Parameters: {"action"=>"autoregistration_form", "controller"=>"registration"}
Rendering template within layouts/base
Rendering registration/autoregistration_form

ActionView::TemplateError (No route matches {:controller=>"httpauth-login", :action=>"index"}) on line #30 of app/views/layouts/base.html.erb:
27: <div id="wrapper2">
28: <div id="top-menu">
29:     <div id="account">
30:         <%= render_menu :account_menu -%>
31:     </div>
32:     <%= content_tag(
33:            'div',

    lib/redmine/menu_manager.rb:150:in `render_single_menu_node'
    lib/redmine/menu_manager.rb:102:in `render_menu_node'
    lib/redmine/menu_manager.rb:91:in `render_menu'
    lib/redmine/menu_manager.rb:168:in `menu_items_for'
    lib/redmine/menu_manager.rb:165:in `each'
    lib/redmine/menu_manager.rb:165:in `menu_items_for'
    lib/redmine/menu_manager.rb:90:in `render_menu'
    app/views/layouts/base.html.erb:30
    config/initializers/mongrel.rb:66:in `dispatch_cgi'

Rendering C:/webserver/redmine-1.4/public/500.html (500 Internal Server Error)

With some googling I found http://stackoverflow.com/questions/6877233/actionviewtemplateerror-no-route-matches-passing-old-style-parameters and edited vendor\plugins\redmine_http_auth\config\routes.rb to add the line

map.httpauthloginindex 'httpauth-login', :controller => 'httpauth-login', :action => 'index'

This solved the problem (after restarting ofc). As I don't know ruby at all, I really can't see if this is a issue in the extension or in my configuration. I just thought to mention the solution here - probably helps others or (if correct) could be included sometime.

kwisatz commented 9 years ago

I can confirm this issue and that the above mentioned additional route solves the problem.