Files app - Wrong file version when downloading, correct version when opening in Web

Hello everyone,

Background: I’ve been using nextcloud for months with great success. My instance is correctly configured, works with the Docker community image in PHP-FPM version with a Nginx frontend, with the latest versions available to date (NC 27.0.2). The applications on my instance are also all up to date. I have no warnings or errors on the administration page.

I’m having a problem using a share link on a folder. I’ve created a public link for an attached server to download .sh files from this Nextcloud folder.

This worked perfectly until I modified a .sh file in the Nextcloud text editor about twenty days ago. The new version of the file was created without a hitch from the web interface.

When I open the file from the Nextcloud interface (from my session), the new version is displayed. When I open it from the web interface, from the public folder link, the new version is also displayed.

However, if I click on “Download” the file concerned from the public folder, the downloaded file is not the new version but the old one. I’ve gone so far as to delete the old version from the file history, but the problem persists even though the old version is no longer supposed to exist on the server side.

EDIT: I then tried to download it from my session (without the public link, from Files app), but it’s the same: the old version is downloaded. the problem doesn’t seem to be linked to the public link, but rather to the Files application.

In the logs, I see this log every time I open the file in the Nextcloud text-editing application:

[text] Info: Keep previous document of 36049

PUT /apps/text/public/session/create
from by jo at 2023-08-21T08:41:10+00:00

When I downloaded it, I didn’t notice anything.

I haven’t found a topic similar to this behavior. Can this behavior be explained and is it normal? Could it be a Nextcloud app bug?

Thanks in advance for your feedback

I’ve tried OCC commands to try to fix, but nothing changes the behavior when downloading. Here are the commands I tried:

files:cleanup Cleanup filecache → 0 files deleted from cache
files:repair-tree Try and repair malformed filesystem tree structures ->0 files with invalid path
files:scan Rescan filesystem → no errors
files:scan-app-data Rescan the AppData folder → no errors