Topic on Project:Support desk

[RESOLVED] Auto suggest not working

11
CvyvvZkmSUDowVf (talkcontribs)

I've installed several Wikis and never had a problem with Auto Suggest in the search box. It's not working on my current wiki. I've tried suggestions found elsewhere using the different variables to no avail:

$wgUseAjax;
$wgEnableMWSuggest;
$wgVectorUseSimpleSearch;

This stuff always works; what could be different about this wiki?

MediaWiki	1.19.13
PHP	5.2.17 (cgi-fcgi)
MySQL	5.1.73-cll
URL: https://neucart.com/wiki/Main_Page
88.130.76.198 (talkcontribs)

Maybe the problem is that the wiki requires login? When I am not allowed to see the pages, it's only logical that I also may not get them displayed in the search results.

CvyvvZkmSUDowVf (talkcontribs)

I can disable that but the issue persists. (I just disabled.)

I've used all the same permissions schemes on other wikis and Auto Suggest had no problems.

86.173.55.164 (talkcontribs)

Hi why not try to update php to 5.3 or higher and then upgrade to latest mediawiki version which is 1.23.1 and see if that fixes the issue because if the results is not showing it could mean javascript not working properly.

CvyvvZkmSUDowVf (talkcontribs)

I am stuck on 1.19 because of the PHP version. That's a non-starter.

CvyvvZkmSUDowVf (talkcontribs)

Ah, it looks like the issue is that some PHP 5.3 code is in this version.

		$text = preg_replace_callback( '#<a .*?</a>#', function ( $matches ) use ( &$masked ) {
			$sha = sha1( $matches[0] );
			$masked[$sha] = $matches[0];
			return "<$sha>";
		}, $text );
PHP Parse error:  syntax error, unexpected T_FUNCTION in {path}/wiki/includes/api/ApiFormatBase.php on line 279

How can I rewrite this for my PHP version? "use" is 5.3-specific.

86.173.55.164 (talkcontribs)

Hi please upgrade to 1.19.17 which may fix your issue. and also try to update php if it keeps happening like that and also update your extension for branch 1.19.

88.130.76.198 (talkcontribs)
Florianschmidtwelzow (talkcontribs)
$wgUseAjax;
$wgEnableMWSuggest;
$wgVectorUseSimpleSearch;

Is that really exactly what you have in your LocalSettings.php? If yes, then try the following:

$wgUseAjax = true;
$wgEnableMWSuggest = true;
$wgVectorUseSimpleSearch = true;
Reply to "[RESOLVED] Auto suggest not working"