scott8035
Forum Replies Created
-
I’m sorry…I deleted the large log containing that message, assuming it would generate more. You must have caught it at a time before it had done so. There are plenty in the debug.log now.
Well, I had to resurrect this topic to finish the project. I finally resolved it by writing a converter for the XML export file that handles the double-newline the same way WordPress does: by using the
wpautop
function. This I think is the closest you will get to a “perfect” import. See https://scotthom.com/wordpress-import-with-wpautop/ for more detail.Update: there are three parsers, SimpleXML, XML, and a Regex-based parser. I was unable to validate the XML parser because my import file was too big and I reached the max memory size I could allocate. The other two, SimpleXML & Regex, both cause the original problem from this post, namely, two consecutive \n (or \r\n) sequences get collapsed to one, later causing wpautop to convert that to a <br/> rather than wrapping the text block in <p>…</p>.
I’m going to have to write quick utility that I can use to transfer the correct content over ??
Update: I used the following PHP code to determine if the modules referenced by WP Import were installed:
echo extension_loaded( 'simplexml' ) ? "SimpleXML loaded\n" : "SimpleXML NOT loaded\n"; echo extension_loaded( 'xml' ) ? "XML loaded\n" : "XML NOT loaded\n";
My results were:
SimpleXML loaded XML loaded
So if I understand correctly, the WP Import plugin should be using the SimpleXML parser (I looked at the code and it checks for that first). Should I try getting it to load the XML module instead?
I’m having the same problem. This would appear to be a pretty significant shortcoming in the WP Import plugin.
@jinschoi, could you elaborate on your fix? Will the WP Importer automatically use a different parser after installing php-xml? I’m using SiteGround hosting, how can I even tell whether it’s installed or not?
Thanks for that, Alex, you’ve been very responsive and helpful.
I would suggest that instead of completely deleting the notices that you simply allow them to be hidden with your own plugin’s “Admin notifications, Update nags” feature. The notices contain good info, they just don’t need to appear on every page load.
Forum: Plugins
In reply to: [Ad Inserter - Ad Manager & AdSense Ads] Won’t save block; fatal errorReply sent to [email protected]
Forum: Fixing WordPress
In reply to: Failed To Import Tag, Media – Can’t Import my old WordPress Content@michaelnjc, you may need to explicitly specify the SSH port before clicking the connect (open?) button in PuTTY…most hosting companies change the default port.
Forum: Plugins
In reply to: [Amazon Link] Review rating, stock count, and 3rd party sellersPaul, that would be outstanding if you implemented those features! There’s always a feature/performance trade-off, but at least when we really needed it, we could get it. Thanks again for your great plug-in.
Forum: Fixing WordPress
In reply to: WP.org won't show posts imported from WP.comI know you can find the DB in one of the ini files, and I think my hosting provider has a MySQL interface. Is there an obvious tablename like “posts”, if not, what is it, and is the data spread across multiple tables? If it’s just a matter of deleting some rows, I can do that.
My bigger question is why didn’t it work in the first place.
Thanks for your help!
Forum: Fixing WordPress
In reply to: WP.org won't show posts imported from WP.comThey are missing from the site pages and from the posts admin screen.