Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031758Openbravo ERPA. Platformpublic2015-12-22 08:512017-02-23 18:12
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q1 
caristu
Core
No
0031758: error uploading attachments/images rendering OB in a frame
When Openbravo is rendered within in HTML frame, JavaScript errors are displayed when trying to upload an image or an attachment.
1. Copy attached file to WebContent directory of a deployed Openbravo (it might require to edit the iframe's src to match actual OB url.
2. Open http://localhost:8080/openbravo/framed-ob.html [^]
3. Go to Product window and open any record
3.1 Try to upload an image
3.2 Try to upload an attachment
3.3 Try to edit description of an existing attachment

In all cases (3.x) a JavaScript error similar to following one appears, and the uploading popup remains open:

  Uncaught TypeError: top.callback is not a function
No tags attached.
related to feature request 0012479 closed dbaz Openbravo ERP should has the capability to be opened within an iframe 
html framed-ob.html (280) 2015-12-22 08:53
https://issues.openbravo.com/file_download.php?file_id=8834&type=bug
Issue History
2015-12-22 08:51alostaleNew Issue
2015-12-22 08:51alostaleAssigned To => platform
2015-12-22 08:51alostaleModules => Core
2015-12-22 08:51alostaleTriggers an Emergency Pack => No
2015-12-22 08:52alostaleReview Assigned To => caristu
2015-12-22 08:52alostaleAssigned Toplatform => alostale
2015-12-22 08:52alostaleStatusnew => scheduled
2015-12-22 08:53alostaleFile Added: framed-ob.html
2015-12-22 08:54alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10519#r10519
2015-12-22 09:29hgbotCheckin
2015-12-22 09:29hgbotNote Added: 0082921
2015-12-22 09:29hgbotStatusscheduled => resolved
2015-12-22 09:29hgbotResolutionopen => fixed
2015-12-22 09:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/418ed88a6db0b2be7cb2dcf8308b8e62139ef9bf [^]
2015-12-22 13:48caristuNote Added: 0082940
2015-12-22 13:48caristuStatusresolved => closed
2015-12-22 13:48caristuFixed in Version => 3.0PR16Q1
2015-12-22 15:06hudsonbotCheckin
2015-12-22 15:06hudsonbotNote Added: 0082943
2017-02-23 18:12caristuRelationship addedrelated to 0012479

Notes
(0082921)
hgbot   
2015-12-22 09:29   
Repository: erp/devel/pi
Changeset: 418ed88a6db0b2be7cb2dcf8308b8e62139ef9bf
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 22 09:29:10 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/418ed88a6db0b2be7cb2dcf8308b8e62139ef9bf [^]

fixed bug 31758: error uploading attachments/images rendering OB in a frame

  Whent trying to upload attachments/images in an application rendered in a frame,
  JS errors were thrown.

  This was caused because callback script for those actions assumed top was the
  container for Openbravo, but when in a frame, top is the topmost frameset.

  Fixed by checking if top is OB, and if not using parent instead.

---
M src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
M src/org/openbravo/erpCommon/info/ImageInfoBLOB.java
---
(0082940)
caristu   
2015-12-22 13:48   
Verified working with OB inside an iframe:

- Try to upload an image -- OK
- Try to upload an attachment -- OK
(0082943)
hudsonbot   
2015-12-22 15:06   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b29a20897f10 [^]
Maturity status: Test