- change definition of inp_edit_category element in /core/admin_templates/incs/form_blocks.tpl file by adding pass_through='test' test='testvalue' to call of adm_SelectorLink tag
- go to Website & Content → Structure & Data and open some category for editing
- open browser developer tools to see HTTP queries
- click on the icon of Point to Section field
- navigate into some category and back
- confirm, that test=testvalue exists in ajax request urls
Details
Diff Detail
- Repository
- rINP In-Portal
- Branch
- /w/in-portal.full/branches/5.3.x
- Lint
Lint OK - Unit
No Unit Test Coverage
Event Timeline
Please create revision from In-Portal 5.3.x instead of 5.2.x. You can just submit update of that revision from In-Portal 5.3 instead adding new differential revision.
The test parameter is present in URLs to AJAX requests (e.g. to catalog_tab template), but it's absent in pass_through, which always has type value (e.g. admin/index.php?env=-catalog_tab%3Am-1--1--s-4&pass_through=type&test=testvalue&tm=single&tp=none&type=item_selector&ajax=yes).
Need to find out how it's possible that:
- test parameter is being passed in all requests, while not being listed in pass_through
- some magical pass_through=type appears from nowhere
core/units/admin/admin_tag_processor.php | ||
---|---|---|
467 | Please use construct like in <inp2:m_T tag for getting passed template: $template = $this->SelectParam($params, 't,template'); Then check that $template variable inside IF. | |
471 | Please don't change comment placement to keep consistent comment placement across the tag. | |
483 | Replace with following code to avoid usage of empty values: if ( isset($params['prefix']) && $params['prefix'] ) { | |
490 | Replace with following code to avoid usage of empty values: if ( isset($params['pass_through']) && $params['pass_through'] ) { | |
516 | Inline this, because $pass_through variable isn't used anywhere past this point. |
core/units/admin/admin_tag_processor.php | ||
---|---|---|
471 | It raises lint error. I can't leave it in old place |
core/units/admin/admin_tag_processor.php | ||
---|---|---|
479 | Add following check around this line: if ( !isset($params['m_cat_id') ) { to avoid user given m_cat_id parameter from being overwritten (like in case with core/admin_templates/catalog/advanced_view.tpl template). |
core/admin_templates/catalog/advanced_view.tpl | ||
---|---|---|
41 | NOTE: Update in other places, where adm_SelectorLink tag is used instead of m_Link.
Add the pass="m", when no pass parameter is given already. The default behavior of m_Link tag, that was used previously was pass="m", but the default behavior for adm_SelectorLink is pass="all". This results in empty list of categories in category selector, when used for Points to Section field during category editing. This happens because temp mode (that is enabled, while I'm editing the category) is passed through to selector which in turn shows only categories from same temp table instead of live table. |