Openbravo Issue Tracking System - Retail Modules
View Issue Details
0058104Retail ModulesWeb POSpublic2025-02-27 16:542025-02-28 09:42
caristu 
caristu 
highmajorhave not tried
closedfixed 
5
 
 
approved
No
No
0058104: Is not possible to reprint an XML document with nested elements of the same type
Is not possible to reprint an XML document with nested elements of the same type
1) Execute the attached test case, which tries to transform an XML document with a nested <line> inside another <line>. The transformation fails.
No tags attached.
related to feature request 0056385 closed adrianromero Send Email refactor 
related to defect 0058090 closed caristu Cannot parse images without read access to ADSystemInformation entity 
depends on backport 0058110RR25Q1 closed caristu Is not possible to reprint an XML document with nested elements of the same type 
depends on backport 0058111RR24Q4.2 closed caristu Is not possible to reprint an XML document with nested elements of the same type 
diff 58104_reproducer.diff (1,825) 2025-02-27 16:56
https://issues.openbravo.com/file_download.php?file_id=20983&type=bug
Issue History
2025-02-27 16:54caristuNew Issue
2025-02-27 16:54caristuAssigned To => caristu
2025-02-27 16:54caristuOBNetwork customer => No
2025-02-27 16:54caristuTriggers an Emergency Pack => No
2025-02-27 16:54caristuIssue generated from0058090
2025-02-27 16:54caristuRelationship addedrelated to 0058090
2025-02-27 16:55caristuRelationship deletedrelated to 0058090
2025-02-27 16:55caristuRelationship addedrelated to 0056385
2025-02-27 16:56caristuFile Added: 58104_reproducer.diff
2025-02-27 16:56caristuSummaryIs not possible to reprint an XML document with nested elements => Is not possible to reprint an XML document with nested elements of the same type
2025-02-27 17:20hgbotMerge Request Status => open
2025-02-27 17:20hgbotNote Added: 0176245
2025-02-28 07:43alostaleRelationship addedrelated to 0058090
2025-02-28 08:26hgbotMerge Request Statusopen => approved
2025-02-28 09:22hgbotResolutionopen => fixed
2025-02-28 09:22hgbotStatusnew => closed
2025-02-28 09:22hgbotNote Added: 0176257
2025-02-28 09:22hgbotNote Added: 0176258
2025-02-28 09:42caristuStatusclosed => new
2025-02-28 09:42caristuResolutionfixed => open
2025-02-28 09:42caristuStatusnew => scheduled
2025-02-28 09:42caristuStatusscheduled => resolved
2025-02-28 09:42caristuResolutionopen => fixed
2025-02-28 09:42caristuStatusresolved => closed

Notes
(0176245)
hgbot   
2025-02-27 17:20   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/merge_requests/5 [^]
(0176257)
hgbot   
2025-02-28 09:22   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf [^]
Changeset: 7d69e543215a59edac30e81e248fa352136ac0bc
Author: Carlos Aristu <c.aristu@orisha.com>
Date: 28-02-2025 07:43:03
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/commit/7d69e543215a59edac30e81e248fa352136ac0bc [^]

fixes BUG-58104: cannot transform XML with nested elements of the same type

  TicketParser was not properly handling the case of processing a nested
element that is inside another element of the same type.

  In such case the parser for the nested element was being skipped for
the execution of the element closing. For the reported case of nested
<line> elements this was resulting in the generation of an html with
unclosed <div> elements that eventually caused an error in the
transformation into PDF: The element type "div" must be terminated by
the matching end-tag "</div>".

  To fix this problem we do not keep in cache the list of parsers and
let Weld to return the parser instance to be used based on its scope. We
also remove the unnecessary equals check of the current parser.

  Finally we also replace the usage of java.util.logging classes which
were used in the past with the org.apache.logging.log4j classes.

---
A src-test/org/openbravo/mobile/transformtopdf/StandaloneTestSuite.java
A src-test/org/openbravo/mobile/transformtopdf/TicketParserTest.java
M src/org/openbravo/mobile/transformtopdf/BarcodeParser.java
M src/org/openbravo/mobile/transformtopdf/LineParser.java
M src/org/openbravo/mobile/transformtopdf/NodeParser.java
M src/org/openbravo/mobile/transformtopdf/TextParser.java
M src/org/openbravo/mobile/transformtopdf/TicketParser.java
M src/org/openbravo/mobile/transformtopdf/XMLTicketParser.java
---
(0176258)
hgbot   
2025-02-28 09:22   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/merge_requests/5 [^]