using the entity changed time can obscure changes due to access changes

Created on 18 June 2025, 4 months ago

Problem/Motivation

Currently, the Entity Share client determines whether a remote entity is changed by comparing the 'changed' field on the local copy and the remote data.

This obviously doesn't support entity types that don't have a 'changed' field, but then at least developers know to expect that.

More confusingly, this can fail if access control has been changed between two pulls:

1. Pull a remote entity which contains references, and where some of the references don't allow access. E.g. a node with paragraphs, and where one of the referenced paragraph types doesn't allow access.
2. The entity is created on the client, with one field value missing.
3. Change the access on the server so access IS granted
4. Go to the Entity Pull page. This reports the entity as synchronized, even though the saved entity on the client and the incoming JSONAPI data are different.

Steps to reproduce

Proposed resolution

Hash the JSONAPI data when an entity is pulled and store that as a field on the entity_import_status. Compare the hashes instead of the changed field value.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

4.0

Component

Entity Share Client

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024