nextcloud / nextcloud/contacts

Refreshing a page of not existing group cause 2 errors

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

Nobody has claimed this yet.

1. to develop bug feature: contacts
Dominant language
JavaScript
Stars
642
Forks
220
Avg merge
14h 39m
Merged PRs (30d)
51

Description

Describe the bug

Problem has been detected in this PR: https://github.com/nextcloud/contacts/pull/2744#issuecomment-1131509827

Steps to reproduce
  1. Create a new group
  2. Add one user to this group
  3. Go to /apps/contacts/nameOfGroup
  4. In a contact view: remove this group from the checkmark within the group dropdown
  5. Refresh a page (F5)
Expected behavior

No errors

Actual behavior

User see 2 error messages:

  • Group group not found
  • Contact not found
Contact version

4.2.0

Operating system

not relevant

PHP engine version

No response

Web server

No response

Database

No response

Operating system

not relevant

List of activated Apps
Contacts
Nextcloud Signing status

No response

Configuration report

No response

Additional info

CardDAV groups are similar to "tags". They could only take place, if there is at least one contact. If last contact goes away from a group, the whole group will disappear. We could not change this behavior.

After page reload the contact don't know, which group does't exist anymore.

To fix this bug: After deleting a last contact from a group -> navigate somewhere else (for example to this contact)

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 group creation, last-contact removal, navigation to /apps/contacts/nameOfGroup, and page refresh described in the issue. Trace the group and contact state used after reload; done means the stale group page no longer shows either “Group not found” or “Contact not found” errors.

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.