خطأ 422 عند إعادة ترتيب الفئات

Good morning,

Discourse version 3.1.0.beta4
I’m trying to reorder the categories from the UI and when I press save order I get a 422 error. Interesting fact: my categories on the main Discourse page doesn’t have the same order on the reorder categories page.
Example : I have the supervisor category at position 4 on my main page, on the other hand when I go on the reorder categories page, the supervisor category is not at position 4, but at position 23 and if I press on save , it will go to position 23 as shown in the reorder categories page. I have the 422 error that appears, but there are still changes that have taken place.
Last week I had no problems with the reorganization, I only had this problem when I moved the new category my script created today to the first position.
In the preview page of Chrome I have a little more details about the error:
The change you wanted was rejected. Maybe you tried to change something you didn’t have access to.

I’m admin, so I shouldn’t get this error.
In the source code I have this exception that throws :
SyntaxError: Unexpected token ‘<’ "<!DOCTYPE "… is not a valid JSON

I’ve:
Done a server reboot
Enabled Allow Uncategorized Topic option

Do you have an idea what I could do ?

I’m afraid I can’t replicate this on my test site. When I change the order of the categories they reorder without any error.

Could it be something to do with how you’ve created this category outside of the UI?

إعجاب واحد (1)

Maybe, but I’ve done lots of categories this way and never had an issue. I did it through the API. I know that one of my categories had a name too long and my script was not able to create it, do you think it could be the issue ?

You could try output your category data via the rails console or data explorer, and see if there’s anything weird in it. :thinking:

I’ve slipped this over to support as we couldn’t get a clear repro.

Did you manage to resolve this in the end?

11 posts were split to a new topic: 422 error on category reorder [improve visibility of true error ‘invalid slug’]