Skip to content

References deletion blocker#576

Merged
brandonkelly merged 6 commits into
5.xfrom
feature/replace-refs
May 13, 2026
Merged

References deletion blocker#576
brandonkelly merged 6 commits into
5.xfrom
feature/replace-refs

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

@brandonkelly brandonkelly commented Apr 30, 2026

Description

CKEditor now tracks which elements are referenced within its content in a ckeditor_references table, and registers a new deletion blocker that alerts users when they are about to delete an element that’s referenced by a CKEditor field. Users will then have the choice to either replace the references with a replacement element, or ignore the blocker.

A deletion blocker modal for an asset, which lists 2 elements that reference the asset.

Any elements that contain CKEditor fields will need to be resaved for this feature to take effect. That can be done using the resave/all command combined with the --with-fields argument:

php craft resave/all --with-fields=myCkeditorField1,myCkeditorField2

Related issues

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Apr 30, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  composer.json  0% smaller
  src/Field.php Unsupported file format
  src/Plugin.php Unsupported file format
  src/controllers/ReplaceReferencesController.php Unsupported file format
  src/deletionblockers/ReferenceDeletionBlocker.php Unsupported file format
  src/jobs/ReplaceReferences.php Unsupported file format
  src/migrations/Install.php Unsupported file format
  src/migrations/m260427_230945_references.php Unsupported file format

@brandonkelly brandonkelly merged commit d71c2cf into 5.x May 13, 2026
2 checks passed
@brandonkelly brandonkelly deleted the feature/replace-refs branch May 13, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant