Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Empty profile tabs
Avatar
Joan Alamo Vallejo
Member
Free Members
Offline
Apr 28, 2012 - 5:56 am

Hi there,

when I try to edit my profile, all tabs in the section are empty and if you click on them it takes you to a new page with the content but no css. Now, I've read somewhere it may be caused by a conflict with the jquery library in the theme.

I've tried to remove the script call on the WP header.php and add this code to the WP functions.php as recommended but then it crashes the design (as it couldn't find the js)

<?php
function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    
 
add_action('wp_enqueue_scripts', 'my_scripts_method');
?>
This is my homepage in case you need to see the code: http://www.subnoise.es
 
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Apr 28, 2012 - 12:24 pm

what you would want to do is really comment out those first two...

    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');

then wp will loads its own jquery instead of the version from google...

Avatar
Joan Alamo Vallejo
Member
Free Members
Offline
Apr 29, 2012 - 2:26 pm

Messing with the jquery libraries didn't fix the problem, did I follow the right steps? I thought it could be the same issue as in here

https://simple-press.com/suppo.....e-options/

This is how my Edit profile screen looks like (see attachment)

And this is where my forum is located http://www.subnoise.es/foro/

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Apr 29, 2012 - 2:59 pm

It is not fixed. There are 3 copies of jQuery being loaded - two of them bypassing the WP API and one of them being loaded direct from your theme.

I believe the other culprit may be some login plugin you are using but I can't say for sure.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Joan Alamo Vallejo
Member
Free Members
Offline
Apr 29, 2012 - 4:05 pm

If I add this to the functions.php as Mr Papa said

<?php
function my_scripts_method() {
    wp_enqueue_script( 'jquery' );
}    
 
add_action('wp_enqueue_scripts', 'my_scripts_method');
?>
and if I comment the call to my theme's jquery.min.js, the slide on my homepage stops working and it didn't fix the issues on the forum
I understand there should be only one jquery loaded but I don't know which one to keep
Avatar
Joan Alamo Vallejo
Member
Free Members
Offline
Apr 29, 2012 - 4:43 pm

I don't know if it's related or just got lucky but I forgot to call wp_footer() and now it seems to be working

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Apr 29, 2012 - 6:25 pm

yup, that would cause it...  good find...  hate when themes dont follow the wp standards! wink

Avatar
Joan Alamo Vallejo
Member
Free Members
Offline
Apr 30, 2012 - 12:56 am

I built the theme from a simple html, I hope I haven't missed anything more

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Apr 30, 2012 - 4:47 am

Just shout if anything else doesn't appear to work as it should and we will try and help.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626