"Category can't be blank" appears when we try to create a new topic

User cannot create a topic, an error “Category can’t be blank” appears. But category is checked. This bug is in version v2.3.0.beta6.

1 Like

Ok, and are they selecting a category?

Do they have the ‘create’ right in any category for categories to appear in that list?

Out of the box new topics default to ‘Uncategorized’, if you’ve disabled uncategorised posting then this needs to be manually selected. Make sure whatever group they’re in has the create right for at least one category, and they’re selecting it from the drop-down.

Yes, they are selecting a category. Necessary user rights are present.
I tested in the “general” category
image

Can you repro this @tshenry?

Not immediately…

Here is what I have tried:

  • Disabled Uncategorized via site settings
  • Set a test category to everyone and trust_level_0 permissions
  • Opened the new topic composer both in the test category and outside of it
  • Switched between categories on the category chooser of the composer
  • Selected the test category from the chooser and posted as Admin and TL0

No unexpected behavior.

@Timon1507 when you do to your admin dashboard what version does it show? I just want to make sure my test site is on the same version or higher than you. I’m at v2.3.0.beta6 +30

2 Likes

My version is v2.3.0.beta6 +39. But for the correct operation of the forum, I restored from backup v2.3.0.beta5

We can’t reproduce your problem, so we are unable to help you at this time.

1 Like

This is happening on my forum as well - a new user signed up, but when posting it says category can’t be blank.

I’ve logged in as the user’s account and tried to post his draft - getting the same thing.

He’s also signed up a new account, and getting the same thing.

I can create topics via my own account though - so seems to be affecting new users…

On [v2.3.0.beta6 +39]

(Also changed their TL to 1 from 0, same issue.)

Can you repro as a new user @tshenry?

Looks like it might be related to the new approval queue system - or when the user’s first posts/topics need to be approved.

The same user posted a reply to an existing thread, which went to the approval queue as usual, however I did not see an alert - only saw that the post was in the queue by clicking on ‘needs review’.

2 Likes

Ok, it seems to be related to approve post count. When it is set to 1, users can’t post new topics, when it is set to 0 they can. A little odd, because approve post count is for posts, not topics.

approve unless trust level seems to be new - should we be using that instead of approve post count (I can’t remember how many posts are required to TL1 now).

3 Likes

Aha maybe @eviltrout can take a look Monday.

2 Likes

I reproduced this bug in following development enviroment: ubuntu 16.04, discourse v2.3.0.beta6 +65 (docker).
I created a new category with these security settings:image
And disabled next checkbox.


And then new user gets an “Category can’t be blank” error though the category “test” was chosen

1 Like

Same error on a forum I manage as well under the same conditions as AstonJ’s description.

1 Like

I am having this exact issue as well on my forum. Started right after I updated to v2.3.0.beta6 +39

It only seems to be affecting some users.

I believe @eviltrout is working on this bug

I tried it myself, and in least in tests-passed I can’t reproduce it. I tried both @AstonJ and @Timon1507’s suggestions and both worked for me. The only thing I can think of is it might be something that broken in the beta but someone fixed afterwards?

5 Likes

Thanks for helping out. I just tried it again on my site and its still throwing this error. learn.oheltorah.com

Any suggestions?

I logged in and clicked ‘create new topic’. Wrote the title and chose a category and then wrote wrote the message. Click the “create topic” button and walla got this error.

I’ve received emails from about a dozen members today that they are experiencing the same issue.

How can I help figure out the source of this issue?

I can repro under the following criteria:

  • v2.3.0.beta6 +82
  • TL0 user
  • allow_uncategorized_topics disabled
  • approve_new_topics_unless_trust_level set to 1: basic user

One thing to note:

  • If I enable uncategorized, the topic will go to the approval queue, but as uncategorized, not with the category the TL0 user selected
6 Likes

Can confirm - by allowing uncategorised the behaviour seems to go back to normal :+1:t3: (i.e posts/topics successfully go into moderation queue)

3 Likes