# Parent message doesn't exist

**URL:** <https://meta.discourse.org/t/parent-message-doesnt-exist/141746>\
**Category:** Migration\
**Created:** [February 16, 2020, 3:59pm UTC](https://meta.discourse.org/t/parent-message-doesnt-exist/141746 "2020-02-16T15:59:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [February 16, 2020, 10:33pm UTC](https://meta.discourse.org/t/parent-message-doesnt-exist/141746/2 "2020-02-16T22:33:32Z")

</div>

Maybe the sort order is wrong because your are grouping emails by subject? Might be worth investigating. Messages are only sorted by `Subject` and the order of emails within the mbox file.

> <https://github.com/discourse/discourse/blob/3b062f79fccd99ebbcf92951cd3e205d574a06d6/script/import_scripts/mbox/support/database.rb#L123-L126>

Are you really sure you need to group emails by subject? Judging by your screenshot it looks like the emails have correct `Message-ID` as well as `In-Reply-To` and `References` headers.

---

_[View the full topic](https://meta.discourse.org/t/parent-message-doesnt-exist/141746)._
