fix: #3621488 Delete the pending Canvas auto-save and create a new revision when resetting a layout

Issue: https://www.drupal.org/project/canvas_override/issues/3621488

Summary

Both reset paths emptied field_canvas_layout and saved in place. A pending Canvas auto-save (a full node snapshot including the old layout) survived, and re-publishing it restored the layout that was just reset; the save also overwrote the current default revision with no trail.

Both paths now record the reset as a new revision (log message, user, timestamp) and call AutoSaveManager::delete() after saving.

AI-Generated: Yes (fix authored with Claude Code; reviewed by Rajab Natshah.)

Checkpoints

  • 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
Edited by Rajab Natshah

Merge request reports

Loading