Failed to create channel in chat plugin

I met exactly the same errors.

We have empty slug because in plugins/chat/app/model/category_channel.rb:

def title(_ = nil)
  name.presence || category.name
end

def generate_auto_slug
  return if self.slug.present?
  self.slug = Slug.for(self.title.strip, "")
  self.slug = "" if duplicate_slug?
end

For me the title was “闲聊打屁”, clearly it is a CJK category name, and my SiteSettings slug_generation_method was none.

So for sure discourse (lib/slug.rb) will return “” as the slug name.

try changing slug_generation_method SiteSettings to encoded.

I don’t know the side effects yet. because it is used by discourse everywhere.

4 Likes