I’ve a topic in our database with an category_id which category someone has deleted. I can open this topic directly with it’s id:
url: …/t/3
in table topics the id = 3 has category = 4. But this category is deleted and not in table categories. Many of this lost topics I could delete. But this one doesn’t work, cause attribute closed and archived are true.
If I choose in popup menu “Permanently Delete” this topic, I get error message:
“An error occurred: This topic has undeleted posts. Please permanently delete them before permanently deleting the topic.”
Any idea how to insert a dummy category with id 4 in database or to delete this lost topic?
cause this category isn’t more available, but which is more important: link to all categories in sidebar doesn’t work anymore.
If I try open …/categories I get errormessage: “Error Something went wrong.” and in browser console errormessage is shown:
Uncaught TypeError: i is null
reason binary.js:7
l item.js:166
get topic.js:1017
ee upload.js:65
get topic.js:1017
get topic.js:1017
eM topic.js:1017
s backup-codes.js:33
n backup-codes.js:33
Z upload.js:65
T backup-codes.js:33
evaluate backup-codes.js:33
_execute backup-codes.js:33
execute backup-codes.js:33
rerender backup-codes.js:33
render theme-setting.js:6
_renderRoots theme-setting.js:6
tA backup-codes.js:33
_renderRoots theme-setting.js:6
_renderRootsTransaction theme-setting.js:6
_revalidate theme-setting.js:6
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_run client-error-handler.js:88
run client-error-handler.js:88
d bookmark.js:114
Ember 2
_join client-error-handler.js:88
join client-error-handler.js:88
p bookmark.js:114
h bookmark.js:114
$ topic.js:1017
trigger composer-action-title.js:62
transitionStarted add-translation.js:27
loading ace-editor.js:176
D upload.js:65
triggerEvent upload.js:65
trigger form-template-validation.js:54
_handleSlowTransition upload.js:65
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_runExpiredTimers client-error-handler.js:88
setTimeout handler*setTimeout client-error-handler.js:88
_installTimerTimeout client-error-handler.js:88
_later client-error-handler.js:88
later client-error-handler.js:88
T bookmark.js:114
_triggerAction form-template-validation.js:54
click form-template-validation.js:54
binary.js:7
Uncaught TypeError: i is null
reason binary.js:7
l item.js:166
get topic.js:1017
ee upload.js:65
get topic.js:1017
get topic.js:1017
eM topic.js:1017
s backup-codes.js:33
n backup-codes.js:33
Z upload.js:65
T backup-codes.js:33
evaluate backup-codes.js:33
_execute backup-codes.js:33
execute backup-codes.js:33
rerender backup-codes.js:33
render theme-setting.js:6
_renderRoots theme-setting.js:6
tA backup-codes.js:33
_renderRoots theme-setting.js:6
_renderRootsTransaction theme-setting.js:6
_revalidate theme-setting.js:6
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_run client-error-handler.js:88
run client-error-handler.js:88
d bookmark.js:114
success base.js:71
l loader.js:1286
fireWith loader.js:1286
jQuery 4
a base.js:71
e named-references.js:49
e named-references.js:49
A base.js:71
_findCategoriesAndTopics item.js:166
k named-references.js:49
w named-references.js:49
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_runExpiredTimers client-error-handler.js:88
setTimeout handler*setTimeout client-error-handler.js:88
_installTimerTimeout client-error-handler.js:88
_later client-error-handler.js:88
later client-error-handler.js:88
T bookmark.js:114
_triggerAction form-template-validation.js:54
click form-template-validation.js:54
TypeError: t.category_list.categories is undefined
s form-template-validation.js:54
categoriesFrom form-template-validation.js:54
_findCategoriesAndTopics item.js:166
k named-references.js:49
w named-references.js:49
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_run client-error-handler.js:88
run client-error-handler.js:88
d bookmark.js:114
success base.js:71
l loader.js:1286
fireWith loader.js:1286
jQuery 4
a base.js:71
e named-references.js:49
e named-references.js:49
A base.js:71
_findCategoriesAndTopics item.js:166
k named-references.js:49
w named-references.js:49
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_runExpiredTimers client-error-handler.js:88
setTimeout handler*setTimeout client-error-handler.js:88
_installTimerTimeout client-error-handler.js:88
_later client-error-handler.js:88
later client-error-handler.js:88
T bookmark.js:114
_triggerAction form-template-validation.js:54
click form-template-validation.js:54
Error while processing route: discovery.categories t.category_list.categories is undefined 3069/categoriesFrom/s<@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:9:2817
categoriesFrom@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:9:2809
11341/_findCategoriesAndTopics/<@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:27:122623
k@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:441:164470
w@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:441:164363
invoke@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:202:7701
flush@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:202:6778
flush@https://forum.mydiscourse.de/assets/chunk.0144d0b7f03b4dd2b0a0.d41d8cd9.js:202:8650
... and much more
If your General category was deleted safely through the UI then it’s expected that the About topic would be soft deleted like you’re seeing. It shouldn’t cause any issues.
I think there may be something else at play. Is there any more detail about that error in your /logs page?
Select id, closed, archived, title,category_id
from topics
where id = '3'
result:
id closed archived title category
3 true true Über die Kategorie Team 4
Hmm. I thought your broken topic had category_id of 4.
That was my best guess. If you have a budget you might ask for help in Marketplace. I think you’ll need someone to get into rails to see if they can figure it out.
Marketplace is always an option, especially if it’s urgent.
Though a bit more detail here might help jimmy up a community response.
You both seem confident that the root cause is this topic. If data explorer can find it then you should be able to find it in the rails console. If you can find it then you should be able to use post_destroyer on it and delete it from there?
(Though slightly hesitant to recommend it as I’ve not quite connected up the dots to where the issue is)
Hmm. It is unusual to be able to find it one way and not the other.
The rails console can be a bit of a sharp knife so it’d be best to figure out what exactly has gone wrong just to minimise any accidents/knock on effects.
How was this category deleted in the first place?
(Just in case the issue isn’t caused by this stray topic, I’ll throw in the basics of checking safe mode and seeing if there’s any more info about the error in your YourSite/logs page too)
Unfortunately, this does not fix the error with the category link. But the problem with the non-deletable post is solved for now. The category problem is also not logged in the log. I will tackle this in the next few days.