Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Assets fail loading as hostUrl specified segment isn't getting prefixed


I have built HTML demo 36 of v8.2.0 and using it with Laravel 10. It is consistently failing to load any fonts because it always starts its URL with one more segment after the domain URL, like:

https://domain/segment-1/fonts/keenicons/keenicons-outline.ttf?fzo4bm

This makes me believe that its not using the value defined in hostUrl variable. I may have made it run without it but that extra segment is making all workarounds useless.

Why does it pick up that extra segment, shouldn't it use the base URL defined in hostUrl variable?

I was previously successfully using demo 6 since last year.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


A "/" was missing in the font face bindings, I manually fixed your source files.



Hi Umair,

We do use the hostUrl variable, but currently, it is only utilized for the image paths, not for the font files. The font files are loaded directly from the CSS files.

For example, in the CSS file /demo1/dist/assets/plugins/global/plugins.bundle.css, the font file paths are defined. It appears that the extra segment you mentioned is not coming from the hostUrl, but rather from another source.



To troubleshoot this issue, you can check if there is a < base href=""/> tag in the < head> section of your HTML file and try removing it. The presence of this tag can sometimes cause unexpected behavior with relative URLs. Removing it might resolve the problem.

If you need further assistance, or if the issue persists, please let us know. We'll be happy to help you further.

Thanks



There is no base href tag in our html.

Also your font URLs do not contain the keenicons folder that is in the generated assets.

As an example the following URL works for us without changing the file structure generated by your tools:
/fonts/keenicons/keenicons-outline.eot



May I know which build tool are you using? Gulp or webpack?

Thanks



I tried both, same result.

The source CSS has these bindings so it does not matter what build tool I use.



We appreciate your feedback. We will address this issue by ensuring that the font URLs include the necessary /fonts/keenicons/ path. If you have any further concerns or suggestions, please don't hesitate to let us know.

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(