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

**URL:** https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986
**Category:** Bug
**Created:** [October 4, 2023, 3:20am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986 "2023-10-04T03:20:06Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Aaron\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_b/32/327391_2.png) [@Aaron\_B](https://meta.discourse.org/u/Aaron_B)
#### Post date: [October 4, 2023, 3:20am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/1 "2023-10-04T03:20:06Z")

</div>

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.

 ![Screenshot 2023-10-03 at 10.15.22 PM](https://global.discourse-cdn.com/meta/original/4X/6/6/2/6625ea18c3bc2516ee2311c8056361ec4aaaad87.png)

Any idea how to get these cleared out?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [October 4, 2023, 3:30am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/2 "2023-10-04T03:30:15Z")

</div>

Hi @Aaron_B 👋 Have you tried in [safe mode](https://meta.discourse.org/t/53504?silent=true) yet?

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

---

<div class="post-metadata">

### Author: ![Aaron\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_b/32/327391_2.png) [@Aaron\_B](https://meta.discourse.org/u/Aaron_B)
#### Post date: [October 4, 2023, 3:34am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/3 "2023-10-04T03:34:21Z")

</div>

I am running 3.2.0.beta2-dev. I will venture into [safe mode](https://meta.discourse.org/t/53504?silent=true) to see if I can find any options.

---

<div class="post-metadata">

### Author: ![Aaron\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_b/32/327391_2.png) [@Aaron\_B](https://meta.discourse.org/u/Aaron_B)
#### Post date: [October 4, 2023, 3:37am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/4 "2023-10-04T03:37:09Z")

</div>

[Safe mode](https://meta.discourse.org/t/53504?silent=true) displays the same “empty” or “ghost” topics I can’t get rid of of see an interface to delete.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 4, 2023, 3:39am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/5 "2023-10-04T03:39:30Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Aaron\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_b/32/327391_2.png) [@Aaron\_B](https://meta.discourse.org/u/Aaron_B)
#### Post date: [October 4, 2023, 3:42am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/6 "2023-10-04T03:42:30Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 4, 2023, 3:48am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/7 "2023-10-04T03:48:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Aaron\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_b/32/327391_2.png) [@Aaron\_B](https://meta.discourse.org/u/Aaron_B)
#### Post date: [October 4, 2023, 4:00am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/8 "2023-10-04T04:00:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 4, 2023, 9:27am UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/9 "2023-10-04T09:27:29Z")

</div>

> [@JammyDodger](#):
>
> I’m wondering if there’s a validation missing somewhere.

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 [discourse/lib/topic\_creator.rb at 24feb20abc713d06106a480b0b4e2f20b3938360 · discourse/discourse · GitHub](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.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 4, 2023, 6:09pm UTC](https://meta.discourse.org/t/topic-embed-and-import-don-t-validate-for-0-character-titles/280986/10 "2023-10-04T18:09:34Z")

</div>

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.

> [@Canapin](#):
>
> I barely know how to read code

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.
