Error Tracker Pepper
Posted on September 10, 2005 at 07:58 PM EST
![]()
Description
Error Tracker is a Pepper for Mint that enables you to see common HTTP errors (401, 403, 404, and 500) that your visitors receive while accessing your site.
Installation
Listed below are the instructions on how to start using the Pepper:
Download the files and unzip the file.
Create a custom error page for each of the following error types: 401, 403, 404, and 500.
-
Be sure to include a link to the Mint external JavaScript file in each error page:
<script type="text/javascript" src="/mint/?js"></script> Upload the files to your root web directory (e.g. public_html).
- If your server is running Apache, add the lines below to a file named “.htaccess” in your root web directory (e.g. public_html). If your web server is not running Apache you’ll need to contact your web host to find out what you need to do to have the server direct your visitors to your customized error pages.
# error handling ErrorDocument 401 /401.php ErrorDocument 403 /403.php ErrorDocument 404 /404.php ErrorDocument 500 /500.phpNote: Be sure to replace .php with the extension of the file type you’re using.
Upload the directory “jeffmiller” and its contents to /mint/pepper/.
Login to your Mint installation and in the Preferences click “Install” under Pepper.
Click the Error Tracker Pepper “Install” button. Click “Okay.”
Click Error Tracker under Pepper in the preferences pane.
In each of the boxes, enter some words that are unique to each error page.
Click “Done.”
Feel free to submit a comment to this post if you experience any bugs or have any suggestions.
Version History
v1.06 (February 18, 2006)
- Updated for Mint 1.2 by Geoffrey Grosenbach
v1.05 (September 23, 2005)
- Corrected an issue with HTML entities in the preferences pane.
- Added compatibility with the new getCfgValue() API calls. (Mint 1.1+ is now required)
v1.04 (September 13, 2005)
- The path to the error now links to the missing file and a secondary line has been added that displays and links to the referring page.
- Truncated the error text to cut down on horizontal scrolling. (the full path may be viewed in the popup text by mousing over the error)
1.03 (September 12, 2005)
- Added an error checking routine that displays an error if one or more of the required fields are missing in the Preferences pane.
v1.02 (September 11, 2005)
- Fixed a bug where the entire page title was being displayed instead of the error code.
v1.01 (September 10, 2005)
- Initial release.
Disclaimer
THIS SOFTWARE IS PROVIDED AS-IS, WITHOUT WARRANTY OF ANY KIND. THE AUTHOR DISCLAIMS ANY DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS SOFTWARE.
Download
error_tracker_pepper_106.zip
File Size: 8 KBs
Downloads: 2987
There are 22 comments on this post. Post yours →
Tagged with mint, pepper, scripts
Comments
Posted by Simon Zirkunow on September 11, 2005 EST
Thats what I did. I was propperly referred and Mint logged the hit. But the Error Tracker Pepper didn’t recognize it. So, any suggestions?
Posted by Simon Zirkunow on September 13, 2005 EST
Well, I didn’t know how to name them so I used this scheme: “404 Page Not Found” (code + explanation)
Posted by Simon Zirkunow on September 12, 2005 EST
OK now, this is so weird! When I fill in the names, nothing is shown at all. When I leave one name blank, then it gives me a list of pages which cannot be missing or forbidden.
Posted by Simon Zirkunow on September 13, 2005 EST
Now this works great! But there’s another thing: Your screenshot shows the URL’s of the pages that weren’t found. Mine only show how much the error-page itself was visited. Is there Something I missed?
Posted by Alderete on September 13, 2005 EST
This is a great idea for a Pepper plug-in, highly useful. I think it could be even better if it helped you figure out where the bad links are located.
I.e., why not add a secondary line to each item, with a From label and the referrer. Basically, just like the From secondary line in the Pages section of the default Pepper.
Posted by Simon Zirkunow on September 16, 2005 EST
Sorry, it still doesn’t show the page that wasn’t found. I reinstalled it and now it’s not even logging the hits… This is so mean. I really like the plugin and would gladly use it. It just seems refusing to work on my server or configuration.
Posted by Colby Makowsky on September 17, 2005 EST
I’m experiencing behavior contrary to what i’d expect…
Posted by Andrew Jaffe on September 24, 2005 EST
Hi-
The download link still points to 1.04!
But anyway, thanks for the great work!
Andrew
Posted by Dan Philibin on June 08, 2008 EST
Hey Jeff, got a question for you. I’m using Mint for a WordPress-powered site. What’s the path to put in the .htaccess file so it recognizes the 404.php page in the theme folder? I tried /wp-content/themes/wpcandy3/404.php but that didn’t work.
Posted by James Revillini on July 31, 2008 EST
Hi Jeff. Love this plugin. I think you might have a bug, though. The Error Tracker is reporting that I have 437 hits to a certain file on my site which I moved a long time ago. Fair enough. But I added some logic to my 404.php page which will do an automatic redirect to the new correct page before the page fully renders, so I should have seen no further hits on the 404 for this page, yet the hits continue to grow. Incidentally, the URL in question is http://tunxis.commnet.edu/business/motorcycle_education.asp (notice the redirection that occurs).
So what I did to check on things was this: 1) copy the URL from the pepper’s front-end (same URL as above) 2) open phpmyadmin and open the mint db 3) execute the following sql:
SELECT resource, resource_title, referer FROM `mint_visit` WHERE `resource_title` LIKE '%HTTP Error 404 - File or directory not found%' and resource = 'http://tunxis.commnet.edu/business/motorcycle_education.asp'
I get 2 returned results, not 437. I’ll investigate further, but let me know if my debugging logic is off.
Posted by James Revillini on July 31, 2008 EST
I think I’ve figured it out. I echo’d out the sql it was actually running to get these stats and it will be something like this:
SELECT dt, referer, resource, resource_title, COUNT( `referer` ) AS 'total'
FROM `mint_visit`
WHERE `resource_title` LIKE '%401 Unauthorized%'
OR `resource_title` LIKE '%403 Forbidden%'
OR `resource_title` LIKE '%HTTP Error 404 - File or directory not found%'
OR `resource_title` LIKE '%500 Borked!%'
GROUP BY referer
ORDER BY 'total' DESC , 'dt' DESC
LIMIT 0 , 18
I may be reading it wrong, but I think this assumes that as long as the referrer is the same, it’s a hit on the same page. So when I look at my first returned result, the referrer is blank, but all those hits from the unknown referer are somehow attributed to the motorcycle page on our site. But the actual stats say otherwise.
Would this not be a better query to run for the Most Common tab?
SELECT referer, resource, resource_title, COUNT( `id` ) AS 'total'
FROM `mint_visit`
WHERE `resource_title` LIKE '%401 Unauthorized%'
OR `resource_title` LIKE '%403 Forbidden%'
OR `resource_title` LIKE '%HTTP Error 404 - File or directory not found%'
OR `resource_title` LIKE '%500 Borked!%'
GROUP BY resource, resource_title
ORDER BY 'total' DESC
LIMIT 0 , 18
Also, in version 1.6, the referrers are not shown anywhere, so maybe we can just remove that from the query also.
What do you think?
Posted by Danny Boy on August 06, 2008 EST
Still having a hard time getting version 1.6 to work properly. Bizarrely it displays a small number of errors for 404’s from some weeks ago, but no other error codes, nor any recent errors. It’s like it’s frozen in time.
Also, when I deviate from the single error code naming convention within preferences, it goes blank. In preferences, when you enter 404, it displays errors, but when you write 404 File Not Found it fails to work.
Posted by James Revillini on August 09, 2008 EST
Danny, The string that you need to enter depends on what the title of your 404 page actually is. If I go to your website, for example, and I type a bogus URL like http://www.dareusa.com/notreal, the title of the page is ‘DARE+company: be brave.’ This would not be so good if you were using Mint to track your 404 errors because there is nothing in the title to suggest that I’ve landed on a 404 page. The error tracker compares what you enter in preferences to the page title, and it uses wildcards on both sides of what you enter. So let’s say you had a title of “Oh, Crap! You just got 404’d,” then a string of ‘404’ in preferences would register it as an error and show in the tracker. But, if you entered ‘404 Page not Found,’ then it would not match - hence the ‘frozen in time’ issue.
Likewise, if you wanted your ‘50x Internal Server Error’ pages to be tracked, the string in preferences for that one would have to match some of the title of the 500 error page.
Also, an important thing to make sure of is that you actually have the script tag pointing to mint on the error pages. I think you already do since it sounds like you were registering errors for awhile, but it’s worth a double-check.
Peace, Jim
Posted by Narada on October 12, 2008 EST
Any progress on Dan’s question? I have the same problem and the same question.
Posted by marcus on February 09, 2009 EST
I’m having some problems with this too.
-I’ve got Mint registering stats no problem -I have a custom 404 working using .htaccess as instructed and ‘404 error’ in the page title -I’ve added ‘404’ into the 404 error box in the prefs -The response header shows it as a 404 -The mint.js file is linked from the 404 page and 404 requests are being logged in Mint
I’ve not managed to get any error hits registered in Mint’s Error Tracker panel.
I’d be grateful for any light you could shine on my problem.
[Here’s a link to the site:] (www.classtelecom.co.uk)
Thanks Marcus

1
Posted by Simon Zirkunow on September 11, 2005 EST
I want to keep my error pages organized like this site/error/404/ Is there a possibility to change the code enabling a custom structure?