Bug 801207 - Wrong messages when typing into input fields.
Wrong messages when typing into input fields.
Status: VERIFIED
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.ER01
Unspecified Unspecified
unspecified Severity high
: ---
: 5.2.1.ER02
Assigned To: Thomas Heute
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-07 17:58 EST by vramik
Modified: 2013-09-02 01:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Commits:
8592 by chris.laprun at 2012-03-14 12:16:17 EDT (show)
8592 by chris.laprun at 2012-03-14 12:16:17 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

bz 801207 GTNPORTAL-2377: <br> + Only output one message of each type in CompoundApplicationMessage<br> + Fixed UsernameValidator and improved IdentifierValidator and ResourceValidator to fail fast when we have an error condition in a loop<br> + Fixed improper/missing localization in EN and FR properties, would need to be done for other languages as well

3 files changed:

  • epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java (+12 / -12)
  • epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java (+35 / -0)
  • epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/application/CompoundApplicationMessage.java (+6 / -2)
8593 by chris.laprun at 2012-03-14 12:16:29 EDT (show)
8593 by chris.laprun at 2012-03-14 12:16:29 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

bz 801207 GTNPORTAL-2377: <br> + Only output one message of each type in CompoundApplicationMessage<br> + Fixed UsernameValidator and improved IdentifierValidator and ResourceValidator to fail fast when we have an error condition in a loop<br> + Fixed improper/missing localization in EN and FR properties, would need to be done for other languages as well

3 files changed:

  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/IdentifierValidator.java (+3 / -3)
  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java (+5 / -5)
  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java (+35 / -8)
8594 by chris.laprun at 2012-03-14 12:16:37 EDT (show)
8594 by chris.laprun at 2012-03-14 12:16:37 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

bz 801207 GTNPORTAL-2377: <br> + Only output one message of each type in CompoundApplicationMessage<br> + Fixed UsernameValidator and improved IdentifierValidator and ResourceValidator to fail fast when we have an error condition in a loop<br> + Fixed improper/missing localization in EN and FR properties, would need to be done for other languages as well

2 files changed:

  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties (+7 / -1)
  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties (+6 / -1)
8600 by chris.laprun at 2012-03-14 13:16:44 EDT (show)
8600 by chris.laprun at 2012-03-14 13:16:44 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

bz 801207 GTNPORTAL-2378: Improved group membership regular expression, added test cases.

3 files changed:

  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableValidator.java (+2 / -1)
  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/test/java/org/exoplatform/webui/test/validator/MockRequestContext.java (+127 / -0)
  • epp/portal/branches/EPP_5_2_Branch/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java (+306 / -0)


Attachments (Terms of Use)
username01 (18.68 KB, image/png)
2012-03-07 17:58 EST, vramik
no flags Details
username02 (18.95 KB, image/png)
2012-03-07 17:59 EST, vramik
no flags Details
groupName (71.29 KB, image/png)
2012-03-07 18:00 EST, vramik
no flags Details
usernameInGroupMan (43.76 KB, image/png)
2012-03-07 18:01 EST, vramik
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNPORTAL-2377 Major Resolved Improper error messages in username validation 2013-09-17 07:49:03 EDT
JBoss Issue Tracker GTNPORTAL-2378 Major Resolved Improper regular expression for username validation in group membership form 2013-09-17 07:49:03 EDT

  None (edit)
Description vramik 2012-03-07 17:58:57 EST
Created attachment 568446 [details]
username01

Description of problem:
1. User Name in New Staff:
a) when type user name with first letter capital, message "The "User Name" field must start with a character" occur (attachment username01.png)
b) when type user name with invalid characters, message looks like "msg msg Ivalid-char Invalid-char" (attachment username02.png)

2. Group Name when adding new group in Users and Groups Management:
When type invalid characters, warning contains message too many times (groupName.png)

(3. User Name field when putting user into Group:
When typing "a*****", message says User "a*****" doesn't exist. I'm not sure if better message is warning that says username contains invalid characters. (usernameInGroupMan.png))
Comment 1 vramik 2012-03-07 17:59:29 EST
Created attachment 568447 [details]
username02
Comment 2 vramik 2012-03-07 18:00:04 EST
Created attachment 568448 [details]
groupName
Comment 3 vramik 2012-03-07 18:01:05 EST
Created attachment 568449 [details]
usernameInGroupMan
Comment 4 claprun@redhat.com 2012-03-13 13:41:41 EDT
The problem comes from the error message for the first issue. It needs to be localized properly, I can fix the en and fr versions.
Still looking at the other issues.
Comment 5 claprun@redhat.com 2012-03-13 14:02:14 EDT
Looking at the code, it looks like the new version of the validation is more permissive (allows different case apart from the initial character which must be lowercase) than what was previously allowed (only lowercase letters). So I first need to go back to the original behavior (post 5.1, I think).
Also, the error messages are currently wrong with respect to what's being done in the code. The English version is incorrect and the French version also. Also, not only are the fr and en versions incorrect but they also contradict one another so localized versions of the error messages would need to be checked for error and coherence between versions.
Comment 6 claprun@redhat.com 2012-03-13 14:26:12 EDT
For the second part, part of the issue is how messages errors are now handled (validation now goes through fully instead of failing fast which means you can now see all the errors at once instead of trying 20 times to get the format right). I will fix the reporting so that it doesn't report the same error several times. The other part of the problem is resource resolving: the localization keys are not properly resolved for a reason unknown to me at the moment. Will look at it later.
Comment 7 claprun@redhat.com 2012-03-14 11:45:12 EDT
I have fixed all issues except for the 3rd one, which comes directly from eXo: it wasn't working before my change and it's not working now. The problem is that usernames when they are put into a group are validated via a regular expression which does allow a username such as a*****. This results in the validator moving on and accepting the username as valid and thus, looking for it at a later validation stage.
Comment 8 JBoss JIRA Server 2012-03-14 11:54:10 EDT
Chris Laprun <chris.laprun@jboss.com> made a comment on jira GTNPORTAL-2378

The problem is that usernames when they are put into a group are validated via a regular
expression which does allow a username such as a*****. This results in the
validator moving on and accepting the username as valid and thus, looking for
it at a later validation stage.
Comment 9 JBoss JIRA Server 2012-03-14 13:30:26 EDT
Chris Laprun <chris.laprun@jboss.com> updated the status of jira GTNPORTAL-2378 to Resolved
Comment 10 JBoss JIRA Server 2012-03-14 13:30:40 EDT
Chris Laprun <chris.laprun@jboss.com> updated the status of jira GTNPORTAL-2377 to Resolved
Comment 11 claprun@redhat.com 2012-03-14 13:33:03 EDT
Should be done now, please check.

Note You need to log in before you can comment on or make changes to this bug.