Javascript error, when editing title of topic

Version: 2.8.0beta1

Hi,

When i edit the title of a topic and press to save this changes i get following error message in the console of my browser:

And i can not save.

Workaround: When i select in the category the same category again it works fine.

stacktrace as code
_application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:14124 Uncaught TypeError: Cannot read property 'categoryId' of null
    at Function.update (_application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:14124)
    at t.finishedEditingTopic (_application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:43889)
    at e.t._join (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67257)
    at e.t.join (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66968)
    at c (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:53760)
    at _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:20968
    at r (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:50091)
    at _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:20967
    at t.click (_application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:53754)
    at trigger (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46074)
update @ _application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:14124
finishedEditingTopic @ _application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:43889
t._join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67257
t.join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66968
c @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:53760
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:20968
r @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:50091
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:20967
click @ _application-86788722cd8f3df1744e65d28cfd87674427a5a7333088bffef2b649f20114be.js:53754
trigger @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46074
e @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:43433
t._run @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67275
t._join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67251
t.join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66968
c @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:53760
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46175
r @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:50091
handleEvent @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46171
handleEvent @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:45108
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:45498
dispatch @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:5443
d.handle @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:5247

Looking forward for your feedback.

4개의 좋아요

Unless you can reproduce it here (try changing the category on this topic, your own topic, from bug to something else) it is not a bug, but an issue in configuration on your site.

Same issue here:

@codinghorror : Sorry not so much in the definition of bug in the discourse domain. For me it looked like a bug, as i did not changed anything on our site. But i can reporduce it here too, which still not mean its a bug..

2개의 좋아요

I can reproduce it here:

Chrome: Version 89.0.4389.90 (Offizieller Build) (x86_64)

  1. Refresh page
  2. Click on edit title
  3. Press Save (without any changes)
  4. Javascript error message.

@codinghorror : Okay to move it back to bug?

Ok so the error is when you initiate a title edit on the first post, but you don’t actually change anything, and press save? Let me test that… editing soon..

aha yes I can repro this. Thanks for the report, indeed a bug of some kind @zogstrip . When you edit the topic title / category via the edit button next to the topic title, but don’t make any changes, and then press save, it is as @dirien describes.

3개의 좋아요

@cvx can you add this to your list?

5개의 좋아요

Fixed in:

https://github.com/discourse/discourse/pull/13227

Thanks for the report! :smiley:

4개의 좋아요