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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029328
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSminorhave not tried2014-12-11 18:062015-04-13 18:40
ReporteraaroncaleroView Statuspublic 
Assigned Toaaroncalero 
PrioritylowResolutionfixedFixed in VersionRR15Q1.3
StatusclosedFix in branchFixed in SCM revisionb71c669fc94b
ProjectionnoneETAnoneTarget VersionRR15Q1.3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Toadrianromero
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029328: Changing main window before callbacks are executed causes javascript errors

DescriptionChanging the main window of the WebPOS (e.g. from #retail.pointofsale to #retail.cashup) before the initial window has finished loading (all callbacks have finished executing) causes javascript errors because the initial window is destroyed upon navigation. If there are pending callbacks that access window components (which have already been destroyed), errors similar to the following will be logged to the console:
posterminal.main.js: Uncaught TypeError: Cannot read property 'createComponent' of undefined;
Steps To ReproduceGo to https://livebuilds.openbravo.com/retail_pi_pgsql/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^]
Log in with demouser/openbravo
As soon as the menu is available, switch to Cash Management or Cash Up windows.
Error messages will appear on the upper right corner of the screen and they will also be logged to the browser console.
Proposed SolutionCallbacks that execute asynchronously should check that the elements they are referencing still exist (objects that have been destroyed have a 'destroyed' attribute set to true).
TagsApproved
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029575 newmarvintm Changing main window just after login causes a double navigation 
blocks defect 0028391 closedaaroncalero Changing main window before callbacks are executed causes javascript errors 

-  Notes
(0076467)
Orekaria (administrator)
2015-04-13 11:47

Repository: retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core
Changeset: 4ae99dca0602336b10972fdd654a9931560292e1
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:01:29 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core/rev/4ae99dca0602336b10972fdd654a9931560292e1 [^] [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads products to return inmediately if the component has already been destroyed.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js
---

Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: 4c5e04e84b70af3d4446424761a65674093ff322
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:17:57 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/4c5e04e84b70af3d4446424761a65674093ff322 [^] [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads sales representatives to return inmediately if the component has been destroyed

---
M web/org.openbravo.retail.posterminal/js/components/modalreceiptproperties.js
---

Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: bc6741e586427eaef63e022cc753b789ec9f9e83
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Mar 18 10:37:48 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/bc6741e586427eaef63e022cc753b789ec9f9e83 [^] [^]

fixed issue 28391: added a line to check if the object has been destroyed when the callback is executed

---
(0076485)
adrianromero (manager)
2015-04-13 16:51

changeset: 1105:04113fd64d2f
user: Aaron Calero <aaron.calero@openbravo.com>
date: Mon Dec 15 13:51:22 2014 +0100
files: web/org.openbravo.mobile.core/source/component/ob-keyboard.js web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproducts.js
description:
Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Fixed code in mobile core module. Added several checks to return inmediately if components have already been destroyed.
(0076492)
hgbot (developer)
2015-04-13 17:06

Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: b71c669fc94bf4adb1e24e8934397a47bca6c0b2
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Mar 18 10:37:48 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/b71c669fc94bf4adb1e24e8934397a47bca6c0b2 [^]

Related to issue 28391, fixes issue 29328: Added a line to check if the object has been destroyed when the callback is executed

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---
(0076505)
adrianromero (manager)
2015-04-13 18:40

Verified. But still exists a new issue related with the same action. See https://issues.openbravo.com/view.php?id=29575 [^]

- Issue History
Date Modified Username Field Change
2015-03-18 10:29 malsasua Type defect => backport
2015-03-18 10:29 malsasua Target Version => RR15Q1.2
2015-03-18 12:54 dmitry_mezentsev Tag Attached: Approved
2015-03-26 18:59 malsasua Target Version RR15Q1.2 => RR15Q1.3
2015-04-13 11:47 Orekaria Note Added: 0076467
2015-04-13 11:47 Orekaria Status scheduled => resolved
2015-04-13 11:47 Orekaria Fixed in Version => RR15Q1.3
2015-04-13 11:47 Orekaria Resolution open => fixed
2015-04-13 16:40 adrianromero Note Added: 0076484
2015-04-13 16:48 adrianromero Note Deleted: 0076484
2015-04-13 16:51 adrianromero Note Added: 0076485
2015-04-13 17:06 hgbot Checkin
2015-04-13 17:06 hgbot Note Added: 0076492
2015-04-13 17:06 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d7d844ee8a819805d1c870289b1d36ac2205cbe9 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/b71c669fc94bf4adb1e24e8934397a47bca6c0b2 [^]
2015-04-13 18:40 adrianromero Review Assigned To Orekaria => adrianromero
2015-04-13 18:40 adrianromero Note Added: 0076505
2015-04-13 18:40 adrianromero Status resolved => closed
2015-04-13 18:40 adrianromero Relationship added related to 0029575


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker