CMS Builder Search Engine

6 posts by 2 authors in: Forums > CMS Builder
Last Post: January 11, 2008   (RSS)

By Djulia - January 10, 2008

Hi,

I test your Tutorial "CMS Builder Search Engine" and I have a problem.

The words with foreign characters (áéíóñü¿¡) are not returned in the results.

You think that there is a possible solution ?

Thank you for your answer.

Djulia

Re: [Djulia] CMS Builder Search Engine

By Dave - January 10, 2008

When you search for them?

Could you give me some short content that I can enter and a keyword so I can test it on my end?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS Builder Search Engine

By Djulia - January 10, 2008

>> When you search for them?
Yes

In content :

Se trata de un artículo de prensa cuyo periodista es A Muñoz Molina extracto del País. Trata de los niños tele adictos. El periodista muestra que los niños abusan de la televisión que ella tiene un mal efecto en ellos, el de quedarse como sonámbulos.

Words : artículo, Muñoz, País, niños, niños

Thank you,

Djulia

Re: [Djulia] CMS Builder Search Engine

By Dave - January 11, 2008

This was a great find, Djulia, thanks for reporting it.

Here's what's happening. The wysiwyg editor (tinyMCE) was encoding extended characters as html entities (it was storing ñ as &ntilde). And as such, the search wasn't finding them.

This will be fixed in the next release (v1.08) and here's how you can fix it now:

Open this file "lib/menus/default/edit_functions.php" and search for "relative_urls : false,". This is in the middle of the code that start the wysiwyg (tinyMCE.init).

After that line, add this line: "entity_encoding : 'raw'," so it looks like this:

relative_urls : false,
entity_encoding : "raw",


Then click "modify" and then "save" on any records and it will automatically convert them back into a format that can be searched.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS Builder Search Engine

By Djulia - January 11, 2008 - edited: January 11, 2008

Thank you, all is correct for the sector of aministration. [:)]

But, I have a last problem.

I created a page of search (search.php) with the code suggested in the tutorial.

Now, I recorded this text in my table. (texte.txt)

In the text, I have the words ; Berné, sifflé, moqué, joué

These words do not give a result "directly".

moqué == search.php?keyword=moqu%C3%A9
sifflé == search.php?keyword=siffl%C3%A9
Berné == search.php?keyword=Bern%C3%A9
joué == search.php?keyword=jou%C3%A9

The search gives :

page '9' not found, start over >>.

<< prev - page 9 of 1 - next >>



BUT, if I add a parameter at the end of the URL, the result is correct.

For example, if I add &page=1 at the end of the URL, all is correct.
The search gives the recording.

moqué == search.php?keyword=moqu%C3%A9&page=1

Only the words which have an accent at the end, cause this error.
In the text, the words : après, Même et dépouilles, do not pose a problem.

There is not this problem with the sector of administration.

You have an idea ?

Thank you for your assistance.

Djulia
Attachments:

texte.txt 1K

search-php.txt 5K