Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035944
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2017-05-08 15:262017-09-21 16:49
ReporteralostaleView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision1ce8df93a3fb
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035944: unresponsive ui after uncaught error in EntityPersistenceEventObserver

DescriptionWhen an EntityPersistenceEventObserver fails with an uncaught error (ie. NPE), the UI becomes unresponsive after saving:

* No error message is displayed to user
* Save button is disabled not being possible to save after fixing wrong data
Steps To Reproduce1. Emulate a NPE in a EntityPersistenceEventObserver by applying attached patch
2. Login
3. Open BP window
4. Select any record and change any value
5. Save:
  -> ERRORS:
     * No error is displayed though save was unsuccessful.
     * Cannot click on save as it is disabled.

This stack trace appears in dev tools:
Uncaught TypeError: Cannot read property 'data' of undefined
    at cons.setErrorMessageFromResponse (34d5119….js:24442)
    at cons.callback [as _userCallback] (34d5119….js:30543)
    at cons.fireCallback (Class.js:1789)
    at cons.fireCallback (Class.js:3488)
    at cons.formSavedComplete (ActionMethods.js:1132)
TagsNo tags attached.
Attached Filesdiff file icon force-npe.diff [^] (515 bytes) 2017-05-08 15:29 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035943 closedAugustoMauch Retail Modules [RR17Q2][Store Server][HighVol][GC & Vouchers] NPE editing BP 
related to defect 0035840 closedalostale Openbravo ERP can't save record after failed save in tabs with a time reference 
related to defect 0036611 closedinigosanchez Openbravo ERP 2nd attempt to 'Delete row' after first delete was stopped does not work and shows 'Deleting ...' forever 

-  Notes
(0098860)
hgbot (developer)
2017-09-06 11:12

Repository: erp/devel/pi
Changeset: 1ce8df93a3fb4644a8f4351f898166cbf3055abb
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Sep 06 11:07:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1ce8df93a3fb4644a8f4351f898166cbf3055abb [^]

fixes bug 35944: unresponsive UI after error in EntityPersistenceEventObserver

  When an EntityPersistenceEventObserver failed with an uncaught error (ie. NPE), the UI became unresponsive after saving. This was happening due to a JS error when trying to set the error message in the view. Under this circumstances data can be undefined, and the error was thrown when trying to access data.data.

  That point of code was reached because the error message was not being handled properly when the message text returned by the server is an empty string. To fix the problem now we handle it and a generic error message is shown in this case.

  Besides, a security check has been added to ensure that data is not null when trying to access to data.data.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0098913)
alostale (manager)
2017-09-08 13:47

reviewed + tested
(0099364)
hudsonbot (developer)
2017-09-21 16:49

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-05-08 15:26 alostale New Issue
2017-05-08 15:26 alostale Assigned To => platform
2017-05-08 15:26 alostale Modules => Core
2017-05-08 15:26 alostale Triggers an Emergency Pack => No
2017-05-08 15:27 alostale Steps to Reproduce Updated View Revisions
2017-05-08 15:27 alostale Relationship added related to 0035943
2017-05-08 15:28 alostale Relationship added related to 0035840
2017-05-08 15:29 alostale File Added: force-npe.diff
2017-05-22 11:03 alostale Status new => acknowledged
2017-08-11 11:07 alostale Relationship added related to 0036611
2017-09-06 09:54 caristu Assigned To platform => caristu
2017-09-06 11:12 hgbot Checkin
2017-09-06 11:12 hgbot Note Added: 0098860
2017-09-06 11:12 hgbot Status acknowledged => resolved
2017-09-06 11:12 hgbot Resolution open => fixed
2017-09-06 11:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1ce8df93a3fb4644a8f4351f898166cbf3055abb [^]
2017-09-06 11:12 caristu Review Assigned To => alostale
2017-09-08 13:47 alostale Note Added: 0098913
2017-09-08 13:47 alostale Status resolved => closed
2017-09-08 13:47 alostale Fixed in Version => 3.0PR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099364


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker