When I enable this module, and the core module "Search" is disabled, the site stop working completly (blank page).
Would be good, if In the requirements, the core module "Search" exists.
Log:
mod_fcgid: stderr: PHP Fatal error: Call to undefined function search_get_default_module_info() in /web/sites/all/modules/contrib/ctools/page_manager/plugins/tasks/search.inc on line 63
File
modules/search/search.module, line 281
https://api.drupal.org/api/drupal/modules!search!search.module/function/...
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2075659-6-ctools-hook-collision.diff | 544 bytes | feng-shui |
Comments
Comment #1
realityloop commentedSearch isn't technically a requirement, as this module can be used with search_api, so we can't really add search as a dependency, your welcome to submit a patch for us to review, or to engage us for a fix otherwise we'll get to it when we have some free time
The correct fix would be to use hook_requirements() or similar to check if either Search or Search API was present, and if not show a warning.
Comment #2
azinck commentedThis is actually caused by a naming collision with a task plugin provided by ctools' page_manager submodule. The function page_manager_search_menu_alter() is defined here: http://cgit.drupalcode.org/ctools/tree/page_manager/plugins/tasks/search...
So once you've enabled page_manager_search on your site, that function becomes a match for hook_menu_alter and gets called whenever you rebuild your menus. Incidentally, there's also a naming collision around hook_enable.
The solution would seem to be to either rename this module, or rename the functions in ctools. As this module is quite young I'd suggest renaming the module.
Comment #3
acrollet commentedFYI I experienced this issue, re-naming the module took care of the issue for me.
Comment #4
badrange commentedThis is a pretty annoying issue that also affects us. Would the module authors accept a patch that renames this module, to for example pagemanagersearch?
Comment #5
damienmckennaI think it's a little too late to rename the module. However, it may be possible to change using e.g. hook_hook_info_alter(), though I have yet to test this theory.
Comment #6
feng-shui commentedThe attached patch uses hook_module_implements_alter to prevent the hook system from invoking page_manager_search_menu_alter. This obviously prevents the use of this module implementing that hook at any point in the future without the renaming of the module, or the ctools function.
Comment #7
umtj commentedComment #8
joshua.boltz commentedVerified the patch in #6 solves the fatal error when core Search module is not enabled.
Comment #9
renatog commented#6 really makes sense. Thank you so much for that
Comment #11
renatog commentedMoved to the dev branch 7.x-1.x
Thank you so much everyone for your contribution