From bdde047dfa23fc0f8b4b8ab5b06bbd64ba02bcce Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Sun, 5 Sep 2021 20:42:40 +0100 Subject: [PATCH] [PLUGINS][Embed] Embed references a table that does not exist. It seems to mean `attachment_embed`, rather than `link_to_attachment` --- plugins/Embed/Embed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Embed/Embed.php b/plugins/Embed/Embed.php index 440f20700b..30e147ce23 100644 --- a/plugins/Embed/Embed.php +++ b/plugins/Embed/Embed.php @@ -304,9 +304,9 @@ class Embed extends Plugin } // If an attachment already exist, do not create an Embed for it. Some other plugin must have done things - $link_to_attachment = DB::find('link_to_attachment', ['link_id' => $link->getId()]); - if (!is_null($link_to_attachment)) { - $attachment_id = $link_to_attachment->getAttachmentId(); + $attachment_to_link = DB::find('attachment_to_link', ['link_id' => $link->getId()]); + if (!is_null($attachment_to_link)) { + $attachment_id = $attachment_to_link->getAttachmentId(); try { $attachment = DB::findOneBy('attachment', ['id' => $attachment_id]); $attachment->livesIncrementAndGet();