I have a dev site at [[LINK href="http://fishwire.rudtek.com"]]fishwire[[/LINK]].
I have a slider on the home page that works normally. I installed buddypress and now the slider no longer works. The site is running wordpress 3.5.1 and the newest version of buddypress 1.7.
it appears to be a js problem. I have deactivated all my plugins except the buddypress. (my regular slider is a custom slider: not a plugin) and still i get the error. If i activate a different slider plugin(smooth slider), that slider doesn’t work either. No other plugins are causing this error. If i activate all other plugins and leave buddypress off both the sliders work.
this is a link of buddypress.org [[LINK href="http://buddypress.org/support/topic/slider-jcarousel-jquery-not-working-on-latest-buddypress/"]]link[[/LINK]]that references a similar situation from 3 years ago. a solution was posted here as well that doesn't work but it appears to be a js issue all the same.
Marko Nikolic answers:
Hello,
I will try to test it on my server, that will help me to look deeper into the problem, will get back with info (if I solve it of course) within next 30 minutes. I hope, someone will find the solution before that.
Marko Nikolic comments:
Ok,
can you check if it is going to work with default buddypress theme?
Tnx
redknite comments:
the slider is running in the script of the current theme, which i would like to keep using, so i'm not sure how to get the slider code into the default buddypress theme? Do you have a suggestion of how to do that?
Marko Nikolic comments:
Hello,
I took whole js code from you, and everything works ok, I pulled all scripts from your server, all of them works fine.
Can you check one thing:
Do you have this code in your header.php:
<?php do_action( 'bp_head' ); ?>
<?php wp_head(); ?>
and this in your footer.php:
<?php wp_footer(); ?>
It seems like there is something wrong with your bp theme. It can be something with buddypress installation, but you can check that by replacing all core files. I hope you didn't change any core files.
Can you please check this and let me know, that would be helpfull info.
Thanks
Abdelhadi Touil answers:
Hi.
Have you tried to use this code for your slider:
<script>
jQuery(document).ready(function($){
$("#slider").easySlider({
'auto' : true,
'continuous': true,
'speed': 2000,
'pause': 5000
});
});
</script>
instead of this used in your theme:
<script>
jQuery(document).ready(function(){
jQuery("#slider").easySlider({
'auto' : true,
'continuous': true,
'speed': 2000,
'pause': 5000
});
});
</script>
It seems to be a javascript conflict.
Good luck.
redknite comments:
Thanks for your help! I changed the code as you suggested and there is no change to the system. I've left it as your suggestion all the same in case you think there could be something else...
Duncan O'Neill answers:
Hi there,
it seems that there is a js error caused by this file;
[[LINK href="http://fishwire.rudtek.com/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js?ver=1.7-beta2-6846"]]http://fishwire.rudtek.com/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.js?ver=1.7-beta2-6846[[/LINK]]
Try the following to fix your issue ( three possible fixes, rather than 1 )
1) Take out the reference to it. From the naming, it's both legacy, and beta code. It may not be necessary.
2) Try loading it in the footer of your page, rather than in the header;
Find the reference to where the script is enqueued, ( something like wp_enqueue_script('buddypress',....
) and change the last ( 5th ) parameter to true
, which willl load the script in the footer of your page, after the rest of the page has loaded, rather than in the header.
[[LINK href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script"]]enqueue_script function ref[[/LINK]]
3) Find a 1.7 version, and replace your beta version of buddypress.js, in the following folder ;
/wp-content/plugins/buddypress/bp-templates/bp-legacy/js/
with the alpha version.
hope this helps.
Christianto answers:
Hi,
Please update your code to include jQuery framework file from google cdn,
currently the site loading jQuery version 1.6.1,
http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js?ver=3.5
you should include at least version 1.7 because I check on your buddypress.js,
it use [[LINK href="http://api.jquery.com/on/"]]on()[[/LINK]] to bind event which only exists in jQuery version 1.7.