Plugin post-voting conflicts with previous question-answer-plugin

Hey there !

Big conflict on my Discourse since the change…

  1. Before i had :
- git clone
  1. Today i wanted to add :
- git clone
- git clone

I obtained a conflict between the two :

I, [2022-12-09T10:13:26.139287 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
/var/www/discourse/plugins/discourse-question-answer/lib/question_answer/engine.rb:4: warning: already initialized constant QuestionAnswer::CREATE_AS_QA_DEFAULT
/var/www/discourse/plugins/discourse-post-voting/lib/question_answer/engine.rb:4: warning: previous definition of CREATE_AS_QA_DEFAULT was here
/var/www/discourse/plugins/discourse-question-answer/app/controllers/question_answer/votes_controller.rb:75: warning: already initialized constant QuestionAnswer::VotesController::VOTERS_LIMIT
/var/www/discourse/plugins/discourse-post-voting/app/controllers/question_answer/votes_controller.rb:75: warning: previous definition of VOTERS_LIMIT was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_vote.rb:7: warning: already initialized constant QuestionAnswerVote::VOTABLE_TYPES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_vote.rb:7: warning: previous definition of VOTABLE_TYPES was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:7: warning: already initialized constant QuestionAnswerComment::COOKED_VERSION
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:7: warning: previous definition of COOKED_VERSION was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:26: warning: already initialized constant QuestionAnswerComment::MARKDOWN_FEATURES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:26: warning: previous definition of MARKDOWN_FEATURES was here
/var/www/discourse/plugins/discourse-question-answer/app/models/question_answer_comment.rb:31: warning: already initialized constant QuestionAnswerComment::MARKDOWN_IT_RULES
/var/www/discourse/plugins/discourse-post-voting/app/models/question_answer_comment.rb:31: warning: previous definition of MARKDOWN_IT_RULES was here
/var/www/discourse/plugins/discourse-question-answer/extensions/topic_extension.rb:9: warning: already initialized constant Topic::QA_SUBTYPE
/var/www/discourse/plugins/discourse-post-voting/extensions/topic_extension.rb:9: warning: previous definition of QA_SUBTYPE was here
rake aborted!
ArgumentError: Invalid route name, already in use: 'question_answer' 
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `add_route'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `add_route'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `decomposed_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `block in map_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `map_match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `match'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `mount'
/var/www/discourse/plugins/discourse-question-answer/config/routes.rb:16:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `eval_block'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `block in finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/actionpack- `finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `finalize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `reload!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `block in updater'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport- `execute'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `execute'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `public_send'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `method_missing'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:88:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport- `block in require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport- `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport- `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties- `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I, [2022-12-09T10:13:36.170591 #1]  INFO -- : gem install rrule -v 0.4.4 -i /var/www/discourse/plugins/discourse-calendar/gems/2.7.6 --no-document --ignore-dependencies --no-user-install
Successfully installed rrule-0.4.4
1 gem installed

  1. Then i removed the first one. Build is ok but the app is no longer running :
    • I got an HTTP 500
    • nginx error logs give me something like :
    root@slazvmeutp01:/opt/discourse# cat /var/opt/discourse/var-log/nginx/error.log
    2022/12/09 10:47:34 [notice] 537#537: signal process started
    2022/12/09 10:47:37 [error] 554#554: *2 connect() failed (111: Connection refused) while connecting to upstream, client:, server: _, request: "POST /message-bus/76e1bd78eedf43a5a337b6f44a8b88d0/poll?dlp=t HTTP/2.0", upstream: "", host: "", referrer: ""
    2022/12/09 10:59:08 [crit] 554#554: *398 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client:, server:
    2022/12/09 11:25:50 [notice] 530#530: signal process started

I noticed that Git repo now redirects to the second
So it would explain the conflict on first build today.
But what about now ? It mentions TLS error rather than a plugin error…

Any idea ?

1 Like

Only having discourse-post-voting is the right move. :+1:

I’m not sure about nginx error logs, but I don’t suppose you also have discourse-feature-voting in your plugins too, do you?


OMG you were right !!
I had it too and I can see Git repo also redirects to !! :scream_cat:

But wait… topic-voting AND q&a merged into post-voting ? Are features cumulated ?

So here is my latest plugin list :

    - exec:
        cd: $home/plugins
          - mkdir -p plugins
          - git clone
          - git clone
          - git clone
          - git clone
          - git clone
          - git clone
          - git clone
            #- git clone
          - git clone
            #- git clone
          - git clone && cd discourse-gamification && git checkout 6a399b4c220f31de62049504d27ff6e50611fbef
          - git clone
          - git clone
          - git clone
          - git clone
            #- git clone
          - git clone

Discourse finally responds.
But now other problems :

  1. Plugin admin show “question & answer”…
  2. When I create a topic, the item menu is not good :
  3. Config in category settings always show q&a

So it seems q&a is always there…

1 Like

Nope I am wrong !
This is separate projects sorry.


discourse-feature-voting was the old name for Discourse Topic Voting, and having the old name in there causes some loading conflicts when you also have post-voting in there as well. If you add the new discourse-topic-voting you should be able to have both again. :+1:

I’m not sure why you have the old Q&A format still? I notice you’re checking out a specific Gamification version - is that because you’re locked to a certain compatibility?

1 Like

Yes !
I am the one who tracks “stable” version of Discourse :sweat_smile:
This is a workaround I mentioned here : Database migrate fails in "stable" version - #2 by gmoirod

Ok I am going for a test right now

Me neither :sob:

1 Like

The official post-voting plugin was renamed to ‘post-voting’ relatively recently, and was Q&A in the UI, etc for a while. It may be that your install is not picking up those changes as you’re tracking Stable?

1 Like

Is there a way to properly “uninstall” a plugin ?
I could use that ton uninstall q&a and post-voting, then reinstall post-voting…

1 Like

When you check your /admin/upgrade page, what version number do you see next to post-voting?

My test-passed, up-to-date one is: 5ea4dccf

Edit: I corrected the page address :slight_smile:

1 Like

Seems ok to have topic-voting now.

I do not have a /plugins page :thinking:
But on the /admin/upgrade page I got :

  1. Do not have post-voting
  2. q&a shows without green check
1 Like

It looks like you’re locked at this commit from September when it was still question-answer:

Are you up-to-date with the Stable version? What version are you currently on?

1 Like

It seems good.

New problem…

  1. I removed post-voting and topic-voting and rebuilt app to try starting from something clean (q&a is not listed too since many attempts) : ok, no more plugins
  2. I brought back post-voting and topic-voting and now rebuild fails…
I, [2022-12-09T14:27:32.724323 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
Failed to update 'Discourse Loading Slider': Timeout::Error
rake aborted!
Timeout::Error: Timeout::Error
/var/www/discourse/lib/final_destination/resolver.rb:28:in `block in lookup'
/var/www/discourse/lib/final_destination/resolver.rb:7:in `synchronize'
/var/www/discourse/lib/final_destination/resolver.rb:7:in `lookup'
/var/www/discourse/lib/final_destination/ssrf_detector.rb:84:in `lookup_ips'
/var/www/discourse/lib/final_destination/ssrf_detector.rb:64:in `lookup_and_filter_ips'
/var/www/discourse/lib/theme_store/git_importer.rb:139:in `block in clone_http!'
/var/www/discourse/lib/theme_store/git_importer.rb:131:in `each'
/var/www/discourse/lib/theme_store/git_importer.rb:131:in `clone_http!'
/var/www/discourse/lib/theme_store/git_importer.rb:93:in `clone!'
/var/www/discourse/lib/theme_store/git_importer.rb:18:in `import!'
/var/www/discourse/app/models/remote_theme.rb:126:in `update_remote_version'
/var/www/discourse/lib/tasks/themes.rake:62:in `block in update_themes'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `block (2 levels) in find_each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `block in find_each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `block in find_in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `block in in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `loop'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `find_in_batches'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord- `find_each'
/var/www/discourse/lib/tasks/themes.rake:56:in `update_themes'
/var/www/discourse/lib/tasks/themes.rake:87:in `block (2 levels) in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.0/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.0/lib/rails_multisite/connection_management.rb:90:in `each_connection'
/var/www/discourse/lib/tasks/themes.rake:86:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => themes:update
(See full trace by running task with --trace)
I, [2022-12-09T14:27:49.987988 #1]  INFO -- : Checking 'Modern Category + Group Boxes' for 'default'... up to date
Checking 'Dark-Light Toggle' for 'default'... updating from cd221006 to 3f72c88f
Checking 'Discourse Loading Slider' for 'default'... 

1 Like

Rebuild again and it passed.
So the last problem with 'Discourse Loading Slider' was just a glitch.
Forget that.

My main problem is that q&a remains instead of post-voting…


I think this may be a consequence of the build you’re using and compatibility. If you look at what should be discourse-topic-voting it’s showing on your page as discourse-voting still as well.

1 Like

So you mean I should use ‘tests-passed’ version of discourse ?

1 Like

If you want the latest versions of things. :slightly_smiling_face:

1 Like

I would prefer a ‘working’ versions of things actually :sweat_smile:
I know there is topic about version to use pretending ‘tests-passed’ is good-to-go.
But I am a kind of a ‘debian guy’ you know… Stability for production !


I think that’s a fine choice too. :+1: :slightly_smiling_face: The flipside is that you’ll need to wait for Version 3.0 to launch in the new year before you can get these latest updates working with Stable.

1 Like


This is a bit disappointing that plugin management do not offer a way to follow a given git ref.
And that plugins follow Discourse lifecycle.
So that you can globally follow ‘stable’ for discourse AND plugins.

Actually each rebuild, or plugin adoption, feels like a roulette wheel.

1 Like

I’m afraid my knowledge about the Stable branch is fairly limited, but I think it’s geared more towards not changing things very often. So I would think adding new plugins and extras outside of a Stable release window would be counter-intuitive to that?

It’s also worth saying that most Discourse sites use tests-passed and generally don’t have any notable issues. Even following test-passed doesn’t mean you need to update every day though and be on the very latest version, so it’s not as changeable as you may think. You would manually have to press the update button from your /upgrade page, or perform a rebuild, to pull those changes into your site.

Managed hosting also makes this process easier too as an alternative, as they’ll handle all of the technical stuff and let you concentrate on your community. :+1:

1 Like