This topic has 18 replies, 4 voices, and was last updated 10 years by Abe.

  • Author
  • #13882
     milus
    Participant

    Hi,
    I have an issue with members directory ajax pagination. If I apply a filter, everything is working well on the first page, but then I loose the applied filters when I click on the second page.
    Is there any solution?
    Thanks,
    Milo

    #13906
     FD
    Participant

    Hi,

    We have the same problem on our site. And when using the back button the filter also resets and you have to start all over. We would really like to get an solution to this. 🙂

    #14069
     Abe
    Keymaster

    Hi milus, Please make sure you are using the latest theme version since it should work


    @fjelldate
    we will think of something

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #14094
     FD
    Participant

    Nice. 🙂

    #15172
     globalo
    Participant

    Hi.
    I have the same problem
    Go http://na-kawe.net/uzytkownicy/ and put in the filed: Miasto “Warszawa” Polish country.

    and the ajax pagination dont keep the city.

    Please some suggest?

    #15187
     globalo
    Participant

    Hello,

    I did some investigation and found the issue. There seems to be a conflict between current (2.6) version of the theme and current (4.3.3) version of the revolution slider plugin that comes with the theme. There is also a possible conflict with lots of other plugins that could load other php scripts via ajax requests.

    The issue can not be reproduced on demo site, cause demo site uses the old version of revolution slider. Both versions (old 4.1.4 and new 4.3.3) seem to have the same contents of release_log.txt file which may be misleading, but in new version there is an additional release_log.html file. Please compare:

    My site (new version of the slider):
    http://na-kawe.net/wp-content/plugins/revslider/release_log.txt – false info about 4.1.4 in 4.3.3
    http://na-kawe.net/wp-content/plugins/revslider/release_log.html – this file exists in 4.3.3 but not in 4.1.4

    Demo (old version of the slider):
    http://seventhqueen.com/demo/sweetdatewp/wp-content/plugins/revslider/release_log.txt – info about 4.1.4 so this is at least 4.1.4
    http://seventhqueen.com/demo/sweetdatewp/wp-content/plugins/revslider/release_log.html – no file, which indicates this is not 4.3.3… This may be some version between 4.1.4 and 4.3.3 however.

    I have compared these versions and there is one important difference in inc_php/revslider_operations.class.php file. This starts in line 931 in old version and line 972 in new version.

    The old code:

    COPY CODE
    						<?php
    						//check if dynamic-captions.css exists. If not, include captions.php
    						if(file_exists(UniteBaseClassRev::$path_plugin."rs-plugin/css/dynamic-captions.css") == false){
    							?>
    							<link rel='stylesheet' href='<?php echo $urlPlugin?>css/captions.php?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
    							<?php
    						}else{
    							?>
    							<link rel='stylesheet' href='<?php echo $urlPlugin?>css/dynamic-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
    							<?php
    						}
    						?>
    						
    						<link rel='stylesheet' href='<?php echo $urlPlugin?>css/static-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />

    The new code:

    COPY CODE
    <?php
    						//check if dynamic-captions.css exists. If not, include captions.php
    						//if(file_exists(UniteBaseClassRev::$path_plugin."rs-plugin/css/dynamic-captions.css") == false){
    							?>
    							<link rel='stylesheet' href='<?php echo $urlPlugin?>css/captions.php?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
    							<?php
    						/*}else{
    							?>
    							<link rel='stylesheet' href='<?php echo $urlPlugin?>css/dynamic-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />
    							<?php
    						}*/
    						$custom_css = RevOperations::getStaticCss();
    						echo '<style type="text/css">'.$custom_css.'</style>';
    						/*<!--link rel='stylesheet' href='<?php echo $urlPlugin?>css/static-captions.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' /-->*/
    						?>

    As you can see the old version of the plugin loads some css files only (unless they don’t exist which may depend on plugin configuration as the plugin seems to mess with these files when you change its settings). The new version always loads captions.php. Loading captions.php breaks the pagination however, as the pagination needs a cookie called ‘bp-members-search’ to work properly with filters, and the call to captions.php results in reseting this cookie by ‘kleo_bp_cookies’ function assigned to ‘wp_loaded’ action hook.

    The same can be done by any other plugin that loads any php files as long as wordpress is loaded in these files to the point ‘wp-loaded’ actions are fired.

    The partial solution that worked for me was changing the configuration of revolution slider – in case you are not using the slider in members directory page you can enter the global settings of the slider, switch the plugin off for all pages, and specify only the pages that use the plugin. It prevents the script from loading captions.php in members page which would immediately remove the cookie and break the pagination (plus it speeds the page up as files are not loaded if not needed), but the issue stands as there may be some more external php scripts loaded by other plugins. Also, visiting any other site in a new tab breaks the pagination in existing tab as well.

    I suppose the real solution would be the change in kleo-bp-search.php – clearing the cookie only if some conditions are met, but specifying these conditions is a job for someone else. Also, I feel depending on cookies and passing its contents to ajax request is not the best solution for the pagination of the search results to work, perhaps saving the search parameters in javascript variables or some hidden fields on site would be a better approach?

    #15270
     Abe
    Keymaster

    We just updated the plugin to latest version on the demo and doing some tests. It is not good that revslider loads on all pages even if it is not used and doing that setting to disable it is a good choice.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15275
     Abe
    Keymaster

    Hi, We did some tests and came out with a fix. Can you please test it and confirm it works. Test it without the fix you came out for Revslider
    Replace this theme file wp-content\themes\sweetdate\custom_buddypress\kleo-bp-search.php with https://archived.seventhqueen.com/files/kleo-bp-search.txt

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15454
     globalo
    Participant

    Hello,

    Your fix seems to work well, thanks for that.

    #15464
     Abe
    Keymaster

    Great.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15466
     FD
    Participant

    It seems to be working for us as well. Thanks 🙂

    #16892
     globalo
    Participant

    Unfortunately the problem have returned recently after we had installed another add-on – iflychat. We are using 2.0 version at the moment. When I am searching for anything and iflychat is enabled it sends another post request to admin-ajax.php with post params as follows:
    action=iflychat-get
    This request deletes the wp-members-search cookie. Here is what it says in firebug:
    Set-Cookie bp-members-search=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
    I have manually fixed this by switching:
    elseif( bp_is_members_component() )
    Into:
    elseif( bp_is_members_component() && @$_POST['action'] != 'iflychat-get' )
    This works for me for now, but it is only a temporary fix as I can imagine the problem may come back again and again after installing other add-ons. Looks like bp_is_members_component() is not enough and more complex check needs to be done here?

    #17350
     Abe
    Keymaster

    @globalo can we take a look at your site please?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #20971
     globalo
    Participant
    #20972
     globalo
    Participant

    Looks like it is broken again, probably after installing some other add-on, but we had no time to analyze it thoroughly yet.

    #21142
     Abe
    Keymaster

    Maybe you can provide the plugin at themesupport@seventhqueen.com to test it localy

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #21248
     milus
    Participant

    It was solved in the previous release, but I confirm it’s broken again 🙁

    #21253
     globalo
    Participant

    The plugin can be downloaded from here: https://wordpress.org/plugins/iflychat/developers/

    #21441
     Abe
    Keymaster

    I just installed it and tested and works with sweetdate 2.6.1, the query remains after page changes

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 19 posts - 1 through 19 (of 19 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?