No results appear when search-results.tpl.php is included in the theme (modified or not)

kittinfish - June 11, 2009 - 23:39
Project:Search 404
Version:6.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:zyxware
Status:closed
Description

I was using a slightly modified version of search-results.tpl.php in my theme and no search results were displaying with search404. Removing the customized file from the theme fixed it. Tried other modified search templates and this was the only one that had any effect. Also tried to replace the modified version with the original (from the Search module), no modification, and that didn't fix it either. The only thing that worked was to remove search-results.tpl.php from the theme.

#1

zyxware - June 15, 2009 - 08:29
Status:active» postponed (maintainer needs more info)

Hi kittinfish

We will check into this, could u share your theme and the custom search-results.tpl.php, so that we can see where the issue pops up.

Thank You

Regards
Zyxware

#2

zyxware - June 15, 2009 - 11:21
Assigned to:Anonymous» zyxware

#3

vflirt - June 22, 2009 - 14:19

I have the exact same problem. All i could dig for it that in the theme.inc , function theme() , when you are checking if the preprocess function exists :
foreach ($info['preprocess functions'] as $preprocess_function) {
if (function_exists($preprocess_function)) {
call_user_func_array($preprocess_function, $args);
}
}
it returns false for "template_preprocess_search_result", wich is needed to set the variables used in the search-result.tpl.php

If you move this function from search.pages.inc to search.module and edit the theme hook in the search.module with removing the file property for the "search_result", then it is all ok .
The workaround it to make your own proprecess function in template.php : theme_preprocess_search_result and copy the source from the search.pagaes.inc. After it you can add all the functionality you need to style your output :)

EDIT: I tested this on 6.11 and there was no such bug so i suppose the problem is with 6.12 version!
I hope that was helpfull.

#4

zyxware - June 25, 2009 - 08:04

Thanks for the Info vflirt, Is there anything to be done in Search404 Module?

Regards
Zyxware

#5

vflirt - June 29, 2009 - 08:20

Well , i don't have time to review all the diffrences from 6.11 to 6.12 but as far as i saw it has nothing to do with the search module.
I think there is somthing alse that is changed within the drupal core that changes the theme(or corresponding preproccess) functions that if they are not in the ".module" file it cant find them.

I wrote here cause this is the only palce i found to mention this bug. But i don't know to whom to assign it as this is core bug.

#6

zyxware - June 29, 2009 - 08:23

I see

Here is the Page for Drupal Core

http://drupal.org/project/drupal

And here is the Issue List

http://drupal.org/project/issues/drupal?categories=All

I think you can report a core issue there.

Hope I was helpful

Can I close this issue if it is not related to Search404?

Regards
Zyxware

#7

vflirt - July 2, 2009 - 11:56

http://drupal.org/node/508134
I copied the description that is provided here. I hope that this is ok with you kittinfish as you are the creator of this reposnse.

You can close this issue as it is not related to your module. :)

#8

zyxware - July 6, 2009 - 09:05
Status:postponed (maintainer needs more info)» closed

Closed since this issue is not related to Search404 module

 
 

Drupal is a registered trademark of Dries Buytaert.