Bug 1174071 - [SPA editor] Save on Invalid entry should not cause NullPointerException
[SPA editor] Save on Invalid entry should not cause NullPointerException
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic, Component-UI (Show other bugs)
3.4
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.6
Assigned To: Patrick Huang
Ding-Yi Chen
:
Depends On:
Blocks: 1150373
  Show dependency treegraph
 
Reported: 2014-12-14 23:24 EST by Patrick Huang
Modified: 2015-03-19 03:10 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2476)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-19 03:10:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick Huang 2014-12-14 23:24:05 EST
Description of problem:
When saving untranslated entry in new editor, the revision field is null and will be rejected by server with 400 bad request. If project enables validation enforcement, if a message failed validation, the result comes back as 500 internal server error because server failed to store validation result in the list.

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


How reproducible:
Always

Steps to Reproduce:
1. Find a project with validation e.g. enforce html/xml tag
2. Find a message that potentially can break validation and is untranslated
3. Open in new editor and fill in an invalid translation (e.g. missing a tag)

Actual results:
Can't save (need to view the result in browser console. New editor don't have a notification system other than console log)

Expected results:
Save

Additional info:
Comment 1 Patrick Huang 2014-12-14 23:42:56 EST
https://github.com/zanata/zanata-server/pull/648
Comment 2 Patrick Huang 2015-01-07 22:22:12 EST
Expected result should be:
Can't save invalid translation but won't cause a server NullPointerException. Client browser console log shows server returns 500.
Comment 3 Ding-Yi Chen 2015-01-12 19:31:45 EST
The "real" expected behavior is ask the user to either save as "Need Work" or back to edit.

However, the scope of this bug is to remove the cause of NullPointerException.

VERIFIED with Zanata 3.6.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-2476)

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