Forum Moderators: open

Message Too Old, No Replies

Mixed Content error in Joomla

Need to remove non-existant CSS

         

abrodski

1:12 am on Jul 28, 2019 (gmt 0)

10+ Year Member



Hello!
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:

<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!)

[edited by: not2easy at 1:51 am (utc) on Jul 28, 2019]
[edit reason] ToS/Charter: No Links Please [/edit]

abrodski

12:27 pm on Jul 28, 2019 (gmt 0)

10+ Year Member



UPDATE
I created a file called style.css and placed it in a CSS folder of my current template and it solved the issue! I actually created that CSS file inside backend of Joomla in its “Template Manager - New File” section. The problem is solved!

not2easy

12:49 pm on Jul 28, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It appeared to be a file in the root folder that was missing part of its path. That was a sensible way to resolve it if you could not edit the link to
<link rel="stylesheet" href="css:/style.css" /> 


Wen you view the files via FTP can you see the "style.css" file in the root directory? I don't use Joomla so there may be a different directory where a template might be calling its files from. Overall it would be better to find the actual file and replace your new file with the original in order to benefit from theme-specific css.

abrodski

5:33 pm on Jul 28, 2019 (gmt 0)

10+ Year Member



In my particular case, the template calls its files from templates/name_of_a_template/css directory (not root!)
In any case, in root folder there's no style.css file. Nor there WAS such a file in that directory I mentioned in a previous sentence. Right now there's a file there that I myself created earlier today to stop that Mixed Content error.