Skip to:
Content
Pages
Categories
Search
Top
Bottom

“Repair forums” destroys my already failed import attempt

  • @anonymized-13302461

    Inactive

    Moving forums to a subdomain, the user database is shared with main website but that’s all.

    Trying to get forums moved in to a clean install but I’ve been trying for many hours with no success.

    have used Tools->export for forums, topics, replies.
    Then Tools->import on the new site.

    The admin panel forums area shows all the topics correctly, forum name, amount of replies, names, etc.
    The topics area also looks correct, names, amount of replies etc.
    The replies area show which topic they are a reply to.

    But when I go to the front end, none of it is connected. No topics in forums, no replies to topics. But the forum and the topics do say “X amount of topics in this forum” etc.

    Try the “Repair forums” and do those 1 at a time and it just makes things worse.
    Then nothing is linked, topics have “no forum”, and replies have “no topic” etc.
    Any help please?

    P.S. Regarding importing large files, if anyone is having problems:
    I had to split the xml files as despite all my php.ini maximum file upload size, maximum script memory, and httpd.conf timeouts being set REALLY high (like 500MB and 1 hour!!) I just cannot complete the imports of files 50MB. So used this and now they are importing when split under 5MB ->
    http://www.hongkiat.com/blog/split-large-xml-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • @bigt11

    Participant

    @welshdemon did you ever figure this out, I am pretty much doing – stuck exactly where you are. I am going for older bbpress to newer bbpress that is part of a full site update and just want to bring everything in cleanly. It does bring in my replies, and they seem to be connected properly in the backend, but frontend, they do not show.

    If i edit a reply, and just hit the update button, it will then show. I want to avoid doing that 1000 times.

    Even if I export the topics from the new site, that show properly after I did the update trick mentioned above, then bring it back in (wordpress import) to test if it will import properly, it does not, has same symptoms a you mentioned.

    @mikecostanzo

    Participant

    This is the first post I’ve found that accurately describes my predicament.

    I am setting up a development site and attempting to import my forums via multiple XML files. However, the import process seems to be breaking a key relationship that allows the front-end of BBPress to work.

    After importing, the Forums, Topics, and Replies all display correctly in the Dashboard, but on the front end I just get the standard “Oh bother! No topics were found here!” If I then run the Repair Tools “Recalculate the parent topic for each post” and/or “Recalculate the parent forum for each post,” then the relationship between Forums and Topics is lost, and the Replies page fails to load completely (returns an empty page with no error message).

    From my digging around in the database, this problem seems centered around the field post_parent in wp_posts. On import, WordPress is setting this to “0” instead of the value in my XML file. If I click “Edit” on a Topic in the Dashboard and then click “Update” without changing anything, WordPress correctly repopulates this post_parent value and the Topic appears on the front end under its parent forum. But like @bigt11 and @welshdemon, I don’t have time to do that with 1,200 Topics and 7,400 Replies.

    Does anyone have any ideas? I have spent weeks trying to figure this out. I have tried multiple different XML import plugins, but none of them seem to word well with BBPress (or work with big XML files). Any help you can give here is very much appreciated!

    @renzopalacios

    Participant

    It’s been almost 2 years, but I wanted to post my reply anyway because I think it can help someone.

    Following @mikecostanzo insights, I built these SQL queries which repopulates the missing post_parent values successfully. Doing this a forum is reconnected with its topics, and topics are reconnected with its replies.

    Remember that first, you need to import the forum, topics, and replies using WordPress importer. These actions import as well the involved users.

    I applied this solution for a single forum but it can be used as a starting point modifying some parameters if required:

    For topics:
    UPDATE
    wpmd_posts
    INNER JOIN (wpmd_postmeta) ON (wpmd_posts.ID = wpmd_postmeta.post_id AND wpmd_postmeta.meta_key = ‘_bbp_forum_id’)
    SET
    wpmd_posts.post_parent = wpmd_postmeta.meta_value
    WHERE
    wpmd_posts.post_type LIKE ‘topic’

    For Replies:

    UPDATE
    wpmd_posts
    INNER JOIN (wpmd_postmeta) ON (wpmd_posts.ID = wpmd_postmeta.post_id AND wpmd_postmeta.meta_key = ‘_bbp_topic_id’)
    SET
    wpmd_posts.post_parent = wpmd_postmeta.meta_value
    WHERE
    wpmd_posts.post_type LIKE ‘reply’

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