Hi Brajesh, I’m taking up this old topic again as it seems like it is not working anymore.
I copied members-loop-php from bp-templates/bp-legacy/buddypress/members/ to my child theme/buddypress/members, and replaced
pagination with pagination no-ajax, as suggested.The directory does not go to the top, but apparently it reloads again, after visiting a profile, the wheel is spinning and it takes a moment, before you can access the directory again.
Any idea why the directory is reloaded, when ajax has been deactivated?
Regards
CarstenThis was the code suggested:
`<div id=”pag-top” class=”pagination”>
with this<div id=”pag-top” class=”pagination no-ajax”>
same for the bottom of the fileReplace this
<div id=”pag-bottom” class=”pagination”>
with<div id=”pag-bottom” class=”pagination no-ajax”>
https://buddydev.com/support/forums/topic/why-does-bp-members-directory-reload-every-time/
Hi, I noticed that the no ajax reload is working if I return to the directory, by using a back button.
If I swipe back on the phone screen, the directory reloads.
Any solution to this would be much appreciated as the reload time is a nuisance for users.
Regards
CarstenHi Carsten,
Thank you for the question.This is a normal behaviour for web pages using ajax. What you are looking for is an app like back button(or single page app behaviour). In order to do that, the state needs to be saved between various page visits.
None of the theme supports it. It can be achieved but it is beyond the scope we can help you here.
You may want to look at https://web.dev/progressive-web-apps/ specification as it aims to bring app like experience for web.
Regards
BrajeshHi Brajesh, I’m aware that this is a normal behaviour for web pages using ajax.
But the hole purpose of adding the class=”pagination no-ajax”, was not to use ajax?
So it is not possible to turn off ajax anyway on webpages or how should I understand this?
Regards
CarstenHi Carsten,
Thank you for clarifying.Please check. is there any chance you have switched to Nouveau template pack? That seems the case to me.
Regards
BrajeshHi Brajesh, just to clarify, where is the right place for adding the
pagination no-ajax
, as there are two members-loop.php files, one in
‘
bp-templates>bp-legacy>buddypress>members>members-loop.phpand one in
bp-themes>bp-default>members>members-loop.php.
I have so far added the
pagination no-ajax
to the members-loop.php file in bp-templates, but should I create a copy of the bp-themes as well to make it work?
Thanks in advance
CarstenHi Carsten,
Thank you.1. The correct file is bp-templates>bp-legacy>buddypress>members>members-loop.php
2. I assumed BP Nouveau as the legacy template does not load the first screen via ajax(It loads subsequent pages via ajax).
If you are seeing the loading text/icon on the very first screen(loading directory), There might be something else doing it.Regards
BrajeshHi Brajesh, yes there must be something else going on, the directory defiantly gets updated, the activity updates as well, despite the pagination no-ajax has been added.
What happens in relation to future updates of BP, when members-loop.php has been added to my child theme, I guess updates could involve changes to the members-loop.php file as well?
Should I then update the file in my child theme manually, or how does that work?
Regards
Carsten
You must be logged in to reply to this topic.