Remove embedded object references when deleting articles
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 17 Jul 2020 09:25:24 +0000 (11:25 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 17 Jul 2020 09:33:13 +0000 (11:33 +0200)
see #3429

wcfsetup/install/files/lib/data/article/ArticleAction.class.php

index 324340950c1a60ea83c618356997a89d977d10f1..0e60fa4a0762016617c87d1319cc87dafca8c2f2 100644 (file)
@@ -289,6 +289,8 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                        TagEngine::getInstance()->deleteObjects('com.woltlab.wcf.article', $articleContentIDs);
                        // delete entry from search index
                        SearchIndexManager::getInstance()->delete('com.woltlab.wcf.article', $articleContentIDs);
+                       // delete embedded object references
+                       MessageEmbeddedObjectManager::getInstance()->removeObjects('com.woltlab.wcf.article.content', $articleContentIDs);
                }
                
                $this->unmarkItems();