Not working
flaviovs - December 6, 2007 - 15:19
| Project: | Search config |
| Version: | 5.x-1.3 |
| Component: | User interface |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I've just installed the moduled and enabled it on the module config.
I then go to the collapsed settings in search options and adjusted the settings to suit my needs: disable category search and select only the content types I want to index (and, as per the docs, the only types my users will be able to select).
When I go to the search page, the advanced search collapsed fieldset is still there, with all original options, all content types and with taxonomy search.
It appears much like as if the module were not installed.
Am I missing something? Anyone using this module in 5.3?

#1
flaviovs,
I'm running 5.3 here and it seems to work fine. Can you do some more investigation and let me know. For example, make sure it is not a browser caching issue with the page. Also, you select content types you do not want to display or index. I really need to work on the wording for that page.
#2
Thanks for your promptly reply.
I'm trying to debug this issue. Look what I get from a "print_r($form)" at the start of hook_alter() (after the if's that check for the form id and arg(1)):
Array
(
[#action] => /search/node
[#attributes] => Array
(
[class] => search-form
)
[module] => Array
(
[#type] => value
[#value] => node
)
[basic] => Array
(
[#type] => item
[#title] => Digite alguma palavra-chave
[inline] => Array
(
[#prefix] => <div class="container-inline">
[#suffix] => </div>
[keys] => Array
(
[#type] => textfield
[#title] =>
[#default_value] => aas2
[#size] => 40
[#maxlength] => 255
)
[processed_keys] => Array
(
[#type] => value
[#value] => Array
(
)
)
[submit] => Array
(
[#type] => submit
[#value] => Pesquisar
)
)
)
[#parameters] => Array
(
[0] => search_form
[1] =>
[2] => aas2
[3] => node
)
[#type] => form
[#post] => Array
(
)
[#programmed] =>
[#token] => search_form
[form_token] => Array
(
[#id] => edit-search-form-form-token
[#type] => token
[#default_value] => 5ff745e37199418123cc5502289578c0
)
[form_id] => Array
(
[#type] => hidden
[#value] => search_form
[#id] => edit-search-form
)
[#id] => search-form
[#description] =>
[#required] =>
[#tree] =>
[#parents] => Array
(
)
[#method] => post
[#validate] => Array
(
[search_form_validate] => Array
(
)
)
[#submit] => Array
(
[search_form_submit] => Array
(
)
)
)
I know how the form API works very superficially, but it looks like your module expects an $form['advanced'] item which, as seem above, is not present.
Maybe this is a ordering issue? Maybe $form['advanced'] is being set after your hook, when it's just too late to change anything?
p.s.: Already checked cache. Cleared bot Drupal and browser cache. Also I got the wording right. It just looks like the module settings aren't being applied at all.
#3
Yep, it looks like an ordering issue:
Possible workaround: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/devel/devel...
#4
Confirmed! The following SQL fixes this issue:
update system set weight = 10 where name = 'search_config';#5
In the system table you need to make sure the weight of the search_config module is higher than that search.
SELECT name, weight FROM system WHERE type = 'module' AND name LIKE '%search%';If it is not you need to update it.
UPDATE system SET weight = 1 WHERE name = 'search_config' AND type = 'module' LIMIT 1;That should do the trick. Maybe I should do this upon installation.
#6
Guess you did all that while I was typing my reply :) Created an issue, http://drupal.org/node/198458, to remind me.
#7
#8