Syndicate Out 0.4

Syndicate Out 0.4 is now available to download from the WordPress plugin directory.  If installing this version as an upgrade some changes to the way the plugin settings are handled should automatically be made.  If you find that your settings seem to have disapeared try de-activating and re-activating the plugin.  This should upgrade the storage format.

This release takes the plugin one step closer to a full version release with the addition of three major features, two of which are the result of user feedback, and the other was always on the cards (although this was requested too!):

  • Syndicated posts can now be sent to more multiple blogs.  The settings page now allows the user to add as many different blogs as they require for each post to be syndicated to. (Thanks to Chris, Cat, Danel for requesting this feature.)
  • Syndicated posts can send the list of categories they have been posted in to remote blogs.  There is an issue with this due to a WP bug, see notes below. (Thanks to Martin for this suggestion.)
  • Posts which have already been syndicated are now updated when the source blog us updated. (Thanks again to Martin for poking me on that one too.)

While implementing point two above, I uncovered an unexpected behaviour in WordPress’ implementation of the metaWeblog.newPost XML-RPC.  When sending categories to the remote blog the expected behavour is that the remote blog will ignore any categories it doesn’t recognise (this is the behaviour specified in the metaWeblog API RFC), however this is not how WordPress behaves.  Instead, if a category is transmitted which the remote blog does not recognise the incoming post is listed under no categories at all.  A bug has been raised with WordPress regading this issue.

While we wait the outcome of this bug report if you want to use the category functionality, and you have access to the WP core code on the remote blog (and don’t mind getting your hands a little dirty), two very small changes can be made to the core xmlrpc.php file so it behaves as expected.  Around lines 2216 and 2469 of xmlrpc.php (line numbers from 2.8.6) you should find the following code:

$post_category[] = get_cat_ID($cat);

Changing these line to the following should rectify the problem:

if ($thisCategory = get_cat_ID($cat)) { $post_category[] = $thisCategory; }

Please only edit that file if you’re really comfortable with it.  Although it’s a very simple change the usual disclaimer applys here: I’m not going to take responsibility for anything which goes wrong because you change that line!

Finally, the following is still outstanding:

  • Posting custom fields / post meta to remote blogs.
  • Mirroring comments on remote and local blogs.
  • Allowing different categories to syndicate to different blogs.
  • Ability to switch off sending updates to remote blogs / only updating remote blogs if the remote post has not been altered more recently than the local post.
  • Some tidying and improvements to the settings page.

As always all bug reports and feature requests are gladly accepted.

Posted on Tuesday 15th December, 2009 at 2:52 am in Syndicate Out.
It was tagged with , , .

27 comments

Brilliant! Many thanks for the update.

I just wanted to check: $post_category[] = get_cat_ID($cat); appears twice in my xmlrpc.php (lines 2206 and 2435). Should they both be changed?

cheers,
chris

Posted on 16th Dec 2009 at 8:46 am by Chris.

Thanks Chris. You’re right, it should be changed in both places — the second location does the same for post edits.

I’ve updated the post.

Posted on 16th Dec 2009 at 10:38 am by Jonathon.

I love the concept of this plugin – and want to install it across several individual team members’ individual WP blogs to occasionally push to a central blog – but when I tried to test on my own blog, I get the following:

Warning: Invalid argument supplied for foreach() in /home/content/d/a/n/[my username]/html/blog/wp-content/plugins/syndicate-out/syndicate-out.php on line 153

Warning: Cannot modify header information – headers already sent by (output started at /home/content/d/a/n/[my username]/html/blog/wp-content/plugins/syndicate-out/syndicate-out.php:153) in /home/content/d/a/n/[my username]/html/blog/wp-includes/pluggable.php on line 865

Any thoughts? I’m using WP 2.8.6.

Posted on 18th Dec 2009 at 5:58 am by Dan.

Hi, this plugin is good thanks,,, but was wondering if there was going to be an option for importing logins as opposed to doing them all one by one?

Thanks,

Dan

Posted on 28th Dec 2009 at 9:36 pm by Daniel McGonagle.

Thanks for the comments Dan. I’ll look into the possibilities here — I’ll probably drop you an email just to confirm exactly what you were thinking — but at a guess I think something should be possible!

Posted on 29th Dec 2009 at 1:49 pm by Jonathon.

Jonathon,

with this new version, can I syndicate out posts in ALL categories, and if so, how do I do that? I tried, but nothing happened…

If It cannot, since I need this functionality, please email me, because I’d hire you to make this change for me and specialize this plugin for my company, as we are planning to maintain mirrors of our blog and want the updated quickly by merely publishing from the prime blog.

Posted on 3rd Jan 2010 at 4:27 am by jc.

Currently no. This is a good feature to add, but currently will be heavily affected by the bug I flagged up with the WordPress development team regarding unrecognised categories.

Posted on 5th Jan 2010 at 11:13 am by Jonathon.

Great plugin, after 2 minutes playing it I love it, top marks. Syndication from a central location is a dream I have been chasing for a while, looks like you guys are on the way to make it real. I don’t know how far you guys are looking to take this development but if I was developing this for my self this is what I would like to see;

1. specify the category on the remote blog to publish to.
2. make the posts unique on each blog the post syndicated to, this could be achieved by using synonyms within a master post.

As it happen there is a project going on here http://www.jv2win.com/wp-chameleon/. between that project and yours I think you both have what the other is lacking. If both plugins could be made to work together it would take content syndication to a higher level

Posted on 3rd Jan 2010 at 8:36 pm by Lee Graham.

If I create a category (syndication) and set posts in any given number of categorys to also have this second category, and if I then set the syndication category to be syndicated out — having made the necessary edit for the category syndication as you specify above — will this effectively result in the syndication of all those other categories too?

Posted on 4th Jan 2010 at 2:47 am by jc.

It should do, yes. The remote blog should add the post to each category it recognises.

Posted on 5th Jan 2010 at 11:18 am by Jonathon.

I use WP 2.9 and now WP 2.9.1

This plug in works, but only if the author of the post to be syndicated has the same user name and password at the target blog…

How can one work around that? It would be great if in settings I could just put the username of the Admin of the target blog and his password…

Posted on 5th Jan 2010 at 6:02 am by jc.

I’m not sure I really understand what you mean. You can specify a different set of credentials in the configuration settings, so this should cover your situation. Unless I’ve totally misunderstood what you mean!

Posted on 5th Jan 2010 at 11:37 am by Jonathon.

I have a blog with several writers, each with their own username and password…and I have another blog, where I alone have a user name and password…

I set the syndication out to send posts with the category Syndication to the second blog, using my user name and password on the second blog…

Now all the posts published at the first blog are using the Syndication category as a second category, but only those which bear my user name as author are actually being sent to the second blog.

I really don’t want to have to change all my users posts to indicate I am the author to get it to work; not to mention that I would be rather offensive to the other authors…

That’s what I meant…

Perhaps it has to do with the fact that if the user does not exist on the target blog, the target blog does not know what to do with the post…it would be great if it defaulted it to the admin.

Posted on 5th Jan 2010 at 6:18 pm by jc.

That’s great, thanks. I’ll look to get that fixed!

Posted on 5th Jan 2010 at 6:33 pm by Jonathon.

Here are 2 suggestions on additional functionalities WP 2.9.1.

One possible functionality would be that when the post arrives at the target blog, that blog using your plugin would have a setting to choose whether to receive and publish, or receive as pending…that way the target blog would have the option of whether to publish or not later on.

A second possible functionality would be that when the post is syndicated out, the url of the thumbnail image of the syndicated post is also sent to the target blog; that way the post appearing at the second blog, would on its front page have the same preconfigured format, and the admin on the second blog would not have to set the thumbnail every time…

Finally, the problem with synidcating categories, has this been fixed in 2.9.1, or do I have to redo the hack now that I upgraded to 2.9.1?

Posted on 5th Jan 2010 at 6:26 pm by jc.

Having a second part of the plugin on the target blog is something I’ve thought about — it opens up a whole load of possibilities — but I’m probably not going to add it in the immediate future.

The bug in the XML-RPC is still in 2.9.1. There is a patch with the ticket now, but I think it’s been attched to the 3.0 milestone I’m afraid!

Posted on 6th Jan 2010 at 6:27 pm by Jonathon.

I’m having a problem where I get this error on my source blog, which I have set up to syndicate to a target blog.

Whenever I create a new entry, I get this error:

Fatal error: Class ‘IXR_Client’ not found in //wp-content/plugins/syndicate-out/syndicate-out.php on line 146

Any idea why?

I’m using WP 2.9.1

Posted on 11th Jan 2010 at 5:32 pm by Dan.

Hi Jonathan,
On the face of it, Syndicate out looks really promising, especially given completion of ALL of the stated outstanding features e.g.
* Posting custom fields / post meta to remote blogs.
* Mirroring comments on remote and local blogs.
* Allowing different categories to syndicate to different blogs.
* Ability to switch off sending updates to remote blogs / only updating remote blogs if the remote post has not been altered more recently than the local post.
* Some tidying and improvements to the settings page.
…to which I would add/suggest

* Ability for remote blogs/site admin to “subscribe” or “Unsubscribe” to a given post

Meanwhile, on a Fresh install of WordPress 2.9.1. on my development server (no other plugins or themes installed) I get
“Parse error: syntax error, unexpected $end in C:\wamp\www\am_wordpress\wp-content\plugins\syndicate-out\so-options.php on line 69″
Your thoughts on that would be warmly welcomed.
TJ

Posted on 11th Jan 2010 at 9:35 pm by TJ.

Got it fixed ;-)
at line 55 I found ONE SHORT TAG <? (now deprecated if memory serves)
instead of <?php

Posted on 11th Jan 2010 at 10:00 pm by TJ.

You’re right, thanks for spotting that. I’ll get it fixed in the development version for next release.

Posted on 11th Jan 2010 at 10:27 pm by Jonathon.

DOH! My bad!! Close but NO CIGAR :-(
Warning: Invalid argument supplied for foreach() in C:\wamp\www\am_wordpress\wp-content\plugins\syndicate-out\so-options.php on line 48

foreach ($syndicateOutOptions['servers'] AS $serverKey => $soServer) {

bummer

Posted on 11th Jan 2010 at 10:05 pm by TJ.

This is a bug I know about. It should only happen when you have no settings, ie. only when you first install the plugin. It doesn’t affect it’s operation — go ahead and fill in the form, when you submit the error should go away.

I’ve rolled a fix for this into the development version of the code, and it’ll be sorted in the next full release. In the mean time if you want to fix it you can simply wrap the foreach in an if ( is_array ( $syndicateOutOptions ) ) and it should get rid of the warning :)

Posted on 11th Jan 2010 at 10:30 pm by Jonathon.

Jonathon,

We can we fans expect the next version out?

Posted on 14th Jan 2010 at 11:09 am by jc.

I’m hoping to get the new version out early next week, I just need to do one or two things before version 0.5 is ready to roll.

Posted on 14th Jan 2010 at 11:22 am by Jonathon.

Hi

Couple of problems I’ve hit. One looks like it’s been spotted – a php ‘short tag’ in so-options.php (line 55).

The other problem I’ve had is fatal errors when deleting a syndicated post. This appears to be because class-IXR.php is only included on post, but is needed for other actions.

Posted on 20th Jan 2010 at 11:12 pm by Chris.

Thanks for the heads up. There are a couple of cases where there are IXR include problems which I hope to get fixed with the next release (still hoping that’ll be this week, although there have been one or two other pressures on my time which I hadn’t bargained for!), so I’ll add this one to my list.

Posted on 21st Jan 2010 at 1:13 am by Jonathon.

After setting up a user and enabling XML-RPC on the remote blog, I installed the plugin. But when I go to “syndication” in the settings, nothing shows up. There are nothing for me to fill out.

Did I miss a step? I am using WP version 2.8.6
Thanks.

Posted on 22nd Jan 2010 at 3:30 pm by Chris.

Leave a comment