danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 71 forks source link

nextcloud installation has a little flaw regarding integrated help #97

Closed airflow2010 closed 4 years ago

airflow2010 commented 4 years ago

While I like the script and I think it is very useful, there seems to be a small glitch/flaw with it. Perhaps it's not even the script, but just a bug which occurs in certain circumstances, I don't know.

The thing is that the integrated help is not working properly. You can easily see it for yourself if you try to open it. It is found under options/controls (the wheel in the upper right corner), then "Help/Hilfe".

I couldn't find out why this is. I also asked the question in the official nextcloud-forum, but I did not get any answers. Do you also have the same phenomenon? I tried finding instances of nextcloud to check if this is just a bug with every instance, but if I look here: https://try.nextcloud.com/ this cannot be seen here, so it seems to be specific to FreeBSD or this script.

My thread in the official forum: https://help.nextcloud.com/t/nextcloud-integrated-help-incorrectly-spawns-nested-frame-within-nextcloud/69961

PrivatePuffin commented 4 years ago

Okey, this report is too vague, so let me explain: If you click "help" in the Nextcloud Menu, it opens a menu on the right with:

Normally these should open help pages on the right (main content window) of nextcloud. I can confirm they don't.

The help-page in the main-content windows of nextcloud, gets forwarded to the default page thats set if page-not-found (in my case the main files windows):

help Help menu

I think this is caused by a missing caddy forward in this script, could you check @danb35 ?

PrivatePuffin commented 4 years ago

@danb35 Did you happen to look into what is missing in caddy that might cause this?

danb35 commented 4 years ago

I can confirm the issue, but I'm kind of at a loss to figure it out. Those links in the sidebar go to $FQDN/settings/help/{user|admin}. When I compare it to the Nextcloud installation I actually use (which doesn't use Caddy, doesn't run under FreeBSD, and doesn't have pretty URLs configured), that system has links to $FQDN/index.php/settings/help/{user|admin}, and it works.

I figured the obvious solution would be to add it in the big rewrite block (starting at line 69 of the Caddyfile), by adding if {path} starts_with /settings/help. But when I tried that, it broke the whole installation. More investigation will be called for.

danb35 commented 4 years ago

Since Caddy v1 is aggressively EOL, I'm working on migrating to Caddy v2. And though this issue wasn't at all a focus of the migration, Caddy v2 does seem to fix it. Check out the caddyv2 branch if you're brave.

airflow2010 commented 4 years ago

Thanks for the heads-up, I'll check it as soon as this is the new stable version. Nice when bugs disappear without actively fixing them. :-)