Plone 5.1.6: All icons suddenly boxes

Is there an easy fix to the situation where all the icons on the site suddenly become boxes? Examples (since this is likely better than a description):

The logged-in sidebar:

The site settings menu:

This seems to happen periodically, and the only solution I've found is to blow away the site and start over from scratch. While it's thankfully only happened on my dev server so far, that gets problematic after a while.

@irfon You don't give us any description on 'the situation' when this occurs. Just after you have eaten a strawberry pie, or had a coffee? Just joking. :wink:

The icons are all rendered through a font file, I think fontawesome and there is another font file as well filled with plone specific icons.. If you want to debug this, check if/why the font resource is not loading in your site.

I've seen this issue before when you have a customised theme where the reference to the font file is loaded using a broken path.

This might happen if you load a resource from css on /++theme++resource/etc It works when the site is hosted in production on http://mysite.org/, but when you view the icon file locally on a development machinie on http://localhost:1234/my_plone_portal/ , /++resource++ will be called on the zope root and not the plone portal route.

I actually felt kind of bad about that when I posted, but I haven't found a specific pattern. :slight_smile: This time around, I had just stopped the site, edited the buildout.cfg to add webcouturier.dropdownmenu, run bin/buildout, and started the site back up. It's possible that it's always happened after stopping and starting the site, but I don't think so? Maybe!

Hmm. This an interesting angle to check. I'd recently been trying to modify some of the paths in my theme in order to get around bizarre theming issues I was hitting (which I thought might have been because it was still referring back to some resources in the original barceloneta theme). The boxes didn't appear at that time, but perhaps some of the changes I've made only "took effect" after this last round of buildout. I'll go back and see if reverting them and re-running the building fixes the issue. Thanks!

I have seen this a lot of times, but not in 5.2.
Note that fonts etc. are cached locally, so you should also test different browsers / machines.

Changing themes / rebuilding resources / changing rosource registration to (and back to) debug mode usually fixed this.

Here is another screenshot :slight_smile:

I think many icons are Fontello / Glyphicons

PS: Fonts are usually (at least on OS X) referenced by ID, so if you have font with duplicate ID it might render instead.

That's good to hear; I just upgraded the affected server to 5.2 for other reasons, so hopefully this won't be an issue anymore.