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
Images in posts not enlarging
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 3:58 pm

yes, you are paying for simple press support...  the issue lies with your wp theme...  you obviously cannot expect us to fix your wp theme for you...  but, that said, we are trying to help you fix your wp theme - happy to do that...  but you have to come along for the ride too... ;)

the codex article tries to walk you through it...

The only jquery library that should be loaded is from wp itself.. loading external jquery librarry from googleapis or theme itself, violates the standards of wp and is a recipe for problems...

somewhere, wp theme or other plugin, you are loading:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=3.5.1'></script>

that is incorrect... if you can find where it is being loaded, we can help fix it...

first, try switching to the default wp theme... do things work?  is jquery loaded right? if so, it probably lies in the theme...

if not, then disable all your other wp plugins... does it work now?  yes, then start enabling one by one until it breaks... then we know where to look...

Avatar
max99
Member
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 4:28 pm

Totally with you and thanks for being patient. I just had a hard time understanding what was being asked.

I did figure out to look for the ajax.googleapis.com... script and went through every plugin, theme file with no luck. Was super manual but couldn't find anything. The theme portion (which was 1.5.2) I deleted. So it's just down to the google script I guess?

I'll start disabling plugins now. Thanks again and I'll report back. 

Avatar
max99
Member
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 4:39 pm

Ok, found the plugin. Hybrid-Connect - a premium plugin I recently installed. I guess I'll be looking for places where they call in the google jquery and remove it?

 

Edit:

 

I see these two pieces:

// jQuery
wp_deregister_script('jquery');
wp_register_script('jquery', HYBRIDCONNECT_JS_PATH . '/jquery-1.7.2.min.js?v=' . $hc_version);
wp_enqueue_script('jquery');

// Licensing
wp_enqueue_script('hcBackendAdminLicense', HYBRIDCONNECT_JS_PATH_ADMIN_LICENSE . '?v=' . $hc_version);

// jQuery UI - need to load jquery UI via CDN so deregister all wordpress jquery ui scripts that may conflict
wp_enqueue_script('jqueryUI', $protocol . '//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js');
wp_enqueue_script('jqueryUIWidget', HYBRIDCONNECT_JS_PATH . '/jquery.ui.widget.js');
wp_enqueue_script('jqueryUICheckbox', HYBRIDCONNECT_JS_PATH . '/jquery.ui.checkbox.js');

 

and:

 

// handle problem themes. Some themes extend jQuery so loading a new version of jquery breaks the site.
if(wp_get_theme() == "Netix - Premium WordPress Landing Page" ||
is_plugin_active('slidedeck2-personal/slidedeck2.php') ||
is_plugin_active('slidedeck2/slidedeck2-lite.php') ||
is_plugin_active('slidedeck2-professional/slidedeck2-tier20.php') ||
is_plugin_active('slidedeck2-developer/slidedeck2-tier30.php')) {
wp_enqueue_script('jquery');
}
else {
wp_deregister_script('jquery');
wp_register_script('jquery', $protocol . '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
wp_enqueue_script('jquery');
}

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 5:16 pm

rather than just remove it, you probably still need it loaded - just the wp way...

wp_enqueue_script('jquery');

for example...

Avatar
max99
Member
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 7:48 pm

I'm  not sure what that means really. In the above code I pasted, there are two instances that show "'//ajax.googleapis.com/ajax/libs/jqueryui".

 

What should I do with those?

 

Thanks,
Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 8:50 pm

change them to

wp_enqueue_script('jquery-ui');

Avatar
max99
Member
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 9:16 pm

but the line wp_enqueue_script is already there?

 

should I change this:

wp_enqueue_script('jqueryUI', $protocol . '//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js');
wp_enqueue_script('jqueryUIWidget', HYBRIDCONNECT_JS_PATH . '/jquery.ui.widget.js');
wp_enqueue_script('jqueryUICheckbox', HYBRIDCONNECT_JS_PATH . '/jquery.ui.checkbox.js');

to: 

wp_enqueue_script('jquery-ui');
wp_enqueue_script('jqueryUIWidget', HYBRIDCONNECT_JS_PATH . '/jquery.ui.widget.js');
wp_enqueue_script('jqueryUICheckbox', HYBRIDCONNECT_JS_PATH . '/jquery.ui.checkbox.js');

 

AND

this:

else {
wp_deregister_script('jquery');
wp_register_script('jquery', $protocol . '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
wp_enqueue_script('jquery');
}

 

to:

else {
wp_deregister_script('jquery');
wp_enqueue_script('jquery');
wp_enqueue_script('jquery');
}

 

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 11:17 pm

No. not quite..  a bit more complex based on that...

change

wp_enqueue_script('jqueryUI', $protocol . '//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js');
wp_enqueue_script('jqueryUIWidget', HYBRIDCONNECT_JS_PATH . '/jquery.ui.widget.js');

to

wp_enqueue_script('jquery-ui');
wp_enqueue_script('jquery-ui-widget');

the other one, not sure there is enough info (might nee to see if statement)... but change

wp_deregister_script('jquery');
wp_register_script('jquery', $protocol . '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
wp_enqueue_script('jquery');

to just

wp_enqueue_script('jquery');

now this changes it everywhere...  this could affect your site elsewhere... you may need to only change if on forum page...  ie

if (sp_is_forumpage() {
   # do the change to stuff
} else {
   # do the original stuff
}

that way the changes are only taking place on the forum page...  using the wp jquery and jquery ui should obviously work everywhere, but cannot tell what the author may have done, modified or used...

 

Avatar
max99
Member
Free Members
sp_UserOfflineSmall Offline
May 27, 2013 - 11:37 pm

Thanks for adding more clarity. I made both changes (w/out the if stmt for now), and as expected that resulted in only one jquery being called (still version 1.8.2) from my site directly. But, it did not change anything re: the images on forum posts, I still get "javascript:null" with nothing happening when I click on an image.

Also, not sure if helpful, but during post preview, I could actually enlarge the image, just not in the final post.

 

Below is the entire code for the 2nd piece including if statement

 

function frontend_register_scripts() {

$protocol = 'http:';

if (!empty($_SERVER['HTTPS'])) {

$protocol = 'https:';

}

wp_register_style('hybridconnectreset', HYBRIDCONNECT_CSS_PATH_TEMPLATES . '/problem-with-post-edit-buttonc_reset.css');

wp_enqueue_style('hybridconnectreset');

// handle problem themes. Some themes extend jQuery so loading a new version of jquery breaks the site.

if(wp_get_theme() == "Netix - Premium WordPress Landing Page" ||

is_plugin_active('slidedeck2-personal/slidedeck2.php') ||

is_plugin_active('slidedeck2/slidedeck2-lite.php') ||

is_plugin_active('slidedeck2-professional/slidedeck2-tier20.php') ||

is_plugin_active('slidedeck2-developer/slidedeck2-tier30.php')) {

wp_enqueue_script('jquery');

}

else {

wp_deregister_script('jquery');

wp_register_script('jquery', $protocol . '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');

wp_enqueue_script('jquery');

}

}

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 28, 2013 - 12:38 am

that's not what I am seeing... I still see:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=3.5.1'></script>

on the forum pages...

looking a bit further it seems you are caching the forum pages.. you cannot do that since its dynamic in nature... so for w3tc, you need to disable it on the wp page the forum is on for ALL types of caching you are using...

and you need to make sure you CDN is not serving up a cached page either since every page is dynamic...  all forum content is displayed on that single wp page...

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625