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.

Comments

ahoeben’s picture

Version: 4.6.0 » 4.6.2
Component: base system » watchdog.module

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

ahoeben’s picture

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

ahoeben’s picture

Category: feature » task
Status: Active » Needs review
FileSize
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)

drumm’s picture

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

kbahey’s picture

+1 on functionality too.

Bèr Kessels’s picture

Status: Needs review » Active

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

Stefan Nagtegaal’s picture

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

Stefan Nagtegaal’s picture

Version: 4.6.2 »
Status: Active » Needs review

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

ahoeben’s picture

FileSize
3.14 KB

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

Gábor Hojtsy’s picture

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

Stefan Nagtegaal’s picture

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!

Junyor’s picture

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

Stefan Nagtegaal’s picture

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

Ready to be applied... :-)

ahoeben’s picture

Actually, the HTTP header calls it 'referer', but 'referrer' is better english (AFAIK, but I am not a native english speaker either). That's why I used referer internally (since it's a reference to the HTTP header), but referrer in the presentation (better english).

You Say Potato, I Say Potato

Junyor’s picture

Right. I didn't mean to imply that anything needed to change. In the code it makes sense to use 'referer' while the text would make sense as either 'referer' or 'referrer'. Sorry for your trouble, Stefan.

Stefan Nagtegaal’s picture

Well, patch #10 use 'Referrer' and #13 uses 'Referer'.. Let the Drupal Gods dicide which one to apply to core... :-)

Steven’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)