In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
69 [In-Portal CMS] Front End bug report always 2009-06-12 12:55 2010-05-11 02:59
Dmitry  
alex  
normal  
closed 4.3.9  
fixed  
 
none 5.0.3-B2  
0
0000069: Issues with "MoreLink" tag and "Data_Exists" param
MoreLink tag is NOT displayed when needed.

Came across this problem in Default2007 and Default2009 themes where <inp2:l_MoreLink render_as="more_link"/> tag (in Short Search Results template) is used inside of RenderElement with data_exists="1" parameter which gets passed through to MoreLink parameters.

Due to specifics of Template Parser the output is getting excluded when NO "field" tag used in the actual RenderElement (in our case "more_link"). All this leads to More Link not to be shown when needed.
Need to Review ALL other places potentially affected by data_exists="1" parameter passed when NOT needed.


Proposed fix (diff):

function MoreLink($params)
    {
        $per_page = $this->SelectParam($params, 'per_page,max_items');
        if ($per_page !== false) $params['per_page'] = $per_page;
        $list =& $this->GetList($params);

        if ($list->PerPage < $list->RecordsCount) {
            $block_params = array();
            $block_params['name'] = $this->SelectParam($params, 'render_as,block');
            - return $this->Application->ParseBlock($block_params, 1);
            + return $this->Application->ParseBlock($block_params);
        }
    }
patch parse_block_fix.patch (10,746) 2010-03-11 10:24
http://tracker.in-portal.org/file_download.php?file_id=340&type=bug
patch parse_block_fix_v2.patch (11,106) 2010-03-17 06:16
http://tracker.in-portal.org/file_download.php?file_id=378&type=bug
patch broken_pagination_fix.patch (859) 2010-03-27 18:37
http://tracker.in-portal.org/file_download.php?file_id=421&type=bug
Issue History
2010-05-11 02:59 alex Note Added: 0002105
2010-05-11 02:59 alex Status resolved => closed
2010-04-06 02:58 alex Note Added: 0001801
2010-04-06 02:58 alex Status reviewed and tested => resolved
2010-04-06 02:58 alex Fixed in Version 5.0.3-B1 => 5.0.3-B2
2010-04-06 02:58 alex Resolution reopened => fixed
2010-04-06 02:58 alex Assigned To !COMMUNITY => alex
2010-04-06 02:58 alex Changeset attached 5.0.x r13332
2010-04-05 21:50 Dmitry Note Added: 0001798
2010-04-05 21:50 Dmitry Status needs testing => reviewed and tested
2010-03-27 18:37 alex Note Added: 0001754
2010-03-27 18:37 alex Assigned To alex => !COMMUNITY
2010-03-27 18:37 alex Status needs work => needs testing
2010-03-27 18:37 alex File Added: broken_pagination_fix.patch
2010-03-27 18:23 alex Note Added: 0001753
2010-03-27 18:23 alex Status needs feedback => needs work
2010-03-27 18:22 alex Note Added: 0001752
2010-03-27 18:22 alex Status resolved => needs feedback
2010-03-27 18:22 alex Resolution fixed => reopened
2010-03-21 04:00 alex Changeset attached 5.0.x r13273
2010-03-20 14:41 alex Changeset attached 5.0.x r13272
2010-03-20 14:41 alex Note Added: 0001711
2010-03-20 14:41 alex Status reviewed and tested => resolved
2010-03-20 14:41 alex Fixed in Version => 5.0.3-B1
2010-03-20 14:41 alex Resolution open => fixed
2010-03-20 14:41 alex Assigned To !COMMUNITY => alex
2010-03-18 14:36 Dmitry Note Added: 0001685
2010-03-18 14:36 Dmitry Status needs testing => reviewed and tested
2010-03-17 06:17 alex Note Added: 0001674
2010-03-17 06:17 alex Assigned To alex => !COMMUNITY
2010-03-17 06:17 alex Status needs work => needs testing
2010-03-17 06:16 alex File Added: parse_block_fix_v2.patch
2010-03-15 19:13 Dmitry Note Added: 0001652
2010-03-15 19:13 Dmitry Assigned To !COMMUNITY => alex
2010-03-15 19:13 Dmitry Status needs testing => needs work
2010-03-12 02:58 alex Note Added: 0001577
2010-03-11 23:37 Dmitry Issue Monitored: alex
2010-03-11 23:37 Dmitry Note Added: 0001566
2010-03-11 10:26 alex Time Estimate Removed 4 =>
2010-03-11 10:26 alex Note Added: 0001563
2010-03-11 10:26 alex Assigned To alex => !COMMUNITY
2010-03-11 10:26 alex Developer => alex
2010-03-11 10:26 alex Status active => needs testing
2010-03-11 10:24 alex File Added: parse_block_fix.patch
2010-03-11 10:04 alex Note Edited: 0001562 bug_revision_view_page.php?bugnote_id=0001562#r403
2010-03-11 09:56 alex Note Added: 0001562
2009-10-06 13:49 alex Note Added: 0000825
2009-10-06 13:49 alex Target Version 5.0.2 => 5.0.3
2009-10-05 16:28 Dmitry Assigned To Dmitry => alex
2009-10-03 07:53 administrator Status reviewed and tested => active
2009-09-23 13:13 alex Time Estimate Added 4
2009-09-23 13:13 alex Note Added: 0000529
2009-09-20 15:11 alex Target Version 5.1.0 => 5.0.2
2009-08-03 15:38 Dmitry Note Added: 0000220
2009-08-03 15:38 Dmitry Assigned To => Dmitry
2009-08-03 15:38 Dmitry Status active => reviewed and tested
2009-08-03 15:38 Dmitry Target Version 5.0.1 => 5.1.0
2009-06-12 13:33 alex Changeset attached RC r11851
2009-06-12 13:07 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=52#r52
2009-06-12 13:07 Dmitry Description Updated bug_revision_view_page.php?rev_id=51#r51
2009-06-12 13:06 Dmitry Description Updated bug_revision_view_page.php?rev_id=49#r49
2009-06-12 13:06 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=50#r50
2009-06-12 12:58 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=47#r47
2009-06-12 12:56 Dmitry Summary Issues with "MoreLink" tag => Issues with "MoreLink" tag and "Data_Exists" param
2009-06-12 12:55 Dmitry New Issue

