ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Advanced Search Form

November 08, 2011 9:31am

Subscribe [3]
  • #1 / Nov 08, 2011 9:31am

    timoteus

    25 posts

    Hi,

    I’m using the advanced search form on my site, and after the update to EE 2.3.1 I noticed that the “Where” input is no longer respected - no matter what you choose the search always uses “all”.

    Can anybody confirm this?

  • #2 / Nov 09, 2011 1:49am

    John Henry Donovan

    12339 posts

    Hi timoteus,

    After an initial test I cannot replicate.

    Can you share your template and tags with us and give us some context on what you are searching for so we can narrow down the issue? Is this site live?

    Are all your custom fields searchable?

    Do you have any add-ons installed?

  • #3 / Nov 09, 2011 6:13am

    timoteus

    25 posts

    Hi John!

    I’ve a test-installation of EE 2.3.1 (no add-ons) with the standard search form from the user-guide. And the “where” dropdown does not work correctly. To make myself clear: I don’t use the “where” setting as a parameter, but like the example in the user-guide I’ve a “select” input named “where”.

    What I did:

    I’ve two entries with the title “Martin is calling” and “Martina ist waiting”.

    I search with the advanced search form for the keyword “Martin” (“Search in titles” and “Exact Phrase Match”) and get two results - that’s what you would expect.
    I search again for “Martin”, but now I choose “Search for Exact Word” from the “where” dropdown, and I still get two results.
    If I understand the Search correctly, There should only be one result, namely the entry with the title “Martin is calling”.

    I’ve looked into the mod.search.php

    and just can’t find the code where the input where gets respected, so I added

    if (isset($this->_meta['where']) && $this->_meta['where'] == 'all') {
       // check if we have an input named where
       if (isset($_POST['where'])) {
        if ($_POST['where']!='all') {
         $this->_meta['where'] = $_POST['where'];
        }
       }
      }

    after line 99 in mod.search.php

    That saves the problem for my installation.

    Can you confirm this?

  • #4 / Nov 10, 2011 6:14pm

    Dan Decker

    7338 posts

    Hi timoteus,

    Would you mind filing a bug report with your suggested fix? My concern here is that you will have to track these modifications through updates, etc. If you post them along with a bug report, it gives the fix a better chance of being in the next release, and you won’t have to worry yourself with tracking the changes you’ve made.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases