Topic List Previews (TLP)

Thank you for your quick reply. :+1: :100:

After hours of debugging :sweat_smile: , I finally found out that the error is casued by the setting.

Prevent anons from downloading files
Prevent anonymous users from downloading attachments.

The error occur when I enable this setting.

The imagesloaded.js file, which Topic List Previews dynamically loads from
/uploads/default/original/1X/d8ce366bd7aad8f9fc7b26b08aecc855dd6d425c.js, was blocked for anonymous users when the ā€œPrevent anons from downloading filesā€ setting was enabled.
As a result, the browser failed to load the script, causing the preview-edits.gjs component in TLP to malfunction for logged-out visitors.

And the error disappear immediately when I reset back to default.

1 Like

Good to know, thanks!

1 Like

Wanted to make note that I resolved this from not updating but removing old plugins that were still in the app.yml when those plugins were bundled in discourse core.
Removing those also fixed a number of other problems so if anyone comes across weird random issues they should probably remove those plugins.

3 Likes

Hi @merefield, hope you’re doing well! :blush:

Could you help me understand what the setting topic_list_tiles_larger_featured_tiles is supposed to do and how it should look when it works?
Thanks a lot in advance!

1 Like

It simply makes the tile take up two columns instead of one (which doubles the height too) so you can feature specific topics in the layout.

Unfortunately that setting is broken atm. I suspect it’s been broken since the huge rewrite required by changes to the Topic List and I simply missed it. I have a branch which fixes it but that work relies on CSS masonry being released and we are still waiting on that.

I may end up fixing it at some point in any case under the current system. PR welcome.

1 Like

Hiya! I was directed to this component because I’m looking for a solution to ā€œexpandā€ my topic contents to make Discourse more facebook/blog-like, as in a stream of posts you can scroll down. I’ve installed it and I can see my previews, which is cool! I’m wondering if there is a setting somewhere to control the length of the preview (I’d like to make it longer). Thanks!

I think the length depends on the Topic excerpt maxlength site setting.

2 Likes

tried, and it doesn’t seem to be that :sad_but_relieved_face:

How did you try? Did you only change the setting? Did you create new topics after changing it? Did you trigger regeneration of the existing excerpts?

2 Likes

If you are self-hosted, you can install the sidecar plugin (see the OP) and update topic_list_excerpt_length within the plugin which overrides core.

3 Likes

I just changed the setting… no, I didn’t create new topics, and didn’t know that triggering regeneration of existing excerpts was a thing :woozy_face:

Thanks, I am self-hosted. What does the override do? (I need to figure out how to install plugins… I’ve seen there is a guide but it’s seemed too involved for the amount of energy at my disposal right now, sadly!)

It’s not that bad! Just add the repo URL to app.yml and rebuild.

2 Likes

Yes, but for all that I need to crawl onto the server, which I haven’t yet done, as a friendly geek did the initial install for me. Within my capabilities but I need to unearth my access codes and find my way in first…

1 Like

How do I trigger topic regeneration?

(Also, side question, might be off-topic: if I know the name of a setting, like the one @Moin gave me here, is there an easy way to ā€œset itā€ aside from hunting/searching for it in the admin interface?)

So it works for new topics?
I think you need to rebake the old posts:

yes, works for new posts! finally made one :sweat_smile:
ā€œrebakingā€ – can only be done from server-side then, and not through the admin interface, I understand?

for individual topics, or you will need to use CLI and rake task.

2 Likes

I think you can also use the ā€œrebuild HTMLā€ button.


I didn’t suggest that in my last post because I had the impression it didn’t work when I tried it, but now the length of the excerpt has changed, so I guess it takes a while for the change to be visible.

2 Likes

If you combine it with the plugin, the excerpts are cached, but the cache key changes if the plugin excerpt length setting is changed.

1 Like