Hallo zusammen,
Bitte Hilfe. Sorry, I do not speak German, but I need help.
There is a problem with searching mm_forum if charset encoding is UTF-8.
I did everything as it was told in forum manual. Indexing is working, but only post with characters a-zA-Z0-9 can be found by forum search.
Most of posts in my site are Cyrillic (russian). When I looked through the table tx_mmforum_wordlist in the TYPO3 database, it turned out that there more then 600 fields, and almost all of them (column 'word') are empty (except some English words).
Is there some way to solve this?
Thanks in advance,
Hello,
it seems that you have discovered a bug preventing the mm_forum indexing function from indexing words containing non-latin characters. This bug will be fixed in one of the next version. Meanwhile, you should be able to circumvent this bug by commenting out line 703 in the file pi4/class.tx_mmforum_pi4.php or by replacing lines 703 and 704 with the following lines:
<?php
$pattern = ".,:;?!\"";
$string = preg_replace( '/'.preg_quote($pattern).'/', " ", $string);
?>
Martin
Hello Martin,
Thank you for this hint. This does not solve all the problem but it was a good start. So, in my case, to make UTF-8 works I did following:
1. First of all used your piece of advise and replaced lines 703 and 704 in file pi4/class.tx_mmforum_pi4.php with
<?php
$pattern = ".,:;?!\"";
$string = preg_replace( '/'.preg_quote($pattern).'/', " ", $string);
?>
2. Then I've replaced line 712 in file pi4/class.tx_mmforum_pi4.php with
$val = mb_strtoupper($val,'UTF-8');
3. After that I used your idea and replaced lines 361 and 362
<?php
$pattern = ".,:;?!\"";
$string = preg_replace( '/'.preg_quote($pattern).'/', " ", $string);
?>
4. And finally, I replaced line 122 with:
$content .= $this->searchfind($conf,mb_strtoupper($this->piVars['searchstring'],'UTF-8'),$param);
And, Voila! Now it works. I also tested it with German and Franch characters. It also works.
I'm not sure that this is realy good patch, but at least this gives me the working forum search until the version where this will be corrected.
Thanks again,