Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034026 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Retail Modules] StoreServer | major | have not tried | 2016-09-19 22:26 | 2016-09-29 17:28 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 4eeb7af92ff1 | ||||
Projection | none | ETA | none | Target Version | RR16Q3.2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | migueldejuana | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0034026: JSON error unexpected token in remote BP data when saving address through customer - remove unnecessary json set | |||||||
Description | Solve two issues: 1) json error when saving customer 2) unnecessary and incorrect setting of json property in object When editing and saving an address through the customer then the error ' Unexpected token o in JSON at position 1' is reported. Strack trace: ce25035…_WebPOS.js:2856 SyntaxError: Unexpected token o in JSON at position 1 at http://store1.openbravo.com:8080/openbravo/web/js/gen/ce2503585cded83ecbab0c78d4c7719d_WebPOS.js:7314:32 [^] at Array.forEach (native) at Function.b.each.b.forEach (http://store1.openbravo.com:8080/openbravo/web/org.openbravo.mobile.core/lib/vendor/underscore-1.3.3.min.js:11:39 [^]) at r.(anonymous function) [as each] (http://store1.openbravo.com:8080/openbravo/web/org.openbravo.mobile.core/lib/vendor/backbone-0.9.2.min.js:25:314 [^]) at http://store1.openbravo.com:8080/openbravo/web/js/gen/ce2503585cded83ecbab0c78d4c7719d_WebPOS.js:7312:21 [^] at processResult (http://store1.openbravo.com:8080/openbravo/web/js/gen/ce2503585cded83ecbab0c78d4c7719d_WebPOS.js:4180:11 [^]); line: Object.OB.UTIL.showError (http://store1.openbravo.com:8080/openbravo/web/js/gen/ce2503585cded83ecbab0c78d4c7719d_WebPOS.js:11173:6 [^]) (*,+)processConsoleLevel @ ce25035…_WebPOS.js:2856OB.error @ ce25035…_WebPOS.js:2886OB.UTIL.showError @ ce25035…_WebPOS.js:11173window.onerror @ ce25035…_WebPOS.js:22654 VM87:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1 | |||||||
Steps To Reproduce | Topic 1: Set remote BP properties Login to webpos Click on Menu Select Customers Search any customer Click on customer click on create new address Create a new address Save Note the error only occurs if you first go through the customers menu not when going through the customer/address button Topic 2: Put breakpoints in the changed locations and check what is being set in the object's json property | |||||||
Proposed Solution | The error is caused by this line: bpLocToSave.set('json', customerAddr.serializeToJSON()); Here: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/200182f3db29/web/org.openbravo.retail.posterminal/js/data/datacustomeraddrsave.js#l57 [^] It must be changed to: bpLocToSave.set('json', JSON.stringify(customerAddr.serializeToJSON())); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0090232) mtaal (manager) 2016-09-25 14:42 |
In the end the solution was to remove all the lines which made no sense to have anyway and which were incorrect. |
(0090234) hgbot (developer) 2016-09-25 14:42 |
Repository: retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal Changeset: 4eeb7af92ff117002a3ec8ed9d46f504aab680c4 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Sun Sep 25 14:42:19 2016 +0200 URL: http://code.openbravo.com/retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal/rev/4eeb7af92ff117002a3ec8ed9d46f504aab680c4 [^] Fixes issue 34026: JSON error unexpected token in remote BP data when saving address through customer - remove unnecessary json set Removed unneeded and incorrect lines --- M web/org.openbravo.retail.posterminal/js/data/datacustomeraddrsave.js M web/org.openbravo.retail.posterminal/js/data/datacustomersave.js --- |
(0090385) migueldejuana (developer) 2016-09-29 17:28 |
Tested and reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2016-09-19 23:40 | mtaal | Type | defect => backport |
2016-09-19 23:40 | mtaal | Target Version | RR16Q4 => RR16Q3.3 |
2016-09-25 12:18 | mtaal | Relationship added | blocks 0034077 |
2016-09-25 12:19 | mtaal | Target Version | RR16Q3.3 => RR16Q3.2 |
2016-09-25 12:19 | mtaal | Summary | JSON error unexpected token in remote BP data when saving address through customer => JSON error unexpected token in remote BP data when saving address through customer - remove unnecessary json set |
2016-09-25 12:19 | mtaal | Description Updated | View Revisions |
2016-09-25 12:20 | mtaal | Review Assigned To | => migueldejuana |
2016-09-25 12:20 | mtaal | Steps to Reproduce Updated | View Revisions |
2016-09-25 14:42 | mtaal | Note Added: 0090232 | |
2016-09-25 14:42 | hgbot | Checkin | |
2016-09-25 14:42 | hgbot | Note Added: 0090234 | |
2016-09-25 14:42 | hgbot | Status | scheduled => resolved |
2016-09-25 14:42 | hgbot | Resolution | open => fixed |
2016-09-25 14:42 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal/rev/4eeb7af92ff117002a3ec8ed9d46f504aab680c4 [^] |
2016-09-29 17:28 | migueldejuana | Note Added: 0090385 | |
2016-09-29 17:28 | migueldejuana | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |