'or' handler doesn't support multiple terms in unexposed filter

calebtr - March 19, 2008 - 19:01
Project:Views Fast Search
Version:5.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I am trying to create a view of nodes that contain certain words in the text.

When I create a view with a Search: Fast Index filter, but don't expose the filter, I am unable to include more than one search term if I choose the 'OR' operator.

Two things happen:

1. Drupal reports the error:

mb_strtolower() expects parameter 1 to be string, array given in /path/includes/unicode.inc on line 401.

2. When I go back to edit the view, the keywords I entered as parameters in the view have disappeared.

I tried creating more than one Search: FastIndex filter, but I got the same results.

When I use the 'AND' operator, everything works as expected. If I expose the view and enter the search terms by hand, everything works as expected.

Any help or advice is appreciated!

#1

NaX - August 14, 2008 - 15:39

I have the exact same problem except the error is a little different, but I think it related to the same problem.

warning: preg_match() expects parameter 2 to be string, array given in /usr/www/users/donalb/includes/bootstrap.inc on line 677.

The function that line 677 refers to is drupal_validate_utf8

I did a backtrace in the drupal_validate_utf8 function and this is function execution order.

drupal_validate_utf8
check_plain
theme_textfield
call_user_func_array
theme
drupal_render
theme_views_filters
call_user_func_array
theme
drupal_render
drupal_render_form
drupal_get_form
theme_views_display_filters
call_user_func_array
views_theme
theme_views_view
call_user_func_array
views_theme
views_build_view
views_view_page
call_user_func_array
menu_execute_active_handler

The argument passed to theme_textfield is

Array
(
    [#type] => textfield
    [#maxlength] => 255
    [#default_value] => Array
        (
        )

    [#post] => Array
        (
        )

    [#programmed] =>
    [#tree] =>
    [#parents] => Array
        (
            [0] => filter0
        )

    [#weight] => 0
    [#processed] =>
    [#description] =>
    [#attributes] => Array
        (
        )

    [#required] =>
    [#input] => 1
    [#size] => 60
    [#autocomplete_path] =>
    [#name] => filter0
    [#id] => edit-filter0
    [#value] => Array
        (
        )

    [#sorted] => 1
)

Hope that helps.

 
 

Drupal is a registered trademark of Dries Buytaert.