Topic List Previews


(Anton) #447

After upgrading Discourse to latest yesterday, home and some other pages stopped working. It turns out, the issue is caused by the Topic List Previews plugin.

See bug details and stacktrace below. But before that, let me share my concerns.

As discussed above, the plugin SHOULD NOT affect any pages for which it is not activated. Home page is one of such pages. Yet it turns out something related to thumbnails is still executed in your plugin when accessing the home page. This is not a good idea. And as it turned out, it is risky. As soon as the plugin gets a bug, the whole forum is affected.

I’d like to use it, but now I can’t risk to turn it on anymore until the main issue is fixed - please consider removing any actions and calls to your plugin, and any type of processing when accessing pages where it is not expected to do anything. Any of your plugin’s methods, especially when it comes to affecting output, but as well building thumbnails and other stuff, should only run on pages where the plugin is expected to affect the output.

Also, I guess building thumbnails should be done in background and should not run while accessing pages.

Hope it makes sense.


Info

ArgumentError (wrong number of arguments (given 0, expected 2))
/var/www/discourse/app/models/upload.rb:28:in `has_thumbnail?’

Environment

Backtrace

/var/www/discourse/app/models/upload.rb:28:in `has_thumbnail?'
/var/www/discourse/plugins/discourse-topic-previews/plugin.rb:40:in `thumbnail_url'
/var/www/discourse/plugins/discourse-topic-previews/plugin.rb:31:in `create_thumbnails'
/var/www/discourse/plugins/discourse-topic-previews/plugin.rb:144:in `get_thumbnails_from_image_url'
/var/www/discourse/plugins/discourse-topic-previews/plugin.rb:122:in `thumbnails'
/var/www/discourse/plugins/discourse-topic-previews/plugin.rb:128:in `include_thumbnails?'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:374:in `include?'
(eval):47:in `_fast_attributes'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:455:in `attributes'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:479:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer/associations.rb:124:in `block in serialize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer/associations.rb:123:in `map'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer/associations.rb:123:in `serialize'
/var/www/discourse/lib/freedom_patches/ams_include_without_root.rb:55:in `include!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:367:in `block in include_associations!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:366:in `each_key'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:366:in `include_associations!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:480:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:345:in `as_json'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:21:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:21:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:25:in `dump'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json.rb:139:in `dump'
/var/www/discourse/app/controllers/categories_controller.rb:39:in `block (2 levels) in index'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/mime_responds.rb:217:in `respond_to'
/var/www/discourse/app/controllers/categories_controller.rb:32:in `index'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:198:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:117:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:137:in `process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.7.1/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal.rb:196:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_controller/metal.rb:237:in `block in action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/mapper.rb:49:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/journey/router.rb:30:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/routing/route_set.rb:817:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/omniauth-1.3.1/lib/omniauth/builder.rb:63:in `call'
/var/www/discourse/config/initializers/008-rack-cors.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:129:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/query_cache.rb:36:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/rack/logger.rb:22:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:13:in `call_with_quiet_assets'
/var/www/discourse/config/initializers/100-silence_logger.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiler.rb:278:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/rack/middleware.rb:62:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:73:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:518:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:165:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
/var/www/discourse/lib/scheduler/defer.rb:85:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'

(charles) #448

I wonder if this may be the cause of topic list previews to load slow


(Angus McLeod) #449

Sorry for the slow response @Joe_Fedric, but I’ve now fixed the issue you were seeing. The front-end load order changed slightly in Discourse, which meant that the logic which updates the topic list according to the user’s settings no longer functioned as expected. @UltimateMoniker @Pad_Pors This may have fixed the issues you were seeing as well, please check.

@meglio I understand your concerns, however let me add a slightly different perspective.

Firstly, what is plugin is trying to do is inherently complex. It’s attempting to significantly change a core feature of Discourse (the listing of topics), largely without any structural support for its changes within Discourse itself. For example, most of the logic which manipulates the DOM is written in jQuery rather than in Handlebars or as a virtual DOM widget because the alternative would be to completely override the topic-list-item template and stick the template full of conditional logic (which you’re not meant to do). No doubt, there are more ways to improve the structure of this plugin, however they are not immediately obvious. What will help in this respect is the widgitization of the topic list, which I’m guessing @eviltrout has on his agenda somewhere. When that happens, I will be able to rely on the plugin api to update the frontend.

Secondly, the separation between ‘pages’ you refer to does not reflect how Discourse is built. Elements you see on each page are components that are reused between pages. The topic list and topic list items are both single, reused components. There is no simple way for a plugin to distinguish between the usage of a component in one place as opposed to the usage of a component in another place. In fact this plugin is the only plugin (as far as I’m aware) that does attempt to distinguish between the use of components in different places in the app based on the route. I have done this by observing the internals of the router in the topic list component, see here. However, this is both a hack and is not foolproof, as I cannot anticipate how the different uses of the topic list component will change over time.

Thirdly, I can’t anticipate what the changes will be made to discourse/discourse before they actually happen. You may notice that any plugin of any significant complexity has a history of messages along the lines of “Plugin stopped working after update”. This even applies to officially supported plugins. This is a workflow choice of the Discourse team which I generally like, however it does mean that non-core functionality, not using the plugin api, breaks relatively frequently.

Thumbnails have always been built when the Topic is made.

@charles The performance issue on topic list load is connected with the ActiveRecord lookups, as explained here.

I suspect the reason you’re experiencing issues now is because the server method I was using to generate the thumbnail images after the topic is created was changed 2 days ago by this commit. I’m investigating this currently.


(Angus McLeod) #450

I have fixed the immediate issue @meglio was experiencing.


#451

Hi Angus !

I have an issue with an heavily customized Discourse (we use your plugin for the possibility to like a topic on latest), but now, nobody can like topics on latest page.

Inside the topic I can like the post without any problem.

Am I the only one who experience this ?

I tried to deactive other plugins and some CSS stylesheets in admin panel, but I can’t say for sure it’s absolutely an issue on your plugin.

We noticed this pretty recently, I think it worked a week ago

It’s nothing urgent btw, I just want to know if I messed something up :v:


(Anton) #452

All is clear, thanks for the explanation.
Still, I’ll have to wait till it is possible to improve on most, if not all, things that you listed.

Thanks for all your effort!


(Angus McLeod) #453

Hey @Steven, yes this issue was caused by the same issue that produced the effect @Joe_Fedric described.

The way buffered rendering is handled in Discourse was changed by this commit:

As the Topic List Item component uses buffered rendering, this affected the render and re-render logic of this plugin.

I have updated the render logic to take this change fully into account. The like button works again now.


Suggestions for better plugin maintenance
(Pad Pors) #454

topic excerpt is shown for the suggested topic, is it by purpose or accidentally?

edit:

is it possible to have the sorting option in the social UI? e.g. sort based on most view, … .


(Pad Pors) #455
  1. the image in the social UI becomes 150150 px after upgrade :frowning: and I’m not sure how to bring it back to 150600 px (the settings are as before).

  2. some of the images got broken in the thumbnail. I checked and it happens to posts that have large images. when I change the images of those posts, the thumbnails do not get updated.

any clue?


(Angus McLeod) #456

Hey everybody, @pmusaraj and I have been working on a new structure for this plugin on this branch. It’s not yet merged, but it will be soon and will require you to update your settings if you are using this plugin.

The new settings structure allows you to specifically distinguish your topic list preview settings between every single discovery topic list: latest, new, unread, top, mobile latest, mobile new, mobile unread, mobile top, category 1 latest, category 1 new etc.

This is done via choice lists in both the site settings and category settings.

By default the site settings do not get applied to the category lists at all. The site settings can be set as the default for each category list via another setting topic_list_set_category_defaults.

There are a few things we’re trying to do here:

  1. Allow for as much customization as possible. You could just have thumbnail previews on your ‘new’ list in one category on mobile web only if you want.

  2. Try to isolate the functionality as much as possible. This new approach moves all of the display logic to the parent topic list component, to be set by a single piece of unified logic which derives its properties from the discovery topic list model rather than from the router.

We’ll merge this in a couple of days after some more testing. When we do this will require a settings update by any users of this plugin.

p.s. @Pad_Pors I’ll have a look at your issue separately tomorrow.


(Joe Fedric) #457

Can confirm that changes you made solve this problem. Thanks!


(Angus McLeod) #458

@Pad_Pors Looking at this now, each of these issues will be better addressed by the refactor @pmusaraj and I are working on. I’m hoping to merge this in the next day or so. Thanks for your patience.


(Nam Nguyen) #459

@angus Is it possible to show thumbnail picture of Onebox, or Youtube Background of LazyYT Plugin?


(OG) #460

Hello, thanks for great plugin!

I wonder on my installation it still loads larger thumbnails than I’ve set in admin panel (590x590 vs 75x75). How can I force regeneration of image thumbnails?


(Angus McLeod) #461

Hey folks. I just merged a big refactor for this plugin to provide more granular control and stability. Now all parts of the topic you can add to the topic list are controllable for every different possible list view.

I’ll update the guide in first post on this topic to reflect the new functionality.

If you have been using this plugin you will need to update your settings.

Thanks to @pmusaraj for his help with this.


(Angus McLeod) #462

I’ve updated the css attributes of the thumbnail so that in normal layout the dimensions match the size settings exactly and in social the max-dimension approach is taken to avoid stretching the image.

@Overgrow This will fix the issue you messaged me about.


(Nam Nguyen) #463

Hi, I had try a test, but it didn’t work with “Suggested Topics” like previous version


(Angus McLeod) #464

Please note, this plugin has been affected by the Ember 2.4 upgrade.

@pmusaraj and I are working on this here.


(Angus McLeod) #465

This plugin is now up to date with Ember 2.4.

https://github.com/angusmcleod/discourse-topic-previews/commit/3704efda753d9707fbcf0ff5a035983d49d39711


(Nam Nguyen) #466

Hi, your plugin is awesome, I very like it

I test it many times, but it not work perfectly with lastest Discourse, I set thumbnail width 190px and height 130px. and the result not look good. Can you fix it? Thanks!