Page 3 of 7

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Mon Mar 30, 2015 9:20 am
by jult
OK, so I tried using the WXR extension posted earlier on in this thread, on an up to date 100% functional pivotx install.
After moving it in the extensions dir, it's there under extensions in the pivotx webUI, but when I click 'edit configuration' (which I probably should do before exporting) it flashes me a config page for a few milliseconds then skips right to the Export options.
What's up with that? How do I do the config for this?

Then I tried p2w.php, the other export script mentioned here, but it fails with
"Could not connect to DB . No such file or directory"
OK, so what DB? It's flatfile, without credentials. There's only one DB to be found under the pivotx dir where I put the p2w.php, how hard can it be to find/see it?

Could someone do a decent write-up on how to succesfully do any of these?

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Thu Apr 02, 2015 11:18 pm
by hansfn
OK, some (untested) advice:

  1. Download the latest hook_wxrexport.php from the extension's SVN directory.
  2. There is no configuration to edit through the normal PivotX interface - edit inside the file. Look for @@CHANGE in the file - or just read the file from the beginning.
  3. Try to run it with changing the config at all.

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Mon Apr 06, 2015 9:27 am
by hansfn
OK, I have tested myself with Bolt 2.1.5 and bolt/ImportWXR 1.2.6.

There is (as someone posted in this thread) a fatal bug in bolt/ImportWXR - see https://github.com/bolt/ImportWXR/pull/4 for the fix. Also see https://github.com/bolt/ImportWXR/pull/6 Added: The pull requests are accepted, but wait for version 1.2.7.

In addition you really should use the latest version of hook_wxrexport.php since I just fixed some minor issues (and might find more later today).

Added: I have just tested that bonusfields (extrafields) can be imported into Bolt. Yeah! It's not documented in the WXRExport extension docs, but I'll do so before we make a proper release on extensions.pivotx.net

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Wed Apr 15, 2015 11:07 pm
by jult
OK hans, so I tried exporting using the latest from april 6th, but it poses some questions;

For me the option
Export Including comments
should do. So I tried, and it just loads a really large page in my Firefox browser. It does not offer me .xml files, like with exporting the categories and such.
What do I do with the loaded webpage? Save it as what?
And in what character format is it? I see all kinds of translation errors (non UTF8 export perhaps?) in the text of the exported content. Which is unexpected, since they do show OK within pivot and its server etc.

TIA!

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Wed Apr 15, 2015 11:44 pm
by hansfn
OK, so there is some error/warning in the export that PHP reports and this breaks the HTTP header which tells the browser that this is indeed XML. You might actually see the error/warning in the output in the browser - maybe at the start if you are lucky. You can also look at the error log for your web server. Run the export again and look at the end of the error log immediately afterwards. You might be able to catch the error also with the PivotX debug mode.

PS! Since I can't reproduce this on my own test sites or live/production sites I need your help to find the problem before I can fix it.

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Thu Apr 16, 2015 9:29 pm
by jult
Unfortunately, it doesn't show *any* errors. It just takes a while and then shows the page with all posts and comments etc. but I'm not sure how to save the loaded file. From your post I understand it's supposed to be XML ?
This is the start of the file, viewing source:
Code: Select all
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252"></head><body><br>
<b>Strict Standards</b>:  Only variables should be passed by reference in <b>/mounted-storage/home33a/sub001/sc12674-OIVI/blah.xxxx.net/pivotx/extensions/wpexport/hook_wxrexport.php</b> on line <b>1267</b><br>
<!--?xml version="1.0" encoding="UTF-8"?-->
<!-- This is a WordPress eXtended RSS file generated by PivotX as an export of your site. -->
<!-- It contains information about your entries and their comments -->
<!-- See end of this file for more detailed information -->

<!-- generator="PivotX/WXR-Export" created="2015-04-15 22:52"-->
<rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/">

<channel>
<title>PivotX export in wxr format for entries and their comments</title>
<link>http://blah.xxxx.net/
<description></description>
<pubdate></pubdate>
<generator>PivotX/WXR-Export</generator>
<language></language>
<wp:wxr_version>1.0</wp:wxr_version>
<wp:base_site_url></wp:base_site_url>
<wp:base_blog_url></wp:base_blog_url>
<item>
<!-- Item for old id 69 to post_id 369 -->

Does this mean I can just edit off that starting bit, and have it be proper xml ? Would that be enough, you think?

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Thu Apr 16, 2015 9:44 pm
by hansfn
Thx for the quote - the error is there staring at us/you:

Code: Select all
<b>Strict Standards</b>: Only variables should be passed by reference in <b>..../pivotx/extensions/wpexport/hook_wxrexport.php</b> on line <b>1267</b><br>

That message is coming from PHP breaking the HTTP header just as I thought. Copy the text from the browser window will cause encoding issues.

I'll commit a fix for the problem this evening. Grab a new version of the hook file tomorrow and try again.

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Sun Apr 19, 2015 9:41 pm
by jult
Yeah I saw that line-mention, which was why I posted the bit. ;-)
Anyway, the new hook works, I've gotten a nice download (a lot faster too) of the Export including comments, as .xml.
Thanks!

I did notice the php header still shows this:

<?php
// - Extension: WXR Export
// - Version: 0.2
// - Author: PivotX team
// - Site: http://www.pivotx.net
// - Description: Export content in WXR (WordPress eXtended RSS) format.
// - Date: 2015-03-21
// - Identifier: wxrexport

I'd update that if I were you.

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Mon Apr 20, 2015 6:58 am
by hansfn
The version number will be updated when a (new) release of the extension is published on http://extensions.pivotx.net/

Re: Importing entries and pages from PivotX to Bolt

PostPosted: Wed Apr 22, 2015 11:29 pm
by jult
Next problem; I seem to have lost all linebreaks in all entries after importing the export.
So,
this
and
this

now looks like this and this. In some posts this is a horrible mess now.

I guess this should be fixed at the export stage. Sounds similar to this: http://support.advancedcustomfields.com ... er-import/ and http://www.mcbsys.com/techblog/2010/06/ ... wordpress/