[wp-hackers] wp_update_posts fails

Dion Hulse (dd32) wordpress at dd32.id.au
Tue Sep 18 20:06:02 UTC 2012


Wp update post requires that the data you feed it is run through
addslashes(), are you doing so here?

-sent from Android
On Sep 19, 2012 4:47 AM, "Haluk Karamete" <halukkaramete at gmail.com> wrote:

> 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
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list