Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMWSearch: TypeError from line 107 in "CirrusSearch.php" #3939

Closed
kghbln opened this issue Apr 19, 2019 · 2 comments · Fixed by #3940
Closed

SMWSearch: TypeError from line 107 in "CirrusSearch.php" #3939

kghbln opened this issue Apr 19, 2019 · 2 comments · Fixed by #3940
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error

Comments

@kghbln
Copy link
Member

kghbln commented Apr 19, 2019

Setup and configuration

  • MediaWiki | 1.32.1 (3efaceb)17:46, 11. Apr. 2019
  • PHP | 7.2.15-0ubuntu0.18.04.2 (apache2handler)
  • MariaDB | 10.1.38-MariaDB-0ubuntu0.18.04.1
  • Elasticsearch | 6.5.4
  • Semantic MediaWiki | 3.1.0-alpha (a795e69) 17:50, 15. Apr. 2019
  • CirrusSearch | 0.2 (3bcae30) 18:19, 18. Apr. 2019

Issue

If one would like to use CirrusSearch for searching with unstructured content I have to add the following configuration:

$wgSearchType = 'SMWSearch';
$smwgFallbackSearchType = 'CirrusSearch';

However this leads to the following error:

[593268e934e3fe5abe2e7caf] /w/index.php?search=article&title=Sp%C3%A9cial%3ARecherche&go=Seite TypeError from line 107 of /../w/extensions/CirrusSearch/includes/CirrusSearch.php: Argument 1 passed to CirrusSearch::__construct() must be an instance of CirrusSearch\SearchConfig or null, instance of Wikimedia\Rdbms\DatabaseMysqli given, called in /../w/extensions/SemanticMediaWiki/src/MediaWiki/Search/Search.php on line 114

See line 107 of /../w/extensions/CirrusSearch/includes/CirrusSearch.php

Stack trace

Produces a stack trace and/or outputs:

#0 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Search/Search.php(114): CirrusSearch->__construct(Wikimedia\Rdbms\DatabaseMysqli)
#1 /../w/extensions/SemanticMediaWiki/src/MediaWiki/Search/Search.php(402): SMW\MediaWiki\Search\Search->getFallbackSearchEngine()
#2 /../w/includes/specials/SpecialSearch.php(311): SMW\MediaWiki\Search\Search->setFeatureData(string, boolean)
#3 /../w/includes/specials/SpecialSearch.php(190): SpecialSearch->showResults(string)
#4 /../w/includes/specialpage/SpecialPage.php(569): SpecialSearch->execute(NULL)
#5 /../w/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#6 /../w/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#7 /../w/includes/MediaWiki.php(860): MediaWiki->performRequest()
#8 /../w/includes/MediaWiki.php(517): MediaWiki->main()
#9 /../w/index.php(42): MediaWiki->run()
#10 {main}

@s7eph4n It would have been really cool to have this working. I just pray that this can be solved on the side of SMW somehow since I do not have high hopes for fixes in CirrusSearch.

@kghbln kghbln added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Apr 19, 2019
@mwjames
Copy link
Contributor

mwjames commented Apr 19, 2019 via email

@s7eph4n
Copy link
Contributor

s7eph4n commented Apr 19, 2019

That's probably the way to go seeing that there is no standardized constructor for SearchEngines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error
Projects
None yet
3 participants