Page MenuHomePhabricator

Call to undefined method PNGHandler
Closed, ResolvedPublic

Description

When running the up to date master version of CirrusSearch with MW 1.20.0 and I then try to run this "php forceSearchIndex.php --forceUpdate" the following error appears:
PHP Fatal error: Call to undefined method PNGHandler::getEntireText() in /var/www/wiki/extensions/CirrusSearch/includes/Updater.php on line 349


Version: REL1_22-branch
Severity: major
OS: Linux

Details

Reference
bz59214

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:15 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz59214.

At this point CirrusSearch isn't compatible with 1.20.

CirrusSearch's master branch is compatible with MW's master branch.
CirrusSearch's REL1_22 branch is compatible with MW 1.22.

I'm resolving this WONTFIX unless there is a large groundswell of folks needing it to work at a particular version.

Sorry, i meant 1.22.0 (brand new). Sorry again for misspelling!

Ah, in that case please try the REL1_22 branch. I recently merged our master branch to it and patched it to get it working on 1.22. If that doesn't work then please reopen the bug.

I am still on mw1.22.0.
OK, downloaded the REL1.22 branch of CirrusSearch now through the working (thanks for this) link on the official mw site (not throug git tis time). I then removed the ElasticSearch DB and rebuild it. A blank page still apears whenever you search anything.

This is the output of $wgDebugLogFile = "/tmp/err_wiki.log";

Start request GET /index.php?search=testword&button=&title=Spezial%3ASuche
HTTP HEADERS:
HOST: [anonymized]
USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
ACCEPT-LANGUAGE: de,de-de;q=0.8,en-us;q=0.5,en;q=0.3
ACCEPT-ENCODING: gzip, deflate
REFERER: http://[anonymized]/w/Hauptseite
COOKIE: wiki[anonymized]UserID=2; [anonymized]UserName=Martin; [anonymized]Token=89002517d8d1109c118da6cb389f758a; stopMobileRedirect=true; [anonymized]_session=ac39d1f8b7f00874618b8684c7ef111e
CONNECTION: keep-alive
CACHES: EmptyBagOStuff[main] SqlBagOStuff[message] SqlBagOStuff[parser]
[cookie] session_set_cookie_params: "0", "/", "", "", "1"
Class LanguageDe not found; skipped loading
LocalisationCache: using store LCStore_DB
Connected to database 0 at localhost
DatabaseBase::query: Writes done: UPDATE user SET user_touched = '20140112121759' WHERE user_id = 2
Fully initialised
User: cache miss for user 2
User: loading options for user 2 from database.
User: logged in from session
User: loading options for user 2 from override cache.
Connected to database 0 at localhost
MessageCache::load: Loading de... got from global cache
Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache::getParser
Parser: using preprocessor: Preprocessor_DOM
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct
[CirrusSearch] Lowercased title searching: testword

More info about this problem. I now also updated Elastica through the mw website (https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Elastica and there I selected 1.22 stable)

Now i get this:

php updateSearchIndexConfig.php --reindexAndRemoveOk --indexIdentifier now

PHP Warning: require(/var/www/wiki/extensions/Elastica/Elastica/lib/Elastica/Transport/Http.php): failed to open stream: No such file or directory in /var/www/wiki/includes/AutoLoader.php on line 1191
PHP Fatal error: require(): Failed opening required '/var/www/wiki/extensions/Elastica/Elastica/lib/Elastica/Transport/Http.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/wiki/includes/AutoLoader.php on line 1191

OF, I got it to work... one has to use:

  1. MW 1.22.0
  2. CirrusSearch Version for 1.22.0
  3. Elatica --> Master (not the 1.22.0 Version!!!)

So I am happy but maybe this should be fixed!

lsilverman wrote:

I just hit this error as a result of runJobs.php.

PHP Fatal error: Call to undefined method PNGHandler::getEntireText() in /usr/local/devmediawiki-1.22.2/w/extensions/CirrusSearch/includes/BuildDocument/PageDataBuilder.php on line 89

I'm running MW 1.22.2, Elasticsearch 0.90.11, CirrusSearch master (77858d4)
15:01, 20 February 2014, and Elastica master (928c69f)
14:19, 16 February 2014.

I attempted to use the REL1_22 versions of the extensions but met with failure which I documented on the talk page of CirrusSearch here: https://www.mediawiki.org/wiki/Extension_talk:CirrusSearch#Failed_opening_required_FunctionScore.php_37675

I imagine Elastica is going to be compatible with any version of any version of Mediawiki. Cirrus won't though. I'll go have a look at updating both those branches right now.

Resolved about a week ago by updating the REL1_22 branches. I also backported text extraction for pdf/djvu files rather than disabling it.