Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed a bug where selected image transforms were being forgotten, if the transform changed the file format. ([#588](https://github.com/craftcms/ckeditor/issues/588))
- Fixed a bug where downloadable links’ `download` attributes were sometimes getting set to the value `"true"`. ([#606](https://github.com/craftcms/ckeditor/issues/606))
- Fixed a bug where custom styles weren’t being applied in fullscreen mode. ([#614](https://github.com/craftcms/ckeditor/issues/614))
- Fixed a bug where entry deletion blockers were factoring in drafts and revisions that referenced the to-be-deleted entry. ([#600](https://github.com/craftcms/ckeditor/issues/600))
- Fixed a styling issue with the Link modal. ([#610](https://github.com/craftcms/ckeditor/issues/610))

## 5.6.1 - 2026-05-13
Expand Down
6 changes: 5 additions & 1 deletion src/deletionblockers/ReferenceDeletionBlocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use craft\base\ElementInterface;
use craft\ckeditor\Plugin;
use craft\db\Query;
use craft\db\Table;
use craft\elements\deletionblockers\BaseDeletionBlocker;
use craft\helpers\Html;
use craft\helpers\StringHelper;
Expand All @@ -27,9 +28,12 @@ public function init()
{
if (Craft::$app->getDb()->tableExists(Plugin::TABLE_REFERENCES)) {
$this->referenceCount = (new Query())
->from(Plugin::TABLE_REFERENCES)
->from(['ckeditor_references' => Plugin::TABLE_REFERENCES])
->leftJoin(['elements' => Table::ELEMENTS], '[[elements.id]] = [[ckeditor_references.sourceId]]')
->where([
'targetId' => $this->elements->ids()->all(),
'elements.draftId' => null,
'elements.revisionId' => null,
])
->count();
} else {
Expand Down
Loading