Anonymous | Login | Signup for a new account | 2024-03-29 09:41 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Vertical ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0001249 | [In-Portal CMS] Data Management | bug report | always | 2012-04-04 07:44 | 2012-07-25 05:31 |
Reporter | alex | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | closed | ||||
Summary | 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function | ||||
Description |
In Admin Console In-Portal uses "env" request variable to pass important information (usually a set of unit config prefixes and IDs associated with them) across all pages, e.g. /admin/index.php?env=-index:m0--1--s-:u----- ("m" and "u" are unit config prefixes). As you can see from example above a dash ("-") is used as a separator between different IDs. But in case if ID contains a dash itself, then this dash is escaped like this /admin/index.php?env=-index:m0--1--s-:user\-prefix-----. When such url is used by JavaScript it removes all "\" from it (since it's an escape character in JavaScript too). After that parsing that "env" request parameter becomes impossible because of single prefix would interpreted as 2 different prefixes resulting in Fatal Error on prefix existence checking code. Below are examples how to property pass such urls to openSelector function: How not to do it: <a href="javascript:openSelector('conf', '<inp2:adm_SelectorLink prefix="conf" selection_mode="single" tab_prefixes="none"/>', 'ModuleRootCategory', '950x600');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a> How to do it: <a href="<inp2:adm_SelectorLink prefix='conf' selection_mode='single' tab_prefixes='none'/>" onclick="openSelector('conf', this.href, 'ModuleRootCategory', '950x600'); return false;"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a> How it was fixed: 1. 2nd parameter (url) of openSelector function moved into "href" attribute of A html tag 2. former "href" attribute of A html tag was renamed to "onclick" attribute and "return false;" was added 3. this.href is used instead of url in a string, which keeps "\" intact even without a need for "js_escape" tag parameter |
||||
Additional Information |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |