edtsech / redmine_x_closed

redmine_x_closed closing issues a week after their "Resolving" (need a maintainer)
13 stars 6 forks source link

"ActionController::DoubleRenderError (Can only render or redirect once per action)" #7

Closed dholm closed 14 years ago

dholm commented 14 years ago

Hi, I have Redmine 0.9.3 and have installed your plugin. When trying to access "Administration -> Issue Statuses" I get an internal server error and the following output in Redmine's log:

Processing IssueStatusesController#index (for 192.168.1.192 at 2010-03-17 16:56:13) [GET] Parameters: {"action"=>"index", "controller"=>"issue_statuses"} Rendering template within layouts/admin Rendering issue_statuses/list

ActionController::DoubleRenderError (Can only render or redirect once per action): public/dispatch.fcgi:24

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

drifteaur commented 14 years ago

I can confirm this issue. IssueStatusesController#index now does an explicit render:

def index
  list
  render :action => 'list' unless request.xhr?
end

So, just calling list before render in redmine_x_closed/lib/issue_closed.rb works for me:

    def index
      list
      render :template => 'issue_statuses/issue_closed_list'
    end
edtsech commented 14 years ago

I fixed this bug, but now i don't now how it wok in redmine 0.9.2