The database field for titles in rss feed items is limited to 255 characters and in some very rare cases, the real title of a feed item can be longer. just happened to me today and that crashes cron, because aggregator_save_item() throws a database error when trying to save that item with the long title.
I think that should be catched by truncating the title upfront if it was longer than 255 character. This could be done with
if (strlen($edit['title']) > 255) {
$edit['title'] = substr($edit['title'], 0, 255);
}
in line 141 of aggregator.processor.in
Comments
Comment #1
mile23Is this still happening? Can you make a patch?
If it's still happening I suggest bumping it up to 8.x-dev.
Comment #2
jurgenhaasYes, this is still happening and I wonder why it shouldn't go into the D7-dev branch for one of the next releases. Anyway, the patch is attached and needs review.
Comment #3
jurgenhaasUpdated version tag.
Comment #5
jurgenhaasTrying again but I'm not sure how to change the line endings (being in NetBeans on a Mac) and to be honest, it feels a bit stupid that the test bot doesn't accept simple text files.
Comment #6
bfroehle commentedSetting to CNR to trigger the bot.
jurgenhaas: I know changing around your workflow/settings is annoying, but be aware that the
patch -p0style patches (as you posted in #2 and #5) will be phased out in the next month or two in favor of the git default (patch -p1) style. See http://drupal.org/patch/create.Comment #8
jurgenhaasSo here is another try (Tip: there is a line-endings plugin for NetBeans = very helpful)
Comment #9
beatnykk commentedsame here, this should be patched in next drupal core.
so far i was doing it manually this way :
Comment #10
lyricnz commentedIt's not just the title field that could overflow, but the link+author+guid elements in aggregator_item could also be > 255 chars.
Comment #11
twistor commentedClosing as dupe of #1244116: Feed items with title longer than 255 characters fail to insert into aggregator_item since the work seems to be going on there. The other fields link, author, guid should be addressed separately. There doesn't seem to be a problem with those in the wild, however, the theoretical problem still exists.
Comment #12
twistor commentedThere we go.