Bug 1072185

Summary: Met unhandled exception when inputing nothing to create domain via web console
Product: OpenShift Online Reporter: Tian Feng <tfeng>
Component: Management ConsoleAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jliggitt, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-09 15:19:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log in devenv.log none

Description Tian Feng 2014-03-04 05:34:33 UTC
Created attachment 870242 [details]
Log in devenv.log

Description of problem:
Go to web console and try to create a domain using "", which doesn't contain character. It will return "We appear to be having technical difficulties" error message. It should return "Invalid namespace.  Namespace must only contain alphanumeric characters." and "Must be a  minimum of 1 and maximum of 16 characters." such error message.

Version-Release number of selected component (if applicable):
INT(devenv_4454)
devenv_4455

How reproducible:
Always

Steps to Reproduce:
1. Go to web console and visit creating domain page
2. Input nothing and try to create domain
3. Check the page

Actual results:
It will return "We appear to be having technical difficulties"

Expected results:
It should return "Invalid namespace. Namespace must only contain alphanumeric characters." and "Must be a minimum of 1 and maximum of 16 characters." such error message.

Additional info:

Comment 1 Jordan Liggitt 2014-03-04 14:10:27 UTC
Due to this code:
        with_details = full_errors.length > 1
        html_options[:class] += ' with-alert-details' if with_details

Form errors need to be able to display more than one message

Comment 2 Jordan Liggitt 2014-03-04 14:15:03 UTC
Several issues need fixing:

1. html_options[:class] could be a string or an array

2. A form input can have multiple errors, which should not be hidden in a "Show more" link

3. In this case, the "Show more" link wasn't hooked up to expand the details div... need to make sure the JS to do that runs everywhere we write message details

Comment 3 Fabiano Franz 2014-03-05 04:49:20 UTC
Fixed in https://github.com/openshift/origin-server/pull/4885

Comment 4 openshift-github-bot 2014-03-05 17:03:29 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/acfb0cb488e18d2d5b5101b34a3f1c120b0427c1
Bug 1072185 - should not collapse message details when bound to a form input

Comment 5 Tian Feng 2014-03-06 02:31:31 UTC
Test on devenv_4472. Create a domain just using "", it returns "Invalid namespace. Namespace must only contain alphanumeric characters." and "Must be a minimum of 1 and maximum of 16 characters." such error message instead of "We appear to be having technical difficultie". So verify this bug. Thanks!