Defect #2866

New issue page not showinf 'no trackers' error

Added by Enderson Maia over 10 years ago. Updated over 10 years ago.

Status:ClosedStart date:2009-02-28
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Fixed Affected version:

Description

I installed redmine following the doc/INSTALL and the page projects/testproject/issues/new shows a blank page. The browser's 'view source code' is empty.

Revision r2538 show a blank page.

Version 0.8.1 show the correct error message "No tracker is associated to this project. Please check the Project settings."

$ svn co svn://rubyforge.org/var/svn/redmine/trunk redmine-trunk
$ cd redmine-trunk/
$ rake config/initializers/session_store.rb
$ cp config/database.yml.example config/database.yml
$ rake db:migrate
$ script/server 

Loaded the default data at Administration page.

Created a project called "teste" without selecting any tracker, and when I go to "New issue", i get a blank page, instead of the

Associated revisions

Revision 2542
Added by Jean-Philippe Lang over 10 years ago

Fixed that some error messages were not displayed (#2866).

History

#1 Updated by Enderson Maia over 10 years ago

Tha same occurs if you don't set a default ticket status.

The lines responsible for this are 123, 135.

app/controllers/issues_controller.rb

   116    def new
   117      @issue = Issue.new
   118      @issue.copy_from(params[:copy_from]) if params[:copy_from]
   119      @issue.project = @project
   120      # Tracker must be set before custom field values
   121      @issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
   122      if @issue.tracker.nil?
*  123        flash.now[:error] = 'No tracker is associated to this project. Please check the Project settings.'
   124        render :nothing => true, :layout => true
   125        return
   126      end
   127      if params[:issue].is_a?(Hash)
   128        @issue.attributes = params[:issue]
   129        @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] if User.current.allowed_to?(:add_issue_watchers, @project)
   130      end
   131      @issue.author = User.current
   132      
   133      default_status = IssueStatus.default
   134      unless default_status
*  135        flash.now[:error] = 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").'
   136        render :nothing => true, :layout => true
   137        return
   138      end    

#2 Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Indeed. The behaviour of render :nothing => true, :layout => true changed with Rails 2.2.
It's fixed in r2542.

Also available in: Atom PDF