Add link to add redirect in 'page not found' (404) log entries
mikeytown2 - January 13, 2009 - 07:25
| Project: | Path Redirect |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
../admin/reports/dblog can be filtered to show only "page not found" messages. Providing a "fix via 303 redirect" link on the Details page would be a nice feature. Even better it could analyse the Log and show the top 404 errors.

#1
The top 404s can already be found at admin/reports/page-not-found with the dblog.module enabled. I like the idea of letting people fix the not founds in the log details, so I'm looking into it.
#2
I can't find any easy way to do this yet. I might have to literally use hook_cron() and modify the actual watchdog records. For now I'm setting this as postponed.
#3
Another option would be to query the dblog, and create a new item on the menu.
#4
It would seem silly to duplicate the code of the dblog module when I should just be able to make one little alter and have it show up on the dblog pages.
#5
Create your own hook_watchdog() that modifies dblog_watchdog(). Inside of pathredirect_watchdog() if $log['type'] == 'page not found' then modify DB entry where everything matches up. Gotta make sure it runs after dblog_watchdog() though.