Chat channels and chat nav seem to have broken

I just updated the #chat-plugin to the most recent commit, 76ff2ba, and I’ve noticed a few bugs that made it mostly dysfunctional. Side note: I can’t remember what the previous plugin commit status was that I had on the instance and I’m not sure how to find it—does anyone know how to look that up?

The bugs that I’m seeing are at least:

  1. The docked channel list appears empty
    • It goes back to showing zero channels and the default text: You have not joined any channels. Click here to view available channels.
    • When I click the link to view the available channels, it doesn’t show any and navigates the full page to show Server Error while trying to load /chat/chat_channels/all.json Error code: 500 error
    • However, when I click the pencil icon and try to create a new channel with a category or a name I had before, it rejects it, giving me the following: You supplied invalid parameters to the request: A channel already exists for this category and name
  2. Clicking the fullscreen icon navigates to a page that just gives the spinner loading icon.
  3. The personal chat list is empty
    • I’m able to add people with whom I’ve chatted before and the chat appears fine and I’m able to send messages.
    • The in_reply_to message is not showing for new messages but shows for old ones, so I’m not sure if something changed there, but I’ve customized the reply message so that could be from my side.
  4. The back button from the personal chat docked message doesn’t do anything when I click it, whereas it previously would take me back to the chat list.

If you want, I could try to find error logs and post them here or send them elsewhere. I’ve tried to run it in safe-mode with themes turned off, but that didn’t seem to fix anything.

Edit:
error logs I’m seeing in the browser console:

Failed to load resource: the server responded with a status of 500 () - /chat/chat_channels.json:1
Uncaught 
Object
errorThrown: ""
jqXHR: {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
textStatus: "error"
[[Prototype]]: Object
at _vendor-f78d12cebd7a573d3ed1aee5e766ee89.js:2177

In the meantime, I’m going to try to rollback the plugin to a previous commit, maybe ~15 commits ago, and see if that works. I don’t really know if there’s an easy way to do that, for now, I’m just going to try the workaround here:

2 Likes

Ok, I figured it out in the chat with the help of @markvanlan, @sam, @joffreyjaffeux, @REALITY:

Summary
I had the topic list previews plugin still installed on my site and despite it not being enabled, it was causing a problem on the server side.

I removed it from the app.yml file and did a rebuild and it works again.

And then added it back as a theme component per this:

Thank you for the help!

Details
(found by appending /logs to my instance’s base URL in the browser)

StandardError (Attempted to access the non preloaded custom field 'topic_list_tiles'. This is disallowed to prevent N+1 queries.) app/models/concerns/has_custom_fields.rb:173:in ’ (eval):35:in _fa

app/models/concerns/has_custom_fields.rb:173:in `[]'
plugins/discourse-topic-previews/plugin.rb:78:in `block (3 levels) in activate!'
(eval):35:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:456:in `attributes'
plugins/discourse-custom-wizard/extensions/custom_field/serializer.rb:4:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in `as_json'
plugins/discourse-chat/app/serializers/chat_channel_serializer.rb:38:in `chatable'
(eval):4:in `_fast_attributes'
4 Likes

Topic List Previews plugin was deprecated in November 2021 and is now a Theme Component

6 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.