Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0008911 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] B. User interface | minor | always | 2009-05-05 13:53 | 2009-08-05 11:44 | |||
Reporter | roklenardic | View Status | public | |||||
Assigned To | iperdomo | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | pi | |||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 68932ea3c43d | |||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_12 | |||
OS Version | Ubuntu 9.04 | Database version | 8.3.7 | Ant version | 1.7.1 | |||
Product Version | 2.50 | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0008911: menu in Openbravo app called from a link does not work | |||||||
Description | If there is a link or a button to the login screen of the Openbravo ERP such as: * <a href="http://ec2-67-202-1-77.compute-1.amazonaws.com" [^] target="_blank"> * <input type='button' onClick="window.open('http://ec2-67-202-1-77.compute-1.amazonaws.com','vm' [^])" name="ov" value="Open My Virtual Machine"> once you login, the menu items simply do not work. if you access the same instance by copy-pasting the url into another browser (or even a new tab of the same browser) it works. The problem is in utils.js (of PI) line 297 and 307 if(top.opener != null) { // is a pop-up window This is triggering in the main window because it has a top.opener (external link). If Firebug is enabled, the error that is attached as a snapshot appears. See also this cross-domain restriction: Q: I can not access the properties of the new secondary window. I always get an error in the javascript console saying "Error: uncaught exception: Permission denied to get property <property_name or method_name>. Why is that? A: It is because of the cross-domain script security restriction (also referred as the "Same Origin Policy"). A script loaded in a window (or frame) from a distinct origin (domain name) cannot get nor set properties of another window (or frame) or the properties of any of its HTML objects coming from another distinct origin (domain name). Therefore, before executing a script targeting a secondary window, the browser in the main window will verify that the secondary window has the same domain name. https://developer.mozilla.org/En/DOM:window.open [^] | |||||||
Proposed Solution | David Baz suggested: if(top.opener != null && frames.name.indexOf('appFrame')==-1 && frames.name.indexOf('frameMenu')==-1) { // is a pop-up window in every places of utils.js where if(top.opener != null) or if(top.opener) appears | |||||||
Tags | 250MP1 | |||||||
Attached Files | ec2MenuClicksNotWorking.png [^] (37,163 bytes) 2009-05-05 13:53
| |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0016076) hgbot (developer) 2009-05-05 22:41 |
Repository: erp/devel/pi Changeset: 68932ea3c43d79291211a32a0e9940cac1413c84 Author: Iván Perdomo <ivan.perdomo <at> openbravo.com> Date: Tue May 05 22:41:20 2009 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/68932ea3c43d79291211a32a0e9940cac1413c84 [^] Fixes issue 8911: Verify the the top.opener reference is a application frame --- M web/js/utils.js --- |
(0017374) sureshbabu (reporter) 2009-06-17 08:39 |
Tested working fine |
(0017452) roklenardic (developer) 2009-06-19 09:10 |
This still does not work in 2.50MP1. |
(0018813) roklenardic (developer) 2009-08-04 10:10 |
This still does not work in 2.50MP2! |
(0018836) roklenardic (developer) 2009-08-05 11:44 |
My mistake, the patch wasn't applied correctly. I'm sorry. |
Issue History | |||
Date Modified | Username | Field | Change |
2009-05-05 13:53 | roklenardic | New Issue | |
2009-05-05 13:53 | roklenardic | Assigned To | => iperdomo |
2009-05-05 13:53 | roklenardic | File Added: ec2MenuClicksNotWorking.png | |
2009-05-05 13:53 | roklenardic | Regression testing | => No |
2009-05-05 22:39 | iperdomo | Status | new => scheduled |
2009-05-05 22:39 | iperdomo | fix_in_branch | => pi |
2009-05-05 22:41 | hgbot | Checkin | |
2009-05-05 22:41 | hgbot | Note Added: 0016076 | |
2009-05-05 22:41 | hgbot | Status | scheduled => resolved |
2009-05-05 22:41 | hgbot | Resolution | open => fixed |
2009-05-05 22:41 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/68932ea3c43d79291211a32a0e9940cac1413c84 [^] |
2009-05-05 22:41 | iperdomo | Tag Attached: 250MP1 | |
2009-06-17 08:39 | sureshbabu | Status | resolved => closed |
2009-06-17 08:39 | sureshbabu | Note Added: 0017374 | |
2009-06-17 08:39 | sureshbabu | Fixed in Version | => pi |
2009-06-18 00:00 | anonymous | sf_bug_id | 0 => 2807992 |
2009-06-19 09:10 | roklenardic | Note Added: 0017452 | |
2009-08-04 10:10 | roklenardic | Note Added: 0018813 | |
2009-08-05 11:44 | roklenardic | Note Added: 0018836 | |
2009-10-19 07:09 | rafaroda | Relationship added | related to 0010955 |
2011-11-10 20:59 | roklenardic | Relationship added | related to 0019038 |
Copyright © 2000 - 2009 MantisBT Group |