Topic List Previews (legacy)

Please don’t update outside of the supported period. (the first five days of the month, as per our policy outlined in the OP). If you do so, we advise you test out the upgrade in a non-Production environment first.

3 Likes

That said, on this occasion, I’ve pushed a fix for both the plugin and the TC :).

TC: https://github.com/merefield/discourse-topic-list-previews-theme/commit/7a2f5399fb9387507aeeb221b48aeb99a3ed51b9

Plugin: https://github.com/paviliondev/discourse-topic-previews/pull/160

They should both now work on latest tests-passed.

2 Likes

Thanks @merefield for fixing this. I was just about to report it. I did rebuild last night and then all the posts on my site were unviewable. I then had to disable unofficial plugins and found that not just TLP, but other plugins are also suffering from this.

Please also check these plugins as they may have the same issue. Only after disabling these can I see my posts again:

https://github.com/paviliondev/discourse-news
https://github.com/paviliondev/discourse-ratings
https://github.com/paviliondev/discourse-layouts

1 Like

It is out of our support period currently, but the primary maintainers of those will take a look at the minimum when the support period comes back around again.

Please resist the temptation to rebuild Production so often. Just because you can, doesn’t mean you should :slight_smile:

4 Likes

I shall try to resist. :innocent:

2 Likes

And if you must fiddle with your build, do so in a staging environment. Heck building one of those might keep you too busy to upgrade Prod ;).

4 Likes

I have no functional problems with this plugin. I can see the topic list thumbnails working just fine. However, I saw this in my log today (It’s the only error in my log), so I thought I would report it. I think this is a conflict with the “Solved” plugin. You can reproduce it if you have both of these plugins. If you try to create a topic and pick the solution, you may get a 500 error.

