nextcloud / nextcloud/contacts

Modifications to contacts fail with error message "The contact you were trying to edit has changed" after the first modification

Open
#2,912 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

If I try to edit a contact's info, I can do so no problem for the first thing. Let's say I want to change the name, and the surname. I can change the name no problem, but then if I want to change the surname, it fails telling me that "The contact you were trying to edit has changed". I need to reload the page, and edit it again. This is really annoying. It's CONSISTENTLY always after the first edit. If I reload, I made the edit I wanted, and want to make another one, then again, it pops up.

I've never not had this bug, it has always happened since I've installed the app.

Steps to reproduce
  1. Go to a contact
  2. Modify any of its contents
  3. Try to modify something else
  4. Error
Expected behavior

I should be able to modify as much as I want without problems.

Actual behavior

I can't do more than a single modification per page refresh.

Contact version

4.2.0

Operating system

Arch Linux

PHP engine version

PHP 8.1

Web server

Nginx

Database

MariaDB

Additional info

Here you can see the network logs for this error:
image

I did two modifications. I added a single character into the address field, which is the 204 request, and then I deleted it, resulting in a 412 request and the error popping up.

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 contact edit flow and compare the 204 request from the first change with the following 412 request shown in the network logs. Trace how the contact state is handled between submissions; done means successive edits complete without a page reload and without the 412 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mariadb, nginx, php
Domain
api, backend, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.