A discussion on the Blender Artists forum addresses a browser crash when accessing an empty ‘About the Jobs category’ topic. bartv reports the issue, which occurs across browsers and is linked to a JavaScript error: TypeError: Cannot read property 'get' of undefinedawesomerobot. Stephen suggests a related Meta Discourse thread, while Falco identifies the root cause: the topic has no posts, likely due to a migration issue. bartv confirms via a database query that the topic is indeed empty. Falco proposes using the API to post to the topic to fix it, and bartv successfully resolves the issue using a curl command with the Discourse API. Falco and riking discuss potential root causes and suggest server-side mitigations for similar issues. gerhard questions the link to a specific PR, and sam notes that a weekly cleanup routine may help prevent such problems.
We have a weird issue where one ‘about’ page is crashing the browser. I can’t figure out how to debug or even solve this - some ideas would be appreciated!
I’m not sure what the problem is, but I see this error in the console
Could not view topic TypeError: Cannot read property 'get' of undefined
at _application-2a1d858e65ec0b4525cdf5e0b11710ee777a37442b3db4ccec07b79396ed4e02.js:26658
at h (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:56524)
at C (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:56702)
at E (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:56687)
at e.invoke (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:26887)
at e.flush (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:26790)
at e.flush (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:26963)
at e._end (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:27447)
at e.end (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:27180)
at e._run (_ember_jquery-716f4989c2eb49ad65163ffb56185407340c2b195b81b9392b62cde3e992cade.js:27492)
I think you’re on to something. I ran the following query in the Data Explorer and came up with 0 results - so apparently I have a topic with no posts. I wouldn’t be surprised if this has been the case since we migrated from vBulletin.
Is there a way to fix it? Can I generate a new ‘About’ topic?
I went for the curl solution and that fixed it. You’re awesome, thanks for your quick help!
For future readers: first create an API key in the user admin for your account, then run this from the command line. You’ll find in-depth API documentation here.
curl -X POST "https://<server name>/posts.json" \
-H "Content-Type: multipart/form-data;" \
-F "api_key=<your api key>" \
-F "api_username=<your user name>" \
-F "topic_id=<topic id>" \
-F "raw=<some content>"
This (problems with 0-post topics) has happened enough times that I think adding an additional mitigation is worth it - e.g. the server-side TopicView giving the client an error message if it’s asked for a topic with no posts.
I fail to see how the changes in PR #7110 could cause such issues. There’s no migration that touches arbitrary categories. And the fixtures for special categories like Staff, Meta and Lounge should work the same as before. The wizard and the “Replace Text” functionality also updates only the About topics of those categories.
There must be another reason for missing posts in the “About category” topics or, if the posts are missing for a long time, why the browser crash didn’t happen before.