"Move to existing topic" admin feature not working [now fixed]

AI-generated summary

The ‘Move to Existing Topic’ feature was broken, triggering a JavaScript error: Uncaught TypeError: Cannot read property 'forEach' of undefined. j.jaffeux initially suspected a fix was already deployed, but ChrisBeach confirmed it still failed after updating. After further investigation, j.jaffeux identified the forum was not on the latest commit, which included a fix. Meanwhile, ChrisBeach discovered a separate critical issue: a NoMethodError from the Poll plugin after a recent commit (227c451), causing the forum to crash. Temporarily disabling the plugin restored functionality. zogstrip acknowledged the bug and pointed to a pending fix (a188d15). Once deployed, ChrisBeach confirmed the Poll plugin crash was resolved. Finally, ChrisBeach also confirmed the original ‘Move to Existing Topic’ issue was fixed, crediting j.jaffeux for the resolution. The root cause was traced to outdated code and a recent regression in the Poll plugin.

When attempting to merge posts into an existing topic, nothing happens when clicking “Move to Existing Topic”

An error is visible in the JS console:

Uncaught TypeError: Cannot read property 'forEach' of undefined at n.performMove

Can you try to update to latest? I think I fixed this.

4 Likes

Still not working after upgrade I’m afraid.

Ok will look later today

3 Likes

can you tell me exactly what commit your forum is on right now please ?

2 Likes

This is not latest, you don’t have:
https://github.com/discourse/discourse/commit/034502af2138aaf1e3a847ffcdc3f07ec83bbb6b

Sorry I wasn’t on my computer, maybe our CI was blocked on some test for a moment, and took time to get this commit in tests-passed. It’s definitely in now and should fix your issue.

5 Likes

:grimacing:

Will try a rebuild at the CLI

Tried a restart (not yet rebuild), didn’t help.

This is the error in production.log:

Started GET "/" for 82.44.224.199 at 2019-05-29 21:36:38 +0000
Processing by ListController#latest as HTML
Completed 500 Internal Server Error in 690ms (ActiveRecord: 0.0ms)
NoMethodError (undefined method `url' for nil:NilClass)
/var/www/discourse/plugins/poll/plugin.rb:441:in `block (3 levels) in activate!'

I notice the poll plugin has been recently changed. Any idea what might be wrong, @nbianca / @zogstrip ?

https://github.com/discourse/discourse/commit/227c45107df6b1d6aa43b624fe59995bcb2db73d#diff-170edb1ef99339086c2d8d1c2b264e90

I’m currently trying a rebuild to see if this helps

Update this didn’t help. Forum still dead… ideas please anyone?! :sob:

Update I entered the Docker container and did the following:

mv /var/www/discourse/plugins/poll /tmp
exit
./launcher restart app

This seems to have got the forum working, although polls are now not rendering properly.

Definitely related to this commit.

Sorry about that. Can you try again once FIX: reduce poll when post is nil · discourse/discourse@a188d15 · GitHub gets on the test-passed branch?

4 Likes

In particular, here:

I wouldn’t rule out the possibility of data corruption on my forum though…

Thanks. I’ll await the fix on tests-passed :+1:

That has fixed it for me. Thanks for the very quick turnaround on this issue

4 Likes

Can confirm, this has fixed the issue with merging topics. Many thanks Joffrey :+1:

4 Likes