Openbravo Issue Tracking System - POS2
View Issue Details
0047184POS2Corepublic2021-06-18 12:292021-07-15 10:26
gorka_gil 
alostale 
normalminoralways
closedfixed 
5
 
 
No
0047184: Confirmation dialog not available on reload, on masterdata load error
When there is a masterdata load error, a popup is show with the models that have fail, and only option is reload.

If reloading also happen an error in masterdata, then, when trying to show the popup (confirmation dialog) it is still not defined and gives an error.
1. Place a breakpoint in any masterdata load query ( for example in Product.java, line 62)
2. In a pos2 terminal, clean cache and reload, make login
3. It will stop in product load and when it gives timeout will show the error popup
4. Click on the reload in the popup
5. It will start again the load of masterdata and stop again in the product model
6. PROBLEM: After the timeout instead of show the popup will appear a javascript error saying that confirmation dialog is not defined
The initialization of the confirmation dialog looks different the first login and the reload, in the reload should be initialized at same moment.
No tags attached.
related to defect 0051148 closed meriem_azaf Error on button logout 
png 47184-popup.png (67,513) 2021-06-18 12:31
https://issues.openbravo.com/file_download.php?file_id=15946&type=bug
png

png 47184-error.png (147,601) 2021-06-18 12:32
https://issues.openbravo.com/file_download.php?file_id=15947&type=bug
png
Issue History
2021-06-18 12:29gorka_gilNew Issue
2021-06-18 12:29gorka_gilAssigned To => Retail
2021-06-18 12:29gorka_gilResolution time => 1627596000
2021-06-18 12:29gorka_gilTriggers an Emergency Pack => No
2021-06-18 12:31gorka_gilFile Added: 47184-popup.png
2021-06-18 12:32gorka_gilFile Added: 47184-error.png
2021-06-18 12:32gorka_gilStatusnew => acknowledged
2021-06-18 12:36marvintmAssigned ToRetail => platform
2021-06-21 10:06gorka_gilDescription Updatedbug_revision_view_page.php?rev_id=22747#r22747
2021-07-14 12:03alostaleStatusacknowledged => scheduled
2021-07-14 12:03alostaleAssigned Toplatform => alostale
2021-07-14 12:16hgbotNote Added: 0130464
2021-07-15 10:26hgbotResolutionopen => fixed
2021-07-15 10:26hgbotStatusscheduled => closed
2021-07-15 10:26hgbotNote Added: 0130495
2021-07-15 10:26hgbotNote Added: 0130496
2022-12-14 08:45meriem_azafRelationship addedrelated to 0051148

Notes
(0130464)
hgbot   
2021-07-14 12:16   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/594 [^]
(0130495)
hgbot   
2021-07-15 10:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/594 [^]
(0130496)
hgbot   
2021-07-15 10:26   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 896d7ef1875c61af51f93797bcf8b6391b33f601
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-07-15T08:25:48+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/896d7ef1875c61af51f93797bcf8b6391b33f601 [^]

fixes BUG-47184: 2nd failed attempt to reload masterdata shows tech error

When masterdata fails to load on login, the first time a confirmation
dialog was displayed to the user to try to reload the page, if while
reloading it failed again an error was thrown because confiramation
dialog wasn't available.

ConfirmationDialog was rendered in LoginScreen and in App as a gloabal
component. It worked on first attempt as it was rendered within
LoginScreen but not in the 2nd one as LoginScreen is not necessary but
at this stage App has not been rendered yet.

Fixed by moving ConfirmationDialog to index.jsx as part of the whole
layout. Note this makes unecessary to render it again as a global
component.

---
M web-jspack/org.openbravo.core2/src/components/AuthProvider/LoginScreen.jsx
M web-jspack/org.openbravo.core2/src/index.jsx
M web-jspack/org.openbravo.core2/src/ob-init.js
---