Difference between revisions of "Talk:Wildcard Search Extension"
Khitrenovich (talk | contribs) (PHP Notice: Use of undefined constant) |
(No difference)
|
Revision as of 13:08, 1 October 2007
I would love to try this extension but I get the following error message when I try a search
Warning: preg_replace() [function.preg-replace]: Compilation failed: range out of order in character class at offset 27 in /var/www/localhost/htdocs/mediawiki/includes/SearchEngine.php on line 188
I'm running the following versions on gentoo linux
- MediaWiki: 1.8.3
- PHP: 5.1.6-pl6-gentoo (apache2handler)
- MySQL: 5.0.26-log
Any ideas?
-- answering my own question here - but I modified the legalSearchChars in the extension and it works the way I like now. I copied the line from SearchEngine.php and added +* to it.
Thanks for the framework!
The first time I tried this extension, it stopped all searches working on our site - after a little searching in the code for SearchEngine.php I noticed that the code in your extension has an error in it
- your code: return "A-Za-z_'0-9¥¥x80-¥¥xFF¥¥-+*";
- Mediawiki code: return "A-Za-z_'0-9\\x80-\\xFF\\-+*";
\\ has been converted to ¥¥ for some reason
As soon as I changed it in the extension, everything started working properly! Thanks for the work!
Someone should change this in the article... --Sebastian.Dietrich 20:27, 2 March 2007 (JST)
does not work with preceding wildcards
unfortunately this extension does not work if the wildcard is preceded (e.g. searching for "*rabbi"
PHP Notice: Use of undefined constant
The following message can be found in error log of web server: "[Mon Oct 01 14:46:51 2007] [error] [client ...] PHP Notice: Use of undefined constant SearchMySQLwildcards - assumed 'SearchMySQLwildcards' in .../SearchMySQLwildcards.php on line 11, referer: ..."
. In order to solve the issue, replace
$wgSearchType = SearchMySQLwildcards;
with
$wgSearchType = 'SearchMySQLwildcards';
Anton 22:07, 1 October 2007 (JST)