# 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:** 8

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 17, 2020, 10:40pm UTC](https://meta.discourse.org/t/parent-message-doesnt-exist/141746/8 "2020-02-17T22:40:27Z")

</div>

> [@ruperty](#):
>
> But I don’t think I can go much further as I don’t know what @lookup.topic\_lookup\_from\_imported\_post\_id is doing

It’s in `base.rb` in the same directory. And it’s doing exactly what the name of the function suggests, it’s looking for the topic\_id by finding the import\_id (which I assume is the message ID in this case} in a topic custom field (or maybe a post custom field?).

> [@ruperty](#):
>
> it is very laborious to edit with vi and rerun the import, with each cycle taking around 30 minutes.

That’s better than the ones that take a week. 😉 (Sometimes you can do stuff to have the import script import only the stuff you’re trying to debug; figuring out how to do so is left as an exercise to the reader.)

You can try looking at the database and see if the parent message is getting imported and if it has a `import_id` topic/post custom field.

---

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