bmbrands / moodle-theme_elegance

This is the new official elegance repository
http://basbrands.nl
23 stars 12 forks source link

3.1 missing fontawesome #170

Closed M4G1 closed 7 years ago

M4G1 commented 7 years ago

I´ve noticed a possible bug in the 3.1 version. The font fontawesome (ttf/woff/woff2) is not is not displayed and I get a 404. The URL to the font is: https://10.0.1.50/theme/font.php?theme=elegance&component=theme&font=fontawesome-webfont.woff2?v=4.4.0. If I change it to https://10.0.1.50/theme/font.php?theme=elegance&component=theme&font=fontawesome-webfont.woff2&v=4.4.0 (?-->&) the font is accessible. Is this some kind of bug in the theme or a misconfiguration of my system (Turnkey appliance)?

scara commented 7 years ago

Hi @M4G1, are you sure you're running the latest version of the code? Look at #153 and, for the complete story, https://moodle.org/mod/forum/discuss.php?d=325511.

HTH, Matteo

M4G1 commented 7 years ago

Hi Matteo,

thank you for your quick response. I´ve just installed the newest version of the theme from the repository (2016080100) and it is still the same:

bildschirmfoto 2016-08-11 um 11 08 28

bildschirmfoto 2016-08-11 um 11 09 18

Is there something I need to adjust in the system (.htaccess / apache2.conf). I am currently not using htaccess and my apache2.conf is the default one.

I am using the Moodle Turnkey appliance.

Thanks, Matthias

scara commented 7 years ago

Hi @M4G1, with "repository" do you mean here, github, or the Moodle Plug-ins? As a workaround you should enable the so called "Slash arguments", Administration > Site administration > Server > HTTP (https://docs.moodle.org/31/en/Using_slash_arguments), hoping that the appliance is properly configured to support it (never used).

HTH, Matteo

M4G1 commented 7 years ago

Hi Matteo,

I mean the Github repository. Slash arguments is turned on by default in Moodle 3.1. What about the the argument itself at the end of the URL (?v=4.4.0). Why can I access the font if I change it to &v=4.4.0?

Thanks, Matthias

scara commented 7 years ago

Good point (if it has been installed from scratch and not coming from un update)! I was in a hurry: did you already double check its configured value via http://hostname/path/to/admin/settings.php?section=http ?

If yes, in the next days I'll review the original PR to see why it looks like not compatible with Moodle 3.1: AFAIK $CFG->slasharguments is still there and you can change its value.

BTW, you can access the font when changing the URL since you're fixing the URL syntax by your own (https://moodle.org/mod/forum/discuss.php?d=325511#p1308296).

HTH, Matteo

M4G1 commented 7 years ago

Are we talking about the settings.php in var/www/moodle/admin/?

Thanks, Matthias

scara commented 7 years ago

Not exactly, apologies for not being clear enough: you need to open it with your browser. If your Moodle instance is available at e.g. http://example.org/moodle you need to open the HTTP configuration settings by means of your browser pointing to http://example.org/moodle/admin/settings.php?section=http .

HTH, Matteo

M4G1 commented 7 years ago

Sorry Matteo, I got it now. These are the HTTP settings:

bildschirmfoto 2016-08-11 um 14 18 36

Thanks, Matthias

scara commented 7 years ago

Hi @M4G1, I'll try by myself in a 3.1 MDL env: at the moment, I cannot understand why your instance should deliver not-slash-arguments-friendly URLs, e.g.: https://10.0.1.50/theme/font.php?theme=elegance&component=theme&font=fontawesome-webfont.woff2?v=4.4.0, when slash arguments is checked. As a consequence of such unexpected behavior, ?v04.4.0 is there w/o & since $CFG->slasharguments is true.

HTH, Matteo

M4G1 commented 7 years ago

Thank you very much for looking into this matter. I am looking forward to your reply.

M4G1 commented 7 years ago

Hi Matteo,

I´ve just reinstalled the appliance and an updated version of Moodle and now everything is working fine. Thank you for your quick responses and the effort.

All the best, Matthias

scara commented 7 years ago

Thanks for the update! You're welcome :smile:.