First: your fix didn’t help. Sorry. Or it did — that error was a little bit strange,
Please, try to follow me
I have 5 channels:
three for TL1
one for staff
one for custom group of 5 persons
I moved all others than staff-channel from sub-categories to top.
Then I tried how category preview component works, but it wasn’t what I needed, so I disabled it. Right after that I did rebuilding to get category lockdown plugin.
It worked, except I had some weird issues with FKB Pro theme and login/signup-modals — those gave only spinning loading icon. That happened only with my iPad AFAIK.
At that point I realize the chat channel of custom group didn’t work any more. Plus staff-group and 2 of 3 TL1-groups showed only very recent messages. One TL1-group was intact.
I tried safe-mode and disabling most of plugins via settings. No help and I opened this topic.
Long story short and after several rebuildings removing and re-enabling plugins:
staff-channel and two TL1-channels are low traffic ones and I forgot totally I’m using 14 days rule there; so there wasn’t any issues
custom-group-channel was broken if I had both plugins Data Explorer and Category Lockdown installed, and enabling/disabling didn’t matter
rebuilding without those two plugins fixed that one broken channel. When I re-rebuilding (is that a word?) with both plugins that channel was still ok
My un-educated guess is something went sideways when I first tried Category Previews, then I disabled it, then rebuilding with Category Lockdown and the last move was deleting Category Previews. Fixing some bizarre SQL-errors or false bites needed totally removal of Data Explorer and Lockdown, following fresher re-installing.
What I can’t understand is error log of Discourse — how do it fit in all of this.
Anyway. I have all plugins back online and channels work nicely.
Hi @Jagster , I am on the chat team as well and I’m looking into this a bit further. Reading over what you have done, none of that should have caused this error. Each chat message is potentially linked to a chat thread in the database via a thread_id, and one of your messages has a thread_id for a thread that does not exist for…some reason. We don’t have any code to delete threads, so perhaps there was some update that went awry.
Can you try running this query for me and post the results? It will let us see whether you have a widespread issue or if it was just one strange edge case:
SELECT id, chat_channel_id, thread_id
WHERE thread_id IS NOT NULL AND thread_id NOT IN (
SELECT id FROM chat_threads