Upgrading from search_api_page 7.x-1.2 to the latest dev version "7.x-1.2+10-dev" of 2016-04-22, on a drupal 7.43 installation now gives:

Notice: Undefined index: search_api_page_search_form_search4 in drupal_retrieve_form() (line 806 of ....\includes\form.inc).

....

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'search_api_page_search_form_search4' not found or invalid function name in drupal_retrieve_form() (line 841 of ...\includes\form.inc).

I also upgrade search_api, search_api_db to latest dev versions.

My "search4" block no longer displays. But the search4 page link works though.

Prior to this upgrade, both the block and page worked fine. I even created a new search page to test out, and has same issue.

Please do you have any ideas or suggestions? Thanks

Comments

zeezhao created an issue. See original summary.

drunken monkey’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for reporting this issue! Always good to get such reports before they are contained in a release.
This particular one seems to be due to #1664706: Add static caching to hook_forms() implementation, though I can't immediately tell which part of the new code fails. (It works fine for me.)

If you are a developer: Please debug search_api_page_forms() on a page where the block should be displayed to find out where it goes wrong.
Otherwise, please apply the attached patch, which should give us debugging information (as Drupal messages printed on the page) on every page where the block should be displayed.

zeezhao’s picture

Thanks. In any case now seems to work after updating entity module to latest dev (old entity used was 7.x-1.6)

drunken monkey’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
joelpittet’s picture

I started seeing this when I added https://www.drupal.org/project/bigmenu back to a site and only as another user. I'll dig in, not worth re-opening as it might be some interaction between the two

joelpittet’s picture

It's coming from this stack and effectively bigmenu_slice_form_js

form.inc:844, drupal_retrieve_form()
form.inc:465, drupal_rebuild_form()
bigmenu.admin.inc:178, bigmenu_slice_form_js()
menu.inc:539, menu_execute_active_handler()
index.php:21, {main}()
joelpittet’s picture

For anybody that runs into this or something similar, a piece of JS tried to build a form using the first form it found which just happened to be the search_api one... resulting in this error.

Fix for bigmenu was due to jQuery version >= 1.7
https://www.drupal.org/project/bigmenu/issues/3265695#comment-14420118