Problem/Motivation

When a node is being updated via the api endpoint, the $entity is being saved even the revision save is $event->shouldPreventRevisionSave() is enabled. The extra save can add some confusion as nothing has changed with the revision. The code https://git.drupalcode.org/project/kordiam/-/blob/1.0.12/src/Controller/...

Proposed resolution

We could remove the extra save by moving the $entity->save() next to the ModuleSettings::kordiamRevisionSet method.

CommentFileSizeAuthor
#2 3578195-preventing-unnecessary-save.patch1.13 KBonnia

Issue fork kordiam-3578195

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    onnia created an issue. See original summary.

    onnia’s picture

    StatusFileSize
    new1.13 KB

    Suggestion to move the $entity->save()

    kordiam’s picture

    Version: 1.0.12 » 1.0.13
    Status: Active » Fixed

    The fix from this issue has been applied and is now available in module version 1.0.13.

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.