Theme losing Font Awesome Moodle 3.10+

Theme losing Font Awesome Moodle 3.10+

by Dave Emsley -
Number of replies: 2

Hi there,

I've developed a child theme of Boost and it seems to have developed a bizarre error.  One the testing server (left) it seems to have lost all fontawesome icons, cannot find the correct font, or the IMP logo for the icon bar.  Yet on the production server it works.

I have tried using the full pathname for the font on the test server and that works!  So it seems that, on the testing server it has "lost" the ability to parse the fontname and path - ie

src: url([[font:theme|fontname.ttf]]) format('truetype'); fails to work.

As does the code $templatecontext = [
'logo' => $OUTPUT->image_url('logo', 'theme'),
....
];
in my frontpage layout file, and

and <img src="{{{ logo }}}" alt="{{sitename}}"> in my mustache template.

On testing inspecting the code shows two different URLs for the logo in the navbar:

<img src="https://(live URL).uk/theme/image.php/imp/theme/1612361015/logo" alt=" Imp">
and
<img src="http://testserver/~imp/moodle/theme/image.php?theme=imp&amp;component=theme&amp;image=logo" alt="imp">

Which is odd. Boost works perfectly, as did this theme before posting live so really confused.

If someone can advise on this I'd be very greatful.

Cheers

Dave

Average of ratings: -
In reply to Dave Emsley

Re: Theme losing Font Awesome Moodle 3.10+

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
src: url([[font:theme|fontname.ttf]]) format('truetype'); fails to work.

is the wrong direction and will send you down a wild goose chase.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Theme losing Font Awesome Moodle 3.10+

by Dave Emsley -
Thank you Gareth for stopping me going on a wild goose chase.

The issue was a closing ?> in the file (mytheme)/lib.php