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
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

Dave Reid - January 29, 2009 - 06:37
Title:dblog (Watchdog) - Add link to "page not found" messages» Add link to add redirect in 'page not found' (404) log entries

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

Dave Reid - January 29, 2009 - 07:07
Status:active» postponed

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

mikeytown2 - January 29, 2009 - 08:44

Another option would be to query the dblog, and create a new item on the menu.

#4

Dave Reid - January 29, 2009 - 14:29

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

mikeytown2 - May 30, 2009 - 20:23

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.

 
 

Drupal is a registered trademark of Dries Buytaert.