Quote of solution does not expand if post contains poll

Hello, we are using the solved plugin on our forum. If I mark a post that contains a poll as “solved” and then go up to the first post, I cannot expand the solution. It just stays at “loading…”:

Here is a live demonstration of this.

What should happen

The quote of the solution in the first post should expand.

What happens instead

The quote’s text disappears and instead “loading…” is displayed indefinitely.

Steps to reproduce

  1. Create a poll in a post.
  2. Mark that post as “solved” using the solved-plugin.
  3. Go up to the first post and expand the quote of the solution.
  4. The solution simply displays “loading…”

Technical details

  • Discourse version: 1.9.4
  • Tested on Firefox 60.0.2 and Edge 42.17134.1.0

Unless you can repro this in the current stable version 2.0 it’s unlikely we’ll look at it.

3 Likes

Reproduced in 2.0.1


PS.: Although, according to this representative poll, 75% of people say that polls don’t break the solved plugin. :joy_cat:

2 Likes

All right, thanks for verifying that. @neil maybe you can have a look this week? I suspect we’re hitting a JS error when loading the post on expand.

1 Like

Part 1 is done, which is the error and being stuck with “Loading…”. But part 2 is fixing this:

Expanding the quote doesn’t render the poll correctly. I think it’s because the solved plugin doesn’t provide a decorator, which the poll plugin needs. I guess it needs to do it the same way that expanding replies handles it.

https://github.com/discourse/discourse-solved/blob/master/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6#L124

3 Likes

Just having it not error is fine for now, I wouldn’t spend a bunch more time on this.

3 Likes