Skip to:
Content
Pages
Categories
Search
Top
Bottom

Vanilla import – lost nested replies

  • @cstef

    Participant

    Hello,

    I have imported a Vanilla forum to a new bbpress install. The Vanilla forum was using the Reply To plugin to nest the replies: http://vanillaforums.org/addon/replyto-plugin

    The nested replies did not transfer to the new bbpress forum. Is there any way I can get these nested positions to transfer?

    This is only affecting the imported posts, I have nested replies turned on and new replies nest properly. I did run the “recalculate position of each reply” repair tool.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • @netweb

    Keymaster

    I just saw your message in #bbpress IRC chat room

    The bbPress Vanilla2 importer does not support threaded replies out of the box, there are far too many plugins available for all the forum packages to try and support all the possible permutations and combinations these would cause.

    So that said, you would have to modify the importer to support the ‘ReplyTo’ Vanilla plugin, I just took a quick peek at the plugin and here you go, add the snippet of code here to the reply section or use the full file and replace your current bbPress Vanilla2.php file I added here and I think will do the trick.

    https://gist.github.com/ntwb/b9b3404400a79ebd5913#file-vanilla2_replyto-php

    @netweb

    Keymaster

    I just also added this to the docs https://codex.bbpress.org/import-forums/vanilla/

    @cstef

    Participant

    Stephen,

    Thanks a bunch, I will try this out first thing tomorrow and let you know how it goes.

    @netweb

    Keymaster

    Cool, it might work, it might not 😉 Either way we can tweak it if needed 🙂

    @cstef

    Participant

    Stephen,

    The import did save the _bbp_reply_to in the postmeta, but it does not seem to be affecting the nesting of the replies.

    Since the data is there, maybe there is some way I can override the listing of replies to make them show in the nested list?

    Thanks!

    @cstef

    Participant

    It looks like the ID of the parent is the old vanilla ID and not the new bbpress post ID, is there a way for me to make sure it saves the new ID as the parent?

    thanks!

    @cstef

    Participant

    I am looking into how the “callback_method” value in the field_map array works. I see that when a reply is created, a post meta value is saved to store the old and new post IDs together. I wonder if I can use a callback_method to get the new post id for the replyto based on the _bbp_post_id meta value?

    Is there any documentation I can look for to learn how to use the callback_method?

    Thanks!

    @cstef

    Participant

    I figured it out for anyone else who may need the answer. I added a new callback method to converter.php that checks for the old vanilla ID of the reply_to and returns the new post ID.

    https://gist.github.com/stefanich/4f8f7b436b87287f44bf

    Tested it, it works 🙂

    @netweb

    Keymaster

    Glad your working, sorry I didn’t get to suggest using a call back earlier 😉

    Did try using the included callback_reply_to first?

    https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converter.php#L1342

    @cstef

    Participant

    Heh, no I didn’t see that.

    Thanks again for all of your help, it is impressive how quickly this was resolved 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar