Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300822

Entity queries for latest revisions should return the latest workspace-specific revisions

$
0
0

Problem/Motivation

Workspaces doesn't alter latest (translation affected) revision entity queries at the moment because the "locking" protection provided by EntityWorkspaceConflictConstraint prevents an entity that's tracked in a workspace from being edited in Live or in another workspace. However, both #3486378: [Plan] Allow for / implement simplified content workflow with workspaces and #3438083: Ability to edit content in Live while it’s also being edited in other workspaces want to bypass/remove that restriction, so we need to ensure that those queries are properly altered.

Proposed resolution

Latest revision entity queries and \Drupal\Core\Entity\TranslatableRevisionableStorageInterface::getLatestTranslationAffectedRevisionId() should return the latest workspace-specific revisions. EntityRepositoryInterface::getActive() and EntityRepositoryInterface::getActiveMultiple() are two major use-cases for those type of queries.

The only impact on existing sites is that entity queries will function properly if the locking protection mentioned above was bypassed in custom code.

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Entity queries for latest (translation affected) revisions will now return the latest workspace-specific revision when executed inside a workspace.


Viewing all articles
Browse latest Browse all 300822

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>