# Topic List Previews (legacy)

**URL:** https://meta.discourse.org/t/topic-list-previews-legacy/101646
**Category:** Plugin
**Tags:** deprecated
**Created:** [November 9, 2018, 3:56am UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646 "2018-11-09T03:56:38Z")
**Posts on this page:** 20
**Page:** 28

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 22, 2021, 9:36pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1497 "2021-07-22T21:36:06Z")

</div>

> [@Stanzilla](#):
>
> remove the links inside of the post completely and rebuild the HTML and it will still show the old image.

Discourse will have cached the link response so doing this is redundant.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 22, 2021, 10:17pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1498 "2021-07-22T22:17:41Z")

</div>

Hrmm..is there any way to clear this cache when a post gets edited? Would that be a Discourse problem or something TLP could do?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 22, 2021, 10:19pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1499 "2021-07-22T22:19:32Z")

</div>

Have you tried my suggestion of random query string? Eg `myurl.com?peter=green`. TLP is relatively superficial in this scenario.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 22, 2021, 10:22pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1500 "2021-07-22T22:22:07Z")

</div>

> [@merefield](#):
>
> Have you tried my suggestion of random query string?

I did, sorry if that was not clear, the picture did not change.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 22, 2021, 10:24pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1501 "2021-07-22T22:24:18Z")

</div>

Then the og tag being used might not changing. Would need to dig into Discourse source to confirm the exact one being used.

Can you confirm the onebox image is changing within the Topic @Stanzilla? Because if that’s not changing then Onebox is definitely using a different source tag.

If the onebox is not changing then I can’t see why TLP would show anything different.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 23, 2021, 10:59am UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1502 "2021-07-23T10:59:46Z")

</div>

It’s definitely using `og:image` as seen here in onebox specs: [onebox/spec/lib/onebox/open\_graph\_spec.rb at b816ada0cc09a374abdddf195c7986668862a26b · discourse/onebox · GitHub](https://github.com/discourse/onebox/blob/b816ada0cc09a374abdddf195c7986668862a26b/spec/lib/onebox/open_graph_spec.rb)

Unless you are oneboxing some kind of embed, it sounds like some caching issue.

Could you remove the plugin and try my TC instead? That way I can rule out the minor overrides I’m doing for: [discourse/lib/cooked\_post\_processor.rb at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/1472e47aae5bfdfb6fd9abfe89beb186c751f514/lib/cooked_post_processor.rb#L202) here: [discourse-topic-previews-sidecar/lib/cooked\_post\_processor\_edits.rb at 971ba5d3a868506b34b61201c32640a0a6bbaa01 · merefield/discourse-topic-previews-sidecar · GitHub](https://github.com/paviliondev/discourse-topic-previews/blob/971ba5d3a868506b34b61201c32640a0a6bbaa01/lib/cooked_post_processor_edits.rb#L4) in case they are the issue.

If the TC exhibits the same problem for a fresh Topic then it’s down to Discourse core criteria and code.

TC here: [GitHub - merefield/discourse-tc-topic-list-previews: Enriches the content and layout of topic lists · GitHub](https://github.com/merefield/discourse-topic-list-previews-theme)

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 23, 2021, 3:19pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1503 "2021-07-23T15:19:18Z")

</div>

> [@merefield](#):
>
> Then the og tag being used might not changing. Would need to dig into Discourse source to confirm the exact one being used.
> 
> Can you confirm the onebox image is changing within the Topic @Stanzilla? Because if that’s not changing then Onebox is definitely using a different source tag.
> 
> If the onebox is not changing then I can’t see why TLP would show anything different.

I can confirm that the Onebox image is changing

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 23, 2021, 3:46pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1504 "2021-07-23T15:46:08Z")

</div>

> [@merefield](#):
>
> It’s definitely using `og:image` as seen here in onebox specs: [onebox/spec/lib/onebox/open\_graph\_spec.rb at b816ada0cc09a374abdddf195c7986668862a26b · discourse/onebox · GitHub](https://github.com/discourse/onebox/blob/b816ada0cc09a374abdddf195c7986668862a26b/spec/lib/onebox/open_graph_spec.rb)
> 
> Unless you are oneboxing some kind of embed, it sounds like some caching issue.
> 
> Could you remove the plugin and try my TC instead? That way I can rule out the minor overrides I’m doing for: [discourse/lib/cooked\_post\_processor.rb at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/1472e47aae5bfdfb6fd9abfe89beb186c751f514/lib/cooked_post_processor.rb#L202) here: [discourse-topic-previews-sidecar/lib/cooked\_post\_processor\_edits.rb at 971ba5d3a868506b34b61201c32640a0a6bbaa01 · merefield/discourse-topic-previews-sidecar · GitHub](https://github.com/paviliondev/discourse-topic-previews/blob/971ba5d3a868506b34b61201c32640a0a6bbaa01/lib/cooked_post_processor_edits.rb#L4) in case they are the issue.
> 
> If the TC exhibits the same problem for a fresh Topic then it’s down to Discourse core criteria and code.
> 
> TC here: [GitHub - merefield/discourse-tc-topic-list-previews: Enriches the content and layout of topic lists · GitHub](https://github.com/merefield/discourse-topic-list-previews-theme)

With your Theme Component, I don’t get images at all, looks like this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/6/a6ce478442e4b1218d28dcc2dca6efc36fb865ae.png)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 23, 2021, 4:02pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1505 "2021-07-23T16:02:24Z")

</div>

Something is breaking your javascript. Have you rebuilt without TLP? Running both will not work.

Check your console for errors.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 23, 2021, 4:15pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1506 "2021-07-23T16:15:41Z")

</div>

I have rebuilt after disabling the plugin, yeah. Console only has warnings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/0/c058c15073bc4d3dba2d478ba078c74f578979db.png)

Edit: I did have another component that influences the styling of this page after disabling that I got the images back.

I then rebuilt the HTML of the post from the original problem and now it shows the updated image. So it works with your component but not the original TLP plugin.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 23, 2021, 4:26pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1507 "2021-07-23T16:26:48Z")

</div>

I think this happens when a topic gets created using a “featured link”, when you do that it never uses the media from the actual links in the topic, and you can’t change a featured link after the fact.

Bonus fun fact: When you disable “featured links” in a category, all posts keep theirs but you can no longer remove them when editing.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 23, 2021, 4:47pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1508 "2021-07-23T16:47:12Z")

</div>

Oh that’s interesting.

But what happens in TLP plugin when you create a new topic via featured link of the same target page now that the og image has been updated?

If this is too much effort you can stick with the TC.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 23, 2021, 5:16pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1509 "2021-07-23T17:16:38Z")

</div>

I’ll try in a bit! TC is nice and I would stay on it if it generally just works better but I kinda want/need these other customizations to the topic list that I had to disable and don’t think I’ll have time to adopt them to special case for TC and they just work with TLP. What they do is hide the extra avatars in the list so it only shows the one of the topic creator and some more.

---

<div class="post-metadata">

### Author: ![Stanzilla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stanzilla/32/166422_2.png) [@Stanzilla](https://meta.discourse.org/u/Stanzilla)
#### Post date: [July 26, 2021, 3:39pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1510 "2021-07-26T15:39:42Z")

</div>

Okay tested in TLP, removed the featured link from a topic, rebuilt the HTML, now it does not have a image at all.

I then added `?test=true` to the URL in the thread. No image.  
I then rebuilt the HTML on the post, still no image.

Edit: Okay, took a while but now it has one again, and it’s the correct / latest one from the link

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [July 26, 2021, 6:56pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1511 "2021-07-26T18:56:59Z")

</div>

There is a way to not parse links in topic preview in order so they don’t break _click on description and go to thread_ feature?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 29, 2021, 6:35pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1512 "2021-07-29T18:35:35Z")

</div>

You could try some css? Eg: [How to Disable Links | CSS-Tricks](https://css-tricks.com/how-to-disable-links/)

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [July 29, 2021, 7:27pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1513 "2021-07-29T19:27:49Z")

</div>

Of course but how to hide/show links for specific user group?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 29, 2021, 10:26pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1514 "2021-07-29T22:26:10Z")

</div>

If you need someone to build that for you, suggest posting in #Marketplace. That’s a bit beyond the scope of the plugin.

---

<div class="post-metadata">

### Author: ![diakopter](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@diakopter](https://meta.discourse.org/u/diakopter)
#### Post date: [August 3, 2021, 9:36pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1515 "2021-08-03T21:36:15Z")

</div>

previews/thumbnails are taking 5 minutes to appear for me also

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 3, 2021, 9:41pm UTC](https://meta.discourse.org/t/topic-list-previews-legacy/101646/1516 "2021-08-03T21:41:35Z")

</div>

This is a core process that runs in the background. The plugin does not modify that. A delay is normal.

[Previous page](https://meta.discourse.org/t/topic-list-previews-legacy/101646.md?page=27)

[Next page](https://meta.discourse.org/t/topic-list-previews-legacy/101646.md?page=29)
