groupfolders icon indicating copy to clipboard operation
groupfolders copied to clipboard

Groupfolders show with id instead of name in webdav/davfs

Open svoeth opened this issue 1 year ago โ€ข 12 comments

How to use GitHub

  • Please use the ๐Ÿ‘ reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. add one or more groupfolders
  2. view your folders via webdav

Expected behaviour

All folders are shown with their choosen name

Actual behaviour

Folders are shown with their chosen name for a very short time and are then renamed to their id There is a (very brief) discussion in the nextcloud forums with a short gif: https://help.nextcloud.com/t/groupfolders-show-with-id-instead-of-name-in-webdav-dvfs/168414

Server configuration

Operating system: Debian 12 (Bookworm)

Web server: Nginx 1.22.1-9

Database: MariaDB (not on the same server)

PHP version: 8.2

Nextcloud version: 27.0.2

Group folders version: 15.0.2

Updated from an older Nextcloud/ownCloud or fresh install: fresh install

Where did you install Nextcloud from: Source via ansible

Are you using external storage, if yes which one: local/s3/smb/sftp/... no

Are you using encryption: yes/no no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/... LDAP

Client configuration

Browser: n/a / Nemo file manager

Operating system: Debian 12 with cinnamon-desktop

Logs

Web server error log

Web server error log This is the log part when opening the folder via webdav. CENSORED%20FOLDERNAME (sorry, had to censor it, but it contains two words with a space in the middle), Admins, Allgemeines and Design are the current groupfolders (see gif in discussion mentioned above in "Actual behaviour")
10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth/CENSORED%20FOLDERNAME HTTP/2.0" 207 396 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 387 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 1059 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth HTTP/2.0" 207 256 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:42 +0200] "PROPFIND /remote.php/dav/files/voeth/Design HTTP/2.0" 207 377 "-" "gvfs/1.50.3"
10.73.21.166 - - [25/Aug/2023:10:55:42 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Templates%20credits.md HTTP/2.0" 207 395 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Reasons%20to%20use%20Nextcloud.pdf HTTP/2.0" 207 402 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud%20Manual.pdf HTTP/2.0" 207 398 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud%20intro.mp4 HTTP/2.0" 207 392 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Nextcloud.png HTTP/2.0" 207 379 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Anleitung.md HTTP/2.0" 207 386 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Templates HTTP/2.0" 207 379 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Photos HTTP/2.0" 207 378 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Notizen HTTP/2.0" 207 379 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Documents HTTP/2.0" 207 380 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/Design HTTP/2.0" 207 377 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:43 +0200] "PROPFIND /remote.php/dav/files/voeth/CENSORED%20FOLDERNAME HTTP/2.0" 207 396 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:44 +0200] "PROPFIND /remote.php/dav/files/voeth/Allgemeines HTTP/2.0" 207 379 "-" "gvfs/1.50.3"
10.73.21.166 - voeth [25/Aug/2023:10:55:44 +0200] "PROPFIND /remote.php/dav/files/voeth/Admins HTTP/2.0" 207 377 "-" "gvfs/1.50.3"
10.73.52.3 - voeth [25/Aug/2023:10:55:46 +0200] "PROPFIND /remote.php/dav/files/voeth/ HTTP/1.1" 207 261 "-" "Mozilla/5.0 (Linux) mirall/3.9.1git (Nextcloud, manjaro-6.4.6-1-MANJARO ClientArchitecture: x86_64 OsArchitecture: x86_64)"

Nextcloud log (data/nextcloud.log)

Nextcloud log
log is empty (nightly rotation and system is not in full production yet)

Browser log

Browser log
no browser in play here
There is nothing in syslog or journal

svoeth avatar Aug 25 '23 09:08 svoeth

I'm using Ubuntu 22.04 with nautilus. The groupfolders are shown correctly with webdav. But if you enter such a groupfolder, the id is shown within the path: grafik

XueSheng-GIT avatar Aug 25 '23 15:08 XueSheng-GIT

Issue #2430 refers. I suggested that group folder ID's should have friendly names, but the issue was closed without a resolution. If it was resolved, you wouldn't have these types of issues further down the line, when used in your use case as observed in your bug report using webdav/davfs. Suggest commenting in #2430 for it to be reopened and resolved.

sunnyd24 avatar Aug 25 '23 22:08 sunnyd24

@sunnyd24 These are different issues. Keeping the id for the raw filesystem does make sense to keep things simple. Accessing the raw filesystem directly is not an intended use case for a user.

But accessing the nextcloud data via dav is a common use case for a user and the folder names should be displayed in a user friendly way.

XueSheng-GIT avatar Aug 26 '23 04:08 XueSheng-GIT

I'm using Ubuntu 22.04 with nautilus. The groupfolders are shown correctly with webdav. But if you enter such a groupfolder, the id is shown within the path: grafik

that's funny. In my case it's the other way around and i see the foldername in the path (after clicking the folder which is named with the id)

svoeth avatar Aug 28 '23 13:08 svoeth

Is there any progress with this? How can we help?

antonwantstosleep avatar Sep 08 '23 12:09 antonwantstosleep

My finding: On one LinuxMint 21.2 I've installed first Nemo and later Nautilus. On Nemo I defined a webDAV Bookmark to a folder on my NextCloud containing some Groupfolders. As that showed the numbers instead of the groupfolder names, I installed Nautilus. Starting Nautilus the first time I already got the folder with the groupfolders as bookmark. Selecting that I saw the "good" names for the groupfolders. So it might be only an issue with Nemo on a NextCloud 25.0.x. With the version 24.0.12 of NextCloud that problem does not occure at all!

undertstater avatar Nov 09 '23 14:11 undertstater

Seems to be a nemo issue. Therefore it is moved here: https://github.com/linuxmint/nemo/issues/3331

svoeth avatar Nov 28 '23 10:11 svoeth

It is actually a bug in NextCloud. Some webdav clients (Nemo, Nautilus etc) asks for specific properties in PROPFIND, e.g. 'displayname'. And NextCloud then replies with the groupfolder id as the displayname.

I have added a quick workaround. (v. 28.0.1)

nextcloud-webdav-groupfolders.patch

Burnie09 avatar Mar 19 '24 14:03 Burnie09

thx @Burnie09

reopening due to your find

svoeth avatar Mar 19 '24 23:03 svoeth

Here are a few requests and replies that makes the difference more clear, that some webdav clients asks for - and uses - displayname. (I have tidied it up a bit for readability)

Windows built-in webclient

PROPFIND /remote.php/dav/files/UserName/GroupFolder HTTP/1.1
User-Agent: Microsoft-WebDAV-MiniRedir/10.0.19044
Content-Length: 0
HTTP/1.1 207 Multi-Status
Date: Wed, 20 Mar 2024 02:52:43 GMT
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/UserName/GroupFolder/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Fri, 16 Feb 2024 13:15:37 GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:quota-used-bytes>0</d:quota-used-bytes>
        <d:quota-available-bytes>10737412742</d:quota-available-bytes>
        <d:getetag>&quot;65cffffee3333&quot;</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Nautilus/gvfs

  • Asks for specific properties, e.g. displayname, which then NextCloud replies is "1"
PROPFIND /remote.php/dav/files/UserName/GroupFolder HTTP/1.1
User-Agent: gvfs
Content-Length: 235

<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
  <D:prop>
    <D:creationdate/>
    <D:displayname/>
    <D:getcontentlength/>
    <D:getcontenttype/>
    <D:getetag/>
    <D:getlastmodified/>
    <D:resourcetype/>
  </D:prop>
</D:propfind>
HTTP/1.1 207 Multi-Status
Date: Tue, 19 Mar 2024 10:35:18 GMT
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/UserName/GroupFolder/</d:href>
    <d:propstat>
      <d:prop>
        <d:creationdate>1970-01-01T00:00:00+00:00</d:creationdate>
        <d:displayname>1</d:displayname>
        <d:getetag>&quot;65cffffee3333&quot;</d:getetag>
        <d:getlastmodified>Fri, 16 Feb 2024 13:15:37 GMT</d:getlastmodified>
        <d:resourcetype><d:collection/></d:resourcetype>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:getcontentlength/>
        <d:getcontenttype/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Burnie09 avatar Mar 20 '24 03:03 Burnie09

Hi,

the PropFindPlugin in Groupfolder should be the better place to add this custom display name logic for group folders:

https://github.com/nextcloud/groupfolders/blob/d3a1f3739a578ec9baed53e518c76fe56dc804a6/lib/DAV/PropFindPlugin.php#L63

kesselb avatar Mar 20 '24 14:03 kesselb

It is actually a bug in NextCloud. Some webdav clients (Nemo, Nautilus etc) asks for specific properties in PROPFIND, e.g. 'displayname'. And NextCloud then replies with the groupfolder id as the displayname.

I have added a quick workaround. (v. 28.0.1)

nextcloud-webdav-groupfolders.patch

This patch fixes this bug here for me as also this bug: https://github.com/nextcloud/server/pull/46694 Seems to be good solution for me.

thekk1 avatar Jul 29 '24 10:07 thekk1

I see this problem in the web interface (NC 29): At first, the files app shows the folders with their correct names, but as soon as I enter them the name is replaced by the id: image

When I navigate up and out from the folder the file listing keeps showing the id for a second and then it is replaced by the literal name again.

ruedigerkupper avatar Aug 07 '24 10:08 ruedigerkupper

@ruedigerkupper different issue: https://github.com/nextcloud/groupfolders/issues/3068

kesselb avatar Aug 07 '24 12:08 kesselb

@kesselb Thanks for pointing me there!

ruedigerkupper avatar Aug 13 '24 10:08 ruedigerkupper

seems to be resolved by https://github.com/nextcloud/server/pull/46728 (as well as above mentioned #3068)

svoeth avatar Aug 21 '24 14:08 svoeth