Forum Replies Created
-
In reply to: Importing from Rainmaker; Topics’ post_parent = 0
Stephen,
As expected, Rainmaker was not willing to share their database schema:
“We are more than happy to provide a database dump to our customers, yet we’re not able to share the Rainmaker database schema.”
So, like I said before, if anyone has a more elegant solution than my cheesy hack, I’m all ears. Thanks!
In reply to: Importing from Rainmaker; Topics’ post_parent = 0Stephen,
I’ll ask about the database schema, but since Rainmaker is proprietary software there’s no guarantee that I will be able to get it. Stay tuned.
Also, liderxlt asked if I was able to solve the problem. The answer is… kind of. Since I’m copying all of my content over from one site to another, in my desperation I ended up hacking the WordPress Importer plugin so that it does not look for conflicts in the
$post_parent
value during import. This means that existing Post content will be overwritten if it shares the same$post_parent
value, which would be an untenable solution in most cases. But since my content will be identical from site to site, I’m counting it as a necessary evil.Here is the snippet I excised from ‘wordpress-importer.php’:
if ( $post_parent ) { // if we already know the parent, map it to the new local ID if ( isset( $this->processed_posts[$post_parent] ) ) { $post_parent = $this->processed_posts[$post_parent]; // otherwise record the parent for later } else { $this->post_orphans[intval($post['post_id'])] = $post_parent; $post_parent = 0; } }
Of course, I made these changes as a separate (cloned) plugin, so I also had to update the
register_importer
function as well. That way I have access to the original Importer for non-Forum Posts and Pages.Like I said, this is a brute force hack, and not an elegant solution. If anyone has an elegant solution, I’m all ears. Thanks!
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
inwp_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 thispost_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!