Path Checker

  • Version

    1.0.0

  • Description

    The Path Checker module provides an additional report that allows administrators to easily check for broken path aliases.

    It provides an alternative report to what you see at admin/path, with a few additions.

    1. All paths (source and destination) are clickable, so you can manually check them.
    2. A new column tells you the status of the URL alias (Ok, Broken, In doubt or Unknown).
    3. There are also some tabs that allow you to filter the report by status. ie. see all URL aliases. or only those flagged as Broken, In Doubt or Unknown.

    While the report is built, some checks are made to evaluate the status of each alias, as follows:

    For nodes, users and taxonomy terms, it extracts the node id, user id or term id and checks that the node, user or term actually exists in the database. If it doesn't, in the status column you'll see 'Broken'.

    For paths like 'user/1/track', it checks if the user exists and if the tracker module is active. If the user doesn't exist or the tracker module is not active, you'll see 'Broken'. Otherwise, you'll see 'Ok'.

    However, for paths like 'user/1/whatever-else', if the user exists you'll see 'In doubt' in the status column. This is because there's no quick and automatic way to figure out if 'whatever-else' is actually taken care by a menu handler.

    The 'Unknown' status may be reported for custom paths, such as 'my/hand/made/path', because again, there's no quick way to figure out if the path destination is actually handled.

    There is also the possibility to define regular expressions (in the pathchecker settings panel) to manually flag aliases as 'Known', so if any regular expression matches one of those 'In doubt' or 'Unknown' aliases, you'll see them as 'Ok' in the report.

    I hope that makes sense. Now, why?

    Well, you may or may not use the pathauto module, but probably your site is alive (otherwise you would be writing static pages, heh), so when time passes there may be left, in the URL aliases table, some records that point to nowhere. Hence, something is needed to check how many paths are broken at a given point in time. This is important, in my opinion, because the URL aliases table is one of the most accessed tables in a Drupal installation, so if it is not optimized it may impact the overall performance of the site.

    That's it :-)

  • Resources