[drupal-devel] [task] Display referer with "page not found" warnings

stefan nagtegaal drupal-devel at drupal.org
Thu Jul 28 09:29:58 UTC 2005


Issue status update for 
http://drupal.org/node/23651
Post a follow up: 
http://drupal.org/project/comments/add/23651

 Project:      Drupal
 Version:      cvs
 Component:    watchdog.module
 Category:     tasks
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Thox
 Updated by:   stefan nagtegaal
 Status:       patch
 Attachment:   http://drupal.org/files/issues/watchdog-referer-storage-final.patch (3.07 KB)

Okay, updated patch to use 'referer' instead of 'referrer'...


Ready to be applied... :-)




stefan nagtegaal



Previous comments:
------------------------------------------------------------------------

Thu, 26 May 2005 11:05:16 +0000 : Thox

I get plenty of "page not found" warnings when I look at the admin page,
but I have no way to fix them. The pages (rightfully) no longer exist,
so I'd simply like to stop links pointing there. If the referering page
was part of the message, that would be far more helpful.




------------------------------------------------------------------------

Tue, 26 Jul 2005 07:52:54 +0000 : ahoeben

Referer / referrer loggin would be usefull for a more than just page not
found warnings. I'ld say include them where available.




------------------------------------------------------------------------

Tue, 26 Jul 2005 09:20:13 +0000 : ahoeben

This requires minor changes in bootstrap.inc (watchdog() function), the
watchdog module, as well as an alteration to the watchdog table. I'll
try to make a patch




------------------------------------------------------------------------

Wed, 27 Jul 2005 21:06:52 +0000 : ahoeben

Attachment: http://drupal.org/files/issues/watchdog-referrer.patch (1.6 KB)

Here's the patch against 4.6.2.


First, you need to execute this SQL statement to alter the watchdog
table:
ALTER TABLE `watchdog` ADD COLUMN `referer` varchar (128)  NOT NULL 


Next, the patch includes two one-line changes, one each for
includes/bootstrap.inc and modules/watchdog.module
(you may have to split up the patch file and run them one by one or
manually)




------------------------------------------------------------------------

Wed, 27 Jul 2005 21:23:07 +0000 : drumm

+1 for this functionality, but it needs to be a patch against Drupal
CVS.




------------------------------------------------------------------------

Thu, 28 Jul 2005 07:25:47 +0000 : kbahey

+1 on functionality too.




------------------------------------------------------------------------

Thu, 28 Jul 2005 08:23:30 +0000 : Bèr Kessels

+1 on the idea.
But this really needs a patch for update.php and database.* marking
this "active" untill that is in place.




------------------------------------------------------------------------

Thu, 28 Jul 2005 08:45:13 +0000 : stefan nagtegaal

Attachment: http://drupal.org/files/issues/watchdog-referer.patch (3.14 KB)

Okay I updated the patch to apply against HEAD.
I also updated the update.inc to reflect the changes..


Please update the patch or apply.. I do not have time to keep this
patch up-to-date.




------------------------------------------------------------------------

Thu, 28 Jul 2005 08:46:40 +0000 : stefan nagtegaal

Status -> 'Patch', Version -> 'CVS'..
I updated the patch to work with current HEAD.


Please apply or pdate yourself. I do not have time to keep this patch
up-to-date.. Sorry




------------------------------------------------------------------------

Thu, 28 Jul 2005 09:09:17 +0000 : ahoeben

Attachment: http://drupal.org/files/issues/watchdog-referrer-cvs.patch (3.14 KB)

New patch against CVS. Includes stefan's patch for updates.inc (thanks)
and adds database.mysql and database.pgsql




------------------------------------------------------------------------

Thu, 28 Jul 2005 09:20:34 +0000 : Goba

+1, I was just looking for this data on 404 messages, and found nothing
useable on my 4.6 site, obviously searching for referer data.




------------------------------------------------------------------------

Thu, 28 Jul 2005 09:21:22 +0000 : stefan nagtegaal

I noticed this while making the patch myself, but we use 'referer' in
the code and database layer, but in the table header we use
'referrer'.. Notice the 'r' against 'rr'..
I'm not a native English speaking person, but I would like to see some
consistency between this.. Or 'referrer' or 'referer', not both
please...


For the patch it's functionality +1!




------------------------------------------------------------------------

Thu, 28 Jul 2005 09:26:13 +0000 : Junyor

Stefan: The header is actually called 'referer', so in the code it makes
sense.







More information about the drupal-devel mailing list