By Marco Palmero on
I've recently changed a lot of node URLs and I'm getting a lot of 404s. I'm trying to find out which URLs I've rectified so I'm trying to flush the logs of the 404's on the "Top 'page not found' errors" page. I tried to adjust the time on "access log settings" to clear out the logs to no avail.
So how do I clear the "Top 'page not found' errors" page entries?
Comments
Was there ever a solution?
Was there ever a solution to this suitable for 6.4?
How do you delete top entries?
Does nobody know, or is it just not possible?
Yes, it's possible
Check the watchdog table in your db.
This is the SQL syntax to remove them all:
DELETE FROM watchdog WHERE type="page not found";To delete the only the pages you got the error:
DELETE FROM watchdog WHERE type="page not found" AND location="http://www.website.org/pagenotavailable.html" ;Any Non-SQL Options
I have some "page not found" nodes which I would like to completely delete. Are there any non-sql options. I am a noobie.
Thanks.
To do this within your admin
To do this within your admin area (no direct database edits), follow these steps:
1. Go to Administer > Site Configuration > Logging and Alerts > Database Logging
2. Set the discard to whatever amount you'd like. If you want a minimal amount, select 100.
3. Click "Save Configuration"
4. Go to Administer > Reports > Status Report
5. Click "run cron manually"
6. Check your "Recent Log Entries" now, and you'll see they've been shortened to the most recent errors up until the discard length you specified in step 2
You can do it with Admin.
For Drupal 7:
Go to Reports >> Recent Log Messages
Click on the Clear Log Messages, then you can able to see Clear Log Messages button into it.
Click on that button and go to Top "Page not found" errors page. The list will flushed out.
This will clear all messages,
This will clear all messages, not just the page not found ones.
Do you know if DELETE FROM
Do you know if DELETE FROM watchdog will cause any referential problems?
Do any other tables refer to the wid in the watchdog table?
Drush 13 in Drupal 11
With Drush 13 in Drupal 11, this SQL syntax shows them all:
An example, which deletes only entries containing the string "/da/" :