Support Forum

Images in posts not enlarging

66 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

You most probably have a JavaScript conflict – your wp theme or another plugin – which needs to be fixed. This codex article explains what this means and what to look for:

http://codex.simple-press.com/codex/faq/troubleshooting/what-is-this-jquery-conflict/

If this is the culprit then it is usually a fairly simple matter to track it down

MA max99
max99
Member

Thanks for replying. That’s frustrating, I see hundreds of .js files. I have absolutely no clue what to do. You said it was easy to fix, but the document says I need to contact theme developers?

There’s no other way to have folks upload files? Right now that feature is completely useless.

YS Yellow Swordfish
Yellow Swordfish
Member

Well you didn’t look very carefully. The very first js file to be loaded on your site is wrong and is loaded by your theme. It is loading an ancient version of jQuery and forcing it to be loaded instead of the WordPress APi version. But even worse you have a plugin that is forcing a second copy – different version this time – to be loaded from the Google CDN.

These will cause all kinds of issues and not just with SP but with any plugin that utilises jQuury correctly.

MA max99
max99
Member

Thanks for pointing that out, but please also understand that we’re in a support forum here for a reason. When I see 300+ .js files it may not be so obvious to me what/if anything’s wrong :)

I see what you’re saying now. So in my WordPress install I should just remove those lines of code for both the theme and google cdn version?

 

Thanks!

MA max99
max99
Member

I’ve searched through every plugin, not even sure if this is still an issue, can someone check my source code again and let me know if I still need to get rid of some code? Thanks

YS Yellow Swordfish
Yellow Swordfish
Member

You actually have about 48 JavaScript files being loaded – nowhere near 300 – and the codex artucle did actually try and be quite explicit about what to look for. There always seems little point in my sitting here typing up the same information as in the article.

And yes – you do still have the initial jQuery problem and I see you also actually have the same issue with the jQuery UI library – also as discussed in the codex page.

It is not a matter of removing the loading of the files and it is certainly not a matter of utilising the google cdn versions. These are to be avoided – again as the codex page makes clear. The only way to safely load jQuery and jQuery libraries is to load the ‘approved’ and proper versions supplied with WordPress.

This means finding which components are responsible for the bad loads and correcting the code. either manually correcting with our help or requesting that the original authors correct their own code. One of your issues is probably with your WP theme. Another is going to be in one of the other plugins you are running.

An additional problems with these sort of loading errors is that they will stop all jQuery code from functioning. So it is hard to tell if there are any other issues causing conflicts until the initial load issues are resolved and the proper and correct libraries are being used.

 

MA max99
max99
Member

Ok, then I apologize for not fully understanding what was said in the article or what you’re saying above. I’m really not sure what else to say. I read the article and didn’t know what to do. I’m still confused by the tone, I’m paying for support, am I not? Again, sorry I don’t follow the article 100%.

So I thought removing the old theme based jquery call was the right thing to do? I also removed the google libraries plugin. What else am I looking for? I re-read the article and just don’t know what I’m looking for. 

 

 

 

MP Mr Papa
Mr Papa
Member

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…

MA max99
max99
Member

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. 

MA max99
max99
Member

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’);
}

MP Mr Papa
Mr Papa
Member

rather than just remove it, you probably still need it loaded – just the wp way…

wp_enqueue_script(‘jquery’);

for example…

MA max99
max99
Member

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