Defect #11027
closed
  
Saving new query without name causes escaping of input field
 
        
        Added by Michal Ciasnocha over 13 years ago.
        Updated over 13 years ago.
        
  
  
  
  Description
  
  During saving new query without filled name is displayed validation error and name input field disappeares and is replaced by text:
<input id="query_name" name="query[name]" size="80" type="text" value="" />
	After clicking on Save button the Firebug says "select is null" in file /javascripts/select_list_move.js on line 78.
	My configuration:
	
	- Ruby - 1.8.7
 
		- Rails - 3.2.3
 
	
	See attachment for details.
   
 
  
  Files
  
 
  
  
    
    
    
    
       - Category set to Issues
 
       - Status changed from New to Confirmed
 
       - Target version set to 2.0.1
 
    
    
     
   
  
  
    
    
    
    The following patch solves this issue:
### Eclipse Workspace Patch 1.0
#P redmine
Index: config/initializers/10-patches.rb
===================================================================
--- config/initializers/10-patches.rb    (revision 9707)
+++ config/initializers/10-patches.rb    (working copy)
@@ -43,7 +43,7 @@
   end
 end
-ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
+ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| html_tag || '' }
 require 'mail'
 
     
   
  
  
    
    
    
    
       - Subject changed from Saving new query without name causes disappearance of input field to Saving new query without name causes escaping of input field
 
       - Status changed from Confirmed to Resolved
 
       - Resolution set to Fixed
 
    
    Fixed in r9711. Etienne, thanks for digging into this.
 
     
   
  
  
    
    
    
    
       - Status changed from Resolved to Closed
 
    
    
     
   
  
 
  
  
  
 
Also available in:  Atom
  PDF