Custom font display breaks without "www" in URL
Advanced and professional portal news Joomla template with community features and various content display layouts.
- GK User
- Fri Jan 02, 2015 4:23 pm
Hi -
The custom typography styles with the GK TWN II template on my site appear to work on an inconsistent basis. I'm referring to the styles of the Main Menu and the article titles. Sometimes they display in the custom font, at other times they are just in Arial. I'm viewing it on the same desktop system, Firefox 34.0.5, Mac OSX 10.6.8, Joomla 2.5.28.
Through the method described below, I've determined that it has to do with a missing "www" in the URL entered in the location field. I could use some help in resolving it proper so it always displays in the custom font, no matter the URL format.
---
Today I went to the front-end site directly and it was displaying in Arial. Then I logged into the admin area, and viewed the front-end site and it was in the custom font. Strange.
I compared the source code of the bad font page against the good font page, and aside from the only notable difference, aside from what I assume are a couple of hidden input field session cookie values, are in the following opensearch link tag:
The difference between the good and bad is that in the link URL, the bad font page does not have a "www." in the URL. And sure enough, if I manually type in the "www" into the bad page URL and load it, the fonts display in the proper custom font.
I know I can create a redirect in my htaccess file forcing the "www" into the URL, but I'd like to fix the problem so that it works in both URLs, with or without the "www.
Any help is appreciated.
Railer
The custom typography styles with the GK TWN II template on my site appear to work on an inconsistent basis. I'm referring to the styles of the Main Menu and the article titles. Sometimes they display in the custom font, at other times they are just in Arial. I'm viewing it on the same desktop system, Firefox 34.0.5, Mac OSX 10.6.8, Joomla 2.5.28.
Through the method described below, I've determined that it has to do with a missing "www" in the URL entered in the location field. I could use some help in resolving it proper so it always displays in the custom font, no matter the URL format.
---
Today I went to the front-end site directly and it was displaying in Arial. Then I logged into the admin area, and viewed the front-end site and it was in the custom font. Strange.
I compared the source code of the bad font page against the good font page, and aside from the only notable difference, aside from what I assume are a couple of hidden input field session cookie values, are in the following opensearch link tag:
- Code: Select all
<link href="http://www.mysite.com/staging/index.php?option=com_search&format=opensearch" rel="search" title="Search My Site" type="application/opensearchdescription+xml" />
The difference between the good and bad is that in the link URL, the bad font page does not have a "www." in the URL. And sure enough, if I manually type in the "www" into the bad page URL and load it, the fonts display in the proper custom font.
I know I can create a redirect in my htaccess file forcing the "www" into the URL, but I'd like to fix the problem so that it works in both URLs, with or without the "www.
Any help is appreciated.
Railer
-
- Gold Boarder
- GK User
- Fri Jan 02, 2015 6:29 pm
Could you please post an url to your site?
-
- Moderator
- GK User
- Fri Jan 02, 2015 7:44 pm
Hi Cyberek,
I've PM'd the development site URL to you.
Looking forward to your reply.
Thanks,
Railer
I've PM'd the development site URL to you.
Looking forward to your reply.
Thanks,
Railer
-
- Gold Boarder
- GK User
- Sat Jan 03, 2015 11:03 am
It looks like there is an error in Joomla configuration. You use site without www. at the beginning but some scripts that are loading with absolute url (http://...) add www. at the beginning.
I would check 2 places:
1. Joomla configuration file placed in the root of the site
2. Joomla configuration section in admin panel.
Probably you did install using www.mysite.com and later switched to mysite.com but didn't fixed default url.
I would check 2 places:
1. Joomla configuration file placed in the root of the site
2. Joomla configuration section in admin panel.
Probably you did install using www.mysite.com and later switched to mysite.com but didn't fixed default url.
-
- Moderator
- GK User
- Mon Jan 05, 2015 9:34 pm
If you are referring to the public $live_site = 'http://www.mysite.com'; setting in the configuration.php file, it does have the "www" in the URL. I don't know of any place to indicate the default URL in the Admininstrator/Global Configuration?
I don't yet have the .htaccess file or SEF URLs or URL rewriting active since this is a development site.
I'm actually in the middle of solving another problem with this site which came about after doing the "mini" migration from 2.5.28 to 3.3.6. I'm posting it as a separate thread.
Unless you have any other thoughts, I may end up using a 301 redirect in the .htaccess file to force the "www" into the URL.
Ideas?
I don't yet have the .htaccess file or SEF URLs or URL rewriting active since this is a development site.
I'm actually in the middle of solving another problem with this site which came about after doing the "mini" migration from 2.5.28 to 3.3.6. I'm posting it as a separate thread.
Unless you have any other thoughts, I may end up using a 301 redirect in the .htaccess file to force the "www" into the URL.
Ideas?
-
- Gold Boarder
- GK User
- Tue Jan 06, 2015 10:37 am
Please change $live_site value to non "www." one and check if that helps.
-
- Moderator
- GK User
- Wed Feb 18, 2015 6:22 pm
Cyberek wrote:Please change $live_site value to non "www." one and check if that helps.
Hi Cyberek,
Thanks. Project got put on hold for a while.
I tried what you suggested (no "www" in the parameter) and it did not fix the problem.
The custom fonts only work if I enter the URL as defined in the $live_site parameter in the browser.
If I use "http://mysite.com/staging" as the $live_site parameter, entering "http://www.mysite.com/staging" in a browser does not show the custom fonts.
If I change it the other way around, so that the $live_site parameter is "http://www.mysite.com", entering "http://mysite.com/staging" in a browser without the '"www" does not show the custom fonts.
Why doesn't it just work in both versions of the URL?
This is crazy. Is this a template bug?
Please help.
-
- Gold Boarder
- GK User
- Fri Feb 20, 2015 3:31 pm
No, it is the way browser works. It doesn't allow to load files from different domain and yes, www.yourdomain.com is different from yourdomain.com. You might try to setup allow-origin headers in htaccess or vhosts of your server, but this is way beyond this forum support.
-
- Moderator
8 posts
• Page 1 of 1