<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WordPress 2.6.x &#8220;Duplicate Custom Field&#8221; Issue</title>
	<atom:link href="http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue/feed" rel="self" type="application/rss+xml" />
	<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue</link>
	<description>Alex King, Denver Web Developer</description>
	<lastBuildDate>Thu, 24 May 2012 16:30:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Elliott</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-140428</link>
		<dc:creator>Elliott</dc:creator>
		<pubDate>Wed, 01 Sep 2010 21:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-140428</guid>
		<description>You did a great job of explaining this.  Thanks a lot it helped me with a project I am working on.</description>
		<content:encoded><![CDATA[<p>You did a great job of explaining this.  Thanks a lot it helped me with a project I am working on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LuÃ£ de Souza</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-129712</link>
		<dc:creator>LuÃ£ de Souza</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:18:55 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-129712</guid>
		<description>Thanks for the second arg tip, this revision calls on save_post was bugging me a lot :)</description>
		<content:encoded><![CDATA[<p>Thanks for the second arg tip, this revision calls on save_post was bugging me a lot <img src='http://alexking.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitter Tools 1.5 &#124; alexking.org</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-65352</link>
		<dc:creator>Twitter Tools 1.5 &#124; alexking.org</dc:creator>
		<pubDate>Thu, 13 Nov 2008 05:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-65352</guid>
		<description>[...] the duplicate custom field issue for people running WordPress [...]</description>
		<content:encoded><![CDATA[<p>[...] the duplicate custom field issue for people running WordPress [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Ross</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64904</link>
		<dc:creator>Christopher Ross</dc:creator>
		<pubDate>Sat, 04 Oct 2008 20:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64904</guid>
		<description>Wow, thanks for posting this! I&#039;ve been running into this problem for the past week or so and it&#039;s been driving me crazy.</description>
		<content:encoded><![CDATA[<p>Wow, thanks for posting this! I&#8217;ve been running into this problem for the past week or so and it&#8217;s been driving me crazy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac Chapman</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64891</link>
		<dc:creator>Isaac Chapman</dc:creator>
		<pubDate>Fri, 03 Oct 2008 20:18:35 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64891</guid>
		<description>Thanks for the posting, it really cleared up the $wpdb-&gt;post_meta duplicates I was seeing in a plugin I wrote.

The &quot;if ($post-&gt;post_type == â€˜revisionâ€™)&quot; check wasn&#039;t working for me for some reason, so even though this would seemingly be called twice, I changed the beginning of my function to:
&lt;code&gt;
function postarchiver_save_post($unusued, $post){
	if (!$post) { return; }
	if ($post-&gt;post_parent != 0) { 
		$post_id = $post-&gt;post_parent;
	} else {
		$post_id = $post-&gt;ID;
	}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the posting, it really cleared up the $wpdb-&gt;post_meta duplicates I was seeing in a plugin I wrote.</p>
<p>The &#8220;if ($post-&gt;post_type == â€˜revisionâ€™)&#8221; check wasn&#8217;t working for me for some reason, so even though this would seemingly be called twice, I changed the beginning of my function to:<br />
<code><br />
function postarchiver_save_post($unusued, $post){<br />
	if (!$post) { return; }<br />
	if ($post-&gt;post_parent != 0) {<br />
		$post_id = $post-&gt;post_parent;<br />
	} else {<br />
		$post_id = $post-&gt;ID;<br />
	}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Cricket Log &#187; Blog Archive &#187; Cricket Moods and 2.6</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64864</link>
		<dc:creator>The Cricket Log &#187; Blog Archive &#187; Cricket Moods and 2.6</dc:creator>
		<pubDate>Wed, 01 Oct 2008 21:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64864</guid>
		<description>[...] a month ago Alex King discovered an &#8220;undocumented feature&#8221;1 in Wordpress 2.6 that affects plugins like Cricket Moods.Â  [...]</description>
		<content:encoded><![CDATA[<p>[...] a month ago Alex King discovered an &#8220;undocumented feature&#8221;1 in WordPress 2.6 that affects plugins like Cricket Moods.Â  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M.</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64849</link>
		<dc:creator>M.</dc:creator>
		<pubDate>Tue, 30 Sep 2008 10:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64849</guid>
		<description>Maybe another solution, if revisions are not needed, is to turn off that feature. Just add the following line to the wp-config.php file.

define(&#039;WP_POST_REVISIONS&#039;, false);</description>
		<content:encoded><![CDATA[<p>Maybe another solution, if revisions are not needed, is to turn off that feature. Just add the following line to the wp-config.php file.</p>
<p>define(&#8216;WP_POST_REVISIONS&#8217;, false);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Meritt</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64805</link>
		<dc:creator>Mark S. Meritt</dc:creator>
		<pubDate>Fri, 26 Sep 2008 12:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64805</guid>
		<description>Very much looking forward to integrating Twitter Tools with a couple of my sites. Having trouble, though, understanding where things stand in relation to this issue, whether the current beta version addressing known issues, when the next version will come out, etc. Can you clarify? Thanks so much.</description>
		<content:encoded><![CDATA[<p>Very much looking forward to integrating Twitter Tools with a couple of my sites. Having trouble, though, understanding where things stand in relation to this issue, whether the current beta version addressing known issues, when the next version will come out, etc. Can you clarify? Thanks so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Name</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64770</link>
		<dc:creator>Name</dc:creator>
		<pubDate>Wed, 24 Sep 2008 08:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64770</guid>
		<description>HAI! I just spoke to your friend, &#039;Safety Letter&#039; (Notice that I did include a Safety letter in the word &#039;Hi&#039;)

It seems he is doing well, however I am concerned by his lack of activity of late, could you please confirm his existence?

Many thanks, Name</description>
		<content:encoded><![CDATA[<p>HAI! I just spoke to your friend, &#8216;Safety Letter&#8217; (Notice that I did include a Safety letter in the word &#8216;Hi&#8217;)</p>
<p>It seems he is doing well, however I am concerned by his lack of activity of late, could you please confirm his existence?</p>
<p>Many thanks, Name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chantal</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64597</link>
		<dc:creator>chantal</dc:creator>
		<pubDate>Mon, 08 Sep 2008 09:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64597</guid>
		<description>Hi

Excuse my blinding ignorance, but where do I make these changes?

Thank you</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Excuse my blinding ignorance, but where do I make these changes?</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: markku</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64584</link>
		<dc:creator>markku</dc:creator>
		<pubDate>Sun, 07 Sep 2008 13:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64584</guid>
		<description>I haven&#039;t looked into the code involving the &#039;save_post&#039; hook, but it seems it needs some changes to account for the revisions feature. More importantly, it should behave as it did before in older WP versions.

From what I understand, I think it is the same hook that introduced a lot of problems in wp-podpress after WP 2.6 was released.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t looked into the code involving the &#8216;save_post&#8217; hook, but it seems it needs some changes to account for the revisions feature. More importantly, it should behave as it did before in older WP versions.</p>
<p>From what I understand, I think it is the same hook that introduced a lot of problems in wp-podpress after WP 2.6 was released.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64579</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Sun, 07 Sep 2008 07:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64579</guid>
		<description>I&#039;m having this problem and it is pretty annoying. Guessing it must be from one of my plugins, but the ones I am using are all very popular and main stream...others must be having the same issue???</description>
		<content:encoded><![CDATA[<p>I&#8217;m having this problem and it is pretty annoying. Guessing it must be from one of my plugins, but the ones I am using are all very popular and main stream&#8230;others must be having the same issue???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scribu</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64571</link>
		<dc:creator>scribu</dc:creator>
		<pubDate>Sat, 06 Sep 2008 21:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64571</guid>
		<description>I agree, something isn&#039;t right, but in a different way:

When I look in my database, it does add the meta to the actual post id, but it doesn&#039;t check if it wasn&#039;t added already.

A patch is needed, in any case. Until then, thanks for the elegant solution, :)</description>
		<content:encoded><![CDATA[<p>I agree, something isn&#8217;t right, but in a different way:</p>
<p>When I look in my database, it does add the meta to the actual post id, but it doesn&#8217;t check if it wasn&#8217;t added already.</p>
<p>A patch is needed, in any case. Until then, thanks for the elegant solution, <img src='http://alexking.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64570</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sat, 06 Sep 2008 20:48:41 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64570</guid>
		<description>When I look in the database, I see post meta added to the post revision post id instead of the original post id. So something isn&#039;t working quite right in there.</description>
		<content:encoded><![CDATA[<p>When I look in the database, I see post meta added to the post revision post id instead of the original post id. So something isn&#8217;t working quite right in there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scribu</title>
		<link>http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64568</link>
		<dc:creator>scribu</dc:creator>
		<pubDate>Sat, 06 Sep 2008 20:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://alexking.org/blog/2008/09/06/wordpress-26x-duplicate-custom-field-issue#comment-64568</guid>
		<description>I have checked the function add_post_meta in WP 2.6.1 and I found this:


// make sure meta is added to the post, not a revision
	if ( $the_post = wp_is_post_revision($post_id) )
		$post_id = $the_post;


I guess wp_is_post_revision() could also be used instead of $post-&gt;post_type.</description>
		<content:encoded><![CDATA[<p>I have checked the function add_post_meta in WP 2.6.1 and I found this:</p>
<p>// make sure meta is added to the post, not a revision<br />
	if ( $the_post = wp_is_post_revision($post_id) )<br />
		$post_id = $the_post;</p>
<p>I guess wp_is_post_revision() could also be used instead of $post-&gt;post_type.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

