Hi 🙂
hidden link
In this view, the first search results disappear, with infinite scrolling start.
Sometimes it´s the same thing on our start page: hidden link
What´s going on there?
Hello, that is unusual. If you are using the legacy Views editor to build these Views or Archives, can you copy and paste the contents of the Loop Editor and the Loop Template editor here for me to review?
Can you also try these troubleshooting steps?
- Temporarily deactivate any custom code you have created in Toolset > Settings > Custom Code tab
- Temporarily deactivate all third-party plugins except Types and Views. If you want to activate a Maintenance Mode plugin during testing, that is okay
- Temporarily activate a default theme like Twenty Twenty One
- Test again
- If the infinite scrolling problem is resolved, reactivate your custom code snippets, other plugins, and theme, one by one, testing each time until the problem returns
- If the infinite scrolling problem is not resolved, I will review your View or Archive code and see if there are any problems to correct.
Okay I can see you have a few nested templates inside the main Betreigsvorschau template, and the main Betreigsvorschau template seems to be incomplete here. The number of closing div tags does not match the number of opening div tags, and that could be part of the problem if the browser is replacing the wrong contents during scroll.
I would like to simplify the main loop as a test to confirm infinite scroll is working as expected, and the problem is somewhere inside the main template or one of the nested templates. As a test, let's replace the code in your loop with the following test code temporarily:
wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
<div style="height:200px; background:#fff; margin-bottom:20px;">[wpv-post-link]</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
Then test the results on the front-end of the site. You should see the post link in a white box for each result, and you should see new results added at the end of the list during infinite scroll. If the first results are not replaced during infinite scroll, we can assume that infinite scrolling is working correctly and we need to investigate the Content Templates more closely.
If you'd prefer not to run these tests on the live site, we can discuss options for creating a site clone and working in a separate development environment. Let me know how you'd like to proceed.
It won´t happen when logged in.
But deactivating WP Fastest Cache won´t help.
Oh so sorry, the template for some reason was not fully displayed, when I copied it in here.
Should have been:
<!-- lernland-Template Beitragsvorschau -->
<div class="archiveintrag [wpv-post-type]-x" style="position: relative; margin: 1em 0;">
<div style="view:table; width: 100%; position: relative;">
<div style="view:table-row;">
<div style="view: table-cell;">
<!-- [wpv-post-body view_template="beitrags-meta"] -->
<div style="font-size:80%; color:grey; margin-top: -20px; margin: 11px; display: block;"></div>
[wpv-post-body view_template="beitrags-vorschau-bild"]
<div style="margin-top: 5px; margin-bottom: -4px;/*display: inline !important; view: table-cell !important;*/">
[wpv-post-body view_template="archiveintrag-titel"]
[wpv-post-body view_template="archiveintrag-vorschautext"]
[wpv-conditional if="( !CONTAINS(#(post_tag),'xs') )"]
<div class="nicht-in-zitat vorschau-tags" style="text-align: cccccccccccccccccenter;">
[wpv-post-body view_template="beitrags-faecher"]
[wpv-post-body view_template="beitrags-themen"]
</div>
<div class="vorschau-tags hidden nicht-in-zitat" style="foooooont-size:80%; color:grey; margin-bottom: -20px; /*margin-top: -14px;*/">
[wpv-post-body view_template="__klasseschulform"]
</div>
[/wpv-conditional]
</div>
</div>
</div>
</div>
<div style="clear:both;"></div>
[wpv-conditional if="( !CONTAINS(#(post_tag),'xs') )"]<div class="voll"></div>[/wpv-conditional]
<div class="tooltip" style="width: 200px; right: -30px; top: 25px; font-size: 10px !important;">Diesen Beitrag (nicht mehr) <a href="/tools/beobachten">beobachten</a></div>
[wpv-post-body view_template="beitrags-meta"]
<div style="top: .7em; /*color:#fff;*/position: absolute;" class="vorschau-rating">[mrp_rating_result]</div>
</div>
You're saying that after changing the contents of the View's loop like I recommended, the problem still occurs when logged out? If so, can we try these troubleshooting steps next?
- Temporarily deactivate all plugins except Types and Views
- Temporarily deactivate all custom code snippets in Toolset > Settings > Custom Code
- Temporarily activate a default theme like Twenty Twenty One
- Test again
- If the problem is resolved, reactivate your theme, custom code snippets, and other plugins one by one until the problem returns
- If the problem is not resolved, I'll need to take a closer look.
Please let me know the results of this test and we can continue investigating from there. Thank you!
This happens with your template code: hidden link
Can you tell me what is the sort order setting for this View? It seems to be random, because the posts load in different order every time I reload the page.
Having done all you said the first post steadily changes! hidden link
btw: In your code the first character should be "["
Okay if you'd like I can log in and create a clone of your site using the Duplicator plugin, and install it on my local environment for additional testing. Please provide login credentials in the private reply fields here and I will take a closer look.
Having tried all those things, it suddenly works now. still checking what might have been the cause. ..
Still wanna do your testing?
Wanna have an account?
Thank you Christian, kind regards!