Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-57

Issues with "MoreLink" tag and "Data_Exists" param

    XMLWordPrintable

    Details

    • Additional information:
      Hide

      Need to [B]Review ALL[/B] other places potentially affected by [i]data_exists="1"[/i] 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); }

      }

      Show
      Need to [B] Review ALL [/B] other places potentially affected by [i] data_exists="1" [/i] 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); } }
    • External issue ID:
      69
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      MoreLink tag is NOT displayed when needed.

      Came across this problem in Default2007 and Default2009 themes where [i]<inp2:l_MoreLink render_as="more_link"/>[/i] tag (in Short Search Results template) is used inside of RenderElement with [B]data_exists="1"[/B] 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                dmitry Dmitry Andrejev [Intechnic]
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: