Topic List Previews

This worked perfectly, my thumbnails are rebuilt — thanks so much for the pointer!

2 Likes

Hey, similar issue as Ian C ; since the upgrade to Discourse 2.5.0.beta4, with Topic List Previews 4.4.0, most of the thumbnails disappeared (on a side-node, why not all?)

image

image

I’ve tried to rebake all posts. It did not help.

Any solution, please?

1 Like

Max days old is way too low. As I pointed out it should be a high number. 30 means anything older than a month will not be thumbnailed.

1 Like

The option is not enabled. It should not be affected, right?

You haven’t checked the box. Images have to be uploaded.

1 Like

It has been disabled because of various issues with it. Also conflicting with custom modifications if I remember.

So, It’s enabled, and I’ve increased max old days. What to do next? I’m not sure how this options works. Does it means we need to wait every single image is downloaded before re-trying again rebacking?

1 Like

This is mostly core discourse behaviour now, not TLP (It used to be all TLP, now there are minimal overrides in the plugin around this because Thumbnail support is now in core).

You need to rebake posts again and this will set up a load of UploadHotLinkImages sidekiq jobs and pull them all in. Within minutes it will start to populate the thumbnails.

2 Likes

Alright. It’s running. Thanks for the help!

2 Likes

How do I get the image thumbnails to appear when you are viewing topics in a category?

Thanks,

1 Like

Rebaking is done. What a messy result! :pensive:

Well, now I know why this option was disabled.

We are using Wordpress and the first post contains full html. Discourse has no issue to replace image HTML with markdown, but markdown image can’t be rendered if surrounded with HTML (or specifically you need a least en empty line above).

I have 2 problems:

  1. Some images were not downloaded, likely because of srcset attribute (but it’s okay). The images are well displayed in the first post, but there is no thumbnail generated. It was working before.

    Is there some breaking change in the plugin where thumbnail can’t be generated with post containing already image HTML? I believe I’ve rebaked 3 times now, it did not help. Is there another to force regenerate the thumbnail? I mean, before, even with the option disabled, a thumbnail was generated with any image on topic creation or even after editing it ; this behavior doesn’t work anymore.

  2. As said above, some markdown image are not rendered.

    I tried to see if some plugin API was available before post is cooked, but could not find one.

    I guess the only way is to add newlines in the concerned raw message directly in the DB and through the rails console, and rebacking again.

    Currently, I’m struggling (don’t know ruby) somehow based on discourse code source:
    It seems to work for one topic. Did not yet execute for all topics. Is there a better/cleaner way to fix the issue without doing that?

Post
  .where(post_number: 1)
  .where("raw LIKE '%upload://%'").each do |post|  
     post.raw.gsub!(/(!\[.*upload:\/\/.*\))/, "\n\n\\1") 
     post.save!(validate: false); 
     post.rebake! 
end

Any help is appreciated, thanks!

1 Like

Same problem here.

After rebaking the previews now work.

But each time I have to upgrade (not under my control, each time I made a rebuild for changing something the forum is upgraded) I cross my fingers.

1 Like

Christian, if you are referring to the Plugin, they are in the Category’s own Settings (not the main admin settings).

Have added a note to the OP to make that more clear! :slight_smile:

1 Like

Criteria for thumbnail building is largely deferred to Discourse core now.

Your issue is likely to occur with any add-in component that uses Discourse thumbnails. Should they broaden their criteria?

Could you post the complete raw contents of a problem post? If I ever get time (I can’t promise anything) I’ll see if it’s trivial to broaden inclusion. However, I’m a little reluctant to override this as Discourse having implemented this in core is a good reason to avoid overrides and rely more on core. This will help stability of the plugin and reduce breaking changes. It’s exactly this kind of customisation that trips up plugins.

You could always maintain your own fork and customise this yourself?

You could try to use the thumbnail picker in the Topic Meta editor to see if you can pick the thumbnail, but that is based on the same criteria for inclusion. If the thumbnail doesn’t appear there, it is not meeting the criteria, so that would act as a good confirmation.

1 Like

This is a pretty suboptimal arrangement.

If you want to optimise stability test upgrades in a staging environment, report/resolve any issues, then update production.

Applying untested changes directly to Production is usually a bad idea.

We do our best to deliver compatibility, focusing on the first 5 days of the month, but we are a change taker, with no warning, so update Discourse the rest of the month at your own risk. And please test your upgrades in a safe environment!

2 Likes

EDIT: comment moved to Problems with thumbnails from Soundcloud and YouTube oneboxes.

2 Likes

Yeah, as above, most thumbnailing logic is now in Discourse. I actually override to loosen the inclusion requirement slightly, but it still may be stricter than before.

I’m wary of overriding any more and really the ‘looseness’ of the criteria for considering something worthy of thumbnailing should now be a core issue. TLP should really just be a customer of that data.

OK now picked up here: Problems with thumbnails from Soundcloud and YouTube oneboxes

2 Likes

Well, the initial issue is likely because of FEATURE: Include optimized thumbnails for topics (#9215) · discourse/discourse@03818e6 · GitHub where it seems thumbnail can be only uploads now. Discourse always first in breaking behavior/changes. Sorry for being salty, it’s just frustrating. :pensive:

I get it it now depends on Discourse behavior. Thanks for the help.

Just telling my status on this. Still struggling.

I’ve tried to normalize img html to include only src attribute since it seems to be ignored by discourse. For example usually a post from WP would start to contain this (here I’ve already cleaned the html, no attributes except src). The criteria you’re talking about does not seems to be related.

<div data-wp><a href="https://www.aliexpress.com/item/4000096717124.html" target="_blank"><img src="https://zuzu.deals/wp-content/uploads/2020/05/5ebd241f6e871-150x150.jpg" /></a><div><div data-buy>

Then rebaking (so image are downloaded) from the console would work only for some topics.
Typically the topic where I’ve extracted the HTML above is ignored. Whatever rake posts:rebake or in rails post.save! ; post.rebake! ; the topic is ignored. I can’t see a reason why it fails, it has the same html as the others topics which worked.

However, if I edit manually from composer without changing the content and saving, then the image is extracted/downloaded. There are too much topics to edit manually.

Do you have an idea how you could achieve the same saving as composer does with rails console?

Note: the max old days option is set to the maximum value

1 Like

That’s a very interesting, if frustrating, difference in behaviour. Can I suggest you post that as a Support Topic as that’s not really in scope of the plugin?

1 Like

When loading /latest some of the posts are showing up as bookmarked for my profile even though I have no bookmarks. Multiple users reporting this.

Here’s a screenshot. I have no bookmarked posts yet some of the posts shows up as bookmarked:

Hovering over the bookmarked icons of one of the falsely bookmarked posts shows a tool-tip with the following:

you’ve bookmarked this post[missing %{name} value]

Clicking the bookmark icon toggles the icon to off, but doesn’t seem to actually have any effect… if I reload the page those same posts show up as bookmarked again, even though they are not.

However, if after clearing the icon state I click it once again to toggle the icon back on… then the post is actually bookmarked as a result.

We’re using Discourse 2.5.0.beta4 - https://github.com/discourse/discourse version 918bd75909d73cd5361f285d59f9b2e0db97e4ac and TLP 4.3.1

What does STR mean?

1 Like

Huge troubles here after adding an image to a topic.

Can’t access this topic : https://forum.cwowd.com/t/oceans-par-north-star-games-livraison-vf-juin-2020/5221

Can’t find it via search (Internal server error) with eg oceans or north star

Tags used for this topic = Error 500

Category used for this topic = https://forum.cwowd.com/exception (I can access to Unread etc.)

Main pages (lastest or categories) = Error 500.

Got this bug this morning, could not find any solution and rolled back to last backup. Tried to change image and got again Errors 500/exception/ISE etc.