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

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.

Title:display suite search resultsDon't interfere with display suite search results
Category:bug» task

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

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:

  1. Go to the modules page, find the Search Display module and click "Configure".
  2. At the top of the configuration page, there's a message saying that it has to be enabled in the search settings. Click the link to go there.
  3. Enable the "Search Display" under the Active Search Modules. (You can safely disable the others if you desire.)
  4. Choose the "Search Display" under Default Search Module.
  5. Save, and configure the Search Display module as you like.
  6. Enjoy your beautiful search results!!!

Hope this helps someone!

Status:Active» Closed (works as designed)

I'm taking the liberty to close this, since it does work as designed.

Status:Closed (works as designed)» Active

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).

Status:Active» Closed (cannot reproduce)

Above warning is form DS, not AF. Can't help you with that.

oops, how did i get here, sry about that

Thank you Swiftarrow, #4 worked for me!

Please enable module "Display Suite Search Result" .then go to search setting in configuration page
then in "Active search modules" check Display Suite Search. also Default search module is Display Suite Search. it will works.

Issue summary:View changes

typo fix