# Embedding is BROKEN in 3.0.4 (stable)

**URL:** https://meta.discourse.org/t/embedding-is-broken-in-3-0-4-stable/268559
**Category:** Bug
**Created:** [June 16, 2023, 12:34am UTC](https://meta.discourse.org/t/embedding-is-broken-in-3-0-4-stable/268559 "2023-06-16T00:34:48Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [June 16, 2023, 9:55am UTC](https://meta.discourse.org/t/embedding-is-broken-in-3-0-4-stable/268559/7 "2023-06-16T09:55:33Z")

</div>

So main has [this](https://github.com/discourse/discourse/blame/main/lib/topic_retriever.rb#LL49C5-L49C96)

```
TopicEmbed.import_remote(@embed_url, user: User.find_by(username_lower: username.downcase))

```

and stable has [this](https://github.com/discourse/discourse/blame/stable/lib/topic_retriever.rb#L53)

```
TopicEmbed.import_remote(user, @embed_url)

```

Note the order of the parameters.

Now the backport of the security patch [changed the function signature on stable](https://github.com/discourse/discourse/commit/5e3106387feb6de59d749202649971fb3c36ed41#diff-a9aa56fcefb13804a057905bdd06a402290431de865469884df64a9585b4206eL206) to the new parameter order,so

`def self.import_remote(import_user, url, opts = nil)`

became

`def self.import_remote(url, opts = nil)`

and now the url parameter receives a User object.

Changing the function call resolves the issue

```plaintext
diff --git a/lib/topic_retriever.rb b/lib/topic_retriever.rb
index b798df6cd7..6186ce5868 100644
--- a/lib/topic_retriever.rb
+++ b/lib/topic_retriever.rb
@@ -50,6 +50,6 @@ class TopicRetriever
     user = User.where(username_lower: username.downcase).first
     return if user.blank?
 
- TopicEmbed.import_remote(user, @embed_url)
+ TopicEmbed.import_remote(@embed_url, user: user)
   end
 end

```

@blake

---

_[View the full topic](https://meta.discourse.org/t/embedding-is-broken-in-3-0-4-stable/268559)._
