nextcloud / collectives

Collectives is a Nextcloud App for activist and community projects to organize together.
GNU Affero General Public License v3.0
102 stars 19 forks source link

Internal links don't work anymore in existing collective #1490

Closed thopanX closed 1 week ago

thopanX commented 1 month ago

Describe the bug I created a collective about 2 years ago with working links to other (sub-)pages. I came back to the collective to look through it in view mode and noticed that internal links didn't work anymore. On click I got a small pop-over in which I can copy the page adress and/or click on it which opens a new browser tab. (Is that the new default for clicking a link in view mode?) The structure of links is https://[domain]/apps/collectives/Organisationen/Readme.md?fileId=21324 – the collective name, DreiDinge, is omitted in internal links after /collectives/, /Organisationen/ is a parent page with subpages.

Links in the left sidebar of the collective are structured like https://[domain]/apps/collectives/DreiDinge/Orte/Borne?fileId=22585 and work fine. If I add internal links via the link button today, the structure of links is https://[domain]/f/21393. If I use the Smart Picker links are correct. I'm pretty confused. How do I get the collective working again?

To Reproduce Steps to reproduce the behavior: I don't know how to reproduce this. My Nextcloud instance got updated during the past two years including the Collectives app.

Expected behavior I'd expect internal links in view mode to function properly and take me to the linked collective page.

Server details:

mejo- commented 3 weeks ago

Dear @thopanX, thanks for your report. We indeed refactored the link handling quite a bit in recent releases of Text and Collectives, as there were many issues with the old way it worked.

The biggest change you already discovered: clicking on a link will open a popover now, where you can either edit, copy or open the link. This is the new behaviour and it was added for accessibility reasons.

Regarding adding a link, there's several ways to insert a link to a collective page:

  1. Drag & drop from the page sidebar inserts the link to the page in the format /apps/collectives/<collective>/<page>?fileId=<id>, which means the page will will open inside Collectives
  2. Adding a collectives page with the Smartpicker will result in the same.
  3. Adding a link via the "Insert link -> Link to file or folder" menu action will link to the file (in Files app), not to the Collective page. This means, the file will be opened in the Viewer (in an overlay modal). We're aware that this is confusing. See the first item of https://github.com/nextcloud/collectives/issues/1026 where it is tracked.

The remaining question would be why your old links broke. Could you please paste the markdown content of the page with broken links, so I can have a closer look?

estux commented 2 weeks ago

Hello, I confirm that internal links are completely broken! @mejo- I tried to make them work in every way is possible (and also encountered at least 5 different bugs and UI issues that I will list here as all are related to internal links broken).

1) About the Popup that appears clicking on a link

2) Link inside a Callout box

3) About Preview and Text-only views

Nextcloud version: 29.0.8 Collectives version: 2.14.4

mejo- commented 1 week ago

Thanks @estux, for your comments. I copied them as a new issue at https://github.com/nextcloud/collectives/issues/1573 as they're not the same as the issue reported by @thopanX.

mejo- commented 1 week ago

bug: the link to another Collective page, created with Smart Linker, only-text mode, when clicked in the popup from the desktop and also mobile view brings you to a login page

Could you test whether the patch in #1572 helps here?

estux commented 1 week ago

bug: the link to another Collective page, created with Smart Linker, only-text mode, when clicked in the popup from the desktop and also mobile view brings you to a login page

Could you test whether the patch in #1572 helps here?

I would gladly do but I don't have a dev environment ready to test it, I'm sorry!

estux commented 1 week ago

Thanks @estux, for your comments. I copied them as a new issue at #1573 as they're not the same as the issue reported by @thopanX.

thank you so much! I hope it wasn't a problem to list them all together as I didn't know where to put them (one or separate issues)!

mejo- commented 1 week ago

thank you so much! I hope it wasn't a problem to list them all together as I didn't know where to put them (one or separate issues)!

No worries @estux. In general we prefer one Github issue per problem, but I'll work through them step by step and maybe at some point close the meta issue and split out remainers into new issues. As always: thanks for reporting!