Anonymous | Login | Signup for a new account | 2024-04-23 23:40 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] [ Related Changesets ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
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 | Project Name | In-Portal CMS | ||
Assigned To | alex | Developer | |||||
Priority | normal | Resolution | fixed | Fixed in Version | 5.2.0-B3 | ||
Status | closed | Product Version | 5.1.3 | Target Version | 5.2.0 | ||
Time Estimate | No estimate | ||||||
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 | |||||||
Tags | No tags attached. | ||||||
Reference | https://groups.google.com/d/topic/in-portal-bugs/4Gpd4VrC7u8/discussion | ||||||
Change Log Message | Fixes incorrect dashed prefix processing in openSelector JS function | ||||||
Estimate Points | 1 | ||||||
Attached Files |
dashed_prefixes_in_selectors_core.patch [^] (4,643 bytes) 2012-04-04 07:44
[Show Content]
dashed_prefixes_in_selectors_modules.patch [^] (4,548 bytes) 2012-04-04 07:44 [Show Content] |
||||||
|
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||
|
Notes | |
(0004560) alex (manager) 2012-04-04 07:46 |
Will test all together later. |
(0004561) alex (manager) 2012-04-04 07:48 |
Fix committed to 5.2.x branch. Commit Message: Fixes 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function |
(0004934) alex (manager) 2012-07-25 05:31 |
Since 5.2.0 version was released. |
Related Changesets | |||
In-Portal CMS: 5.2.x r15267 Timestamp: 2012-04-04 07:48:09 Author: alex [ Details ] [ Diff ] |
Fixes 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function | ||
mod - /in-portal/branches/5.2.x/core/admin_templates/config/config_general.tpl | [ Diff ] [ File ] | ||
mod - /in-portal/branches/5.2.x/core/admin_templates/groups/groups_edit_permissions.tpl | [ Diff ] [ File ] | ||
mod - /in-portal/branches/5.2.x/core/admin_templates/incs/form_blocks.tpl | [ Diff ] [ File ] | ||
mod - /in-portal/branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl | [ Diff ] [ File ] | ||
Modules :: In-News: 5.2.x r15266 Timestamp: 2012-04-04 07:47:14 Author: alex [ Details ] [ Diff ] |
Bug 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function | ||
mod - /modules/in-news/branches/5.2.x/admin_templates/import.tpl | [ Diff ] [ File ] | ||
Modules :: In-Link: 5.2.x r15265 Timestamp: 2012-04-04 07:46:44 Author: alex [ Details ] [ Diff ] |
Bug 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function | ||
mod - /modules/in-link/branches/5.2.x/admin_templates/import.tpl | [ Diff ] [ File ] | ||
mod - /modules/in-link/branches/5.2.x/admin_templates/paid_listings/paid_listing_type_edit.tpl | [ Diff ] [ File ] | ||
Modules :: In-Commerce: 5.2.x r15264 Timestamp: 2012-04-04 07:46:34 Author: alex [ Details ] [ Diff ] |
Bug 0001249: Unit config prefixes with dashes ("-") not always work, when used in openSelector JavaScript function | ||
mod - /w/in-commerce/branches/5.2.x/admin_templates/import.tpl | [ Diff ] [ File ] | ||
Issue History | |||
Date Modified | Username | Field | Change |
2012-07-25 05:31 | alex | Note Added: 0004934 | |
2012-07-25 05:31 | alex | Status | resolved => closed |
2012-04-04 07:48 | alex | Note Added: 0004561 | |
2012-04-04 07:48 | alex | Status | reviewed and tested => resolved |
2012-04-04 07:48 | alex | Fixed in Version | => 5.2.0-B3 |
2012-04-04 07:48 | alex | Resolution | open => fixed |
2012-04-04 07:48 | alex | Assigned To | !COMMUNITY => alex |
2012-04-04 07:48 | alex | Changeset attached | 5.2.x r15267 |
2012-04-04 07:47 | alex | Changeset attached | 5.2.x r15266 |
2012-04-04 07:46 | alex | Changeset attached | 5.2.x r15265 |
2012-04-04 07:46 | alex | Changeset attached | 5.2.x r15264 |
2012-04-04 07:46 | alex | Note Added: 0004560 | |
2012-04-04 07:46 | alex | Status | needs testing => reviewed and tested |
2012-04-04 07:45 | alex | Assigned To | => !COMMUNITY |
2012-04-04 07:45 | alex | Developer | => alex |
2012-04-04 07:45 | alex | Status | active => needs testing |
2012-04-04 07:45 | alex | Reference | => https://groups.google.com/d/topic/in-portal-bugs/4Gpd4VrC7u8/discussion |
2012-04-04 07:44 | alex | Relationship added | related to 0001243 |
2012-04-04 07:44 | alex | File Added: dashed_prefixes_in_selectors_modules.patch | |
2012-04-04 07:44 | alex | New Issue | |
2012-04-04 07:44 | alex | File Added: dashed_prefixes_in_selectors_core.patch | |
2012-04-04 07:44 | alex | Change Log Message | => Fixes incorrect dashed prefix processing in openSelector JS function |
2012-04-04 07:44 | alex | Estimate Points | => 1 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |