Topic embed and import don’t validate for 0 character titles

In the category view, I have a handful of “ghost” topics where there is no title and I can’t click on them or delete them.

Any idea how to get these cleared out?

Hi @Aaron_B :wave: Have you tried in safe mode yet?

Also, are you on an up to date version of Discourse? (either 3.1.1 or 3.2.0.beta2-dev)

I am running 3.2.0.beta2-dev. I will venture into safe mode to see if I can find any options.

1 Like

Safe mode displays the same “empty” or “ghost” topics I can’t get rid of of see an interface to delete.

That’s unusual. I’m not sure how they got into that state? It should be impossible through the normal course of things.

Though does clicking on the last activity timestamp still work to take you to the last post?

That worked! I didn’t notice that the last activity timestamp was linked. Once there I could see that it was a remnant of a post from the embedded posts feature.

All cleared!

2 Likes

Do you know how you managed to get a topic without a title? I’m wondering if there’s a validation missing somewhere.

1 Like

Not directly but from the post I got to, it was auto generated from the embedded posts feature.

3 Likes

There are other cases where topics without titles can be created.

I migrated from vBulletin 3 years ago, and profile posts were imported into Discourse as titleless topics.

Maybe https://github.com/discourse/discourse/blob/24feb20abc713d06106a480b0b4e2f20b3938360/lib/topic_creator.rb lacks this verification? I didn’t check it as I barely know how to read code and didn’t investigate the vBulletin migration script either. It’s just a guess.

3 Likes

That’s it. Both for the import script and the code that creates topics from embeds. It’s intentional, but maybe shouldn’t allow topics to be created with 0 characters in the title.

Off topic, but one trick is to read code as though it’s a weird form natural language. Eventually it starts to make sense. That and open the codebase in an IDE to make it easier to search.

2 Likes