Babble - A Chat Plugin

When logged in as a non-admin user, clicking the Bullhorn icon to expand the chat doesn’t do anything. I’ve disabled Babble temporarily as my members aren’t able to use it.

I see the following errors in the browser console for a single click.

Summary
_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692 Uncaught TypeError: Cannot read property 'color' of undefined
    at i.availableTopicAvatar (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692)
    at i.availableTopicListItem (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:687)
    at _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:656
    at Array.map (<anonymous>)
    at i.availableCategories (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:655)
    at i.topicsList (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:644)
    at i.render (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:604)
    at t.html (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:350)
    at t.m [as draw] (_application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67523)
    at t.value (_application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67700)
availableTopicAvatar @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692
availableTopicListItem @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:687
(anonymous) @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:656
availableCategories @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:655
topicsList @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:644
render @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:604
html @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:350
m @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67523
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67700
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:15923
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:15906
l @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16310
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16178
o @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16254
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16200
o @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16254
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16200
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16165
l @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16311
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16178
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16165
rerenderWidget @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:47953
(anonymous) @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:2395
_ @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:37925
trigger @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:48313
_updateOutletClass @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:2421
_ @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:37925
L @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:38282
x @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:38173
we @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:39641
set @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:48449
openChat @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:2457
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67784
(anonymous) @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67842
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67809
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67836
click @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:60450
(anonymous) @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62364
(anonymous) @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62287
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67809
i @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62286
(anonymous) @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62363
dispatch @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5198
g.handle @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5006
Summary
_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692 Uncaught TypeError: Cannot read property 'color' of undefined
    at i.availableTopicAvatar (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692)
    at i.availableTopicListItem (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:687)
    at _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:656
    at Array.map (<anonymous>)
    at i.availableCategories (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:655)
    at i.topicsList (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:644)
    at i.render (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:604)
    at t.html (_plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:350)
    at t.m [as draw] (_application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67523)
    at t.value (_application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67700)
availableTopicAvatar @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:692
availableTopicListItem @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:687
(anonymous) @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:656
availableCategories @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:655
topicsList @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:644
render @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:604
html @ _plugin-third-party-a46600129ef2a25dfa31cc1a7561cb7c5be9cd799d3aff3619e465c1de4226ae.js:350
m @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67523
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67700
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:15923
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:15906
l @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16310
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16178
o @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16254
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16200
o @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16254
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16200
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16165
l @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16311
i @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16178
r @ _vendor-3eae3eec8fba033cb1b5af6c103a5b8781caa69cf97fe7773ba89ba68980b263.js:16165
rerenderWidget @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:47953
e.invoke @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26886
e.flush @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26791
e.flush @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26964
e._end @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27448
_boundAutorunEnd @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27151
characterData (async)
o @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26607
e._scheduleAutorun @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27624
e._end @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27453
_boundAutorunEnd @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27151
characterData (async)
o @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26607
e._scheduleAutorun @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27624
e._end @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27453
_boundAutorunEnd @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27151
characterData (async)
o @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26607
e._scheduleAutorun @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27624
e._end @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27453
_boundAutorunEnd @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27151
characterData (async)
o @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:26607
e._scheduleAutorun @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27624
e._ensureInstance @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27616
e.scheduleOnce @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:27304
e.scheduleOnce @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:15784
queueRerender @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:47932
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67759
value @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:67808
i @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62286
(anonymous) @ _application-28dcbe459f42c6537c9c047b34c222b164b4de724017b247ea191c6fc75a1cda.js:62363
dispatch @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5198
g.handle @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5006

Has anybody else ran into this? Thanks.

@foohonPie That would indicate to me that you’ve deleted a channel that was linked to a Babble chat. I believe you should be able to update the permissions of the channel in question to be valid from the /admin/chats interface

Thanks @gdpelican,

The permissions as far as I can tell had valid settings, but I deleted some of the newer chats I added and things are working again. :+1:

I found my root issue; I had a chat that was paired to an existing private category. However, the only group that had access to that category had since been deleted by an automated process.

This wasn’t obvious in the /admin/chats settings as the chat->category pairing is still valid.

1 Like

Thanks so much for the support and the great plugin you’ve written here. I’ve used many forum platforms in the past and when it comes to chat add ons, Babble is by far the best.

Donation sent and I hope others will join in.

1 Like

Does anyone notice problem with own messages under other user?

On my discourse when many people talking, it happens sometimes. My messages is under someone else but only on my device, after refresh (F5) bug disappears (good message order appers). It’s not only my problem, other users have the same issues with their messages.

Making the setting to show Babble as open by default to user settings makes a lot of sense, but I wonder if we could get a global setting for a default. I mean, so that the new users would see the chat opened unless they specifically disable it?

4 Likes

Does the plugin have a route name? I want to launch it form the Discourse Tab Bar theme component, and it works with URLs or route names.

Hm no, there’s no route for Babble; you’d need to run somehow

this.appEvents.trigger("babble-toggle-chat")

upon clicking the link in the theme component.

1 Like

I tried it, but haven’t found a way to trigger it from the theme component. Would be great if you could register a route name in any of the future updates :slight_smile:

I have installed babble, and it says it’s installed and enabled, but I do not see the interactive icon even if I set to right/left or play with settings? I have tried on stock and other themes and doesn’t seem to make it work. Any ideas? Anything I can provide to help figure this out?

I don’t know, maybe it was a cache thing. No matter how many times I retried it didn’t work. Rebuilt the thing, and now it’s showing. :blush:

Thanks for the work, nothing to see here. :lol:

Also @jrgong I would like to have that option on the mobile bar element as well. Please let me know if you manage to do it!

1 Like

Speaking of interactions with the mobile bar element!
The UI of the mobile tab bar element overlaps with the text entry on babble mobile. Should I fix it in babble or the mobile element? I’m not great at ux stuff

Also I seem to not understand the chat history function? The history is still there and editing this setting doesn’t appear to change any chat history display?

Just add this to your Mobile CSS:

/* babble custom on mobile */
.babble-sidebar.mobile {
    z-index: 1001;
}
1 Like

Is it possible to request the feature of changing chat channel avatar/icon pictures? Currently, they just make a circle of whatever the category/subcategory color is. I’d like a picture.

So my chat for “Apple” can be an Apple.

Orange can be an orange, etc.

3 Likes

Hi,

Latest Discourse and plugin version.
The plugin seems to work fine, but the search is broken and shows nothing (not the full search page but where the results are supposed to show in the popup) with the following errors:

Message

ArgumentError (wrong number of arguments (given 3, expected 1..2))
/var/www/discourse/plugins/babble/app/models/group.rb:3:in `block in <class:Group>'

Backtrace

/var/www/discourse/plugins/babble/app/models/group.rb:3:in `block in <class:Group>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/relation.rb:288:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/relation.rb:288:in `_exec_scope'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/scoping/named.rb:186:in `block in scope'
/var/www/discourse/lib/search.rb:710:in `groups_search'
/var/www/discourse/lib/search.rb:622:in `find_grouped_results'
/var/www/discourse/lib/search.rb:246:in `execute'
/var/www/discourse/plugins/babble/app/models/search.rb:4:in `execute'
/var/www/discourse/app/controllers/search_controller.rb:74:in `query'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/base.rb:134:in `process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.2.1/lib/action_view/rendering.rb:32:in `process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-protection-2.0.5/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:32:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/conditional_get.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:216:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/logster-2.2.0/lib/logster/middleware/reporter.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiler.rb:171:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/message_bus-2.2.0/lib/message_bus/rack/middleware.rb:57:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:163:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/engine.rb:524:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `<main>'
Message

Failed to handle exception in exception app middleware : wrong number of arguments (given 3, expected 1..2)

Backtrace

/var/www/discourse/plugins/babble/app/models/group.rb:3:in `block in <class:Group>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/relation.rb:288:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/relation.rb:288:in `_exec_scope'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/scoping/named.rb:186:in `block in scope'
/var/www/discourse/lib/search.rb:710:in `groups_search'
/var/www/discourse/lib/search.rb:622:in `find_grouped_results'
/var/www/discourse/lib/search.rb:246:in `execute'
/var/www/discourse/plugins/babble/app/models/search.rb:4:in `execute'
/var/www/discourse/app/controllers/search_controller.rb:74:in `query'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/abstract_controller/base.rb:134:in `process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.2.1/lib/action_view/rendering.rb:32:in `process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-protection-2.0.5/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:32:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/conditional_get.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:216:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/logster-2.2.0/lib/logster/middleware/reporter.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiler.rb:171:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/message_bus-2.2.0/lib/message_bus/rack/middleware.rb:57:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:163:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/engine.rb:524:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2.1/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/unicorn-5.4.1/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.5.0/bin/unicorn:23:in `<main>'

Currently, there is only one channel. Options are by default.

Current plugins list:

image

I’ll have a look at this today; thanks for the report :blush:

EDIT: This should now be fixed in the latest master. Note that you’ll need to be on the bleeding edge of Discourse for this to work :slight_smile:

2 Likes

I confirm. It’s now working, thanks!

So, I found out a way to set the value for all users:

 UserCustomField.update_all(name: "babble_open_by_default", value: "true")

But it’s not a very good solution, as this would remove all the user opt-outs each time it is run, and it would have to be run each time new user registers…
I tried to find a way to set default via the DB, but it’s not viable, as the setting is stored in a table with all the other custom profile fields…

2 Likes

You could store another custom field somewhere else, like SettingsCustomField if it exists, with the date last run, then use that date against users created date. That way you’d keep any old settings that the users had.

If there is a webhook for new users being created, you could install https://github.com/adnanh/webhook and create a webhook on new user to trigger a custom shell which could run the routine for you.

Hi @gdpelican, your plugin is a great value for my discourse.

But i have a litlle question. I added it on my board. Create channels…

But when i speak with guy in DM by the chat i found an issue. Only the last guy i have DM appears and not a list of 4-5 guys who i have recently talked. Does it normal ? Could you fix this ?

Thanks by advance mate