Closed (fixed)
Project:
Search 404
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Aug 2009 at 14:49 UTC
Updated:
14 Aug 2011 at 21:01 UTC
Jump to comment: Most recent file
Hi! I've found this module very useful.
I've patched it for adding three more important features:
- Use a redirect 301 instead of redirect 302;
- Disable the warning message when an user is redirect to a search result;
- Custom page if no nodes has been found.
I use this features for SEO purposes. The patch is valid for version 6.x-1.7.
What do you think about this features?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | search404_improvements-2.patch | 9.26 KB | finex |
| search404_improvements.patch | 9.24 KB | finex |
Comments
Comment #1
finex commentedProbably the patch could be improved returning a 404 instead of a 301 for the custom page redirect.
Comment #2
finex commentedI've updated the patch: now it returns a 404 when it redirects to the custom page. Moreover I've fixed a small bug I've introduced.
Comment #3
zyxware commentedHi FiNeX
I have gone through the patch, here are my opinions on the 3 items introduced in the patch.
- Use a redirect 301 instead of redirect 302;
This is a feature requested by another user too, so I have implemented this in the latest dev commit of the Search404 module.
- Disable the warning message when an user is redirect to a search result;
Giving this option might confuse the end user, the user who gets into a Search404 based search result might not know why the he / she is getting a search result page when they have explicitly have given an URL on the top of the page. So I still have my doubts on implementing this as a feature in Search404.
- Custom page if no nodes has been found.
I am still thinking over this issue, I have not yet decided on how to implement his feature, may be this can be combined with this http://drupal.org/node/549134, since in both cases a node is shown in the search page and your scenario is a special case when no nodes are shown. In the thread I have given the node is embedded just below the search form. I will give you an update on this soon
Regards
Santhosh Raju
Comment #4
zyxware commentedComment #5
finex commentedHi! Thanks for looking my patch :-)
- Disable the warning message when an user is redirect to a search result;
It can be useful with the 301 redirect so if a user open a dead link, it is transparently redirected to an existing page which matches.
- Custom page if no nodes has been found.
I'm using this when nothing has been found: usually I send the user to a views wich display the most visited nodes. I print a "warning message" directly from the views, but this message could be configurable in the previous option... what do you think about?
Comment #6
finex commentedHi! What do you think about the custom page redirect if no page has been found instead of the configurable message?
Comment #7
serg.remote commentedHi,
I'm both hands for the "Disable the warning message" feature. There won't be a confusion as we can always put a custom message there. But the default doesn't look good on sime sites.
Regards,
Serge
Comment #8
bryancasler commentedAny possibility of getting patch #2 working with this modules latest version of 6.x-1.9? I tried several times, but I can't get the patch to apply cleanly.
Comment #9
CatherineOmega commentedI second the request for a method to disable the "a search for %1 resulted in this page". I have it turned off on my current site, but I'm not feeling great about hacking up a contrib module.
My use case is the same as the one mentioned above: to handle dead links seamlessly after a large-scale site migration.
Comment #10
zyxware commentedThe disable error message has been implemented in the latest dev version.
Comment #11
zyxware commentedThere is a problem with redirecting to a custom page when no nodes are found. This would return a status code of 301 or 302 defeating the purpose of the 404 status. Since the other two items have been taken care of I am marking this issue as fixed.