Incomplete projects display on sidebar

Support intro

Hi, I rely nextcloud add to a project functionality heavily to organize my documents. However when I share a file in multiple projects, only the first project is listed in the sharing sidebar

Nextcloud version (eg, 20.0.5): 22.2.4
Operating system and version (eg, Ubuntu 20.04): 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.25
PHP version (eg, 7.4): 7.4

The issue you are facing: file_A.md is shared in proj_1 and proj_2, but only proj_1 is listed on the sharing sidebar

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Creat file_A.md, file_B.md and file_C.md
  2. Create project_1 by linking file_A.md and file_B.md.
  3. Create project_2 by linking file_A.md and file_C.md. (At this point, project_1 and project_2 are both shown correctly in the sharing sidebar of file_A.md.)
  4. Reopen the sharing sidebar of file_A.md, only project_1 is shown for file_A.md, while project_2 is missing.

The problem can be reproduced in the NC22.2.4, NC23.0.4 and NC24.0.0

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.x.x:8080",
            "192.168.x.x:8080",
            "192.168.x.x:8080"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "22.2.5.1",
        "overwrite.cli.url": "http:\/\/192.168.x.x:8080",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "loglevel": 0,
        "theme": ""
    }
}