I have a parametric search view with paging. I've noticed that in my paged results I am seeing repeated posts. For example one of my posts appears on page two and four of the paged results. This is on the first visit to the page with no search filter applied.
If I disable the paging, then the results list I see is very different to the list of post with paging enabled.
I've attached two images, one with paging enabled and one without paging, as you can the see the first page of results are different between the two. I can't see a pattern to it, but the first item displayed on page 1 of the paged results, is the 10th item displayed on the list without paging - the number of items per page is set to 1.
My pager is included within the view loop:
<div class="ft-i-search-items">
[wpv-layout-start]
[wpv-items-found]
<div class="ft-i-pager">
[wpv-pagination][wpv-pager-nav-links output="bootstrap" text_for_previous_link="Go back" text_for_next_link="Next page" skip="30" previous_next_links="true" reach="1"][/wpv-pagination]
</div>
I'
Hi, that's definitely strange. Can you tell me if it makes any difference when you move the pagination shortcodes outside the Loop Output editor? Try placing these shortcodes in the Filter Controls editor area instead. If that area is not visible in your View editor, you can use the Screen Options tab to enable the editor.
Hey Christian,
I've duplicated the view, removed the parametric search section and all query filters. I've added very basic paging (next and previous) to the filter section and removed the paging shortcodes from the view loop. The results are identical - i'm still seeing duplicate posts and different results between a paged and non-paged view.
Okay thanks for the update. Please try these standard troubleshooting steps next:
- Temporarily disable all non-Toolset plugins (including WPML and WPML extras) and activate a default theme like Twenty Seventeen
- If the problem is resolved, reactivate plugins and theme one by one until the conflict is revealed.
- If the problem was not resolved, try adding cached="off" to the shortcode used to place your View, like so:
[wpv-view name="your-view-slug" cached="off"]
Please let me know the results of this test and we will proceed from there.
Disabled all plugins except Toolset - no change.
Installed 2017 theme - no change.
Added nocache parameter to view - no change.
Okay at this point I think it will be best for me to take a look in your wp-admin area to get a better idea of what's happening. Please provide login credentials in the private reply fields below, as well as the View ID and the Page URL where I can see the problem.
Hi, I've unchecked "Don't include current page in query result" for this View, and the duplicated Mushroom post (on pages 2 and 4) is now only showing once. Can you take a look and see if the results look more like you expect now, or if there are additional issues?
I see no difference. Both views are still showing the same output with the flag set or unset - perhaps you could compare the two results sets yourself? (between the test version and full filterversion).
This setting should really produce no difference as we are sitting on a page, and not a single post of the queried post type - unless I'm missing something.
Hmm, no you're right, I must have been looking at something else before because I thought the results were different. At this point I think it's probably best for me to create a clone of your site I can install locally, so I'm not modifying your live content. If it's okay with you, I will install the Duplicator plugin and create that clone to begin testing.
It's already installed - go ahead.
Thanks, I will continue to debug this and keep you posted.
I just spoke with another supporter and he recommended adding a secondary post sort order as a temporary solution while we continue to debug. In my local clone, this definitely has an effect on the posts shown in the list. As a test, can you try to add secondary sorting in your Query Filter? Post ID should be okay. Let me know the results.
I can afford to wait a little for a fix - I have more work to do before the site can go live. Clearly this should work as is and you have a copy of the site if you need to carry out tests. I'm happy to test a patch when one becomes available.
Okay I have escalated this problem to my 2nd tier support team for additional investigation. I have been able to reproduce the same issue on a fresh installation and a default theme, so it's definitely not specific to your environment. I will continue to update you here as I receive additional information.