Entity pull page doesn't warn about conflict and overwrites data from the client

Created on 27 January 2025, 2 months ago

Problem/Motivation

If a node on the client and the server has diverged, then the data on the client is overwritten, and there's no indication in the Entity Pull UI that this will happen.

Steps to reproduce

Proposed resolution

Warn the user that there is a conflict.

Though we can't always detect that from the basic entity JSONAPI data.

There are some cases where it's easy:

- the local and the server have the same revision ID but different timestamps
- the local has a higher revision ID than the server

But if the server has had more edits than the client, we can't tell whether the client's revision is included in the server's revision history without fetching revisions from the server. We can apparently do that -- https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi... (although I'm not managing to get it to work). We can then compare the timestamps to see if the client's latest revision is in the revision history on the server. If it's not we should declare a conflict.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024