[wp-hackers] wp_update_posts fails
halukkaramete at gmail.com
Tue Sep 18 18:47:09 UTC 2012
Thank you Jeremy for sharing your experience.
What I find confusing is the following;
If I use the dashboard interface to update a post with the smart
characters ( the same ones that causes my migration routine chokes on
), that post goes thru. What's it that makes it work at the dashboard
when the post is done manually, and what is that fails it when the
same content is updated using the WP API?
One solution I will try today is to save the content as a text file
and then read the text file back - hoping this save and read operation
scrubs the characters that wp_update_post is choking on.
This char set matters always get to me.
On Tue, Sep 18, 2012 at 11:15 AM, Jeremy Clarke <jer at simianuprising.com> wrote:
> On Mon, Sep 17, 2012 at 9:27 PM, Haluk Karamete <halukkaramete at gmail.com>wrote:
>> how do you tackle such import problems so that $content does not fail
>> the process like that!
>> Is there a way to clean the $content so that it becomes kosher enough
>> for the wp_update_post to go thru?
> When migrating a huge site to Disqus I ended up using the command-line tool
> xmllint* to track down all the strange little encoding failures in the WXR
> file created by WP that Disqus was choking on. If you're using XML at all
> that might help. It was the only thing I could find that was sensitive
> enough to pick up all the issues that would cause Disqus to fail.
> Not sure if that helps you at all. There may be other tools that will have
> a similar effect of scrubbing whatever kind of data you have that you are
> importing to WP.
> * man page: http://xmlsoft.org/xmllint.html
> Jeremy Clarke
> Code and Design • globalvoicesonline.org
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers