Support Forum

Missing register button and Login button does nothing??

46 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Are you using the most recent SP version (5.1)? There was an issue where the Group RSS button was not being removed but this was fixed in 5.1..
What about caching> And WP cache plugins?

SC Simon Coxshaw
Simon Coxshaw
Member

No I haven’t upgraded to 5.1 yet as I have been changing a lot of the css and still playing with the layout. Will upgrade and see if this fixes it…

If I upgrade will I lose the layout changes I have made? Or is that specific to the theme I am using?

YS Yellow Swordfish
Yellow Swordfish
Member

Well hopefully you followed the advice and made your own theme. If you didn’t then it’s not too late. And it IS simple and worth it. See http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

SC Simon Coxshaw
Simon Coxshaw
Member

Yellow Swordfish said
This should do it – commenting out the following lines of code:

//wp_deregister_script('jquery');
//wp_register_script('jquery', ''.get_template_directory_uri().'/scripts/js/jquery.min.js', 'jquery');
wp_enqueue_script( 'jquery' );

//wp_register_script('jqueryui', ''.get_template_directory_uri().'/scripts/js/jquery-ui.min.js', 'jquery');
wp_enqueue_script( 'jqueryui' );

See if that helps.

Hi Guys,

I have come back to this to find that this solution gets the login jquery drop down functioning but breaks all other uses of jquery on the site. Any ideas?

Thx

YS Yellow Swordfish
Yellow Swordfish
Member

It depends. In line with the plugins or themes loading their own jQuery they also sometimes then use the $ notation to call it instead of the ‘no conflict’ mode of ‘jQuery’ that is rtight for WordPress. So could this be the issue?

SC Simon Coxshaw
Simon Coxshaw
Member

I thought that might be the case and found the following file: custom.js (attached) This has a lot of javascript using the $ notation I have tried simply doing a find and replace in this document, swapping out the $ for jQuery but this did not work.

However, I did manage to get the slider on the homepage working as there is a single javascript for this that I amended as below…

<script type=”text/javascript”>
var jQuery = jQuery.noConflict();
jQuery(window).load(function() {
jQuery(‘.flexslider’).flexslider();
});
</script>

instead of…

<script type=”text/javascript”>
$(window).load(function() {
$(‘.flexslider’).flexslider();
});
</script>

MP Mr Papa
Mr Papa
Member

the second one (jquery ui), should be:

wp_enqueue_script(‘jquery-ui-core’);
wp_enqueue_script(‘jquery-ui-widget’);

the second one might not be needed, but I always put it in since it used to be jquery ui core…

SC Simon Coxshaw
Simon Coxshaw
Member

Ok, tried adding the above but still no good, forum works fine, rest of the site doesn’t.

Below the calling of jquery are all of the following, some of these are the ones that are now not working:

wp_register_script(‘superfish’, ”.get_template_directory_uri().’/scripts/js/superfish.js’, ‘jquery’);
wp_enqueue_script(‘superfish’);

wp_register_script(‘custom’, ”.get_template_directory_uri().’/scripts/js/custom.js’, ‘jquery’);
wp_enqueue_script(‘custom’);

wp_register_script(‘tabs’, ”.get_template_directory_uri().’/scripts/js/tabs.js’, ‘jquery’);
wp_enqueue_script(‘tabs’);

wp_register_script(‘prettyphoto’, ”.get_template_directory_uri().’/scripts/js/jquery.prettyPhoto.js’, ‘jquery’);
wp_enqueue_script(‘prettyphoto’);

wp_register_script(‘opacityrollover’, ”.get_template_directory_uri().’/scripts/js/jquery.opacityrollover.js’, ‘jquery’);
wp_enqueue_script(‘opacityrollover’);

wp_register_script(‘galleriffic’, ”.get_template_directory_uri().’/scripts/js/jquery.galleriffic.js’, ‘jquery’);
wp_enqueue_script(‘galleriffic’);

wp_register_script(‘flexslider’, ”.get_template_directory_uri().’/scripts/js/jquery.flexslider-min.js’, ‘jquery’);
wp_enqueue_script(‘flexslider’);

wp_register_script(‘jcarousel’, ”.get_template_directory_uri().’/scripts/js/jquery.jcarousel.js’, ‘jquery’);
wp_enqueue_script(‘jcarousel’);

wp_register_script(‘photogallery’, ”.get_template_directory_uri().’/scripts/js/slides.min.jquery.js’, ‘jquery’);
wp_enqueue_script(‘photogallery’);

wp_register_script(‘easing’, ‘http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js’, ‘jquery’);
wp_enqueue_script(‘easing’);

SC Simon Coxshaw
Simon Coxshaw
Member

Mr Papa said
the second one (jquery ui), should be:

wp_enqueue_script(‘jquery-ui-core’);
wp_enqueue_script(‘jquery-ui-widget’);

the second one might not be needed, but I always put it in since it used to be jquery ui core…

Ok, tried Mr Papas suggestion adding the above but still no good, forum works fine, rest of the site doesn’t.

Below the queing of jquery are all of the rest of the scripts being called from within the theme, some of these are the ones that are now not working for example:

wp_register_script(‘prettyphoto’, ”.get_template_directory_uri().’/scripts/js/jquery.prettyPhoto.js’, ‘jquery’);
wp_enqueue_script(‘prettyphoto’);

Do these need to be edited?

YS Yellow Swordfish
Yellow Swordfish
Member

Well the prettyphoto script is commonly used and I encounter it often on our users sites. Just because it does not work now does not necessarily mean the problem is in there.

I do wish that theme and plugin authors would take into account that their stuff needs to work with the widest possible array of other plugins. It is so easy to do things properly!

You need to go about this in a methodical manner and that means determining exactly what piece of code is at fault. The only way to do this is by using a script console. By far the best is the Firebug extension for Firefox but if tyou do niot want to install that then the Firefox error console will do. Open it – clear it out – run a page. Look at the console report (please ONLY the errors tab) and it should point to the place of failure if all is well.

SC Simon Coxshaw
Simon Coxshaw
Member

Thanks Yellowfish, yes, prettyphoto is just one of the scripts that isn’t working and I have used prettyphoto many times without issue.

I am using Chrome as gave I gave up on firefox as it just became very slow. Chrome has an equivalent to firebug built in and this is what the error console returned:

Uncaught TypeError: Property ‘$’ of object [object Window] is not a function custom.js:3
Uncaught TypeError: Property ‘$’ of object [object Window] is not a function tabs.js:1
Uncaught TypeError: Property ‘$’ of object [object Window] is not a function :8888/silverhairs/:207 (this is the flexislider script at line 207)

(Tested on a local version hence the :8888/silverhairs/)

Do you think this is a conflict issue? Should I change the above to use the jQuery noConflict?

You will see from an earlier post I got the flexislider to work using the noConflict script but this worked only for this single script as it isn’t included in the custom.js file

SC Simon Coxshaw
Simon Coxshaw
Member

Yellow Swordfish, you are my new best friend!

Why I didn’t think of using the error console before, I guess I couldn’t see the wood for the trees! Well on my way to fixing it all now using noConflict on the scripts showing up in the error console.

smilesmilesmile

SC Simon Coxshaw
Simon Coxshaw
Member

OK, was about to start pulling my hair out… The forum jquery has stopped functioning, no drop down on login etc… AND nothing showing up in the error console to suggest why! 

Then I reverted to the original replacing…

//wp_deregister_script('jquery');
//wp_register_script('jquery', ''.get_template_directory_uri().'/scripts/js/jquery.min.js', 'jquery');
wp_enqueue_script( 'jquery' );

//wp_register_script('jqueryui', ''.get_template_directory_uri().'/scripts/js/jquery-ui.min.js', 'jquery');
wp_enqueue_script( 'jqueryui' );
 
with...

wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’, ”.get_template_directory_uri().’/scripts/js/jquery.min.js’, ‘jquery’);
wp_enqueue_script( ‘jquery’ );

wp_register_script(‘jqueryui’, ”.get_template_directory_uri().’/scripts/js/jquery-ui.min.js’, ‘jquery’);
wp_enqueue_script( ‘jqueryui’ );

 

and we are back in business, everything appears to be working now. As you say a “methodical manner”, and keep trying! Thanks again for the great support.

Will let you know when the site goes live (hopefully this weekend) Might be a nice example for your Showcase.

Simon.

MP Mr Papa
Mr Papa
Member

looking forward to it… and it just happens we are in the process of converting our showcase site over to new SP 5 sites…