You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not able to reproduce any issue with the split page results using the demo products. I've dropped Configuration :: Maximum Values :: Products Listing from 10 to 3 and traverse the "Big Linked" category that has 25 products and I'm not seeing any HTML validation issues.
Further investigation reveals that in the use case you're using that the display_links method is using false for the value for $outputAsUnorderedList. The value of $display_links_text is used in the return, which results in valid HTML.
Invalid HTML (nested li tags) would result only if the value of $ul_elements was used in the return. This happens only when the $outputAsUnorederedList argument is true.
Most of the calls to the display_links method use the value of $paginateAsUL for the $outputAsUnorderedList argument. Only the responsive_classic template sets this variable to true.
Consider my suggested fix as preventive medicine in case $paginateAsUL is ever set true in the future.
Lines 205-213 of includes/classes/zca/zca_split_page_results.php:
// next group of pages
if ($cur_window_num < $max_window_num) {
$href_link = zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type);
$link = '<li><a class="page-link" href="' . $href_link . '" title="' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . '" aria-label="' . ARIA_PAGINATION_ELLIPSIS_NEXT . '">...</a></li>';
$display_links_string .= $link;
$ul_elements .= ' <li class="ellipsis page-item">' . $link . '</li>' . "\n";
} else {
// $ul_elements .= ' <li class="ellipsis" aria-hidden="true">' . $link . '</li>' . "\n";
}
$ul_elements will contained nested
<li>
tags. Perhaps the<li>
tag added to $link should be moved to $display_links as in the following code to avoid the nested tags:// next group of pages
if ($cur_window_num < $max_window_num) {
$href_link = zen_href_link($_GET['main_page'], $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type);
$link = '<a class="page-link" href="' . $href_link . '" title="' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . '" aria-label="' . ARIA_PAGINATION_ELLIPSIS_NEXT . '">...</a>';
$display_links_string .= '<li>' . $link . '</li>';
$ul_elements .= ' <li class="ellipsis page-item">' . $link . '</li>' . "\n";
} else {
// $ul_elements .= ' <li class="ellipsis" aria-hidden="true">' . $link . '</li>' . "\n";
}
The text was updated successfully, but these errors were encountered: