Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
on the admin/node/search we have an advaced seearch option, yet taht does not work.
I vote for completely removing that page. I see no benefit in a special search page inside admin, esp. since it hardly differs from the side-wide search.
Comment | File | Size | Author |
---|---|---|---|
#13 | content_search_remove_0.patch | 2.12 KB | anders.fajerson |
#11 | content_search_remove.patch | 2.17 KB | catch |
#8 | 40934.patch | 2.17 KB | catch |
Comments
Comment #1
grohk CreditAttribution: grohk commentedThis bug is still present in beta2. I think Ber is right, this page is redundant unless the advanced search is only available to admins.
Comment #2
Uwe Hermann CreditAttribution: Uwe Hermann commentedThat page also has some help strings which talk about wildcards. According to http://drupal.org/node/41510 they're no longer supported, so that needs to be fixed, too.
Comment #3
Bèr Kessels CreditAttribution: Bèr Kessels commentedBut there is no setting and no permission to allow only admins to search. Hence this page is completely redundant. If you only want yourself to search nodes, you must use the default search permission anyway.
Also, thios page used to return also 'disabled' nodes. Which no longer is the case.
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedmoving to cvs.
Comment #5
mbchandar CreditAttribution: mbchandar commentedhi,
here is the patch for search.module
*** modules/search.module 2006-05-10 13:51:44.000000000 +0530
--- modules/search.module1 2006-05-10 12:54:45.000000000 +0530
***************
*** 360,364 ****
// With the exception of the rules above, we consider all punctuation,
// marks, spacers, etc, to be a word boundary.
! //$text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE . ']+/u', ' ', $text);
return $text;
--- 360,364 ----
// With the exception of the rules above, we consider all punctuation,
// marks, spacers, etc, to be a word boundary.
! $text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE . ']+/u', ' ', $text);
return $text;
***************
*** 737,741 ****
// Build word-index conditions for the first pass
! $query2 = substr(str_repeat("i.word like '%s' OR ", count($arguments2)), 0, -4);
return array($query, $arguments, $query2, $arguments2, $matches);
--- 737,741 ----
// Build word-index conditions for the first pass
! $query2 = substr(str_repeat("i.word = '%s' OR ", count($arguments2)), 0, -4);
return array($query, $arguments, $query2, $arguments2, $matches);
here is the patch for node.module
*** modules/node.module 2006-05-10 12:55:24.000000000 +0530
--- modules/node.module1 2006-05-10 12:53:44.000000000 +0530
***************
*** 698,702 ****
// Do search
- $keys=str_replace("*","%",$keys);
$find = do_search($keys, 'node', 'INNER JOIN {node} n ON n.nid = i.sid '. $join1 .' INNER JOIN {users} u ON n.uid = u.uid', $conditions1 . (empty($where1) ? '' : ' AND '. $where1), $arguments1, $select2, $join2, $arguments2);
--- 698,701 ----
save this patch and patch the node.module and search.module file.
it will work
Comment #6
Bèr Kessels CreditAttribution: Bèr Kessels commentedPlease attach as real patch. Thanks for the work though.
More info on http://drupal.org/diffandpatch
Comment #7
bdragon CreditAttribution: bdragon commentedPlease attach a patch. It's difficult to test patches that aren't attached.
Comment #8
catchOK the search page at admin/content/search does absolutely nothing now - both normal and advanced search. Page refreshes, no search is run.
This patch just removes the menu item and associated function completely from node module.
Comment #9
catchTwo arguments for removing rather than trying to correct it:
1. http://drupal.org/node/146466 needs to go in (and I double checked that it has no effect on this being broken or not).
2. This is a two year old issue, with a handful of posts on it. I was unable to find any duplicate issues or forum topics with a cursory search, so from that I think we can assume that almost no-one actually uses admin/content/search.
3. If search is enabled, there's usually a search box/link somewhere on every page anyway.
Comment #10
anders.fajerson CreditAttribution: anders.fajerson commentedPatch doesn't apply for me.
I agree that the right option is to remove this menu item. The righ way to implement content search is to remake the filter functionality on /admin/content/node to a filter/search functionality.
Comment #11
catchhmm re-roll.
Comment #12
catchpatch applies for me on debian but it says "stripping trailing CRs". I'm patching on windows with notepad++ and tortoise so probably due to that. I don't have cvs set up on my vps, so probably not able to re-roll cleanly. Back to needs work and hopefully someone can take this up.
Comment #13
anders.fajerson CreditAttribution: anders.fajerson commentedI see. Changed the line endings to UNIX and patch applies.
(catch: There is a handbook page dedicated to creating patches on Windows, or you can contact me offlist and I give you my killer Windows patch setup)
Comment #14
catchchanging status. fajerstarter I'll check the handbook page again, otherwise I might take you up on that.
Comment #15
anders.fajerson CreditAttribution: anders.fajerson commentedI should mention that I did test the patch and it works a expected (as always, enable/disable a module to re-build the menu). Don't know the the code enough to say if all trails of this functionality is removed.
Comment #16
catchI did a search of the whole drupal directory for as many references as I could find, but yeah it could do with someone who has more familiarity to see if there's anything left.
Comment #17
Gábor HojtsyIndeed, I checked the search functionality and it does not seem like doing anything well. It is also the same interface as the usual search page. I also grepped the Drupal source for some more locations this is used or referenced, but found nothing:
Thanks, committed.
Comment #18
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.