Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Moderator tools and Link to Forum permission
Avatar
Dan
Albany, NY
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2012 - 3:09 pm

Any chance you can actually copy/paste the 2 types of jQuery you're finding in there so we're on the same page, and so I can really hunt down the culprit

I've got on line 32: 

<script type='text/javascript' src='http://lootpalace.com/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 12, 2012 - 3:25 pm

Well the googleapi one has gone (?) so there are now just two being loaded from WP. That one above should not call the script directly but should use the wp_enqueue_script method.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dan
Albany, NY
Member
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2012 - 3:35 pm

Yellow Swordfish said
Well the googleapi one has gone (?) so there are now just two being loaded from WP. That one above should not call the script directly but should use the wp_enqueue_script method.

Yep, I was able to delete the call to Google's API. It was in header.php. What's the 2nd jquery being loaded from WordPress?

 

My theme uses wp_enqueue_script I believe, this is in my theme's function.php file:

function aero_theme_scripts() {

wp_enqueue_script('jquery');
wp_enqueue_script('modernizr', get_template_directory_uri() . '/javascripts/modernizr.js', false, '2.3.5');
wp_enqueue_script('superfish', get_template_directory_uri() . '/javascripts/superfish.js', false, '1.4.8');
wp_enqueue_script('cssfx', get_template_directory_uri() . '/javascripts/cssfx.js', false, '0.9.3');
wp_enqueue_script('plugins', get_template_directory_uri() . '/javascripts/plugins.js', false, THEMEVERSION);
wp_enqueue_script('custom', get_template_directory_uri() . '/javascripts/scripts.js', false, THEMEVERSION);

/* If is contact page */
if ( is_page_template( 'template-contact.php' ) ) {
wp_enqueue_script('validate-contact-form', get_template_directory_uri() . '/javascripts/validate-contact-form.js', false, THEMEVERSION);
}

/* If is single and comment is allowed */
if ( is_singular() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

}

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 12, 2012 - 8:23 pm

so that means its likely coming from another wp plugin... can you check those?  or temp deactivate them and see if it goes away and then reactivate one by one till it comes back...

Avatar
Fabio Lena
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 13, 2012 - 4:21 am

Could kindly ask to check conflict to my site too? 

http://www.riseofgames.com/forum

I luckly saw that the moderator toobox works after I show my profile. eek

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 13, 2012 - 5:09 am

Well you only have the single copy of jQuery being loaded but it IS an older copy and it IS being loaded improperly by your WP theme. It should be changed. However the site is throwing a script error regardless of that in the themes 'custom.js' file - but let's fix the jQuery load first.

I am guess it is being loaded in the themes functions.php file so take a look to see if your can see a wp_enqueue_script() call in there... Let us know what you find.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dan
Albany, NY
Member
Free Members
sp_UserOfflineSmall Offline
Sep 13, 2012 - 6:59 am

Mr Papa said
so that means its likely coming from another wp plugin... can you check those?  or temp deactivate them and see if it goes away and then reactivate one by one till it comes back...

I've gone through them and have had no luck with this yet.  Maybe there's something going on in my actual theme.  Can you see anything in my source code that is the conflicting issue? I can take care of the issue if I know what line of code(s) are the cause of the problem.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 13, 2012 - 9:46 am

I can't check your source code...!

The easiest way to check for a plugin conflict is to

  1. deactivate them one at a time.
  2. clear the browser cache.
  3. run a page and check the source code being generated looking for loaded copies of jQuery.js (or might be some thing like jQuery.min.js) - you are wanrting just one.
  4. See if the problem is resolved
  5. repeat as necessary...

Or - install a plugin called 'Plugin Organiser' which we have been hearing about lately from another user - and specify which WP plugins should be loaded on the forum pages. This is simpler and quicker of course but does mean you need to install the organiser plugin first.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dan
Albany, NY
Member
Free Members
sp_UserOfflineSmall Offline
Sep 13, 2012 - 11:51 am

Just letting you know that I fixed the problem. Here's some of what went on to get a solution:

I had a clone of the site on my dev server.  I did some plugin/theme swapping, found out my theme was the only problem.  All plugins activated + any other theme = worked fine. This includes the Toolbox and Profile area.

I went through all the non-topical WordPress theme files (ie I ignored header.php, footer.php, etc) and started removing anything from my theme I know I wasn't using - custom post types, custom slider/photo gallery scripts/CSS, etc...

Not exactly sure which one was the culprit, but it was definitely caused due to advanced functions built in with my theme.

Thanks for the support, I've only got good things to say about your product and team.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 13, 2012 - 11:58 am

Wow - that's curious is it not. That means the theme was loading jQuery twice which is bizarre - especially as one way was correct and one was not!

And thank you for the thoughtful words.

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: 17366
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626