Talk:Wildcard Search Extension

From assela Pathirana
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

MediaWiki

Updated version of th extension on MediaWiki site: http://www.mediawiki.org/wiki/Extension:Wildcard_search. --Anton 22:07, 2 October 2007 (JST)

Range out of order

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)

Problems with MW 1.11

I can't get this one to work with the following configuration

  • MediaWiki: 1.11.0
  • PHP: 5.1.2 (apache2handler)
  • MySQL: 5.0.18

I just get a white screen. Any ideas? Anyone got it to work under 1.11? --Flominator 19:27, 2 October 2007 (JST)

Take a look at the error log of your web server (usually /var/log/httpd/error_log for Apache under Linux). Anton 19:31, 2 October 2007 (JST)
Awesome hint. Thank you very much. The error_log was at /var/log/apache2 and showed me my mistake. --Flominator 20:31, 2 October 2007 (JST)