Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2007 at 05:19 UTC
Updated:
11 Jun 2010 at 15:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
Wesley Tanaka commentedComment #2
Wesley Tanaka commentedsame patch as above, but with a clarifying comment on theme_search_page
Comment #3
drummTheme API changes are only going to happen in development versions of Drupal. There might be time for 6.x, but it is already in code freeze.
The method of override does not seem logical to me. I would expect a separate theme function to be called for the no results page.
Comment #4
douggreen commentedI've rerolled this patch for 7.x simplifying it a little. I'm not sure that I agree with drumm that this needs to be it's own theme function. So, I've taken the simplest possible solution. This adds two lines of code, and in the HTML, it should add an empty <dl> </dl>
Comment #5
douggreen commentedThis is closely related, if not a duplicate of #211141: Add ability to customize display if search from block has no keywords entered, and they should be worked together. If you're going to close one of this issues, it should probably be the other one, as this one already has a patch.
Comment #7
lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #9
WorldFallz commented"no results" is a valid search result and the fact that this one particular search result is hard coded into search.module is a bug imo.
Here's an updated patch that addresses this more completely.
Comment #10
dwwNote, this is related to #242048: Replace "blue smurf" in no search results message but distinct. Yes, it's lame the default help text in D6 and earlier mentioned "blue OR smurf" etc. It's a step in the right direction that it's now "bike OR shed". However, it's lame this text is still hard-coded into core at all via help text. It'd be a lot better if this message was controlled by a theme function so you could change it to "Karl OR Marx" if you wanted to without hacking core.
This patch would at least allow a theme to provide its own search-results.tpl.php file and not invoke
print search_help('search#noresults', drupal_help_arg());if it didn't want to.Big +1 from me. However, the current patch includes
<h2>Search Results</h2>without t() in the default template, which is obviously a no-no.Comment #11
dwwIn addition to the t() for the "Search results" header, I also fixed the logic in the search-results.tpl.php file so that if we're in the "no results" case, we don't print the
<dl>or the pager.Comment #12
dave reidGreat cleanup.
Comment #13
dries commentedCommitted to CVS HEAD. Thanks!
Comment #14
dwwD6 backport. Tested and working nicely.
Comment #15
jhodgdonThis is a large functionality change for Drupal 6. I think it's a won't fix for Drupal 6 (see #3 above).
Comment #16
jhodgdondww thinks maybe we should let Gabor decide on whether it's OK for D6 or not, and I'm certainly OK with that idea.
Comment #17
jhodgdonThe patch looks OK to me (basically same as D7 functionality)
Comment #18
gábor hojtsyI agree this would be nice and all but the way it modifies the search template now making it responsible to output the page title will break many sites who did override this function or use a base theme which did override this function. Unfortunately this breaks backward compatibility in a non-trivial way. Moving back to D7 fixed.