Autoblog intermittently drops specified tags

I've used Autoblog to setup multi-site blog that aggregates feeds from a number of sources. I'm using unique tags for each feed and I've set these in the Feed admin panel -- seems the easiest way to identify content from each source.

My problem is that Autoblog intermittently omits the specified tags. There doesn't seem to be any pattern. It works fine for a while, then omits tags for a few updates, then it works again.

Any ideas on how to resolve this (or at least how to diagnose the problem) would be greatly appreciated.

  • drmike
    • DEV MAN’s Mascot

    at least how to diagnose the problem

    A webserver's error logs check would be a great start. Get with your host if you need to know where to find them.

    My money is on the feed not validating or a post within that feed not being "proper" like an embed getting though. That;s the first thing that comes to mind. WPMu/Ms strips out stuff like that so the feed importer may be getting hung up on a Post with non allowed content.

  • kbiglione
    • Flash Drive

    Thanks for the leads, here's some more detail along with info from the logs.

    I currently have 18 feeds being aggregated with Autoblog. All but one of the RSS feeds validates -- I've temporarily put that feed on hold while I try to resolve this problem.

    To be clear, the feeds are updating and new posts are being created as expected. They're even being assigned to the appropriate categories. Unfortunately the tags are not getting set. These are tags that I setup when I add the feeds to the Autoblog system, not tags being imported from the feeds.

    No errors in the apache log, but here's what I found in the PHP log:

    WordPress database error Got a packet bigger than 'max_allowed_packet' bytes for query INSERT INTO wp_options followed by a huge serialized string that appears to include all of the feed content being imported.

    Is there a limit to the number of feeds I can expect to aggregate on one site? Should I attempt to stagger the updates?

  • kbiglione
    • Flash Drive

    After further testing this does appear to be an issue with multiple feeds updating simultaneously. Here's what I did:

    - Set all feeds to pause.
    - Set last update on all feeds to 0 (in the wp_autoblog table).
    - Cleared out all imported posts, but left the categories and tags in place.
    - Ran updates for each feed manually while watching the PHP error log.

    Five of the 18 feeds triggered the error referenced above. However, all of the feeds imported as expected and had the designated tags set on every post -- so, despite the errors the tags get set.

    I guess I need a way of ensuring that the feed updates run individually instead of as a group.

    Also, the feeds that triggered the error are on a hosted service that appears to have no limit on the number of items in a feed. Each feed had several hundred entries. It might help if there was a way to limit the number of items imported for any given feed.

  • Barry
    • DEV MAN’s Mascot

    Hi, sorry you are having problems.

    If you switch on debugging for your autoblog system, do you get any messages in the debug box?

    Also, the feeds that triggered the error are on a hosted service that appears to have no limit on the number of items in a feed. Each feed had several hundred entries. It might help if there was a way to limit the number of items imported for any given feed.

    The autoblog should read all it can for a certain period of time (3 seconds is the default limit) and then stop reading that feed. The next time it hits the feed, it will check if it has already read each item (from the first one) and as soon as it finds one it has already imported, then it will stop processing entries in the feed - so after the first read and process, it will only read new entries - but if the error is happening on processing runs after the initial one, then i'm not sure.

  • kbiglione
    • Flash Drive

    @barry,

    The debugger is on. There are numerous notices indicating there are no new entries for various feeds. Some of the feeds listed are ones that I've identified as being problem feeds - so, the plugin appears to recognize that the feed has no new posts.

    However, I'm still seeing errors in the logs for each of the problem feeds. And tags are being missed again now that the feeds are back on auto-update.

  • kbiglione
    • Flash Drive

    An update:

    I've setup a new installation of WordPress and Autoblog on a new server. I intentionally steered clear of the problem feeds like the one referenced above. After adding about 15 feeds and processing each of them manually, everything worked great.

    I checked back again this morning and the feeds have been updated, but the tags are not being set. So, this happens even with feeds that are not otherwise a problem.

    I guess what you should be testing is aggregation of pretty much any collection of feeds that have tags specified manually on the feed setup screen (as opposed to tag import from the feed). Those tags get set when feeds are processed individually, but they become unpredictable during the scheduled updates.

  • kbiglione
    • Flash Drive

    Barry, Just checking to see if you got that sql dump.

    Also a potential feature request. This issue wouldn't be so much of a problem for me if the feed name was saved with each post. I'm using tags as a workaround for that limitation.

  • Barry
    • DEV MAN’s Mascot

    Hey, I did get the SQL, thanks and have had it running for a bit on a test server. I've got a more efficient version of the feed reader for the next release, and i've added the ability to set post meta information on a post by post / feed by feed basis - which should allow you to mark posts as coming from certain feeds, etc...

  • Barry
    • DEV MAN’s Mascot

    @kbiglione - i've set it up so the plugin can be hooked into and expanded via add-ons as the interface was getting too complex to try to fit every possibility in. I'll be putting together a few add-ons from the code i cut out so you can pick and choose which extra bits you want and/or need.

  • kbiglione
    • Flash Drive

    Still having problems with tags dropping, even after the upgrade.

    I'm trying to a meta value after post insert to save the site name in a custom field. I've almost got it, but I'm still not able to get the feed title (as opposed to the post title).

    Here's what I've got so far:

    add_action( 'autoblog_post_post_insert', 'cafe_autoblog_add_title_meta' );

    function cafe_autoblog_add_title_meta( $post_ID, $ablog, $item ) {
    add_post_meta($post_ID, 'blog_name', $ablog['title']);
    return true;
    }

  • kbiglione
    • Flash Drive

    Fixed my problem above adding the blog name to a custom field. I'd forgotten to specify the number of arguments when adding the action.

    This works:

    add_action( 'autoblog_post_post_insert', 'cafe_autoblog_add_title_meta', 10, 3 );

    function cafe_autoblog_add_title_meta( $post_ID, $ablog, $item ) {
    add_post_meta($post_ID, 'blog_name', $ablog['title']);
    return true;
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.