Problem/Motivation

When saving a new draft revision of a published node, the node is incorrectly removed from all assigned entityqueues, even though a published version still exists.

Steps to reproduce

  1. Create a published node and add it to an entityqueue via the entityqueue_form_widget
  2. Create a new draft revision of that node (e.g., by editing it and selecting "Save as Draft")
  3. Save the draft
  4. Check the entityqueue - the node has been removed

Root Cause

The entityqueue_form_widget_form_node_form_submit() function checks only the current revision's publication status ($node->isPublished()) when deciding whether to remove the node from queues. Since draft revisions are unpublished, this causes the removal logic to treat the entire entity as unpublished and remove it from all queues.

Proposed resolution

Check if any published revision of the node exists in the database before removing it from queues. If a published version exists, only remove from unchecked queues. If no published version exists, remove from all queues.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
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

yasmeensalah created an issue. See original summary.

yasmeensalah’s picture

Title: Quest Trusted Data Management Platform » Saving a draft revision will remove the node from the queue

yasmeensalah changed the visibility of the branch

yasmeensalah’s picture

Issue summary: View changes
yasmeensalah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Active » Needs review
josebc’s picture

Status: Needs review » Fixed

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.

rajab natshah’s picture

Status: Fixed » Needs review

Moving on with further testing and ensuring the unit tests pass before releasing.

rajab natshah’s picture

Assigned: Unassigned » rajab natshah

  • rajab natshah committed 40b26098 on 2.0.x
    fix: #3611115 Fix failing FunctionalJavascript tests and make all CI...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Needs review » Fixed
Issue tags: +entityqueue_form_widget-2.0.9, +entityqueue_form_widget-2.1.0

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.