0

In some browsers I get a Mixed Content error because there’s a call for style.css file and that file will be supposedly loading via HTTP protocol and that’s what some browsers try to prevent. It’s this line that triggers the error. And on line 46 in a source code of main page you see this:

$this['asset']->addFile('css', 'css:style.css');

<link rel="stylesheet" href="css:style.css" />

I assume that something within a template attempts to load that insecure CSS file (which I’m not even sure that exists in my Joomla tree). I don’t know where to find the source of this call and how to stop it. POSSIBLY it’s in templates/jp-x2/layouts/template.config.php file on line 103 there’s this:

$this['asset']->addFile('css', 'css:style.css');

So MAYBE it’s the source of the trouble (or maybe not!) Here how it looks like in Chromium browser (under Ubuntu 16.04) after pressing F12 enter image description here

4
  • This is likely an issue with your template. Try updating the template to the latest version or contact the template developer to fix this. Commented Jul 27, 2019 at 6:47
  • If Neil's recommended template update doesn't do the trick, see if you can find where the css file path is being generated (beyond addFile()). For anyone not sure what this issue is referring to or want to read some relevant advice: joomla.stackexchange.com/q/19255/12352 , joomla.stackexchange.com/q/19375/12352 ,joomla.stackexchange.com/q/14155/12352 , joomshaper.com/blog/how-to-do-ssl-check-in-joomla-3-7 , forum.joomla.org/viewtopic.php?t=862848 , forum.joomla.org/viewtopic.php?t=951594 Commented Jul 27, 2019 at 8:06
  • I contacted the template developer. Waiting for their reply.
    – papakota
    Commented Jul 28, 2019 at 1:43
  • You should post your own answer that describes the steps you took after the template developer responded to you. There is nothing wrong with answering your own question then accepting your answer. You will be able to upvote Neil's answer as "helpful" once you have a few more rep points. You should not describe your solution as a comment - solutions should be posted as answers. This is not a "forum thread" to be closed -- Stack Exchange pages have a different format. Accepting Neil's answer doesn't make sense if you didn't do one of the things he suggested. Commented Jul 28, 2019 at 20:42

1 Answer 1

0

If the template developer can't fix this then there are some Joomla extensions that can help. For example:

jQuery Easy (free or paid version) can add or remove scripts and stylesheets so you could remove the http version of the stylesheet and add the https version.

Easy Https (paid) can change all http links to https links.

ReReplacer (free or paid version) can replace anything in your Joomla site’s output with whatever you want so you could replace a specific http url with the https version or all http links with https if you want.

Edit:

As per comments, creating style.css in the /templates/[template-name]/css folder seems to have fixed the problem.

7
  • I added some more info into my original post here above... to clarify things more.
    – papakota
    Commented Jul 28, 2019 at 1:41
  • What template are you using? Commented Jul 28, 2019 at 4:23
  • It's JP-X2 by Joomlaplates, actually. It's like 5 years old already. It's WARP6 template with widgetkit and I have the latest version of K2 installed on my site too. As a matter of fact, I've just got a reply from the template dev. He advised me to create an empty css/custom.css and the issue will be done. Now the question is how to create that so that it would be served over HTTPS.
    – papakota
    Commented Jul 28, 2019 at 10:54
  • Also is it OK that I would be creating a file with a name "Custom.css" whereas the call is for "Style.css"?
    – papakota
    Commented Jul 28, 2019 at 11:05
  • 1
    OK, well done! I suggest you add the solution as an answer and accept the answer by clicking on the tick under the upvote/downvote buttons. Commented Jul 28, 2019 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.