I started using Panels Everywhere with Bootstrap but it gave me an error everytime I cleared the cache.

Notice: Undefined index: search_theme_form in drupal_retrieve_form() (line 763 of /Applications/MAMP/htdocs/skeidgnup-dev/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'search_theme_form' not found or invalid function name in drupal_retrieve_form() (line 798 of /Applications/MAMP/htdocs/skeidgnup-dev/includes/form.inc).

When trying to debug I commented out the 'toggle_search' variable in the theme/theme.inc file in PE and the error went away.

$vars['search_box'] = (theme_get_setting('toggle_search') ? drupal_get_form('search_theme_form') : '');

This error is only visible in Bootstrap though and setting settings[toggle_search] = 0 in your bootstrap_subtheme will fix the problem.

I post this as a support request since I´m curious about the the 'toggle_search' theme setting. It´s doesn´t seem to be available in the D7 api , although it exists in the D6 api.

Comments

busla’s picture

I wasn´t sure if I should have posted this in the PE or BS project so my apologies in advance.

busla’s picture

Project: Bootstrap » Panels Everywhere
Version: 7.x-2.x-dev » 7.x-1.0-rc1

Moving this to PE. Changing the toggle_search setting in BS didn´t fix it after all.

Letharion’s picture

Category: support » feature

It's entirely possible that this part didn't get ported from 6 to 7 then.
Neither of the maintainer have had a lot of time for the project recently, so if you want to conjure up a patch, that would be most welcome. :)

bigbaldy’s picture

Based on https://drupal.org/node/254940#search_box in Upgrading 6.x themes to 7.x I assume that line

47: $vars['search_box'] = (theme_get_setting('toggle_search') ? drupal_get_form('search_theme_form') : '');

in "panels_everywhere/theme/theme.inc" should be removed as the search box is no longer a theme issue. I will try to make a patch after a little more testing. I would think this is more of a bug than a feature request.

bigbaldy’s picture

After some additional looking this seems to be a duplicate of https://drupal.org/node/1918756. The patch supplied with 1918756 removes line 47 which resolves this problem. I will see if applying the patch at 1918756 creates any additional problems.

damienmckenna’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Category: Feature request » Bug report
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new750 bytes

There were a few problems here. Firstly, there is no 'toggle_search' theme setting in D7. Secondly, the search form was renamed to 'search_block_form'. Thirdly, that logic shouldn't even be executed if the Search module isn't enabled. This patch resolves all three issues.

damienmckenna’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new852 bytes

D6 backport of the module_exists() check.

damienmckenna’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
StatusFileSize
new852 bytes

You know, on second thought lets skip the Search box entirely for D7 - core doesn't supply this.

damienmckenna’s picture

StatusFileSize
new550 bytes

Sorry, wrong patch.

damienmckenna’s picture

Status: Needs review » Fixed

I've committed the patches to their respective branches.

  • Commit 18838f3 on 6.x-1.x by DamienMcKenna:
    Issue #2030157 by DamienMcKenna: Only load the search_box form in the...

  • Commit b33e705 on 7.x-1.x by DamienMcKenna:
    Issue #2030157 by DamienMcKenna: Removed the search_box header variable...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.