Page 1 of 1

Font-Awesome icons not showing on first load, both with or without www..

Posted: Wed Nov 08, 2017 11:31 pm
by dexus
Hi all,
I have a fairly new install of opencart 3.0.2.0 and when the site loads for the first time in a browser, the search icon and other font-awesome stuff does not show. The search icon shows "fl" and other icons also do not show correctly.
I know this has been an issue for people before, and know some only get this error when not using "www" in front of the domain, but in my case it happens both with www and without.

The problem goes away on first refresh or press of the search button, and the icons show up normally for the rest of the session.. anyone have any ideas?

The site is http://samle.no or http://www.samle.no
The site is under development, so the maintenance mode is on, but the problems shows anyhow..

Best regards, Klaus - Norway.

Re: Font-Awesome icons not showing on first load, both with or without www..

Posted: Thu Nov 09, 2017 5:56 am
by Johnathan
You need to be browsing the same version of the site (www or non-www) that you've declared in the config.php files. The other version of the site will have issues like you're describing.

What you should do is redirect the version that's having an issue to the one that's declared in the config.php files, using htaccess. You can find directions on that by doing a web search for "htaccess redirect www non-www".

Re: Font-Awesome icons not showing on first load, both with or without www..

Posted: Thu Nov 09, 2017 11:45 am
by dexus
Thanks, I got the problem on both www and non-www urls, but figured out that both my http and https urls in config.php was configured to the https url. So doing a

Code: Select all

# force ssl
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
fixed the problem, and redirects any non-https url to a https one.. (Note this will only work if your http port is the default 80, if you use another port, you must put that in the RewriteCond statement.)