Log
plugins/discourse-topic-previews/plugin.rb:61:in `block (2 levels) in activate!'
lib/discourse_event.rb:14:in `block in trigger'
/usr/local/lib/ruby/2.6.0/set.rb:338:in `each_key'
/usr/local/lib/ruby/2.6.0/set.rb:338:in `each'
lib/discourse_event.rb:13:in `trigger'
plugins/discourse-solved/plugin.rb:160:in `block in accept_answer!'
lib/distributed_mutex.rb:33:in `block in synchronize'
lib/distributed_mutex.rb:29:in `synchronize'
lib/distributed_mutex.rb:29:in `synchronize'
lib/distributed_mutex.rb:14:in `synchronize'
plugins/discourse-solved/plugin.rb:81:in `accept_answer!'
plugins/discourse-solved/plugin.rb:222:in `accept'
actionpack (6.0.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.0.3.2) lib/abstract_controller/base.rb:195:in `process_action'
actionpack (6.0.3.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.0.3.2) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
app/controllers/application_controller.rb:340:in `block in with_resolved_locale'
i18n (1.8.5) lib/i18n.rb:313:in `with_locale'
app/controllers/application_controller.rb:340:in `with_resolved_locale'
activesupport (6.0.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
activesupport (6.0.3.2) lib/active_support/callbacks.rb:139:in `run_callbacks'
actionpack (6.0.3.2) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.0.3.2) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `block in instrument'
activesupport (6.0.3.2) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.0.3.2) lib/active_support/notifications.rb:180:in `instrument'
actionpack (6.0.3.2) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (6.0.3.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (6.0.3.2) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.0.3.2) lib/abstract_controller/base.rb:136:in `process'
actionview (6.0.3.2) lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler (2.0.4) lib/mini_profiler/profiling_methods.rb:104:in `block in profile_method'
actionpack (6.0.3.2) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.0.3.2) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:834:in `call'
railties (6.0.3.2) lib/rails/engine.rb:527:in `call'
railties (6.0.3.2) lib/rails/railtie.rb:190:in `public_send'
railties (6.0.3.2) lib/rails/railtie.rb:190:in `method_missing'
actionpack (6.0.3.2) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
actionpack (6.0.3.2) lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.0.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.0.3.2) lib/action_dispatch/routing/route_set.rb:834:in `call'
lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:336:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/cookies.rb:648:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.0.3.2) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (6.0.3.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
logster (2.9.2) lib/logster/middleware/reporter.rb:43:in `call'
railties (6.0.3.2) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.0.3.2) lib/rails/rack/logger.rb:28:in `call'
config/initializers/100-quiet_logger.rb:19:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/request_id.rb:27:in `call'
lib/middleware/enforce_hostname.rb:22:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.0.3.2) lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
rack-mini-profiler (2.0.4) lib/mini_profiler/profiler.rb:321:in `call'
message_bus (3.3.1) lib/message_bus/rack/middleware.rb:61:in `call'
lib/middleware/request_tracker.rb:176:in `call'
railties (6.0.3.2) lib/rails/engine.rb:527:in `call'
railties (6.0.3.2) lib/rails/railtie.rb:190:in `public_send'
railties (6.0.3.2) lib/rails/railtie.rb:190:in `method_missing'
rack (2.2.3) lib/rack/urlmap.rb:74:in `block in call'
rack (2.2.3) lib/rack/urlmap.rb:58:in `each'
rack (2.2.3) lib/rack/urlmap.rb:58:in `call'
unicorn (5.6.0) lib/unicorn/http_server.rb:632:in `process_client'
unicorn (5.6.0) lib/unicorn/http_server.rb:728:in `worker_loop'
unicorn (5.6.0) lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
unicorn (5.6.0) lib/unicorn/http_server.rb:144:in `start'
unicorn (5.6.0) bin/unicorn:128:in `<top (required)>'
vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<main>'
2 Likes

Steps to reproduce please. I have two sites running this and no such log entries.

1 Like

To reproduce on my site:

  1. Have Topic List Previews enabled.
  2. Go to a topic where Solved is enabled:
    image
  3. As an admin or staff, go to someone’s post and select it as a Solution.
2 Likes

Thanks. I’ll take a look during support week.

1 Like

@merefield I love your topic list preview theme component together with the sidecar plugin for likes and bookmarks.

https://github.com/merefield/discourse-topic-list-previews-theme/

I believe, I found a bug in the Topic List Preview List when someone clicks the “Replies”.

Ideal situation:

Click the replies for the topic in the topic preview list, you get to select the Dates and you choose one and it takes you to the topic details.

My problem:

Click the replies for the topic in the topic preview list, I see the Dates selection, but before I chose one, Topic List Preview page refreshes and it doesn’t take you to the Topic details.

image

When you get a chance, please verify this.

Thank you.

2 Likes

I’ve spent a lot of time during the month on support this month. Given this is not critical I’ll defer it to a more quieter period. Thanks for your understanding. My recollection is that this is an old bug the fix for which was never prioritised. PR welcome as ever.

3 Likes

I have installed the following theme component and plugin. They work great together. I need some help.

https://github.com/merefield/discourse-topic-list-previews-theme 
git clone https://github.com/merefield/discourse-topic-previews.git -b "theme_sidecar" 

I am looking for a CSS tip on how to align the likes and bookmark icons under the excerpt. They shift based on the size of the image.

Thank you.

2 Likes

I’m better with an example in front of me, especially if you don’t use thumbnails everywhere in your forum. But I think the best way to do this will be with the topic-details class to limit the width it uses. Limit the width of this class with something like this width: calc(100% - 000px); (000 = the width set up for the thumbnail column) and add a margin-left with the same size as the thumbnails. It might be enough

1 Like

Could you PM the site address? I’ll take a look at some point.

1 Like

Try:

.topic-details {
    overflow: hidden;
}
3 Likes

Wonderful, it works. Thanks so much :pray:

2 Likes

Is it possible to only enable this plugin for Theme A while disregarding it on Theme B?

2 Likes

Yes if you use the TC

2 Likes

Thanks. Pardon my ignorance, but what is TC? Theme component…?

2 Likes