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 files break after moving or renaming files #1527

Open
TheNomad11 opened this issue Oct 11, 2024 · 5 comments
Open

Links to files break after moving or renaming files #1527

TheNomad11 opened this issue Oct 11, 2024 · 5 comments
Assignees
Labels
1. to develop bug Something isn't working

Comments

@TheNomad11
Copy link

Describe the bug
Links to files break after moving or renaming files

To Reproduce
Steps to reproduce the behavior:

  1. Make a link from a Collectives page to a pdf file in Files
  2. Click on the link
  3. The pdf loads correctly
  4. Go to Files and move the pdf file
  5. Go back to Collectives, reload, and click on the link to the pdf file
  6. The pdf file does not load, a message appears "File no loger exists"
  7. Copy the link and put in the Browser URL bar
  8. The pdf loads

Expected behavior
The Pdf link loads, as these links are permanant within Nextcloud. They still work after moving and renaming

Server details:

  • Collectives app version: 2.14.14;
  • Nextcloud version: [e.g. 30.0.0 (AIO)

Client details:

  • OS: Linux Mint
  • Browser: Firefox
  • Browser version: 131.0.2
  • Device: [Laptop
@TheNomad11 TheNomad11 added the bug Something isn't working label Oct 11, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Oct 22, 2024
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Oct 22, 2024
@mejo-
Copy link
Member

mejo- commented Oct 22, 2024

Hey @TheNomad11, thanks for your report. I'm able to reproduce your bug.

It seems like the server returns an outdated reference object from the cache. We probably need to take care that the the reference cache for files gets invalidated when they get moved or copied.

Cc @juliusknorr as you worked on this in the past.

@juliusknorr
Copy link
Member

Which URL format is being used? Wondering with the internal URL we should not see any change in the URL with the move and I'd expect that with any other we should still have the file id as identifier, so maybe that is rather a but in the extraction logic to get the file metadata for the specific link

@mejo-
Copy link
Member

mejo- commented Oct 28, 2024

Which URL format is being used? Wondering with the internal URL we should not see any change in the URL with the move and I'd expect that with any other we should still have the file id as identifier, so maybe that is rather a but in the extraction logic to get the file metadata for the specific link

Exactly, the URL does not change. But the reference response contains the file metadata which contains the file name (which changed) - and apparently this is passed to the viewer for opening the file.

@juliusknorr
Copy link
Member

@mejo- mejo- self-assigned this Nov 5, 2024
@Aveyron-RetD
Copy link

Aveyron-RetD commented Jan 3, 2025

I suppose this is linked.
If you copy/paste a collective folder with documents in .attachements in another place (other collective) the documents are not displayed anymore.
Its very confusing because images are displayed correctly and the "actual" link displayed in the error message exist
Image

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
Projects
Status: 📄 To do (~10 entries)
Development

No branches or pull requests

4 participants