Mixed Content - HTTPS / jQuery issue

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 3:25 pm

Hello

I am working on a clients site. There is a Mixed Content error showing up regarding jquery.min.js.
Mixed Content: The page at 'https://www.usacargotrailersales.com/' was loaded over HTTPS, but requested an insecure script 'http://ajax.googleapis.com/ajax/libs/jq ... ery.min.js'. This request has been blocked; the content must be served over HTTPS.
I am looking at the joomla files (via ftp) and it's not making sense to me where the above is being called.

I'm almost 100% certain what I need to modify is in here:

Code: Select all

<jdoc:include type="head" />
But it's been a while and I'm not very familiar with how Joomla works.

Any help would be much appreciated! Thanks! ;D

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 3:39 pm

Hi,
I think because you are using https on the website it means that you need to change the 'http://ajax.googleapis.com/ajax/libs/jq ... ery.min.js' url address to 'https://ajax.googleapis.com/ajax/libs/j ... ery.min.js' (just change http:// to https://.

Here is the source code of your Home page

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
  <head>
  <meta name="viewport" content="width=device-width, user-scalable=no">
   
    <!-- The following JDOC Head tag loads all the header and meta information from your site config and content. -->
      <base href="https://www.usacargotrailersales.com/" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="description" content="Choose the right enclosed cargo trailer and buy direct from us where you can even create your own custom trailer that suits your hauling needs!" />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>USA Cargo Trailer | Enclosed Cargo Trailer Sales | USA Cargo Trailer Sales</title>
  <link href="/templates/atomic/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link rel="stylesheet" href="https://www.usacargotrailersales.com/modules/mod_ext_superfish_menu/assets/css/superfish.css" type="text/css" />
  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/media/system/js/caption.js" type="text/javascript"></script>
  <script type="text/javascript">
window.addEvent('load', function() {
				new JCaption('img.caption');
			});
  </script>
  <script type = "text/javascript" src ="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script type = "text/javascript" src = "https://www.usacargotrailersales.com/modules/mod_ext_superfish_menu/assets/js/hoverIntent.js"></script>
  <script type = "text/javascript" src = "https://www.usacargotrailersales.com/modules/mod_ext_superfish_menu/assets/js/superfish.js"></script>
  <script type = "text/javascript">if (jQuery) jQuery.noConflict();</script>


    <!-- The following line loads the template CSS file located in the template folder. -->
    <link rel="stylesheet" href="/templates/atomic/css/template.css" type="text/css" />
    <link rel="stylesheet" href="/templates/atomic/css/custom.css" type="text/css" />

    <!-- The following line loads the template JavaScript file located in the template folder. It's blank by default. -->
    <script type="text/javascript" src="/templates/atomic/js/template.js"></script>
  <script type="text/javascript" src="/templates/atomic/js/custom.js"></script>
   
    <!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PM89TF8');</script>
<!-- End Google Tag Manager -->
    <meta name="google-site-verification" content="wovUvClkBY_YAnpoVt_6wgoe4Pcqvf3jTpt4FYjAwGU" /> 
    
 
  
    
  </head>
  <body>

kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Re: Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 3:52 pm

Yeah, that's the problem, I'm unable to find that URL anywhere in the code. Do you have any suggestions what file I might find it in? I checked index.php, there aren't any header or footer includes... I did a search in the folder of /atomic/ (the template folder.)

Thanks

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 4:09 pm

I think it depends on the extension that calls that script?

See this post here viewtopic.php?t=651225

Try turning off modules & plugins to see if you can find which extension is causing the problem. The extension developer should use https: for the call to the script, but if you can find it you can change the code.
Last edited by yaanimai on Wed Feb 07, 2018 4:19 pm, edited 1 time in total.

kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Re: Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 4:18 pm

yaanimai - strange, i don't have a jui folder... here's what i'm looking at: (see attached)
Screen Shot 2018-02-07 at 10.17.55 AM.png
You do not have the required permissions to view the files attached to this post.

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 4:20 pm

kolbaba, I had one but the url was not in the js file (so I removed that post). You need to find the extension that is calling that script.

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 4:27 pm

Here is another tip to search your site files to find references to ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js file using the shell command. If you don't know how to use that contact your hosting tech support & ask them how to search your site files to find references to that file. After you find it change http to https & contact the developer & ask them to change it.

https://webcache.googleusercontent.com/ ... clnk&gl=us

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 4:34 pm

Which version of Joomla are you using?

Have you tried forcing SSL on the entire site? - Global Configuration>Server>Force HTTPS>Entire Site

kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Re: Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 4:37 pm

just tried the force https. doesn't seem to fix the issue.

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 4:45 pm

You need to find the source of the call to that file. It will be in one of the extensions you installed. Disable the plugins & modules one by one until you find it. Turn off caching & clear your browser cache to test for the error after turning off each plugin & module. Or you can use the shell command to search the site file for the http://ajax.googleapis.com string or ask your hosting provider to help you with that.

kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Re: Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 4:52 pm

Thanks yaaniai will try that!

kolbaba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Feb 07, 2018 3:20 pm

Re: Mixed Content - HTTPS / jQuery issue

Post by kolbaba » Wed Feb 07, 2018 5:02 pm

Thanks again Yaaniai, I found the problematic urls by doing a search in the modules dir. Turns out the culprit was superfish menu!

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Mixed Content - HTTPS / jQuery issue

Post by yaanimai » Wed Feb 07, 2018 6:27 pm

Awesome! So glad you were able to fix your problem. I hope the Superfish menu developers fix the url in their extension to save other users the headache you went through!


Post Reply

Return to “General Questions/New to Joomla! 3.x”