Tagged: pagination
-
AuthorPosts
-
August 19, 2021 at 1:55 pm #1317498
Hi there,
Pagination currently does not work on my website.
I am using the avia_product_slider in my search.php to display the products with images in a grid as per: https://kriesi.at/support/topic/search-results-page-grid-layout/#post-917717
Latest version of Enfold is installed: 4.8.6.2.
I have also tried the following solutions, but none of them worked:
Kindly assist.
August 23, 2021 at 6:30 am #1317914Hey Rustum,
Thank you for the inquiry.
Try to edit the avia_extended_pagination_link function in the enfold/framework/php/function-set-avia-frontend.php file and remove this code around line 1403.
// @since 4.8.4 fix possible XSS vulnerabilities in query string $url = esc_url( $url );
Let us know if it helps.
Best regards,
IsmaelAugust 23, 2021 at 10:13 am #1317939Thanks Ismael. But that did not work.
The value of $url before and after esc_url( $url ); is still the same.
The below is the main issue I found. The & sign is being replaced by #038; So the url becomes https://www.patiowarehouse.co.za/?prod_category&avia-element-paging=2#038;s=palm which takes me to the home page instead of https://www.patiowarehouse.co.za/?prod_category&avia-element-paging=2&s=palm where the pagination works correctly.
Please advise on how I can fix this, preferably via my child theme rather than editing the core theme files if possible.
Thanks.
August 25, 2021 at 6:17 am #1318217Hi,
Thank you for the inquiry.
Looks like the get_pagenum_link function automatically transforms the URL because its second parameter is set to default, so it is using the esc_url() function instead esc_url_raw(). Please try to look for this line above the one we edited above.
if( empty( $query_arg ) ) { $url = $method( $page_number ); } else { $url = $method( 1 );
We have to set the second parameter to false.
if( empty( $query_arg ) ) { $url = $method( $page_number, false, ); } else { $url = $method( 1, false );
Let us know how it goes.
Best regards,
IsmaelAugust 25, 2021 at 8:32 am #1318242Perfect. The Pagination now works. Could I please just ask that you make a note of this for the next Enfold update, so that I don’t lose this fix when I update Enfold.
Thanks once again.
August 27, 2021 at 9:04 am #1318596Hi,
Glad to know that it is working properly now. We will forward this thread to our channel for further considerations. Please keep the modifications for now.
Thank you for your patience.
Best regards,
IsmaelSeptember 2, 2021 at 12:32 pm #1319492 -
AuthorPosts
- You must be logged in to reply to this topic.