Hi,

this is my problem:
when I search for a word like "grille", everything works good on all pages of the pagination. As soon as i add an accent to the same word (grillé) the pagination doesn't work anymore. The keyword is changed to grillé, and of course, there are any result for this keyword.

Any idea?

My search module works with Ajax, and i have a multilingual website (i18n module)

Comments

jhodgdon’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using just the core Search module for searching, or is it Solr, Lucene, etc.?

jhodgdon’s picture

Oh, you said you are using Ajax... maybe that is the problem? You must be using some contributed or custom search module...

The core search module should be OK I hope?

voxy’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

thank you jhodgdon, but i found the solution:
in my Drupal parseQueryString function I used
"args[pair[0]] = unescape(pair[1].replace(/\+/g, ' ')); " instead of
"args[pair[0]] = decodeURIComponent(pair[1].replace(/\+/g, ' ')); "

Drupal.view_cooking.parseQueryString = function (query) {
    var args = {};
    var pos = query.indexOf('?');
    if (pos != -1) {
      query = query.substring(pos + 1);
    }
    var pairs = query.split('&');
    for(var i in pairs) {
      var pair = pairs[i].split('=');
      // Ignore the 'q' path argument, if present.
      if (pair[0] != 'q' && pair[1]) {
      // args[pair[0]] = unescape(pair[1].replace(/\+/g, ' '));                           // WRONG
      args[pair[0]] = decodeURIComponent(pair[1].replace(/\+/g, ' '));              // WORKS FINE!
      }
    }
    return args;
  };