From 3b577ff679dd60dea7c1739b50dabeff81d70a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=B6ffler?= Date: Wed, 24 Jan 2024 11:58:47 +0100 Subject: [PATCH 1/2] [BUGFIX] Add record to index queue when published # What this pr does Checks if action is "publish" and add record to index queue. Removed "swap" action as it's removed with https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-92206-RemoveWorkspaceSwappingOfElements.html. # How to test 1. Create a workspace 2. Switch to workspace and create page 3. Page is not in index queue -> correct 4. Publish the page to LIVE workspace 5. Page is not in index queue -> incorrect Fixes: #3718 --- Classes/IndexQueue/RecordMonitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/IndexQueue/RecordMonitor.php b/Classes/IndexQueue/RecordMonitor.php index f72aa0fb2..acbfa5e23 100644 --- a/Classes/IndexQueue/RecordMonitor.php +++ b/Classes/IndexQueue/RecordMonitor.php @@ -98,7 +98,7 @@ public function processCmdmap_postProcess( // track publish / swap events for records (workspace support) // command "version" - if ($command === 'version' && $value['action'] === 'swap') { + if ($command === 'version' && $value['action'] === 'publish') { $this->eventDispatcher->dispatch( new VersionSwappedEvent($uid, $table), ); From 7e8c2cd3009e008166db5f477a2f7ee5f571baec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20K=C3=A4hm?= Date: Mon, 3 Nov 2025 14:04:07 +0100 Subject: [PATCH 2/2] Use `swap` command as well. --- Classes/IndexQueue/RecordMonitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/IndexQueue/RecordMonitor.php b/Classes/IndexQueue/RecordMonitor.php index acbfa5e23..771dc19f1 100644 --- a/Classes/IndexQueue/RecordMonitor.php +++ b/Classes/IndexQueue/RecordMonitor.php @@ -98,7 +98,7 @@ public function processCmdmap_postProcess( // track publish / swap events for records (workspace support) // command "version" - if ($command === 'version' && $value['action'] === 'publish') { + if ($command === 'version' && ($value['action'] === 'publish' || $value['action'] === 'swap')) { $this->eventDispatcher->dispatch( new VersionSwappedEvent($uid, $table), );