voyager icon indicating copy to clipboard operation
voyager copied to clipboard

Voyager Font and Dimmer Images not working

Open CoffeeQuotes opened this issue 2 years ago • 12 comments

Laravel version

9.5.1

PHP version

8.0.8

Voyager version

1.6.x-dev

Database

libmysql - mysqlnd 8.0.8

Description

Voyager fonts and dimmer images not loading on Chrome and Safari Browsers, but it is working absolutely fine in Firefox. Screenshot 2022-04-01 at 11 52 45 AM Not Working in Chrome and Safari

Steps to reproduce

Install Laravel 9 Require TCG/Voyager

Expected behavior

It should show the Voyager fonts icons and dimmer images. I have also cleared cache, run optimize command, check the ap url and also link storage.

Screenshots

No response

Additional context

No response

CoffeeQuotes avatar Apr 01 '22 06:04 CoffeeQuotes

Anything in your browser dev tools/console? I'd expect to see some kind of error related to the font files. The type of error shown will help identify cause. This does work fine, so it's not a bug with Voyager, but something about your setup

fletch3555 avatar Apr 01 '22 13:04 fletch3555

I am getting these errors on my console. Failed to decode downloaded font: http://localhost:8000/admin/voyager-assets?path=fonts/voyager.woff menus:1 OTS parsing error: invalid sfntVersion: 538976288 menus:1 Failed to decode downloaded font: http://localhost:8000/admin/voyager-assets?path=fonts/voyager.ttf menus:1 OTS parsing error: invalid sfntVersion: 538976288

Sorry for late response.

CoffeeQuotes avatar Apr 05 '22 08:04 CoffeeQuotes

https://stackoverflow.com/questions/34288778/failed-to-decode-downloaded-font-ots-parsing-error-invalid-version-tag-rails

Not exactly the same environment, but same error reported, which is that your browser can't parse the font files for some reason. Open up the network tab and find those requests and I'd bet you'll find a 404 or some other response with HTML content. If this is the case, there's something wrong with how you're hosting your laraval instance.

fletch3555 avatar Apr 05 '22 14:04 fletch3555

i got same issue

luongtu996 avatar Aug 30 '22 04:08 luongtu996

I found that all files from voyager-asset include two blank lines when on chrome. So images and fonts cannot display

Screenshot 2022-08-30 at 16 29 13

luongtu996 avatar Aug 30 '22 09:08 luongtu996

That's a JS file, so whitespace is fine. That's very much not the cause of your issue.

fletch3555 avatar Aug 30 '22 11:08 fletch3555

it is not in js file. even in SVG file and font file

luongtu996 avatar Aug 30 '22 11:08 luongtu996

Yes, but the screenshot you provided was of a JS file

fletch3555 avatar Aug 30 '22 11:08 fletch3555

so it cannot decode font or not show svg file Screenshot 2022-08-30 at 18 49 28

luongtu996 avatar Aug 30 '22 11:08 luongtu996

In svg file

Screenshot 2022-08-30 at 19 53 54

luongtu996 avatar Aug 30 '22 12:08 luongtu996

OH. I found my issue. this is because in some files I place <?PHP in line 2.

luongtu996 avatar Aug 30 '22 13:08 luongtu996

Yup, that would definitely do it. Glad you found it

fletch3555 avatar Aug 30 '22 13:08 fletch3555