Glyphicons don't work in BS3 downloaded through Bower #9940

Closed
rikiless opened this Issue Aug 20, 2013 · 9 comments

Comments

Projects
None yet
5 participants
@rikiless

As specified in variables.less:

@icon-font-path:          "../fonts/";

It throws error in Chrome: GET http://herpy.derpy.local/assets/fonts/glyphicons-halflings-regular.woff 500 (Internal Server Error)

Solution working with bower (not tested when using customizer etc):

@icon-font-path:          "../bootstrap/fonts/";

@rikiless rikiless closed this Oct 1, 2013

@gaboAcosta

This comment has been minimized.

Show comment
Hide comment
@gaboAcosta

gaboAcosta Nov 1, 2013

¿How is this closed if I'm seeing this error still today?

¿How is this closed if I'm seeing this error still today?

@rikiless

This comment has been minimized.

Show comment
Hide comment
@rikiless

rikiless Nov 3, 2013

i closed this because no body is participant of this issue. i thought i am doing something wrong. the solution is to overwrite @icon-font-path value in LESS.

rikiless commented Nov 3, 2013

i closed this because no body is participant of this issue. i thought i am doing something wrong. the solution is to overwrite @icon-font-path value in LESS.

@rikiless rikiless reopened this Nov 3, 2013

@gaboAcosta

This comment has been minimized.

Show comment
Hide comment
@gaboAcosta

gaboAcosta Nov 3, 2013

I'm new to less, when I tried to compile the bootstrap.less I had an error compiling it I figured it was because the variables is in a different file, anyway it became to time consuming so I copied the fonts folder and that solved it. I know it might sound a lot harder than it actually is, but shouldn't there be a way to add a configuration so we dont have to do all this? or at least a script that fixes it somehow?

I'm new to less, when I tried to compile the bootstrap.less I had an error compiling it I figured it was because the variables is in a different file, anyway it became to time consuming so I copied the fonts folder and that solved it. I know it might sound a lot harder than it actually is, but shouldn't there be a way to add a configuration so we dont have to do all this? or at least a script that fixes it somehow?

@rikiless

This comment has been minimized.

Show comment
Hide comment
@rikiless

rikiless Nov 5, 2013

you should use your own less file, for example screen.less. in this file you have to import bootstrap.less and than overwrite @icon-font-path value.

rikiless commented Nov 5, 2013

you should use your own less file, for example screen.less. in this file you have to import bootstrap.less and than overwrite @icon-font-path value.

@rikiless

This comment has been minimized.

Show comment
Hide comment
@rikiless

rikiless Nov 5, 2013

now i got it! it was caused by storing web content to /web folder instead of root of project's directory.

report:
from safari console:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.woff, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.woff

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.ttf, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.ttf

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.svg, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular

in /.bowerrc file

{
    "directory": "web/assets",
    "json": "bower.json"
}

in LESS the line ..

@icon-font-path:          "../fonts/";

.. need to be overwritten to:

@icon-font-path:          "../bootstrap/fonts/";

rikiless commented Nov 5, 2013

now i got it! it was caused by storing web content to /web folder instead of root of project's directory.

report:
from safari console:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.woff, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.woff

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.ttf, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.ttf

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (glyphicons-halflings-regular.svg, line 0)
http://localhost:8000/assets/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular

in /.bowerrc file

{
    "directory": "web/assets",
    "json": "bower.json"
}

in LESS the line ..

@icon-font-path:          "../fonts/";

.. need to be overwritten to:

@icon-font-path:          "../bootstrap/fonts/";

@rikiless rikiless closed this Nov 5, 2013

@rikiless

This comment has been minimized.

Show comment
Hide comment

rikiless commented Dec 1, 2013

see PR #10941

@gregory

This comment has been minimized.

Show comment
Hide comment
@gregory

gregory May 26, 2014

when is this gonna get merged with master?

gregory commented May 26, 2014

when is this gonna get merged with master?

@cvrebert

This comment has been minimized.

Show comment
Hide comment
@cvrebert

cvrebert May 26, 2014

Member

@gregory You presumably want #13542 instead.

Member

cvrebert commented May 26, 2014

@gregory You presumably want #13542 instead.

@Hestros

This comment has been minimized.

Show comment
Hide comment
@Hestros

Hestros Sep 7, 2017

I had a similar issue... in my case the library was under an alias domain (nginx) and solve it by refining* the domain's configuration file.
my guess is that it always comes to a misconfiguration of font files path.

  • the alias (domain) was configured to serve specific files and those of fonts were not included.

Hestros commented Sep 7, 2017

I had a similar issue... in my case the library was under an alias domain (nginx) and solve it by refining* the domain's configuration file.
my guess is that it always comes to a misconfiguration of font files path.

  • the alias (domain) was configured to serve specific files and those of fonts were not included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment