From dave at daveweiss.net Tue Apr 7 03:27:41 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 6 Apr 2009 22:27:41 -0500
Subject: [wp-xmlrpc] exposing and manipulating custom fields
Message-ID: <22C0C726-CE92-46A8-9D66-D551E6E7C142@daveweiss.net>
I can't get this to work, and I don't know if it's due to my lack of
knowledge with XMLRPC or if there is something else wrong.
I am able to update posts with title, description, etc., but when I
try to update posts with custom fields, the custom fields do not get
updated. Here's a sample of the XML generated by a request:
POST /wordpress/xmlrpc.php HTTP/1.0
Host: www.mydomain.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library
Content-length: 982
metaWeblog.editPost
445
********
*************
title83 Fox Hill
value>
descriptionUpdated Hello World
3!
publish1
member>
custom_fields
id445
key_listing_price
value>
value380000
member>
1
1
boolean>
Any ideas where I'm going wrong?
Thanks.
From dave at daveweiss.net Tue Apr 7 04:17:42 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 6 Apr 2009 23:17:42 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
Message-ID:
I can't seem to get the updates to custom fields to work on existing posts,
but creating new posts with custom fields seems to be working just fine.
Creating new post (Success!):
POST /wordpress/xmlrpc.php HTTP/1.0
Host: www.mydomain.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library
Content-length: 961
metaWeblog.newPost
1
********
********
title430 N Michigan
Ave
descriptionHello
World!
publish1
custom_fields
key_listing_price
value300000
1
569
Editing an existing post (Fail!):
POST /wordpress/xmlrpc.php HTTP/1.0
Host: www.mydomain.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library
Content-length: 989
metaWeblog.editPost
442
********
********
title430 N Michigan
Ave
descriptionUpdated Hello World
3!
publish1
custom_fields
id442
key_listing_price
value300000
1
1
The ID field in custom fields (442) is the ID for an existing, valid post in
the blog. I've tried this value as a string, casted to an int, etc. I
can't seem to make it work.
Any ideas or suggestions would be most appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From burt at ourcommoninterest.org Tue Apr 7 04:45:48 2009
From: burt at ourcommoninterest.org (Burt Adsit)
Date: Tue, 07 Apr 2009 00:45:48 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References:
Message-ID: <49DADA7C.4040307@ourcommoninterest.org>
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Tue Apr 7 06:06:32 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 7 Apr 2009 01:06:32 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
Message-ID: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net>
Well, that doesn't help, other than to know it's not something I'm
doing wrong.
I am assuming there is a bug somewhere in either the IXR_Client or in
xmlrpc.php then.
Now, the question is this - does anyone know what the issue is
already, or do I have to use my feeble skills to figure it out?
From burt at ourcommoninterest.org Tue Apr 7 07:05:22 2009
From: burt at ourcommoninterest.org (Burt Adsit)
Date: Tue, 07 Apr 2009 03:05:22 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net>
References: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net>
Message-ID: <49DAFB32.20704@ourcommoninterest.org>
An HTML attachment was scrubbed...
URL:
From burt at ourcommoninterest.org Tue Apr 7 14:54:25 2009
From: burt at ourcommoninterest.org (Burt Adsit)
Date: Tue, 07 Apr 2009 10:54:25 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <49DAFB32.20704@ourcommoninterest.org>
References: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net>
<49DAFB32.20704@ourcommoninterest.org>
Message-ID: <49DB6921.2060309@ourcommoninterest.org>
An HTML attachment was scrubbed...
URL:
From jalkut at red-sweater.com Tue Apr 7 15:14:40 2009
From: jalkut at red-sweater.com (Daniel Jalkut)
Date: Tue, 7 Apr 2009 11:14:40 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <49DB6921.2060309@ourcommoninterest.org>
References: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net>
<49DAFB32.20704@ourcommoninterest.org>
<49DB6921.2060309@ourcommoninterest.org>
Message-ID: <0662F420-9803-4E6D-9AB8-1A2E55BC6062@red-sweater.com>
David, I'm following this topic closely as I have plans to use the
Custom Fields API but haven't yet dug into it.
From talking to Joseph Scott, I re-oriented my thinking a bit about
how WordPress handles these fields. I expected the fields would be
very "post-centric", but in fact the field values are themselves more
like little mini-posts that are referenced by the main post in question.
This explains why, as Burt suggests, you need to specify a specific
field id when updating one. Just as you specify a post ID to update
the post.
it also leads to the somewhat weird (to me) situation that custom
fields can vary wildly across posts, and there is nothing to tie them
together except the key names. For instance, a "Mood" custom field
value attached to one post has no spacial relationship to a "Mood"
value attached to another.
Daniel
On Apr 7, 2009, at 10:54 AM, Burt Adsit wrote:
> I just assumed that the structure of 'id','key','value' for custom
> fields in the function set_custom_fields() in xmlrpc.php meant 'post
> id', 'key','value'. It doesn't mean that at all.
>
> wp is expecting the post meta id in the 'id' field. wp returns that
> value when you get the post. It gives you the post meta
> 'id','key','value' for the custom fields. Your edit post call needs
> to use that 'id' value *not* the post id.
From burt at ourcommoninterest.org Tue Apr 7 16:19:38 2009
From: burt at ourcommoninterest.org (Burt Adsit)
Date: Tue, 07 Apr 2009 12:19:38 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <0662F420-9803-4E6D-9AB8-1A2E55BC6062@red-sweater.com>
References: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net> <49DAFB32.20704@ourcommoninterest.org> <49DB6921.2060309@ourcommoninterest.org>
<0662F420-9803-4E6D-9AB8-1A2E55BC6062@red-sweater.com>
Message-ID: <49DB7D1A.2070500@ourcommoninterest.org>
It looks to me like the only way to update the custom fields in a post
via this api is to get the post, remember the custom field ids and then
call edit post, referring to those custom field ids again with updated
info. Those custom field ids are unique to each post.
--
You are not doing anything wrong. Stop trying to do it right.
Burt Adsit
From joseph at josephscott.org Tue Apr 7 17:34:30 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 7 Apr 2009 11:34:30 -0600
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <49DB7D1A.2070500@ourcommoninterest.org>
References: <7707F4A6-DD2E-4CFB-8490-1DEAA8EF0BD7@daveweiss.net> <49DAFB32.20704@ourcommoninterest.org> <49DB6921.2060309@ourcommoninterest.org>
<0662F420-9803-4E6D-9AB8-1A2E55BC6062@red-sweater.com>
<49DB7D1A.2070500@ourcommoninterest.org>
Message-ID: <47BEAC4A-B2B0-4D5A-B0C0-03B7D3B5F169@josephscott.org>
On Apr 7, 2009, at 10:19 AM, Burt Adsit wrote:
> It looks to me like the only way to update the custom fields in a
> post via this api is to get the post, remember the custom field ids
> and then call edit post, referring to those custom field ids again
> with updated info. Those custom field ids are unique to each post.
Correct. When updating a custom field (in any way) you must provide
the custom field id. Obviously when creating custom fields as part of
a metaWeblog.newPost call you just provide the key/value pair since
the id is not known at that point. This implies that you should turn
around and get the post info for the post that you just created so
that you'll have those ids should you want to update the custom fields
later on.
Daniel was also correct in pointing out that custom field ids are
unique across all blog posts, so that custom fields across different
posts with the same key aren't associated with each other.
Since this thread has grown beyond David's original email to me about
how to do this, here's a PHP snippet that calls metaWeblog.newPost
with custom fields:
---------------------
$post = array(
"title" => "Test Me Please",
"description" => "Hi there!",
"custom_fields" => array(
array( "key" => "state", "value" => "Utah" ),
array( "key" => "country", "value" => "USA" )
)
);
$rpc = new IXR_Client( 'http://localhost/wp/trunk/xmlrpc.php' );
$status = $rpc->query(
"metaWeblog.newPost",
1,
$username,
$password,
$post,
false
);
---------------------
Let's assume that the new post_id is 4 and that we've called
metaWeblog.getPost and determined that the custom field id for state
on that post is 3. A call to metaWeblog.editPost would look like:
---------------------
$post_id = 4;
$post = array(
"title" => "Test Me Please",
"description" => "Hi there!",
"custom_fields" => array(
array( "id" => 3, "key" => "state", "value" => "California" ),
)
);
$rpc = new IXR_Client( $rpc_url );
$status = $rpc->query(
'metaWeblog.editPost',
$post_id,
$username,
$password,
$post,
false
);
---------------------
Just remember that every custom field in WP gets a unique id.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Tue Apr 7 18:50:53 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 7 Apr 2009 13:50:53 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
Message-ID: <41FE28DB-CC8E-4391-A18D-CF152B2A856D@daveweiss.net>
Joseph:
I'm good to go now that I know it's the meta_id I'm needing to send.
If there is any way I can be of assistance in a future design of
custom fields, I'd be happy to contribute. I have several thoughts on
the subject now that I have a good grasp of the current implementation.
Thanks for the help so far!
From dave at daveweiss.net Tue Apr 7 18:46:30 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 7 Apr 2009 13:46:30 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
Message-ID: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
Daniel:
"it also leads to the somewhat weird (to me) situation that custom
fields can vary wildly across posts, and there is nothing to tie them
together except the key names."
I'm not sure what you're saying here. My understanding of custom
fields is that by creating each field, you'll see the option to
populate a field with the same name on a per post basis when using the
UI. That makes it easy to use a custom field in a template - you just
have to know what the custom field is you want to display.
It's definitely not "normalized" data - as someone pointed out in
another thread, a type-o in creating a custom field will cause some
issues for you. But for the time being, it would seem to me that
knowing the field names should pretty much suffice for many users'
needs. A better future solution might be to forget about the meta_id
for the custom fields, and do create/update/delete based only on the
name of the 'key'. Who really cares what the meta_id is anyway? For
post 'X', if I supply a field named "Y", create it if it doesn't
exist, update it if it does. To "delete" it, provide a null value for
it, or do a lookup for it and remove the row from the table.
In my particular situation, doing a "get" on a post to discover the
meta_ids only creates more server load and more load on the network.
I have all the data I need in a local database, so being able to
create/update/delete a custom field from a post would only take one
POST to the server instead of a REQUEST and POST.
From joseph at josephscott.org Tue Apr 7 20:04:29 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 7 Apr 2009 14:04:29 -0600
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
Message-ID: <336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
On Apr 7, 2009, at 12:46 PM, David Weiss wrote:
> Daniel:
>
> "it also leads to the somewhat weird (to me) situation that custom
> fields can vary wildly across posts, and there is nothing to tie
> them together except the key names."
>
> I'm not sure what you're saying here. My understanding of custom
> fields is that by creating each field, you'll see the option to
> populate a field with the same name on a per post basis when using
> the UI. That makes it easy to use a custom field in a template -
> you just have to know what the custom field is you want to display.
He's just saying that there's nothing global about a key name. The
custom field "country" on post #12 isn't tied to the custom field
"country" on post #45 other than they happen to have the same name.
>
> It's definitely not "normalized" data - as someone pointed out in
> another thread, a type-o in creating a custom field will cause some
> issues for you. But for the time being, it would seem to me that
> knowing the field names should pretty much suffice for many users'
> needs. A better future solution might be to forget about the
> meta_id for the custom fields, and do create/update/delete based
> only on the name of the 'key'. Who really cares what the meta_id is
> anyway? For post 'X', if I supply a field named "Y", create it if
> it doesn't exist, update it if it does. To "delete" it, provide a
> null value for it, or do a lookup for it and remove the row from the
> table.
The reason for this because you can have duplicate keys, so the id is
required in order to uniquely identify a field. There's nothing to
stop you from having 25 custom fields on a post all with the same key
name.
>
> In my particular situation, doing a "get" on a post to discover the
> meta_ids only creates more server load and more load on the
> network. I have all the data I need in a local database, so being
> able to create/update/delete a custom field from a post would only
> take one POST to the server instead of a REQUEST and POST.
See the above, you don't actually have enough information to uniquely
identify a custom field until you get the id for it.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From jalkut at red-sweater.com Tue Apr 7 20:09:04 2009
From: jalkut at red-sweater.com (Daniel Jalkut)
Date: Tue, 7 Apr 2009 16:09:04 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
Message-ID: <63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
Joseph - thanks for clarifying what I was talking about.
Also:
On Apr 7, 2009, at 4:04 PM, Joseph Scott wrote:
> The reason for this because you can have duplicate keys, so the id
> is required in order to uniquely identify a field. There's nothing
> to stop you from having 25 custom fields on a post all with the same
> key name.
Do you have a sense for whether many (any?) plugins expect this kind
of scenario? In providing a service to my customers, I'm expecting to
allow them to configure named fields with the assumption that there
will be a 1-1 relationship of names and fields. I wonder if I'm
setting myself up for a customer backlash with this restriction.
I'm thinking mostly of the obvious cases for custom fields like
"mood", "music I'm listening to", etc. Seems like if it has a name,
most customers will only expect for there to be one.
Daniel
From dave at daveweiss.net Tue Apr 7 21:35:28 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 7 Apr 2009 16:35:28 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
Message-ID:
The 1-to-1 concept is what I'm after, too. I think it can be handled
without too much of an issue. Who would ever use custom fields to
define the same field more than once per post?
It would lead to unworkable use in the templates, unless you needed an
array of something attached to the post. I'm going to make a change
to the API and try to update custom fields via post_id and meta_key
and see how it works. This way, I can say "Update wp_postmeta set
meta_value = 'X' where meta_key = 'Y' and post_id = 'Z'". All you'd
need to do is pass in the post_id, meta_key, and meta_value.
I don't want to have to do a get for every post, then figure out which
key is which, update the appropriate data, then do a post back to WP.
That's too much work.
From joseph at josephscott.org Tue Apr 7 23:10:15 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 7 Apr 2009 17:10:15 -0600
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
Message-ID: <8E6C0332-36F2-4E9B-BBFC-AE03D187255C@josephscott.org>
On Apr 7, 2009, at 2:09 PM, Daniel Jalkut wrote:
>> The reason for this because you can have duplicate keys, so the id
>> is required in order to uniquely identify a field. There's nothing
>> to stop you from having 25 custom fields on a post all with the
>> same key name.
>
> Do you have a sense for whether many (any?) plugins expect this kind
> of scenario? In providing a service to my customers, I'm expecting
> to allow them to configure named fields with the assumption that
> there will be a 1-1 relationship of names and fields. I wonder if
> I'm setting myself up for a customer backlash with this restriction.
>
> I'm thinking mostly of the obvious cases for custom fields like
> "mood", "music I'm listening to", etc. Seems like if it has a name,
> most customers will only expect for there to be one.
Unfortunately I don't have a feel for what people are actually doing
with custom fields out in the wild.
I agree that in many cases a simple one to one would work fine. I
could see situations where'd you not want that though, it makes it
easy to store one type of data multiple times. Here's a made up
example, what if you wanted to save the GPS coordinates of your
location every time you edited a post? Would be simple enough to have
a custom field key called "gps_edit_location" with the value storing
all the bits you needed. A theme could then ask for all of the
"gps_edit_location" custom fields for each post and display them
accordingly.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From joseph at josephscott.org Tue Apr 7 23:14:57 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 7 Apr 2009 17:14:57 -0600
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References:
Message-ID: <4920EDFF-B8AB-449D-ACDD-AFC420B1F0F7@josephscott.org>
On Apr 7, 2009, at 3:35 PM, David Weiss wrote:
> The 1-to-1 concept is what I'm after, too. I think it can be
> handled without too much of an issue. Who would ever use custom
> fields to define the same field more than once per post?
>
> It would lead to unworkable use in the templates, unless you needed
> an array of something attached to the post. I'm going to make a
> change to the API and try to update custom fields via post_id and
> meta_key and see how it works. This way, I can say "Update
> wp_postmeta set meta_value = 'X' where meta_key = 'Y' and post_id =
> 'Z'". All you'd need to do is pass in the post_id, meta_key, and
> meta_value.
>
> I don't want to have to do a get for every post, then figure out
> which key is which, update the appropriate data, then do a post back
> to WP. That's too much work.
Themes can easily handle getting an array of custom fields, not a
problem at all.
If you are concerned about the number of round trips you'll also want
to look at system.multicall, which WordPress supports.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From iamduyu at gmail.com Wed Apr 8 03:30:00 2009
From: iamduyu at gmail.com (du yu)
Date: Wed, 8 Apr 2009 11:30:00 +0800
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <8E6C0332-36F2-4E9B-BBFC-AE03D187255C@josephscott.org>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<8E6C0332-36F2-4E9B-BBFC-AE03D187255C@josephscott.org>
Message-ID: <7595a2b30904072030p11ec2049v424dd91a4f621e6e@mail.gmail.com>
I think WP's 'post' should be more general just like the Drupal's 'node'
conceptual.then we can define field in wp_post table, and WP should have
some code to allow us extent like this way. this is really the 'custom
field' should be. and then, instead of creating new table to manage new type
of content, we can manage all content in wp_post table.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From peter.westwood at ftwr.co.uk Wed Apr 8 06:38:31 2009
From: peter.westwood at ftwr.co.uk (Peter Westwood)
Date: Wed, 8 Apr 2009 07:38:31 +0100
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <7595a2b30904072030p11ec2049v424dd91a4f621e6e@mail.gmail.com>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<8E6C0332-36F2-4E9B-BBFC-AE03D187255C@josephscott.org>
<7595a2b30904072030p11ec2049v424dd91a4f621e6e@mail.gmail.com>
Message-ID:
On 8 Apr 2009, at 04:30, du yu wrote:
> I think WP's 'post' should be more general just like the Drupal's
> 'node' conceptual.then we can define field in wp_post table, and WP
> should have some code to allow us extent like this way. this is
> really the 'custom field' should be. and then, instead of creating
> new table to manage new type of content, we can manage all content
> in wp_post table. _______________________________________________
>
It already is to a point. You can define your own post types on top
of the built-in ones (post,page,attachement)
Custom fields are for storing extra information which is metadata
related to a post.
If your trying to create a new type of post say an event then you may
want to do this with a new post_type
westi
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
From iamduyu at gmail.com Wed Apr 8 11:48:23 2009
From: iamduyu at gmail.com (du yu)
Date: Wed, 8 Apr 2009 19:48:23 +0800
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<8E6C0332-36F2-4E9B-BBFC-AE03D187255C@josephscott.org>
<7595a2b30904072030p11ec2049v424dd91a4f621e6e@mail.gmail.com>
Message-ID: <7595a2b30904080448t50870356v58afc413bae9a576@mail.gmail.com>
>
> It already is to a point. You can define your own post types on top of the
> built-in ones (post,page,attachement)
>
> Custom fields are for storing extra information which is metadata related
> to a post.
>
> If your trying to create a new type of post say an event then you may want
> to do this with a new post_type
>
Peter, thanks for your reply.
then instead of create a new post_type, why bbpress/buddypress create new
tables to manage they content type?
Do you think WP's 'post' is the same extensible as Drupal's 'node'?
If so, I'll try to learn and use WP as my preferable CMS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dougal at gunters.org Wed Apr 8 13:54:06 2009
From: dougal at gunters.org (Dougal Campbell)
Date: Wed, 08 Apr 2009 09:54:06 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net> <336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
Message-ID: <49DCAC7E.4000004@gunters.org>
Daniel Jalkut wrote:
> Joseph - thanks for clarifying what I was talking about.
>
> Also:
>
> On Apr 7, 2009, at 4:04 PM, Joseph Scott wrote:
>
>> The reason for this because you can have duplicate keys, so the id is
>> required in order to uniquely identify a field. There's nothing to
>> stop you from having 25 custom fields on a post all with the same key
>> name.
>
> Do you have a sense for whether many (any?) plugins expect this kind
> of scenario? In providing a service to my customers, I'm expecting to
> allow them to configure named fields with the assumption that there
> will be a 1-1 relationship of names and fields. I wonder if I'm
> setting myself up for a customer backlash with this restriction.
>
> I'm thinking mostly of the obvious cases for custom fields like
> "mood", "music I'm listening to", etc. Seems like if it has a name,
> most customers will only expect for there to be one.
>
I implemented the PostMeta (Custom Fields) feature that way for a reason.
At the time, it seemed like the best/easiest way to allow an array of
values for a key to be stored. Why would you want an array of values?
Keep in mind that custom fields were added to WordPress long before tags
were. But, custom fields made it possible to implement per-post tags.
Yes, you could have used a comma- or space-separated list of values, but
then every plugin developer would need to work out their own formats and
parsing when they needed break simple text lists back up into arrays for
processing. I wanted to make the system flexible for plugin developers
to build upon, yet keep the UI simple for end-users.
Keep in mind that even if you have multiple custom fields attached to a
post with the same key, you can fetch them all as an array with a single
call. The API consolidates them for you. It may look confusing to some
people if you are *expecting* to have unique keys per post, but it still
seems to me like the best compromise between simplicity and flexibility.
Every other way I could think of to do it becomes over-complicated
pretty quickly.
--
Dougal Campbell
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/
*Hire me!*
From jalkut at red-sweater.com Wed Apr 8 14:30:27 2009
From: jalkut at red-sweater.com (Daniel Jalkut)
Date: Wed, 8 Apr 2009 10:30:27 -0400
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <49DCAC7E.4000004@gunters.org>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net> <336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<49DCAC7E.4000004@gunters.org>
Message-ID: <2FF43CE6-1E63-4536-BC4F-89F1C75A0B43@red-sweater.com>
Dougal, thanks for the perspective!
On Apr 8, 2009, at 9:54 AM, Dougal Campbell wrote:
> Keep in mind that even if you have multiple custom fields attached
> to a post with the same key, you can fetch them all as an array with
> a single call. The API consolidates them for you. It may look
> confusing to some people if you are *expecting* to have unique keys
> per post, but it still seems to me like the best compromise between
> simplicity and flexibility. Every other way I could think of to do
> it becomes over-complicated pretty quickly.
So if I was to encounter a "custom tags" type entry, it would have a
number of tag-name custom fields, each with a different field ID,
right? When you say the "API consolidates them for you" is this what
you're talking about?
Or are you referring to some other custom-field specific API?
Daniel
From dave at daveweiss.net Wed Apr 8 15:42:12 2009
From: dave at daveweiss.net (David Weiss)
Date: Wed, 8 Apr 2009 10:42:12 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To: <49DCAC7E.4000004@gunters.org>
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<49DCAC7E.4000004@gunters.org>
Message-ID:
Thank you.
Now I understand it a bit better. I was coming from a perspective of custom
fields being more like an extension of the WP data dictionary. I'm still
trying to figure out how I'm going to update a specific key's value through
XMLRPC though. Technically, I'm fine, but functionally, it seems
problematic to me. I'd somehow have to do a getPost, then inspect the
custom_fields array to figure out what meta_ID is attached to the specific
field I'm wanting to update.
On Wed, Apr 8, 2009 at 8:54 AM, Dougal Campbell wrote:
> Daniel Jalkut wrote:
>
>> Joseph - thanks for clarifying what I was talking about.
>>
>> Also:
>>
>> On Apr 7, 2009, at 4:04 PM, Joseph Scott wrote:
>>
>> The reason for this because you can have duplicate keys, so the id is
>>> required in order to uniquely identify a field. There's nothing to stop you
>>> from having 25 custom fields on a post all with the same key name.
>>>
>>
>> Do you have a sense for whether many (any?) plugins expect this kind of
>> scenario? In providing a service to my customers, I'm expecting to allow
>> them to configure named fields with the assumption that there will be a 1-1
>> relationship of names and fields. I wonder if I'm setting myself up for a
>> customer backlash with this restriction.
>>
>> I'm thinking mostly of the obvious cases for custom fields like "mood",
>> "music I'm listening to", etc. Seems like if it has a name, most customers
>> will only expect for there to be one.
>>
>>
> I implemented the PostMeta (Custom Fields) feature that way for a reason.
>
> At the time, it seemed like the best/easiest way to allow an array of
> values for a key to be stored. Why would you want an array of values? Keep
> in mind that custom fields were added to WordPress long before tags were.
> But, custom fields made it possible to implement per-post tags. Yes, you
> could have used a comma- or space-separated list of values, but then every
> plugin developer would need to work out their own formats and parsing when
> they needed break simple text lists back up into arrays for processing. I
> wanted to make the system flexible for plugin developers to build upon, yet
> keep the UI simple for end-users.
>
> Keep in mind that even if you have multiple custom fields attached to a
> post with the same key, you can fetch them all as an array with a single
> call. The API consolidates them for you. It may look confusing to some
> people if you are *expecting* to have unique keys per post, but it still
> seems to me like the best compromise between simplicity and flexibility.
> Every other way I could think of to do it becomes over-complicated pretty
> quickly.
>
> --
> Dougal Campbell
> http://dougal.gunters.org/
> http://twitter.com/dougal
> http://twitual.com/
> *Hire me!*
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Joe.Cheng at microsoft.com Wed Apr 8 16:03:35 2009
From: Joe.Cheng at microsoft.com (Joe Cheng)
Date: Wed, 8 Apr 2009 09:03:35 -0700
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<49DCAC7E.4000004@gunters.org>,
Message-ID:
> I'd somehow have to do a getPost, then inspect the custom_fields array to figure out what meta_ID is attached to the specific field I'm wanting to update.
David, is this really such a big deal for you to do? You talked about server/network load earlier, but we're just talking about a couple of extra XML-RPC requests at authoring time, and only a few extra lines of code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Wed Apr 8 16:26:11 2009
From: dave at daveweiss.net (David Weiss)
Date: Wed, 8 Apr 2009 11:26:11 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<49DCAC7E.4000004@gunters.org>
Message-ID:
I don't know if it's a big deal or not. As I explained in an earlier post,
I'm a bit of a noob at both WP and XMLRPC. If there is a simple request
that can be made that solves the problem for me, I haven't found what that
is.
Maybe I just don't know enough on the subject yet. Maybe if I give a little
more detail to my issue and thoughts, it would help.
Let's say I have 10 custom fields I want on every post. It's the same 10
fields all the time.
For a new post, I can set them just fine with metaWeblog.newPost. For an
update, as far as I can tell, I have to:
1. do a metaWeblog.getPost.
2. loop through all of the custom_fields for each of the 10 custom fields,
and inspect the array so that I can match up each of the 10 custom fields
with the existing custom field.
3. do a metaWeblog.editPost
I'd like to find a better way to do step 2, I just don't know what that
better way is.
I don't know what my server and network load will be yet, but I'm just
preparing myself for a possible issue.
On Wed, Apr 8, 2009 at 11:03 AM, Joe Cheng wrote:
>
> > I'd somehow have to do a getPost, then inspect the custom_fields array to
> figure out what meta_ID is attached to the specific field I'm wanting to
> update.
>
> David, is this really such a big deal for you to do? You talked about
> server/network load earlier, but we're just talking about a couple of extra
> XML-RPC requests at authoring time, and only a few extra lines of code.
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Wed Apr 8 19:59:03 2009
From: dave at daveweiss.net (David Weiss)
Date: Wed, 8 Apr 2009 14:59:03 -0500
Subject: [wp-xmlrpc] Updating Custom Fields Using metaWeblog.editPost
In-Reply-To:
References: <1712DCE3-C720-4B22-A614-33763B908F70@daveweiss.net>
<336A84FE-A0FF-4960-AA99-04403509CC82@josephscott.org>
<63BEABC8-9A2B-463E-B6AC-3F0945647F39@red-sweater.com>
<49DCAC7E.4000004@gunters.org>
Message-ID:
OK - I did just what I said - did a get on the post, inspected all the
custom_fields in the array using a switch statement, then updated the fields
with the new values, and finally saved the post via metaWeblog.editPost.
Seems to work OK.
On Wed, Apr 8, 2009 at 11:03 AM, Joe Cheng wrote:
>
> > I'd somehow have to do a getPost, then inspect the custom_fields array to
> figure out what meta_ID is attached to the specific field I'm wanting to
> update.
>
> David, is this really such a big deal for you to do? You talked about
> server/network load earlier, but we're just talking about a couple of extra
> XML-RPC requests at authoring time, and only a few extra lines of code.
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From alan at verselogic.net Sat Apr 11 09:40:36 2009
From: alan at verselogic.net (Alan Castonguay)
Date: Sat, 11 Apr 2009 05:40:36 -0400
Subject: [wp-xmlrpc] wpmu / adding users/sites/any other admin
References:
Message-ID: <5FFFCA13-F205-480C-8D89-B543B4C79315@verselogic.net>
This came up on wp-hackers but didn't get much response. Any thoughts,
or should I just start hacking up an implementation?
Alan J Castonguay
Begin forwarded message:
> From: Alan Castonguay
> Date: April 6, 2009 5:13:44 PM GMT-04:00
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] wpmu / adding users/sites/any other admin
> Reply-To: wp-hackers at lists.automattic.com
>
>> Alan, how about "gaping pits of hell"?
> heh. =)
>
> As noted, there's a lot of configurables in the Wordpress admin
> interface that are not exposed by either xmlrpc or atompub. The
> xmlrpc function "wp_getAuthors" will provide user_id, user_login,
> display_name, but there is no method to Edit existing user/usermeta,
> Register new users, or Delete existing ones.
>
> The only fleshed out implementation of user management via atompub
> that I'm aware of is Google's GDATA API for Provisioning on Google
> Apps (for Premier and Education Edition). This seems well thought
> out, and at least some of the decisions can be borrowed.
>
> http://code.google.com/apis/apps/gdata_provisioning_api_v2.0_developers_protocol.html#Create_Account_Example
>
> Gallery3's API is supposed to provide user registration and editing: http://codex.gallery2.org/Gallery3:API:REST
> Second Life's API supports user registration: http://wiki.secondlife.com/wiki/Registration_API
>
> A proper implementation has to start somewhere. So, what thinks
> people of creating the following endpoints, and defining an atom
> entry for a "user"? I'm not sure if this can borrow from hCard or
> the DiSo project.
>
> + http://blog.example.com/(wp-)app.php/user/{id} or {username}?
> + http://blog.example.com/(wp-)app.php/users/{page}?
>
>
> Alan J Castonguay
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Sun Apr 12 03:09:38 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Sat, 11 Apr 2009 21:09:38 -0600
Subject: [wp-xmlrpc] wpmu / adding users/sites/any other admin
In-Reply-To: <5FFFCA13-F205-480C-8D89-B543B4C79315@verselogic.net>
References:
<5FFFCA13-F205-480C-8D89-B543B4C79315@verselogic.net>
Message-ID:
On Apr 11, 2009, at 3:40 AM, Alan Castonguay wrote:
> This came up on wp-hackers but didn't get much response. Any
> thoughts, or should I just start hacking up an implementation?
>
Sorry I missed that on wp-hackers.
If we're going to add support for adding/managing WP users I think
we'll end up needed our own namespace to support the more WP specific
fields (role being the biggie).
>
> Begin forwarded message:
>
>> From: Alan Castonguay
>> Date: April 6, 2009 5:13:44 PM GMT-04:00
>> To: wp-hackers at lists.automattic.com
>> Subject: Re: [wp-hackers] wpmu / adding users/sites/any other admin
>> Reply-To: wp-hackers at lists.automattic.com
>>
>>> Alan, how about "gaping pits of hell"?
>> heh. =)
>>
>> As noted, there's a lot of configurables in the Wordpress admin
>> interface that are not exposed by either xmlrpc or atompub. The
>> xmlrpc function "wp_getAuthors" will provide user_id, user_login,
>> display_name, but there is no method to Edit existing user/
>> usermeta, Register new users, or Delete existing ones.
>>
>> The only fleshed out implementation of user management via atompub
>> that I'm aware of is Google's GDATA API for Provisioning on Google
>> Apps (for Premier and Education Edition). This seems well thought
>> out, and at least some of the decisions can be borrowed.
>>
>> http://code.google.com/apis/apps/gdata_provisioning_api_v2.0_developers_protocol.html#Create_Account_Example
>>
>> Gallery3's API is supposed to provide user registration and
>> editing: http://codex.gallery2.org/Gallery3:API:REST
>> Second Life's API supports user registration: http://wiki.secondlife.com/wiki/Registration_API
>>
>> A proper implementation has to start somewhere. So, what thinks
>> people of creating the following endpoints, and defining an atom
>> entry for a "user"? I'm not sure if this can borrow from hCard or
>> the DiSo project.
>>
>> + http://blog.example.com/(wp-)app.php/user/{id} or {username}?
>> + http://blog.example.com/(wp-)app.php/users/{page}?
>>
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Mon Apr 13 13:25:12 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 13 Apr 2009 08:25:12 -0500
Subject: [wp-xmlrpc] New Media Object
Message-ID:
First, thanks to those who helped me with my other issues - all is cool so
far!
But being a noob (soon to be not a noob), I am now tripped up by the call to
new media object.
Specifically, I am kind of clueless how the Base64 file representation is
supposed to work. Do I have to convert the file myself, or is that
something that happens inside the Incutio client? I've dug through the
code, but I'm just not sure how this works. Also, I can't find a single
example of how to do this out on the net. Weird.
I'm sure this should just be a handful of lines of PHP, but I'm just not
getting it right.
Any help would be greatly appreciated.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jalkut at red-sweater.com Mon Apr 13 15:20:58 2009
From: jalkut at red-sweater.com (Daniel Jalkut)
Date: Mon, 13 Apr 2009 11:20:58 -0400
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References:
Message-ID: <3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
Hi Dave - you have to Base64 the data yourself. It's a means of
turning binary data into data that can be safely expressed in a pure-
text medium.
I've never done this myself with PHP, but it looks like this function
is included in PHP 4 and 5:
http://us2.php.net/base64_encode
You might benefit from looking at the network log from an app such as
my own MarsEdit (Mac), or another client if you're on a PC. You'll
see exactly how the newMediaObject data is transmitted from the app to
the blog.
Daniel
On Apr 13, 2009, at 9:25 AM, David Weiss wrote:
> First, thanks to those who helped me with my other issues - all is
> cool so far!
>
> But being a noob (soon to be not a noob), I am now tripped up by the
> call to new media object.
>
> Specifically, I am kind of clueless how the Base64 file
> representation is supposed to work. Do I have to convert the file
> myself, or is that something that happens inside the Incutio
> client? I've dug through the code, but I'm just not sure how this
> works. Also, I can't find a single example of how to do this out on
> the net. Weird.
>
> I'm sure this should just be a handful of lines of PHP, but I'm just
> not getting it right.
>
> Any help would be greatly appreciated.
>
>
> Dave
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
From dave at daveweiss.net Mon Apr 13 21:21:23 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 13 Apr 2009 16:21:23 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To: <3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
Message-ID:
Yeah, I saw that function at php.net, and the user feedback just makes what
seems like a simple function call completely confusing.
I'll monkey around with it a bit and see what I can accomplish. I was
hoping to avoid a day or two of fiddling with this by just seeing if anyone
has actually used this API and made it work using PHP.
BTW, I'm on a Mac. I totally made the switch. The only thing I use my PC
for is IE7 testing, because I don't want to run Parallels or anything like
that on my souped up MacBook Pro. I'll check out MarsEdit.
On Mon, Apr 13, 2009 at 10:20 AM, Daniel Jalkut wrote:
> Hi Dave - you have to Base64 the data yourself. It's a means of turning
> binary data into data that can be safely expressed in a pure-text medium.
>
> I've never done this myself with PHP, but it looks like this function is
> included in PHP 4 and 5:
>
> http://us2.php.net/base64_encode
>
> You might benefit from looking at the network log from an app such as my
> own MarsEdit (Mac), or another client if you're on a PC. You'll see exactly
> how the newMediaObject data is transmitted from the app to the blog.
>
> Daniel
>
>
> On Apr 13, 2009, at 9:25 AM, David Weiss wrote:
>
> First, thanks to those who helped me with my other issues - all is cool so
>> far!
>>
>> But being a noob (soon to be not a noob), I am now tripped up by the call
>> to new media object.
>>
>> Specifically, I am kind of clueless how the Base64 file representation is
>> supposed to work. Do I have to convert the file myself, or is that
>> something that happens inside the Incutio client? I've dug through the
>> code, but I'm just not sure how this works. Also, I can't find a single
>> example of how to do this out on the net. Weird.
>>
>> I'm sure this should just be a handful of lines of PHP, but I'm just not
>> getting it right.
>>
>> Any help would be greatly appreciated.
>>
>>
>> Dave
>> _______________________________________________
>> wp-xmlrpc mailing list
>> wp-xmlrpc at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Mon Apr 13 21:43:59 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Mon, 13 Apr 2009 15:43:59 -0600
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
Message-ID: <7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
On Apr 13, 2009, at 3:21 PM, David Weiss wrote:
> Yeah, I saw that function at php.net, and the user feedback just
> makes what seems like a simple function call completely confusing.
>
> I'll monkey around with it a bit and see what I can accomplish. I
> was hoping to avoid a day or two of fiddling with this by just
> seeing if anyone has actually used this API and made it work using
> PHP.
I can confirm that it does work with PHP :-)
Using the IXR library that WordPress ships with you need to make sure
that the field is correctly marked up as base64:
$file_data = new IXR_Base64( $data );
The IXR_Base64 class takes care of calling the base64_encode()
function for you.
>
> BTW, I'm on a Mac. I totally made the switch. The only thing I use
> my PC for is IE7 testing, because I don't want to run Parallels or
> anything like that on my souped up MacBook Pro. I'll check out
> MarsEdit.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Mon Apr 13 23:31:43 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 13 Apr 2009 18:31:43 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To: <7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
Message-ID:
That's the piece I did not see in the code.
Thanks!
On Mon, Apr 13, 2009 at 4:43 PM, Joseph Scott wrote:
>
> On Apr 13, 2009, at 3:21 PM, David Weiss wrote:
>
> Yeah, I saw that function at php.net, and the user feedback just makes
> what seems like a simple function call completely confusing.
>
> I'll monkey around with it a bit and see what I can accomplish. I was
> hoping to avoid a day or two of fiddling with this by just seeing if anyone
> has actually used this API and made it work using PHP.
>
>
>
> I can confirm that it does work with PHP :-)
>
> Using the IXR library that WordPress ships with you need to make sure that
> the field is correctly marked up as base64:
>
> $file_data = new IXR_Base64( $data );
>
> The IXR_Base64 class takes care of calling the base64_encode() function for
> you.
>
>
>
> BTW, I'm on a Mac. I totally made the switch. The only thing I use my PC
> for is IE7 testing, because I don't want to run Parallels or anything like
> that on my souped up MacBook Pro. I'll check out MarsEdit.
>
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Mon Apr 13 23:34:43 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 13 Apr 2009 18:34:43 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To: <7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
Message-ID:
And my starting point for getting the file into $data is this:
I'll let you all know if it works or not.
On Mon, Apr 13, 2009 at 4:43 PM, Joseph Scott wrote:
>
> On Apr 13, 2009, at 3:21 PM, David Weiss wrote:
>
> Yeah, I saw that function at php.net, and the user feedback just makes
> what seems like a simple function call completely confusing.
>
> I'll monkey around with it a bit and see what I can accomplish. I was
> hoping to avoid a day or two of fiddling with this by just seeing if anyone
> has actually used this API and made it work using PHP.
>
>
>
> I can confirm that it does work with PHP :-)
>
> Using the IXR library that WordPress ships with you need to make sure that
> the field is correctly marked up as base64:
>
> $file_data = new IXR_Base64( $data );
>
> The IXR_Base64 class takes care of calling the base64_encode() function for
> you.
>
>
>
> BTW, I'm on a Mac. I totally made the switch. The only thing I use my PC
> for is IE7 testing, because I don't want to run Parallels or anything like
> that on my souped up MacBook Pro. I'll check out MarsEdit.
>
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Tue Apr 14 16:44:48 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 14 Apr 2009 11:44:48 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
Message-ID:
It works!
Thanks again for the help.
On really large images, I get a "transport error" - I assume that's some
sort of timeout issue or something.
On Mon, Apr 13, 2009 at 6:34 PM, David Weiss wrote:
> And my starting point for getting the file into $data is this:
>
> // get contents of a file into a string
> $filename = "path-to-file";
> $handle = fopen($filename, "r");
> $data = fread($handle, filesize($filename));
> fclose($handle);
> ?>
>
>
> I'll let you all know if it works or not.
>
> On Mon, Apr 13, 2009 at 4:43 PM, Joseph Scott wrote:
>
>>
>> On Apr 13, 2009, at 3:21 PM, David Weiss wrote:
>>
>> Yeah, I saw that function at php.net, and the user feedback just makes
>> what seems like a simple function call completely confusing.
>>
>> I'll monkey around with it a bit and see what I can accomplish. I was
>> hoping to avoid a day or two of fiddling with this by just seeing if anyone
>> has actually used this API and made it work using PHP.
>>
>>
>>
>> I can confirm that it does work with PHP :-)
>>
>> Using the IXR library that WordPress ships with you need to make sure that
>> the field is correctly marked up as base64:
>>
>> $file_data = new IXR_Base64( $data );
>>
>> The IXR_Base64 class takes care of calling the base64_encode() function
>> for you.
>>
>>
>>
>> BTW, I'm on a Mac. I totally made the switch. The only thing I use my PC
>> for is IE7 testing, because I don't want to run Parallels or anything like
>> that on my souped up MacBook Pro. I'll check out MarsEdit.
>>
>>
>>
>> --
>> Joseph Scott
>> joseph at josephscott.org
>> http://josephscott.org/
>>
>>
>>
>>
>>
>> _______________________________________________
>> wp-xmlrpc mailing list
>> wp-xmlrpc at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dougal at gunters.org Tue Apr 14 17:01:29 2009
From: dougal at gunters.org (Dougal Campbell)
Date: Tue, 14 Apr 2009 13:01:29 -0400
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References: <3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com> <7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
Message-ID: <49E4C169.5060606@gunters.org>
David Weiss wrote:
> It works!
>
> Thanks again for the help.
>
> On really large images, I get a "transport error" - I assume that's
> some sort of timeout issue or something.
You should be able to learn more about the error from your web server
error logs. If it's a timeout, or an upload size limit issue, you'll
probably need to adjust your php.ini settings.
--
Dougal Campbell
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/
*Hire me!*
From joseph at josephscott.org Tue Apr 14 17:04:58 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 14 Apr 2009 11:04:58 -0600
Subject: [wp-xmlrpc] New Media Object
In-Reply-To: <49E4C169.5060606@gunters.org>
References: <3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com> <7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
<49E4C169.5060606@gunters.org>
Message-ID:
On Apr 14, 2009, at 11:01 AM, Dougal Campbell wrote:
> David Weiss wrote:
>> It works!
>>
>> Thanks again for the help.
>>
>> On really large images, I get a "transport error" - I assume that's
>> some sort of timeout issue or something.
>
> You should be able to learn more about the error from your web
> server error logs. If it's a timeout, or an upload size limit issue,
> you'll probably need to adjust your php.ini settings.
I'd guess a memory limit error in PHP. Shipping large files around
base64 encoded (which is what XML-RPC requires) eats up memory like mad.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Tue Apr 14 22:32:34 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 14 Apr 2009 17:32:34 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
<49E4C169.5060606@gunters.org>
Message-ID:
Now, is there way to delete a media object from the WP library?
I don't see one, but thought I'd ask.
On Tue, Apr 14, 2009 at 12:04 PM, Joseph Scott wrote:
>
> On Apr 14, 2009, at 11:01 AM, Dougal Campbell wrote:
>
> David Weiss wrote:
>>
>>> It works!
>>>
>>> Thanks again for the help.
>>>
>>> On really large images, I get a "transport error" - I assume that's some
>>> sort of timeout issue or something.
>>>
>>
>> You should be able to learn more about the error from your web server
>> error logs. If it's a timeout, or an upload size limit issue, you'll
>> probably need to adjust your php.ini settings.
>>
>
>
>
> I'd guess a memory limit error in PHP. Shipping large files around base64
> encoded (which is what XML-RPC requires) eats up memory like mad.
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Tue Apr 14 23:02:07 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Tue, 14 Apr 2009 17:02:07 -0600
Subject: [wp-xmlrpc] New Media Object
In-Reply-To:
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
<49E4C169.5060606@gunters.org>
Message-ID: <110CDC76-F719-42CF-B854-9C3D2FE70426@josephscott.org>
On Apr 14, 2009, at 4:32 PM, David Weiss wrote:
> Now, is there way to delete a media object from the WP library?
>
> I don't see one, but thought I'd ask
No, media management APIs is an area where there is still plenty of
work to be done.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Wed Apr 15 01:21:16 2009
From: dave at daveweiss.net (David Weiss)
Date: Tue, 14 Apr 2009 20:21:16 -0500
Subject: [wp-xmlrpc] New Media Object
In-Reply-To: <110CDC76-F719-42CF-B854-9C3D2FE70426@josephscott.org>
References:
<3533994C-7D57-420C-B9FF-618E2972A419@red-sweater.com>
<7A7E564D-0278-4A80-BD67-DB06F470D644@josephscott.org>
<49E4C169.5060606@gunters.org>
<110CDC76-F719-42CF-B854-9C3D2FE70426@josephscott.org>
Message-ID:
I think I have an alternate solution.
But at least I know how to make it work now! I get a charge out of being
able to use the APIs. There's so much that can be done with it.
On Tue, Apr 14, 2009 at 6:02 PM, Joseph Scott wrote:
>
> On Apr 14, 2009, at 4:32 PM, David Weiss wrote:
>
> Now, is there way to delete a media object from the WP library?
>>
>> I don't see one, but thought I'd ask
>>
>
>
>
> No, media management APIs is an area where there is still plenty of work to
> be done.
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Fri Apr 17 15:54:09 2009
From: dave at daveweiss.net (David Weiss)
Date: Fri, 17 Apr 2009 10:54:09 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
Message-ID:
Thanks to everyone's help here, I am "THIS" close (holding my index finger
and thumb a 1/4 inch apart) to having a really slick solution for getting my
project working.
One more problem.
Let's say I have a URL I'm sticking into a custom field and using getPost or
editPost to create/update that custom field.
The XML that gets passed looks just fine:
id3038
key_photo_1_largevalue/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg
But once it's inside of WP, the "&" gets stripped off the "&".
How do I fix this? I've tried adding an extra "&" and all sorts of other
permutations of possibilities.
Thanks for your help again.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Fri Apr 17 22:35:15 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Fri, 17 Apr 2009 16:35:15 -0600
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
Message-ID:
On Apr 17, 2009, at 9:54 AM, David Weiss wrote:
> Thanks to everyone's help here, I am "THIS" close (holding my index
> finger and thumb a 1/4 inch apart) to having a really slick solution
> for getting my project working.
>
> One more problem.
>
> Let's say I have a URL I'm sticking into a custom field and using
> getPost or editPost to create/update that custom field.
>
> The XML that gets passed looks just fine:
>
>
> id3038
> key_photo_1_large
> value>value/wordpress/
> images/image.php/07160864_1.jpg?width=600&height=400&image=/
> wordpress/images/07160864_1.jpg
>
>
> But once it's inside of WP, the "&" gets stripped off the "&".
>
> How do I fix this? I've tried adding an extra "&" and all sorts of
> other permutations of possibilities.
I've been trying to reproduce this with no luck so far. What version
are you using? I've been testing against -trunk so it's possible that
something has changed that addressed this.
I used the IXR library and my custom field looked like:
array(
"key" => "photo",
"value" => "/wordpress/images/image.php/07160864_1.jpg?
width=600&height=400&image=/wordpress/images/07160864_1.jpg"
)
I checked the DB, the edit post screen and the results of
metaWeblog.getPost, they all returned the same string with the &
intact.
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Sat Apr 18 00:48:00 2009
From: dave at daveweiss.net (David Weiss)
Date: Fri, 17 Apr 2009 19:48:00 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
Message-ID:
2.7.1 with the LibXML2 plugin, which I just updated yesterday.
On Fri, Apr 17, 2009 at 5:35 PM, Joseph Scott wrote:
>
> On Apr 17, 2009, at 9:54 AM, David Weiss wrote:
>
> Thanks to everyone's help here, I am "THIS" close (holding my index finger
>> and thumb a 1/4 inch apart) to having a really slick solution for getting my
>> project working.
>>
>> One more problem.
>>
>> Let's say I have a URL I'm sticking into a custom field and using getPost
>> or editPost to create/update that custom field.
>>
>> The XML that gets passed looks just fine:
>>
>>
>> id3038
>>
>> key_photo_1_largevalue/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg
>>
>>
>> But once it's inside of WP, the "&" gets stripped off the "&".
>>
>> How do I fix this? I've tried adding an extra "&" and all sorts of other
>> permutations of possibilities.
>>
>
>
>
> I've been trying to reproduce this with no luck so far. What version are
> you using? I've been testing against -trunk so it's possible that something
> has changed that addressed this.
>
> I used the IXR library and my custom field looked like:
>
> array(
> "key" => "photo",
> "value" =>
> "/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg"
> )
>
> I checked the DB, the edit post screen and the results of
> metaWeblog.getPost, they all returned the same string with the & intact.
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Sat Apr 18 01:05:04 2009
From: dave at daveweiss.net (David Weiss)
Date: Fri, 17 Apr 2009 20:05:04 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
Message-ID:
/**
* IXR - The Inutio XML-RPC Library
*
* @package IXR
* @since 1.5
*
* @copyright Incutio Ltd 2002-2005
* @version 1.7 (beta) 23rd May 2005
* @author Simon Willison
* @link http://scripts.incutio.com/xmlrpc/ Site
* @link http://scripts.incutio.com/xmlrpc/manual.php Manual
* @license BSD License http://www.opensource.org/licenses/bsd-license.php
*/
/**
* IXR_Value
*
* @package IXR
* @since 1.5
*/
This is the
On Fri, Apr 17, 2009 at 5:35 PM, Joseph Scott wrote:
>
> On Apr 17, 2009, at 9:54 AM, David Weiss wrote:
>
> Thanks to everyone's help here, I am "THIS" close (holding my index finger
>> and thumb a 1/4 inch apart) to having a really slick solution for getting my
>> project working.
>>
>> One more problem.
>>
>> Let's say I have a URL I'm sticking into a custom field and using getPost
>> or editPost to create/update that custom field.
>>
>> The XML that gets passed looks just fine:
>>
>>
>> id3038
>>
>> key_photo_1_largevalue/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg
>>
>>
>> But once it's inside of WP, the "&" gets stripped off the "&".
>>
>> How do I fix this? I've tried adding an extra "&" and all sorts of other
>> permutations of possibilities.
>>
>
>
>
> I've been trying to reproduce this with no luck so far. What version are
> you using? I've been testing against -trunk so it's possible that something
> has changed that addressed this.
>
> I used the IXR library and my custom field looked like:
>
> array(
> "key" => "photo",
> "value" =>
> "/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg"
> )
>
> I checked the DB, the edit post screen and the results of
> metaWeblog.getPost, they all returned the same string with the & intact.
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dave at daveweiss.net Sat Apr 18 19:02:58 2009
From: dave at daveweiss.net (David Weiss)
Date: Sat, 18 Apr 2009 14:02:58 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
Message-ID:
I am going to try to upgrade my php to 5.2.9. I'm sure this is some sort of
libxml2/php issue. But even with the plugin that was supposed to address
the issue, I had problems.
One way or the other, I'll report back on results.
On Fri, Apr 17, 2009 at 5:35 PM, Joseph Scott wrote:
>
> On Apr 17, 2009, at 9:54 AM, David Weiss wrote:
>
> Thanks to everyone's help here, I am "THIS" close (holding my index finger
>> and thumb a 1/4 inch apart) to having a really slick solution for getting my
>> project working.
>>
>> One more problem.
>>
>> Let's say I have a URL I'm sticking into a custom field and using getPost
>> or editPost to create/update that custom field.
>>
>> The XML that gets passed looks just fine:
>>
>>
>> id3038
>>
>> key_photo_1_largevalue/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg
>>
>>
>> But once it's inside of WP, the "&" gets stripped off the "&".
>>
>> How do I fix this? I've tried adding an extra "&" and all sorts of other
>> permutations of possibilities.
>>
>
>
>
> I've been trying to reproduce this with no luck so far. What version are
> you using? I've been testing against -trunk so it's possible that something
> has changed that addressed this.
>
> I used the IXR library and my custom field looked like:
>
> array(
> "key" => "photo",
> "value" =>
> "/wordpress/images/image.php/07160864_1.jpg?width=600&height=400&image=/wordpress/images/07160864_1.jpg"
> )
>
> I checked the DB, the edit post screen and the results of
> metaWeblog.getPost, they all returned the same string with the & intact.
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Mon Apr 20 15:31:59 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Mon, 20 Apr 2009 09:31:59 -0600
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
Message-ID: <3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
On Apr 18, 2009, at 1:02 PM, David Weiss wrote:
> I am going to try to upgrade my php to 5.2.9. I'm sure this is some
> sort of libxml2/php issue. But even with the plugin that was
> supposed to address the issue, I had problems.
>
> One way or the other, I'll report back on results.
Did this turn out to be part of the libxml2/php problem?
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Mon Apr 20 18:28:49 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 20 Apr 2009 13:28:49 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To: <3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
References:
<3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
Message-ID:
I don't know yet.
I am not super slick with my Linux administration, so I want to figure out
the proper way to upgrade to 5.2.9 without blowing up my server. Also, my
server was built with RPMs, so upgrading and downgrading components isn't
always easy, particularly since my host will not support Fedora 9 or 10. I
can't find the FC8 RPM packages to downgrade libxml2. I figured that would
be the simplest thing to test first, then move on to php 5.2.9 and
recompiling Apache, which I want to avoid if at all possible, since I don't
see FC8 RPM packages for those items either.
I may just write a simple plugin for myself or hack my template to fix the
data on the fly. There are only a couple of specific times where the & gets
omitted. "width=600height=400" can easily be fixed with a str_replace
function to stick the & back in. I have some other instances of
"width=150height=100" that can easily be fixed on the fly, too.
On Mon, Apr 20, 2009 at 10:31 AM, Joseph Scott wrote:
>
> On Apr 18, 2009, at 1:02 PM, David Weiss wrote:
>
> I am going to try to upgrade my php to 5.2.9. I'm sure this is some sort
>> of libxml2/php issue. But even with the plugin that was supposed to address
>> the issue, I had problems.
>>
>> One way or the other, I'll report back on results.
>>
>
>
>
> Did this turn out to be part of the libxml2/php problem?
>
>
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Mon Apr 20 20:15:29 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Mon, 20 Apr 2009 14:15:29 -0600
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
<3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
Message-ID: <7F59F5EC-A6E6-4086-8D1C-EEDE216AA81C@josephscott.org>
On Apr 20, 2009, at 12:28 PM, David Weiss wrote:
> I don't know yet.
>
> I am not super slick with my Linux administration, so I want to
> figure out the proper way to upgrade to 5.2.9 without blowing up my
> server. Also, my server was built with RPMs, so upgrading and
> downgrading components isn't always easy, particularly since my host
> will not support Fedora 9 or 10. I can't find the FC8 RPM packages
> to downgrade libxml2. I figured that would be the simplest thing to
> test first, then move on to php 5.2.9 and recompiling Apache, which
> I want to avoid if at all possible, since I don't see FC8 RPM
> packages for those items either.
>
> I may just write a simple plugin for myself or hack my template to
> fix the data on the fly. There are only a couple of specific times
> where the & gets omitted. "width=600height=400" can easily be fixed
> with a str_replace function to stick the & back in. I have some
> other instances of "width=150height=100" that can easily be fixed on
> the fly, too.
If you can find some pattern to the problem that an update to the
libxml2 plugin would fix let me know and I'll add it.
I did release an update recently that dealt with the libxml2 version
was 2.7.3 but the PHP version was lower than 5.2.9. If you find
yourself in that situation be sure to try out the new version of the
plugin (0.2.2).
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Mon Apr 20 20:50:12 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 20 Apr 2009 15:50:12 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To: <7F59F5EC-A6E6-4086-8D1C-EEDE216AA81C@josephscott.org>
References:
<3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
<7F59F5EC-A6E6-4086-8D1C-EEDE216AA81C@josephscott.org>
Message-ID:
Well, the pattern is that an & gets turned into amp;
>From searching on the net, I see people saying this and < as being a
problem.
On Mon, Apr 20, 2009 at 3:15 PM, Joseph Scott wrote:
>
> On Apr 20, 2009, at 12:28 PM, David Weiss wrote:
>
> I don't know yet.
>>
>> I am not super slick with my Linux administration, so I want to figure out
>> the proper way to upgrade to 5.2.9 without blowing up my server. Also, my
>> server was built with RPMs, so upgrading and downgrading components isn't
>> always easy, particularly since my host will not support Fedora 9 or 10. I
>> can't find the FC8 RPM packages to downgrade libxml2. I figured that would
>> be the simplest thing to test first, then move on to php 5.2.9 and
>> recompiling Apache, which I want to avoid if at all possible, since I don't
>> see FC8 RPM packages for those items either.
>>
>> I may just write a simple plugin for myself or hack my template to fix the
>> data on the fly. There are only a couple of specific times where the & gets
>> omitted. "width=600height=400" can easily be fixed with a str_replace
>> function to stick the & back in. I have some other instances of
>> "width=150height=100" that can easily be fixed on the fly, too.
>>
>
>
>
> If you can find some pattern to the problem that an update to the libxml2
> plugin would fix let me know and I'll add it.
>
> I did release an update recently that dealt with the libxml2 version was
> 2.7.3 but the PHP version was lower than 5.2.9. If you find yourself in
> that situation be sure to try out the new version of the plugin (0.2.2).
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joseph at josephscott.org Tue Apr 21 02:09:16 2009
From: joseph at josephscott.org (Joseph Scott)
Date: Mon, 20 Apr 2009 20:09:16 -0600
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
<3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
<7F59F5EC-A6E6-4086-8D1C-EEDE216AA81C@josephscott.org>
Message-ID:
On Apr 20, 2009, at 2:50 PM, David Weiss wrote:
> Well, the pattern is that an & gets turned into amp;
>
> From searching on the net, I see people saying this and < as
> being a problem
What version of PHP and libxml2 are you using?
--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/
From dave at daveweiss.net Tue Apr 21 02:26:49 2009
From: dave at daveweiss.net (David Weiss)
Date: Mon, 20 Apr 2009 21:26:49 -0500
Subject: [wp-xmlrpc] An Error in Custom Fields Processing?
In-Reply-To:
References:
<3BD17FB1-AD67-4A3A-936F-DBB051B95AD4@josephscott.org>
<7F59F5EC-A6E6-4086-8D1C-EEDE216AA81C@josephscott.org>
Message-ID:
2.7.1 - WP
2.7.2-2 libxml2
On Mon, Apr 20, 2009 at 9:09 PM, Joseph Scott wrote:
>
> On Apr 20, 2009, at 2:50 PM, David Weiss wrote:
>
> Well, the pattern is that an & gets turned into amp;
>>
>> From searching on the net, I see people saying this and < as being a
>> problem
>>
>
>
>
> What version of PHP and libxml2 are you using?
>
>
> --
> Joseph Scott
> joseph at josephscott.org
> http://josephscott.org/
>
>
>
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: