Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035944Openbravo ERPA. Platformpublic2017-05-08 15:262017-09-21 16:49
urgentmajorhave not tried
0035944: unresponsive ui after uncaught error in EntityPersistenceEventObserver
When 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
1. 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)
No tags attached.
related to defect 0035943 closed AugustoMauch Retail Modules [RR17Q2][Store Server][HighVol][GC & Vouchers] NPE editing BP 
related to defect 0035840 closed alostale Openbravo ERP can't save record after failed save in tabs with a time reference 
related to defect 0036611 closed inigosanchez Openbravo ERP 2nd attempt to 'Delete row' after first delete was stopped does not work and shows 'Deleting ...' forever 
diff force-npe.diff (515) 2017-05-08 15:29
Issue History
2017-05-08 15:26alostaleNew Issue
2017-05-08 15:26alostaleAssigned To => platform
2017-05-08 15:26alostaleModules => Core
2017-05-08 15:26alostaleTriggers an Emergency Pack => No
2017-05-08 15:27alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15128#r15128
2017-05-08 15:27alostaleRelationship addedrelated to 0035943
2017-05-08 15:28alostaleRelationship addedrelated to 0035840
2017-05-08 15:29alostaleFile Added: force-npe.diff
2017-05-22 11:03alostaleStatusnew => acknowledged
2017-08-11 11:07alostaleRelationship addedrelated to 0036611
2017-09-06 09:54caristuAssigned Toplatform => caristu
2017-09-06 11:12hgbotCheckin
2017-09-06 11:12hgbotNote Added: 0098860
2017-09-06 11:12hgbotStatusacknowledged => resolved
2017-09-06 11:12hgbotResolutionopen => fixed
2017-09-06 11:12hgbotFixed in SCM revision => [^]
2017-09-06 11:12caristuReview Assigned To => alostale
2017-09-08 13:47alostaleNote Added: 0098913
2017-09-08 13:47alostaleStatusresolved => closed
2017-09-08 13:47alostaleFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099364

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

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

  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

M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
2017-09-08 13:47   
reviewed + tested
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: [^]
Maturity status: Test