Bug 1174071 - [SPA editor] Save on Invalid entry should not cause NullPointerException
Summary: [SPA editor] Save on Invalid entry should not cause NullPointerException
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic, Component-UI
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.6
Assignee: Patrick Huang
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks: 1150373
TreeView+ depends on / blocked
 
Reported: 2014-12-15 04:24 UTC by Patrick Huang
Modified: 2015-03-19 07:10 UTC (History)
2 users (show)

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 07:10:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Patrick Huang 2014-12-15 04:24:05 UTC
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-15 04:42:56 UTC
https://github.com/zanata/zanata-server/pull/648

Comment 2 Patrick Huang 2015-01-08 03:22:12 UTC
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-13 00:31:45 UTC
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.