Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

favicon.ico error


valquiria23

Recommended Posts

Hello everyone.

When I inspect with Google Chrome my site in some pages (index.php and contact_us.php) I get one or all of the following errors.

Anyone know what can it be?

regards

Valqui


index.php:1 Access to Font at 'http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.woff2' from origin 'http://site.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://site.com' is therefore not allowed access.
index.php:1 Access to Font at 'http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.woff' from origin 'http://site.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://site.com' is therefore not allowed access.
index.php:1 Access to Font at 'http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.ttf' from origin 'http://site.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://site.com' is therefore not allowed access.
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

Where exactly is your favicon.ico file? By default, the browser will request it from the site / directory. Do you have any <meta> tags on the pages in question, specifying a different place? Or conversely, those pages are missing <meta> tags specifying some non-default place and/or name?

I don't think the three font errors have any influence on the favicon issue, but at some point you should deal with them.

Link to comment
Share on other sites

check the fonts exist in the said location, I know I had a missing regular.woff2 which I replaced.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

17 hours ago, valquiria23 said:

Anyone know what can it be?

It looks as if you are trying to get files from another site and they are refusing you access! following the link in your error takes you to a dead page and then to this site,

www.salesforce.com/products/ ?? only you will know why you are getting resources from this site. Are you using a CRM or other extension from these people?

 

Link to comment
Share on other sites

Hello everyone,

The files
http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.woff2
http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.woff
http://www.site.com/catalog/ext/bootstrap/fonts/glyphicons-halflings-regular.ttf'

Are exist in my folder http://www.site.com/catalog/ext/bootstrap/fonts/.

The favicon.ico file does not exist in all my site.

I do not install any favicon addons so I have no idea where these errors come from.

The strangest thing is that when I loading the site I do not see the first 3 errors, but when I scroll down they appear. Today all the four errors did not appear ( only the first 3 errors ) and that I did not make any changes to the site.

 

4 hours ago, JcMagpie said:

It looks as if you are trying to get files from another site and they are refusing you access! following the link in your error takes you to a dead page and then to this site,

www.salesforce.com/products/ ?? only you will know why you are getting resources from this site. Are you using a CRM or other extension from these people?

 

I do not know that site (www.salesforce.com) and I do not use a CRM, checking the HTML code of my site I do not find a reference to that site, I'm lost .....

Best regards

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

@valquiria23

1) The first three errors state "No 'Access-Control-Allow-Origin' header is present".  As I stated in my first post (and link) above, you need to put an 'Access-Control-Allow-Origin' statement in the .htaccess file in the root of your shop.

2) I am going to guess that the browser is trying to find a favicon in order to display it, and that error is just the browser saying it didn't find one. You don't need a favicon, so if you don't want one, just ignore that error.

M

Link to comment
Share on other sites

Every browser requests /favicon.ico, unless you have a meta tag to specify a different location or name. You will get a 404 logged if you don't have one. Every site should have a favicon so that it looks good, and you don't get these error messages logged. They're very easy to create. Likewise you should have a /robots.txt so that the constant requests for it won't fill up your error log.

Link to comment
Share on other sites

Dear Malcolm @ArtcoInc

Thank you very much for your prompt response. 

I Just add to my .htaccess the following code:

<FilesMatch "\. (Ttf | otf | eot | woff | woff2) $">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</ IfModule>
</ FilesMatch>

and the problem disappeared !! Thank you very much again for your advice!

I will try to create a favicon.ico as @MrPhil says. What do I have to put in the file /robots.txt?

Best regards.

Valqui

 

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

You can specify the favicon in the head section of all pages i.e template_top.php

<link rel=icon href=favicon.png sizes="16x16" type="image/png">

I don't know what the reference in robots.txt would be, but you only need to do one or the other.

Link to comment
Share on other sites

9 hours ago, valquiria23 said:

I do not know that site (www.salesforce.com) and I do not use a CRM, checking the HTML code of my site I do not find a reference to that site, I'm lost ...

So that's strange as when I go to the links provided this is what I get,(see below) are you using a shared server? or are you using a redirecting service? clearly something is wrong with the set up as it keeps send people to UltraDNS Redirection Service.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<frameset rows="100%,*" frameborder="no" border="0">
<frame src="https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true" scrolling="auto">
<noframes>
<body><table border="2" width="50%">
<tr><td>Your browser does not appear to support frames. However, you can still view the content you requested by clicking the link below.</td></tr>
<tr><td><a href="https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true">https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true</a></p></td></tr>
</table></body>
</noframes>
</frameset>
</html>

Salesforce .com appear to own www.site.com and are redirecting it to there main site. They also provide hosting for e-commerce which is why I thought you may be using them.

all very confusing? 

image.png.ed3bd28a1129e97ecb32d1ec3b73baa4.png

 

Link to comment
Share on other sites

Oh and also these days favicons are more complicated than just having one file in your root! Hence the addon. Browsers now expect to be able to serve the right size favacon for each device, also they are used differently by each device and high resolution displays require better quality favacons.

This is all taken care of by the add-on. Nice and simple so yes I recommend using the add-on rather that editing core files. :biggrin:

image.thumb.png.d72fbe83cbeea11811b5bb7fe5cf4cf5.png

 

Link to comment
Share on other sites

10 hours ago, valquiria23 said:

I do not know that site (www.salesforce.com)

:smile:

OK sorry  Valqui , I was just making a point that it’s best to post as a none active link when your just wanting to show the path of your shop without giving the actual link,

www.site.com belongs to someone as does xyz.com,  sorry just my warped sense of humor.

 

Link to comment
Share on other sites

15 hours ago, Hotclutch said:

You can specify the favicon in the head section of all pages i.e template_top.php


<link rel=icon href=favicon.png sizes="16x16" type="image/png">

I don't know what the reference in robots.txt would be, but you only need to do one or the other.

That is necessary only if your favicon file is not named favicon.ico, or is not in root. A browser will look in /favicon.ico by default. Note that ".ico" is a specific image format.

I don't know what @Hotclutch meant by "do one or the other". favicon and robots.txt are two completely independent things. A robots.txt doesn't need more than a comment in it, but you can add all sorts of other useful things, including a pointer to your sitemap. Google "robots.txt" for tutorials on it.

Link to comment
Share on other sites

favicon.ico file are different depending on which operating system your customer is using! Windows favicon.ico are not the same format as apple.ico or android. Hence the need to have multiple file so you can serve the correct one for each operating system and device. You also need favicon.png files.

To serve all the devices currently being used you need about 19-20 files all of different sizes and quality.

You only use one file in root if you don't care about marketing your site or businesses properly. Its hard out there as it is you should take advantage of every small simple thing that makes your site easier for the browser to serve to devices.

Oh and just to be clear a favicon can be a png, gif or ico all 3 are acceptable.

If you really want to push the boat out you can even have a animated gif like this  :rolleyes:

 

Link to comment
Share on other sites

11 hours ago, MrPhil said:

That is necessary only if your favicon file is not named favicon.ico, or is not in root. A browser will look in /favicon.ico by default. Note that ".ico" is a specific image format.

I don't know what @Hotclutch meant by "do one or the other". favicon and robots.txt are two completely independent things. A robots.txt doesn't need more than a comment in it, but you can add all sorts of other useful things, including a pointer to your sitemap. Google "robots.txt" for tutorials on it.

I meant specify in the head section of the page OR robots.txt - do one or the other.

Link to comment
Share on other sites

20 hours ago, JcMagpie said:

So that's strange as when I go to the links provided this is what I get,(see below) are you using a shared server? or are you using a redirecting service? clearly something is wrong with the set up as it keeps send people to UltraDNS Redirection Service.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<frameset rows="100%,*" frameborder="no" border="0">
<frame src="https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true" scrolling="auto">
<noframes>
<body><table border="2" width="50%">
<tr><td>Your browser does not appear to support frames. However, you can still view the content you requested by clicking the link below.</td></tr>
<tr><td><a href="https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true">https://www.salesforce.com/platform/overview/?d=70130000000liBh&internal=true</a></p></td></tr>
</table></body>
</noframes>
</frameset>
</html>

Salesforce .com appear to own www.site.com and are redirecting it to there main site. They also provide hosting for e-commerce which is why I thought you may be using them.

all very confusing? 

image.png.ed3bd28a1129e97ecb32d1ec3b73baa4.png

Dear Zahid @JcMagpie, Sorry for the confusion www.site.com is not my real test site. I put it as an example (it did not turn out very well).

Also, thank you very much for taking your time and answering me. :smile:

Best regards

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

13 hours ago, MrPhil said:

I don't know what @Hotclutch meant by "do one or the other". favicon and robots.txt are two completely independent things. A robots.txt doesn't need more than a comment in it, but you can add all sorts of other useful things, including a pointer to your sitemap. Google "robots.txt" for tutorials on it.

Dear @MrPhil 

Forgive my ignorance, what comment about favicon.ico should I put in the robots.txt file?

Best regards.

Valqui

:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Link to comment
Share on other sites

Not a "comment about favicon.ico" in robots.txt, but just a comment, like

# this is a dummy robots.txt. I'll put real directives in it later

The idea is it's a placeholder, to have a robots.txt file that search engines can pull in (even though it does nothing, yet) and so stops the 404 errors logged every time a search engine requests /robots.txt. Putting together a real robots.txt is pretty simple, so you can go ahead and start on it right away if you wish.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...