Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Missing icons from Admin Panel

Solved by Pedro M View solution

Started by Pedro M 6 years ago · 2 replies · 502 views
6 years ago

Hello.

What could have happend with the admin panel icons?

They are missing.

Selection_017|690x218

I have overwritten the admin plugin, but not working. I have two subdomains with two grav pages, in the first all work fine and in second this happens.

Any help?

6 years ago Solution

I've discovered the following with Chrome Inspector:

jv_gestion:1 Access to font at 'https://prueba.juanvillen.es/user/plugins/admin/themes/grav/fonts/forkawesome-webfont.woff2?v=1.1.5' from origin 'http://prueba.juanvillen.es' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

After a long search, this afternoon, I've managed to solve this issue:

In the .htaccess of your site, you have to add this:

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

That's all. All icons have appeared.

last edited 04/25/20 by Pedro M
6 years ago

@pmoreno, I think your solution is in fact a workaround...

As the error says: You are trying to fetch the font from https://mydomain, while the origin is http://mydomain. CORS differentiates between HTTP and HTTPS.

From the CORS docs on mdn:

[...] A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.

There are more HTTP and other issues on you site:

  • http://fonts.googleapis.com/css?family=Open+Sans
  • GET https://prueba.juanvillen.es/js/wow.min.js net::ERR_ABORTED 404
  • <a href="http://grav.juanvillen.es/#contacto">formulario</a>
  • <a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="http://juanvillen.es/cookies" rel="noopener noreferrer nofollow" target="_blank">Saber más</a>
  • plus some more references to insecure external HTTP sites

By the way, is there any reason why I cannot open the context menu of the page?

last edited 04/26/20 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago