Pathologic
Pathologic is an input filter for Drupal which attempts to make sure that links to other content in your Drupal installation, as well as images and other media, will always work correctly; the links won't "break" in situations which would otherwise cause them not to work. Maybe it could be explained better by listing some situations where Pathologic would come in handy…
- You run a personal site, and the address of your site recently changed. Perhaps you moved to a shiny new domain name, or perhaps you moved the Drupal installation from one subdirectory to another. Now all the images in your content are broken, as well as links to other content on your site. You could go through all your content and update all the links… or you could install Pathologic.
- You oversee a site which has testing and production servers. Copy-editors (and/or you) edit content on the testing server, and that eventually gets pushed over to the production server. When those darn editors link to other content on the site, they sometimes link to the version of it that's up on the test server; these links break when the content is published on the production server. You could flog the editors (and/or yourself) with a bullwhip for each infraction… or you could install Pathologic.
- Your Drupal site has been up for a while, but you've recently discovered the Clean URLs feature and enabled it. Your links still work, but they still have that ugly "?q=" thing in them, and you have better things to do with your time than go through all your content to prettify the links. Or maybe you're going the other way; you used to have Clean URLs enabled, but you've had to disable it, and now your links are broken. Pathologic to the rescue!
- Your site content uses relative paths (eg, <a href="tag/food/pizza"> which break for people reading your site's feed. You could just start using absolute paths instead, but you're too set in your ways and would rather have a tool do it for you.
Pathologic is designed to be a simple, set-it-and-forget-it utility. You don't need to type any special "tags" or special characters in your content to trigger Pathologic to work; it finds paths it can manage in your content automatically.
As Pathologic is an input filter, installation and configuration is a little more difficult than it is for a standard module — but it's still not that tough, if you follow the full installation and configuration guide here.
Alternatives to Pathologic:
- Path Filter can also transform relative paths into absolute ones, if you type "internal:" at the beginning of the path. However, it cannot also correct absolute paths as Pathologic can. (Path Filter predates Pathologic substantially; however, I was unaware of its existence when I started Pathologic.)
- URL Replace Filter is a svelte alternative, but it requires you to configure which URLs you want it to operate on, and is not available for Drupal 6.
- Pathfinder can also correct absolute paths; however, it bends the rules a bit by modifying post content before saving it to the database; I considered such an approach in the development of Pathologic, but ultimately decided to stick to the "rules" and only modify post content as it is rendered. Pathfinder has not been publicly released yet (if it ever will be), but you can read about it in this site development write-up.
The Drupal 5 version of this module is no longer being supported. You may submit patches and issues for it if you'd like, but the Drupal 6 release is going to receive the majority of my attention. Time to upgrade, folks…
(Note that the 2.0 release does not have any substantial new features above the previous 1.0/1.1 features. But I found that Drupal's CVS system, which I totally love and adore and seriously do find conductive to productivity and simplicity and logic fer crissake, and I'm not being sarcastic at all when I say that, wouldn't let me make a new release until I tried incrementing the version number that drastically. Oh, CVS, you silly little thing you.)
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-2.0-beta19 | 2008-Dec-31 | 8.32 KB | Download · Release notes | Recommended for 6.x | |
| 6.x-1.1-beta16 | 2008-Dec-31 | 8.32 KB | Download · Release notes | Supported for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2009-May-15 | 8.32 KB | Download · Release notes | Development snapshot | |
