Reordering Categories Produces Error 422

I have a category with 27 sub-categories. When I try to reorder them, I receive “422 Unprocessable Entity” upon saving.

I haven’t been able to reproduce this. Can you try reordering the categories with your browser’s inspector open to its console tab and see if any more details about the error show up there?

2 Likes

I can’t do that now, but will ASAP. In the meantime, I upgraded to the latest Discourse 2.4.0.beta5 (302e8f4393) and the 422 error evolved to 422 No Reason Phrase.

A mi también me da ese error al tratar de reordenar las categorías. ¿Qué puedo hacer?

Muchas gracias.

In the meantime I upgrade to 2.4.0.beta7 (15f6f57cdc), and found an error log complaining that “Failed to handle exception in exception app middleware : Validation failed: Auto close hours must be greater than 0”.

There must have been an issue at some point with my multisite setup that broke some migrations for this site specifically, since others do not show this 422 error.

1 Like

In the moment, is have the same error but mine is named only “422 error”.
This error comes only when i will order the categories new.

This is the code from my console in Firefox.

> _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:72538 [DEPRECATION] `ember-addons/ember-computed-decorators` is deprecated. Please use `discourse-common/utils/decorators` instead.
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:72538
_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393

> Deprecation notice: `app-events:main` has been replaced with `service:app-events` (deprecated since Discourse 2.4.0)
e.default @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393
_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393

> Deprecation notice: Import the Site class instead of using Discourse.Site (deprecated since Discourse 2.4.0) (removal in Discourse 2.6.0)
e.default @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393
_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393 

> Deprecation notice: Import the User class instead of using User (deprecated since Discourse 2.4.0) (removal in Discourse 2.6.0)
e.default @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:393
/categories/reorder:1

> Failed to load resource: the server responded with a status of 422 ()
_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12512 

>SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)
    at n (_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12508)
    at e.popupAjaxError (_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12551)
    at g (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70136)
    at k (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70309)
    at C (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70295)
    at w (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70231)
    at t.invoke (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64637)
    at e.t.flush (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64527)
    at e.t.flush (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64731)
n @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12512
_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:37064 

>Uncaught Object
_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9851 

> POST https://forum.fktt-module.eu/categories/reorder 422
send @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9851
ajax @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9448
i @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10537
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70335
n @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70843
o @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10551
saveOrder @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:37261
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65342
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20563
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20562
click @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:48012
trigger @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44318
e @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:41789
t._run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65360
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65336
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44419
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44415
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43352
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43742
dispatch @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5251
v.handle @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5058
_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12512 

> SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)
    at n (_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12508)
    at e.popupAjaxError (_application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12551)
    at g (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70136)
    at k (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70309)
    at C (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70295)
    at w (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70231)
    at t.invoke (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64637)
    at e.t.flush (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64527)
    at e.t.flush (_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64731)
n @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12512
e.popupAjaxError @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:12551
g @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70136
k @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70309
C @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70295
w @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70231
t.invoke @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64637
t.flush @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64527
t.flush @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64731
t._end @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65307
t.end @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64993
t._run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65362
t.run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65042
h @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51824
r.error @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10517
n @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:3305
fireWith @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:3435
l @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9549
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9799
load (async)
send @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9818
ajax @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9448
i @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10537
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70335
n @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70843
o @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10551
saveOrder @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:37261
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65342
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20563
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20562
click @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:48012
trigger @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44318
e @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:41789
t._run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65360
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65336
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44419
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44415
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43352
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43742
dispatch @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5251
v.handle @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5058
_ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:37064 Uncaught {jqXHR: {…}, textStatus: "error", errorThrown: "", _discourse_displayed: true}
o @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:37064
trigger @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:69993
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70854
t.invoke @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64635
t.flush @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64527
t.flush @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64731
t._end @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65307
t.end @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:64993
t._run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65362
t.run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65042
h @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51824
r.error @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10517
n @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:3305
fireWith @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:3435
l @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9549
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9799
load (async)
send @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9818
ajax @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:9448
i @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10537
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70335
n @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:70843
o @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:10551
saveOrder @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:37261
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65342
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20563
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:20562
click @ _application-23de447831b30f899d0d24c783c7e5d428fab93934bb0b9486ccf28d1adafb26.js:48012
trigger @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44318
e @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:41789
t._run @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65360
t._join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65336
t.join @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:65053
p @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:51878
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44419
r @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:48299
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:44415
handleEvent @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43352
(anonymous) @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:43742
dispatch @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5251
v.handle @ _ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js:5058

Hope I can help you.
1 Like

I’ve just started to experience this issue today too on 2.4.0.beta8

Doesn’t seem to be any correlation between whether the category had sub-categories or not, some categories throw the 422 error even once the sub-categories have been deleted.

@Tom_Newhouse, @Taunusbahner, do you have a warning in the logs that "Auto close hours must be greater than 0”?

I edited a category in another forum recently, and the auto-close was set to zero. I removed the 0 and could save.

I think I found the solution.

In my case, the Uncategorized category had a 0 auto-close hours set, which prevented the category order from being saved: Editing the Uncategorized category and removing this 0 entry solved it!

I guess this 0 was introduced when the auto-close hours configuration setting first appeared, and it was set to zero (instead of left nil). This works for me, hopefully it will solve your problem as well.

This topic should be moved to #support and this post chosen as the solution, unless the team wants to ensure this won’t happen again and track down the bug to fix it programmatically.

4 Likes

No sign of that error and the “Auto-close topic hours” field is already blank on my side.

Been doing some more testing with this and still experiencing the issue.

After browsing the database it appears that there are several category position ID clashes which don’t correlate to what is being shown in the “Reorder Categories” UI itself.

Could this be the cause of the issue and, if so, how do we solve it?

1 Like

Today I have rechecked the Error but I’ve found no solution.

Discourse Version: 2.4.0.beta9
Installed Plugins:

||Name|Version|Activated?||
| --- | --- | --- | --- | --- |
||[discourse-chat-integration](https://github.com/discourse/discourse-chat-integration)|0.1|J||

[discourse-formatting-toolbar](https://github.com/iunctis/discourse-formatting-toolbar.git) 3.2 J

[discourse-merge-users](https://github.com/curiousdannii/discourse-merge-users) 0.1.0 J
[discourse-mlm-daily-summary](https://www.github.com/joebuhlig/discourse-mlm-daily-summary) 0.1 J

[discourse-telegram-notifications](https://github.com/davidtaylorhq/discourse-telegram-notifications) 0.1 J

[discourse-translator](https://github.com/tgxworld/discourse-translator) 0.2.0 N

[discourse-whos-online](https://github.com/davidtaylorhq/discourse-whos-online) 1.0 J

[docker_manager](https://github.com/discourse/docker_manager) 0.1 J

In the logs are only these Errors.

Error: No Reason Phrase Url: https://forum… assets/ember_jquery-c2cca4a19fd4c70eabc95b010a6d7643955ec2a2251aeb1d70f625773eebea21.js Line: 1 Column: 262166 Window Location: https://forum.

ActiveRecord::RecordInvalid (Validation failed: slug is invalid) /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.1/lib/active_record/validations.rb:81:in `raise_validation_er

Failed to handle exception in exception app middleware :Validation failed: slug is invalid

Try in safe mode, so that you can eliminate any doubt about plugins.

Try using the console log in your browser…

This might be the problem. Do you have a category with a slug that is all numbers? If so, are you able to edit that category’s slug to something else?

2 Likes

Hello users,

meanwhile I have found my problem or I think so.

Bevore I had these problems, I had imported a over 25000 threads from yahoo.
These category seems to big for handle by discourse?
After I deleted this category, the forum runs nice.

Is there a limit to the batch processing of the reordering algorithm? I would expect a background job for this feature, @Simon_Cossar?

There is no limit set in the Discourse code for the number of categories that can be reordered. It is not handled by a background job. I think the cause of 422 errors is when the reorder code calls cat.save!. For example, your issue was with a category that had its “Auto close hours” set to 0. That’s an invalid setting, so saving the category threw an error.

It seems possible that attempting to reorder a huge number of categories could also create errors.

3 Likes

I had this problem.

I had the Allow Uncategorized Topics setting unset. When I allowed uncategorized topics, the saving of the reordering worked

3 Likes