Posted by danteblitz on April 19, 2012 at 8:00pm
7 followers
Jump to:
| Project: | Advanced Forum |
| Version: | 7.x-2.0 |
| Component: | Other module integration |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (cannot reproduce) |
Issue Summary
I am using Display Suite (7.x-1.5) to handle display of search results. In the Display Suite search settings (Structure / Display Suite / Search) I set the view mode to 'search result'.
When I then search for a term the 'search results' view mode is not honoured by display suite. Instead I can only see the output of advanced-forum.naked.topic-header.tpl.php.
I am also using my own custom templates for advanced forum as set by the following in my themes .info file:
plugins[advanced_forum][styles] = 'templates/forum'
Any ideas why display suite is not honouring the 'search result' view mode for forum topic search results?
Comments
#1
Had a quick look at the code. It think it's a racing condition problem with advanced_forum_theme_registry_alter(). As advanced forum has a lower weight, it will add its preprocess function after that of Display Suite, so when new template suggestions are added AF always wins.
Now, Display Suite's weight is 1, I could make it lower, but then field group needs to come along as well.
Another option could be this: add an checkbox in Advanced Forum on a settings screen (if there's one, I have no idea, don't know the module) to check for the Display Suite module and if so, not inject the preprocess function.
Not sure exactly to handle this, but I'll follow this thread for ideas or add more answers it there's any questions.
#2
Thanks, swentel. I don't think this is necessarily a bug but definitely needs some resolution.
There's already an option in the settings to make AF not style forum nodes that are shown in a view so adding an option to not show them in a DS search result doesn't seem like a bad idea as long as there is some way of determining when it is being listed in a DS search result.
I'm not sure when I'll be able to dig into actual code here... Possibly troky will beat me to it. I have an awful lot on my plate already. :(
Michelle
#3
Hey! I had the same problem, and was about to post a "me-to" here, but then I saw this tutorial:
Tutorial on Search Display
It turns out that the Search Display has to be enabled in the search settings. Of course, you may have already done that, in which case, I hope that this link is useful for other perpetual beginners such as myself. :)
Just in case that link ever goes down, the basic procedure:
Hope this helps someone!
#4
I'm taking the liberty to close this, since it does work as designed.
#5
Apologies, DS search is not working at all for me after many searches and following the video. Getting this error
Warning: Invalid argument supplied for foreach() in node_ds_search_execute() (line 437 of C:\xampp\htdocs\*\sites\all\modules\ds\modules\ds_search\ds_search.module).
#6
Above warning is form DS, not AF. Can't help you with that.
#7
oops, how did i get here, sry about that