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

[Bug]: File URLs not backwards compatible after upgrade to Nextcloud Hub 7 (28.0.5) #45101

Open
5 of 8 tasks
calebjones opened this issue Apr 30, 2024 · 7 comments
Open
5 of 8 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug feature: sharing pending documentation This pull request needs an associated documentation update

Comments

@calebjones
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

I have a spreadsheet (ODS) that I have captured receipts in for the last few years. I've put links in that spreadsheet to the images or PDFs of the receipts. These URLs were formatted this way (from prior version - can't remember which version):

https://[HOST]/index.php/apps/files/files?dir=/[DIR]&openfile=[FILEID]

Since updating to Nextcloud Hub 7 (28.0.5), file URLs are formatted this way:

https://[HOST]/index.php/apps/files/files/[FILEID]?dir=[DIR]&openfile=true

The former URL no longer works and just opens the directory. The newer URL opens the file specified in the dir parameter.

Steps to reproduce

  1. Copy file URL for file (not share URL, but URL when hovering over file in directory) from older version (prior major version - can't remember which version produces older URL version)
  2. Open the URL and note that Nextcloud opens the file.
  3. Upgrade to Nextcloud Hub 7 (28.0.5)
  4. Repeat step 2 (the same URL created from prior version) but note that it only opens the directory and not the file

Expected behavior

File URLs from prior versions should open in Nextcloud Hub 7 (28.0.5) - backwards compatibility.

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@calebjones calebjones added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 30, 2024
@kesselb
Copy link
Contributor

kesselb commented Apr 30, 2024

Thanks for your report.

The internal link is backwards-compatible / stable.
Actual URLs used by the frontend probably not.

Example for internal link (you find them in the sharing tab):
https://[HOST]/index.php/f/[FILEID]

I don't see an issue here but will forward it to clarify.

@SystemKeeper
Copy link
Contributor

If you have the links in a spreadsheet anyway and all your links end with "openfile=" you could try to translate them to an internal link:

=CONCATENATE("https://[HOST]/index.php/f/", RIGHT(A1,LEN(A1)-SEARCH("openfile=", A1)-8))
image

Just quick and dirty, but might work.

@joshtrichards
Copy link
Member

This has come up a couple times now. If nothing else might suggest an opportunity to clarify the documentation a bit.

@joshtrichards joshtrichards added pending documentation This pull request needs an associated documentation update feature: sharing labels Apr 30, 2024
@calebjones
Copy link
Author

calebjones commented May 1, 2024

From a usability standpoint, when linking to files in a durable way is the recommendation to NOT right-click "Copy Link" when browsing files and hovering over a file? That seemed to be the most straightforward way to do it (that produced the link that doesn't work after upgrade).

What is the best way to get the internal link for users browsing the file UI?

@calebjones
Copy link
Author

If you have the links in a spreadsheet anyway and all your links end with "openfile=" you could try to translate them to an internal link:

=CONCATENATE("https://[HOST]/index.php/f/", RIGHT(A1,LEN(A1)-SEARCH("openfile=", A1)-8))
image

Just quick and dirty, but might work.

Thanks for the recommendation. I'll try that out as a way to fix things.

@SystemKeeper
Copy link
Contributor

What is the best way to get the internal link for users browsing the file UI?

If you open the share tab in the right sidebar, there’s an option to copy „Internal link“

@blalyasar
Copy link

blalyasar commented May 15, 2024

This problem still on Nextcloud 29.
How can I solve.
When I open excel file on the web server, after save and turn back url is saved from cache and turn back this folder excel file is auto open .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug feature: sharing pending documentation This pull request needs an associated documentation update
Projects
None yet
Development

No branches or pull requests

6 participants