Save the Planet! Well, the Drupal Planet (actually, the Drupal Planet log files)

The other day I got a message today from killes that the Drupal Planet was getting a ton of 404 errors on the images in my posts because I was using relative URLs, and because I've been going a bit gangbusters on the imagery lately, the errors have been compounded. These 404 errors pollute the error logs, making is more difficult to identify important errors, and apparently I'm not the only one with this issue. You, too, could be responsible for log pollution!

Luckily, I ran into a module called Relative Path to Absolute URLs a while back when figuring out how to send launch MailChimp campaigns from Drupal (module forthcoming) that will add an input filter to convert relative URLs in your images and links to absolute ones. So, I installed it, enabled the filter, and all was well with the Planet.

If you're contributing to log file wash-out with relative paths, use Relative Path to Absolute URLs and help keep the Planet clean.



Comments

Aarrgh! This is technically correct as far as RSS spec goes, but I consider this a bug in how Drupal either produces RSS feeds, or consumes them using core aggregator.

Really should be a core patch in there somewhere, don't you think?

I prefer the Pathologic module myself. It's got a longer history and track record in the community. It's one of those modules you enable on every site and it just works.

@Boris: We would have to completely fix the URL filter to get it to work. Plus the filter system has no idea what context the current page is using. It doesn't know if it's a view, a node page, or an RSS feed. I think that's why modules like Pathologic fit right in.

OK… so how do we square the circle? As I said, according to RSS standard, relative URLs are correct / supported, but the consuming application should look at the base included in the feed, and prepend it to

So, core aggregator is broken? (not that that surprises me, just trying out where to lay blame / file issues).

(later)

OK, I found it -- there is a patch set for D7, would be nice to get this in, AND backport it for D6. http://drupal.org/node/395764

This *feels* like something I bitched about years ago. The RSS we produce should be properly consumed by the aggregator we ship with :P

@boris that issue was marked as dup. This is the issue you want. http://drupal.org/node/88183 Although this has been set to be postponed til 8.x. Might want to duke it out there.

Dave - thanks for the link to Pathlogic, I'll have to check that out. So far I haven't ran into any issues with rel_to_abs, it was was also one of those modules that just worked.

Boris - it would be nice to get that fixed. I didn't realize how long this issue had been around until I started digging and landed on the post that redndahead mentioned. Looks like it's headed in a good direction, though!