FeedWordPress 0.992: author remapping and URI bug fix

Update 2008-11-06: FeedWordPress 0.992 is now out of date. You can download the latest release — 2008.1105 at the time of this writing — from the project homepage.

0.992 is now available for download.(http://wordpress.org/extend/plugins/feedwordpress/feedwordpress.0.992.zip)

Since I’ve had to spend time either traveling or working on other projects, it’s been longer than I would have liked since the last update of FeedWordPress. This release is a rather limited one: it fixes one outstanding bug and adds one major new feature:

1. **BUG RELATED TO URIS CONTAINING AMPERSAND CHARACTERS FIXED:** A bug in
WordPress 2.x’s handling of URIs in Blogroll links created problems for
updating any feeds whose URIs included an ampersand character, such as
Google News RSS feeds and other feeds that have multiple parameters
passed through HTTP GET. If you experienced this bug, the most likely
effect was that FeedWordPress simply would not import new posts from a
feed when instructred to do so, returning a “0 new posts” response. In
other cases, it might lead to unpredictable results from feed updates,
such as importing posts which were not contained in the feed being
syndicated, but which did appear elsewhere on the same website. This bug
has, hopefully, been resolved, by correcting for the bug in WordPress.

2. **NEW FEATURE – AUTHOR RE-MAPPING:** I’ve been promising this one to my e-mail
correspondents for a couple of months now; and I’m happy to announce that I’ve been able to polish
up the preliminary implementation that I was working on late last year and make it ready for general
consumption. FeedWordPress now offers a new feature in the site-wide Syndication Options
(Syndication –> Options), and in the settings for each syndicated feed (Syndication –> Syndicated
Sites –> Edit). You can now create re-mapping rules to determine how author names in a feed are
translated into usernames within the WordPress database.

Traditionally, what FeedWordPress has done, when adding a post, is to take the author information
from the feed and search the WordPress database to determine whether there is a username with
the same name or e-mail address. If it found a match, then the new post would be assigned to that
user. If there was no match, then FeedWordPress would consult the settings for the feed, or the
global default settings, for what to do with an unfamiliar author. These could be set by the
administrator from within the WordPress Dashbard, with three options: (1) create a new user
account with the same name as the author, and assign the new post to that new user; (2) filter out
the post rather than adding it to the database; or (3) assign the new post to a default user (user #1
in the WordPress database, i.e. the site administrator).

With the new re-mapping feature, you have considerably more control over what FeedWordPress
does with post authorship data from the feed. In the settings for each syndicated feed (Syndication
–> Syndicated Sites –> Edit), you can now define rules that tell FeedWordPress what to do with
each particular author name on that feed — to filter out all posts by that author, or to assign posts
by that author to any username that you like. You can also tell FeedWordPress what to do with
usernames that aren’t listed in your rules, and which don’t match any of the users already in the
WordPress database — to filter out the posts, or to assign them to any username you like, or to
create a new username to match the new author, or to follow the default setting for new author
names on all feeds. The site-wide default setting can be changed using Options –> Syndication.

So, for example, one of my friends runs a FeedWordPress aggregator site that syndicates
. The problem is that, like an increasing number of WordPress
blogs out there, all the posts on this blog are attributed to Administrator. For those visiting
the blog directly, it’s clear that Administrator is the blogger; but when someone aggregates
the blog on another website, the naming now mistakenly implies that the Administrator of the
*aggregator* website is the author of the post. (It also means that if two or more blogs both
attribute their posts to Administrator, the aggregator site will mistakenly treat all of the
posts from all of those blogs as being by the same author.) With the new re-mapping feature, you
could now define a rule that would attribute posts by Administrator from the praxeology.net
feed to a different username — in this case, Roderick Long. Problem solved. Huzzah!

One more note before I go. I regret that I haven’t been able to develop FeedWordPress more actively than I currently am developing it, or to spend as much time handling and responding to bug reports as I would like. I originally created FeedWordPress for my own use, and made it available to others in the hope that it would be useful, so the best guarantee of getting a feature added or a bug identified and quickly fixed has always been whether it’s one that I personally encountered, or one of my friends encountered, in the course of using it. But I’m really very pleased with how much uptake and interest there has been for FeedWordPress. Ideally I would like to devote much more time to FeedWordPress development and support than I currently do. But I earn my living freelance, by the hour or by the project, and I do have to pay my rent every month, so the only way that I can keep up with this on more than a limited and casual basis is if the donations from FeedWordPress users allow me to free up the time needed to work on FeedWordPress, rather than spending the same time looking for paying gigs.

So, if you would like to see more regular upgrades and bugfixes, and more rapid replies to your support questions, I’d urge you to consider how much ongoing development and support for FWP is worth to you, and consider making a contribution through the project donation jar at . It’s in your hands, and anything you can offer will help. (If I had $5 for everyone who ever sent me a FeedWordPress tech support question, I’d be flush for the next several years….)

Thanks,
-C

53 thoughts on “FeedWordPress 0.992: author remapping and URI bug fix

  1. HI!

    It seems I can’t save feeds specific settings. I mean that general settings are applied correctlu on every feed. But if I want one feed to have, for example, a different destination category and I change the cat setting for that feed only, the change is not saved.

    Tell me if you need some log or something.
    Thanks,
    Alessandro

  2. I’m getting feeds from photobucket and I was wondering if it’s possible to make all images appear in a single post instead of separate posts for each image

  3. This is a great plug-in. The only problem for me right now, however, is that sometimes the permalinks will not point to the original website, and instead point to the post on my site (with no links or other ways to get to the original site). Is this a feed error, or a known bug in the plug-in?

    Thanks!

  4. I agree with Timothy B.

    where should we discuss about bugs?

    Is it feasible for you to release the source code so that someone else may try some bugfix ?

    In my opinion the plugin is good, but it needs more support and testing.

  5. Well here’s what I did for the autotagging part

    Download the software from
    http://www.semiologic.com/software/publishing/autotag/

    Drop the extract-terms.php into the feedwordpress dir.

    Edit the feedwordpress.php

    • Do an include somewhere at the top

      include_once dirname(FILE). ‘/extract-terms.php’;

    • Comment the_content filters I dont write my own posts, just feedwordpress posts

      // add_filter('the_content', 'feedwordpress_preserve_syndicated_content', -10000);
      // add_filter('the_content', 'feedwordpress_restore_syndicated_content', 10000);
      

    • add an action below the fwp_publish_post_hook action

      add_action('publish_post', 'autotag_entry');
      

    • add the autotag function below the fwp_publish_post_hook function around line 1630

      
      function autotag_entry($post_id)
          {
                $post = get_post($post_id);
                  $terms = get_the_post_terms($post);
      
                  if ( $terms )
                  {
                      $tags = '';
      
                      foreach ( $terms as $term )
                      {
                            $tags .= ( $tags ? ', ' : '' ) . $term;
                       }
      
                      wp_set_post_tags($post_id, $tags, true);
                  }
          }
      
  6. Dario,

    On your first question: that’s not actually a conflict between the two pieces of information; I just haven’t done a good job of explaining how exactly FeedWordPress update scheduling works. Unfortunately, I don’t know if there is an easy way to describe how it works in the space available in the Options interface. If I can think of anything better, I’ll rewrite it.

    The reason there’s not a conflict is that there are actually two different things which are being scheduled. The information which indicates about an hour or so is the time at which the feed will be ready for its next update if FeedWordPress is looking for ready-to-update feeds. The interval that you set under Syndication Options determines how often FeedWordPress will look for ready-to-update feeds. So if you set that interval to five hours, your feeds will only be updated every five hours or so. It’s just that, if you had set the interval lower than once an hour, then FeedWordPress would be checking them every hour or so.

    I will think about ways to make the scheduling information clearer in upcoming releases. For now, don’t worry about it; the actual update schedule FWP is using should be about what you expect it to be.

    On your second question: in principle it should be able to run anywhere, even without access to cron. However, Windows builds of PHP are notorious for introducing subtle compatibility issues, and I haven’t been able to test FeedWordPress on a Windows build as of yet. If you are having problems with updates, it may be the result of an unexpected problem with PHP. Do you have access to your web server error logs? If so, then try running an update, and check the tail end of the error log to see if there are any new PHP errors logged. If so, send the contents of the error along to me in e-mail and I’ll see if I can figure out what is going wrong.

    Vinko,

    I’m not sure what they mean. If it’s referring to use of the WordPress database table for categories, then the last three releases of FeedWordPress have all been compatible with WordPress 2.3’s new database representation of post categories. I currently use FeedWordPress on a couple of WordPress 2.3 sites. It is possible that the warning is being triggered by some compatibility code, which FeedWordPress only uses on older WordPress installations, not on WordPress 2.3 installations.

    shine,

    I’m looking into the issue you mentioned. My hope is that I’ll be able to fix it in time for the next public release, which I hope to have out by the end of this month.

    Mark,

    Could you e-mail me the URI of the feed which is giving you trouble? It will help me test whether I introduced any changes that would cause a reversion.

    M3g4d37h,

    I’m not sure what is causing this problem for you. Usually a blank screen or early break-off like that is a sign of a fatal PHP error somewhere along the line. It is possible that there is something that FWP expects your installation to have which it does not have. Do you have access to your web server error logs? If so, I could better figure out what the problem might be, and hopefully how to fix it, if you could go through the steps that lead to this problem, and then check the tail end of your error log for any PHP error messages, and pass along any that you find to me.

    Ruriko,

    There isn’t any way to do this currently with FeedWordPress as it is off the shelf. In principle you could do it with a FeedWordPress filter, but the work required to do it would be a bit ambitious. If you’re comfortable with PHP coding, or if you know someone who is, drop me a line via e-mail and I can give you some pointers about the basic approach that you would need to take.

    allen,

    That sounds like a feed error; I think the most likely cause of the error would be if the feed didn’t actually supply any permalink for the post in question. But to be sure I would need to see the specific feeds in question. It’s not a known issue.

    David,

    Thanks for the report. I’m not sure what is causing your problem; on first inspection, MagpieRSS seems to handle the feed alright. I will investigate on my testbed server and let you know what I find out.

    Timothy B. and Shine,

    I am sorry that I haven’t been more prompt in responding to support requests. I appreciate that it’s frustrating to wait. However, please do remember that I have a regular, paying development job that competes with FeedWordPress for time. Part of the reason I am asking for donations is precisely so that I will be able to take more time off from that job in order to devote more time to development work, testing, new releases, and responding to the numerous support requests, bug reports, and general questions that I receive every day.

    FeedWordPress is already open source. The source code is available to anyone who wants it — it’s right there in feedwordpress.php — and the license grants complete freedom to reuse or modify, as long as any published and distributed modifications remain under the GPL copyleft. In addition to the public releases, the current development version is also available through Subversion at http://svn.wp-plugins.org/feedwordpress/trunk/.

    I would be more than happy to consider any bug fix or other patches that anybody cares to submit; so far I have only ever had one person even so much as inquire about submitting a patch.

  7. Hi,
    thanks for this plugin. Im actually working on an atheistic german Blog-Planet ( Blog-Planet Beta. Your plugin is very easy to use, so that a WP and hph-newbie like me can use it.
    Just one question is open: Why is that more-tags are erased vom imported Posts and how can I change that?

  8. Does anybody know a way to let feedwordpress adjust the post slugs? Post titles containing special chars get a very ugly url.

    example:

    ‘ becomes %e2%80%99
    ” becomes %e2%80%9c21

    Most trackbacks and other backlinks break because they strip out the %

    I noticed that some special chars are stripped properly like: , ! ?
    Can the same be done for ” ‘ and possible other special chars

  9. I’m completely stuck and can use any help anyone can provide. I did everything according to the installation instructions but when I hit “activate” I get:

    Error 500 – Internal server error
    An internal server error has occured!
    Please try again later.

    I use WP 2.3 with 1and1 hosting.

    Any ideas?

  10. Hi,
    I’m using FeedWordPress to get the post from various sites to my mainsite.
    It all works fine till now.

    But there is one Problem.
    I write the blog at extreeeme.org in two languages, and the other sites english only. Is there a Way to mark all “imported” Posts with a graphic in front of it. My readers get a little confused about the english Posts on the German language blog.

    Hope there is a way to mark them as imported

  11. @ David.
    Usually this is due to the .htaccess file
    – It containes syntax errors
    – It’s not read or processed properly

  12. Has anyone been able to get any of the recent comments plugins working with FeedWordPress? On our site, all recent comments link to the same permalink, and I can’t figure out why (see sidebar at http://hermenaut.org and hover mouse over comment links). Thanks to anyone who has cracked this nut…

  13. Every time I save a feed to a category that has a parent, it doesn’t save changes. Is there a work around?

  14. Duplicate posts everywhere! I’ve looked for help at the WordPress forum and people are still getting random dups from lots of different feeds. It never seems to be consistant to one fee.

    Ideas?

  15. great plugin. I do have a couple suggestions:

    1. Allow users to assigns permamlink to original page or local page on a feed by feed basis.

    2. Give users more control over the feed content coming into. For instance, one of my feeds forces and RSS graphic to show up before my title. If I could somehow set to auto remove a specific piece if code (Find & Remove) that would fix this issue.

    Overall, great plugin.

  16. Thank you for an excellent plugin. May I make one suggestion for a feature? Import categories as tags.

    The planet-like site I’m building uses tags for navigation rather than categories. I would like to gather feeds from friendly sites and include them in the tag system.

    True, under manage/import, wordpress has got the feature to turn categories into tags, but this does not work when a tag with the same name as the category already exists. (Which will automatically be the case after a few feed updates, having previously turned categories into tags.)

  17. I’ve got this setup, but was disappointed there was not an option to truncate long posts with a “read more” link to the original post. Is this a setting or API function I missed? If not would it be possible to add this as a feature in a future release?

  18. I have a couple of times now where I have had to track down blank lines which broke my FeedWordPress feed. I just posted how to find and correct this at link.

    Hopefully other find this helpful.

  19. Hi, I used an older version and upgrade to the lastest one. However, when I add in new feeds, it doesn’t show up in the Option page. The categories are all set correctly but the feeds are not being pulled.

    Wonder if you know of this problem.

  20. Hello. Great plugin, but do you know why target=”_blank” is removed from the original rss-feed? I’d like all links in syndicated posts to open in a new window….

Comments are closed.