nextcloud / nextcloud/photos

Album Photo Count Off After Deleting Photos Folder

Open
#2,009 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: albums
Dominant language
JavaScript
Stars
718
Forks
91
Avg merge
2d 15h
Merged PRs (30d)
76

Description

Describe the bug
The album photo count is off if the Photos folder is deleted.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a new album, add some already existing pictures (let's say 2).
  2. Upload another picture through the photos plugin. It is saved in the Photos folder. There are now 3 pictures in the album.
  3. Delete the entire Photos folder (including the folder itself).
  4. The album still says it contains 3 pictures. Even though the last one is now missing. When opening the album, there are 2 pictures, as expected.

Expected behaviour
The photo count for the album should decrease to 2.

Desktop (please complete the following information):

  • OS: Ubuntu 22
  • Browser Firefox
  • Version 116.0.2

Additional context
The bug does not occur when individual photos are deleted from within the Photos folder. In that case, it works as expected.

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 by reproducing the issue with an album containing existing pictures and one uploaded through the Photos plugin, then delete the entire Photos folder and inspect the album count. Trace the album-count update path for folder deletion, while preserving the existing individual-photo deletion behavior. Done means the count decreases when the folder and its photo are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.