Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to Collectives pages get opened in Files app #3857

Closed
mejo- opened this issue Mar 1, 2023 · 0 comments · Fixed by #3870
Closed

Links to Collectives pages get opened in Files app #3857

mejo- opened this issue Mar 1, 2023 · 0 comments · Fixed by #3870
Labels
1. to develop bug Something isn't working regression

Comments

@mejo-
Copy link
Member

mejo- commented Mar 1, 2023

Describe the bug
Links to Collectives pages contain a fileId=<id> query param in order to have a fallback when pages got renamed. Due to #2268, this results in links to Collective pages getting opened in the Files app in Text.

The relevant code moved here in the meantime:

text/src/helpers/links.js

Lines 114 to 118 in 3b6201d

if (query?.fileId) {
// open the direct file link
window.open(generateUrl(`/f/${query.fileId}`), '_self')
return
}

I see two paths forward:
a) Limit the condition for opening files in the Files app to links that point to apps/files/...?fileId=<id>
b) Hardcode an exception for links to Collectives

I don't see a problem with solution a), but maybe I'm missing something. Cc @julien-nc (since you're the author of the PR linked above), @juliushaertl @max-nextcloud @susnux.

To Reproduce
Steps to reproduce the behavior:

  1. Create a collective with a subpage
  2. Copy the URL of this collectives page
  3. Create a Text document and copy the copied URL into it
  4. Click on the link and see the collectives page being opened in Files app

Expected behavior
Text should not force-open links to collectives pages in the Files app.

@mejo- mejo- added bug Something isn't working 1. to develop regression labels Mar 1, 2023
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 2, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 6, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
backportbot-nextcloud bot pushed a commit that referenced this issue Mar 6, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 6, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
juliusknorr pushed a commit that referenced this issue Mar 6, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
nextcloud-command pushed a commit that referenced this issue Mar 6, 2023
Until now, we always opened direct link files when a link contained
a `fileId` query parameter. This breaks e.g. links to pages from the
Collectives app, which contain `fileId` parameters as well.

Limit opening direct file link to links that point to the Files app.

Fixes: #3857

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant