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