Notes
(0000220)
Dmitry   
2009-08-03 15:38   
Moved to 5.1.x releases.
(0000529)
alex   
2009-09-23 13:13   
Plan:
1. search for all calls of kApplication::ParseBlock method with second parameter passed.
2. for each found case try to remove 2-nd parameter and see how related functionality will react.

Usually $pass_params (2nd parameter) is not required because $block_params (1st parameter) already contains $params (main tag params, who called ParseBlock) added via $block_params = $this->prepareTagParams($params); call.
(0000825)
alex   
2009-10-06 13:49   
Moving to 5.0.3 because of too much work.
(0001562)
alex   
2010-03-11 09:56   
(edited on: 2010-03-11 10:04)
1. Method kTagProcessor::processTagParams is used to pass, parameters given to the tag to kApplication::ParseBlock it calls from inside (like kDBTagProcessor::PrintList2 tag does).

2. $pass_params parameter of ParseBlock passes all parameters, from current deep level, like all parameters on current template or all parameters given to DefineElement, where our tag is located.

Our problem is with data_exists parameter, which is not passed directly to sub tags, but which is available globally, when $pass_params parameter of ParseBlock method is used.

(0001563)
alex   
2010-03-11 10:26   
Here is the patch, but it seems to have strange effect on "Comments" (Reviews) grid in admin - shows plain template from ajax response.

Please test all changed tags. On non-ajax grids and even in catalog all seems to work, but comments section seems to be broken.
(0001566)
Dmitry   
2010-03-11 23:37   
Reminder sent to: alex

Are we talking about regular Comments of Category Items? I also have Comments for Polls...

Thanks will test soon.

(0001577)
alex   
2010-03-12 02:58   
I specifically wrote that it's comments, that are former reviews section. Please read carefully next time.
(0001652)
Dmitry   
2010-03-15 19:13   
Tested Okay everywhere but Comments as you pointed out.
(0001674)
alex   
2010-03-17 06:17   
Several more issues found, that you haven't discovered during testing:

1. comments (reviews) grid was not working
2. catalog/advanced view was not working also
3. user editing (general tab) also gives fatal error

Please test all cases this time.
Also descriptive comments added to places, where $pass_params are used, so we don't accidentally remove them later.
(0001685)
Dmitry   
2010-03-18 14:36   
Tested okay!

Review all places and basic others.
(0001711)
alex   
2010-03-20 14:41   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000069: Issues with "MoreLink" tag and "Data_Exists" param
(0001752)
alex   
2010-03-27 18:22   
When editing a language, previous/next/last/first buttons (in pagination bar) doesn't work, because they miss 1 parameter in the JS:

example for going to page number 2
buttons uses javascript:go_to_page('phrases', 2, )
page numbers uses javascript:go_to_page('phrases', 2, 0)
(0001753)
alex   
2010-03-27 18:23   
Time to fix
(0001754)
alex   
2010-03-27 18:37   
Need to test "broken_pagination_fix.patch" patch only. See previous comment to understand what to test.
(0001798)
Dmitry   
2010-04-05 21:50   
Tested good!
(0001801)
alex   
2010-04-06 02:58   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000069: Issues with "MoreLink" tag and "Data_Exists" param
(0002105)
alex   
2010-05-11 02:59   
Closing all tasks from released versions.