nextcloud / nextcloud/sharelisting

occ share:list fails if orphaned shares are present

Open
#600 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
19
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce
  1. Check if orphaned shares are present via occ sharing:delete-orphan-shares
  2. Do NOT delete orphaned shares
  3. Run occ share:list
Expected behaviour

The share should be listed as orphaned

Actual behaviour

The command will fail with an error and not list any shares:

In Share.php line 169:

Node for share not found, fileid: XXX
Server configuration

Web server: Apache/HAProxy
Database: MariaDB
PHP version: 8.2.29
Nextcloud version: 32.0.8 Enterprise

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the occ sharing:delete-orphan-shares and occ share:list commands, then inspect Share.php around line 169. Reproduce the failure while orphaned shares remain and trace how the missing node is handled. Done means occ share:list lists the orphaned share instead of failing with the “Node for share not found” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.