YunoHost-Apps / discourse_ynh

Discourse package for YunoHost
https://www.discourse.org/
GNU General Public License v2.0
24 stars 12 forks source link

Discourse_YNH doesn't setup properly when path is "/" #111

Closed artybdrlt closed 2 years ago

artybdrlt commented 2 years ago

Describe the bug

Hi there, I just came across quite a strange bug and I wanted to share it with you because it is quite cumbersome. Yesterday I tried to install discourse_ynh on a subdomain () and after the initial setup the stylesheets were missing on my discourse and everything looked broken as you can see below. I hadn't had this issue before. 2022-06-15_14-27

I discovered that the CSS was broken due to the fact that Discourse couldn't find the files (see screenshot below, that's the web inspector). 2022-06-15_14-29

I then decided to change the url to domain.tld/forum using yunohost cli (yunohost app change-url discourse --domain domain.tld --path /forum). Soon after, the issue was gone! I then decided to do the other way around: yunohost app change-url discourse --domain subdomain.domain.tld --path / And guess what, the issue hadn't come back!

So, in the end, how comes that Discourse_YNH doesn't setup properly when path is "/" ?

I have an idea:

Context

Expected behavior

Discourse should install properly with subdomains like subdomain.domain.tld