Page MenuHomePhabricator

Search is not functional after upgrade to MW 1.24
Closed, ResolvedPublic

Description

Hi,

  • I upgraded our wiki to mw 1.24
  • Try to make a search with SphinxSearch

Actual Result
I have a PHP Fatal error: Cannot call constructor in mw/extensions/SphinxSearch/SphinxMWSearch.php on line 549. I must disable SphinxSearch in LocalSettings.php to search in our wiki.

Expected Results :
We can do search.

I use Firefox 33.1 on Fedora Linux 20, MW 1.24, Sphinx 2.08, PHP 5.3.3.

Event Timeline

Kco87 raised the priority of this task from to Needs Triage.
Kco87 updated the task description. (Show Details)
Kco87 changed Security from none to None.
Kco87 subscribed.
Aklapper changed the task status from Open to Stalled.Dec 3 2014, 2:02 PM

Hi @Kco87,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report.

Sorry, I will read this tomorrow and report the bug with useful information.

Kco87 renamed this task from PHP Fatal Error when upgrade to MW 1.24 to Search is not functional after upgrade to MW 1.24.Dec 4 2014, 8:48 AM
Kco87 updated the task description. (Show Details)

I updated the task we more informations.

I use Firefox 33.1 on Fedora Linux 20, MW 1.24, Sphinx 2.08, PHP 5.3.3.

https://www.mediawiki.org/wiki/Extension_talk:SphinxSearch says "It is recommended to use SphinxSearch 0.8.5 and a recent stable release of Sphinx 2.1" - did you ask on the discussion page already?

This should fix it:

--- a/extensions/SphinxSearch/SphinxMWSearch.php
+++ b/extensions/SphinxSearch/SphinxMWSearch.php
@@ -546,7 +546,7 @@ class SphinxMWSearchResult extends SearchResult {
 
    function __construct( $row, $sphinx_client ) {
        $this->sphinx_client = $sphinx_client;
-        // parent::__construct( $row );
+        parent::initFromTitle( Title::makeTitle( $row->page_namespace, $row->page_title ) );
    }

@Greg_Sabino_Mullane: Thanks!

You are very welcome to use developer access to submit this as a Git branch directly into Gerrit.

Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!

Aklapper claimed this task.

Looks like this was fixed in acd40b8fa82c04e80d390f650ee368bbdd4628cd

Thanks! Closing task as resolved.