Icons in Simplex Theme appear and disappear depending on URL

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
maehschaf
New Member
New Member
Posts: 9
Joined: Fri Jan 27, 2017 2:53 pm

Icons in Simplex Theme appear and disappear depending on URL

Post by maehschaf »

Hi. I'm running CMS Made Simple 2.1.6. I'm using PHP 5.6.

CMSMS or the Simplex Theme seem to build the URL differently - sometimes they access the font files as http://www.xyz/uploads/... and sometimes they acccess the same files as http://xyz/uploads/...

All Icons (Social Media, The "back-to-top" arrow) are broken.

You can see the difference i.E. here:

https://cms.dejongmultimedia.nl/
and
https://www.cms.dejongmultimedia.nl/

My Firefox Console says

"17:30:38.696 Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf http://www.xyz/uploads/simplex/fonts/simplex.woff. (Grund: CORS-Kopfzeile 'Access-Control-Allow-Origin' fehlt). 1 (unbekannt)"

and

"17:30:38.762 downloadable font: download failed (font-family: "simplex" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: http://www.xyz/uploads/simplex/fonts/simplex.ttf 1 stylesheet_combined_993f140a3899e16d2e94da37f7c1f057.css:4:12"

which means: blocked because of cross-site-access. My single domain is regarded as two different ones.

What I tried to do:

1. Search: There is one (spanisch) similar case in the forum. But the solution (he somehow hard coded) is not for me.

2. Clear the cache. Changes nothing.

3. I configured root_url and uploads_url in config.php. So now I can switch and use one or the other URL. Using both makes one or the other have broken icons.

4. Find other pages. There are some default, naked installations. I tried to add www or not and found out: Everywhere the same.

5. Tried to enable cross-origin-access in .htaccess in different ways - without any success.

6. Tried to forward the www subdomain to the "Root"-Domain and the other way around. No success because "Default"-Domains cannot be forwarded on my host.

Why can the Theme/CMSMS not put the URL together always in the same way?

Please give me advice!
Thanks in advance,
Mae
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Icons in Simplex Theme appear and disappear depending on

Post by Rolf »

Follow tutorial https://www.cmscanbesimple.org/blog/set ... ade-simple

And check all CDN urls that they have https:// in the url like described in #1
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
maehschaf
New Member
New Member
Posts: 9
Joined: Fri Jan 27, 2017 2:53 pm

Re: Icons in Simplex Theme appear and disappear depending on

Post by maehschaf »

I do not want to be misunderstood - it is not about ssl. That page was just an example. I just reinstalled a clean database:

http://www.linten.eu

If I visit

http://linten.eu all icons are broken.

So I suppose configuring ssl/tls/https would not help.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Icons in Simplex Theme appear and disappear depending on

Post by velden »

The message is pretty clear.

'www.example.com' and 'example.com' are two different domains.

Better force one domain by using some rewrite rule.

https://www.cmscanbesimple.org/blog/set ... ade-simple describes such a rule to force www...
Locked

Return to “Layout and Design (CSS & HTML)”