Forum Replies Created
-
Author
-
globaloParticipant
The plugin can be downloaded from here: https://wordpress.org/plugins/iflychat/developers/
globaloParticipantLooks like it is broken again, probably after installing some other add-on, but we had no time to analyze it thoroughly yet.
globaloParticipantglobaloParticipantUnfortunately 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?globaloParticipantHello,
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.4Demo (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?
globaloParticipantHi.
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?
-
AuthorPosts