Page MenuHomePhabricator

Catchable fatal error: Argument 1 passed to DisplayTitleHooks::handleLink() must be an instance of Title, instance of TitleValue given
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.29.1 (901313e) 16:21, 20. Okt. 2017
  • PHP 5.6.30-0+deb8u1 (apache2handler)
  • MariaDB 10.0.33-MariaDB-1~jessie
  • DisplayTitle 1.5 (327cdad) 01:06, 29. Okt. 2017

Issue
When trying to access page information via action "info" I get the follwing catchable fatal error:

Catchable fatal error: Argument 1 passed to DisplayTitleHooks::handleLink() must be an instance of Title, instance of TitleValue given, called in /../w/extensions/DisplayTitle/includes/DisplayTitleHooks.php on line 75 and defined in /../w/extensions/DisplayTitle/includes/DisplayTitleHooks.php on line 109

This issue was also present in version 1.4 though there the lines were a bit different:

Catchable fatal error: Argument 1 passed to DisplayTitleHooks::handleLink() must be an instance of Title, instance of TitleValue given, called in /../w/extensions/DisplayTitle/includes/DisplayTitleHooks.php on line 54 and defined in /../w/extensions/DisplayTitle/includes/DisplayTitleHooks.php on line 88

Event Timeline

Can you give me any more information about the context in which the error occurs? All pages or only those with display title set? I cannot reproduce. I'm running:

  • MediaWiki 1.29.1 (28445ef) 22:05, 1 November 2017
  • PHP 7.0.19-1 (apache2handler)
  • MariaDB 10.1.26-MariaDB-0+deb9u1
  • DisplayTitle 1.5 (c882522) 20:54, 31 October 2017

Interestingly enough I cannot reproduce either on https://www.semantic-mediawiki.org/ which is still using version 1.4

So you are only seeing an error in the log? But the pages seem to be rendering OK?

No, action "info" does not render and instead issues the error. Just looked at the Apache log and got no more information than what I already posted. MediaWiki's error and exception log is filling up however with unrelated stuff.

Huh. Clicking on both of the links you posted above look fine to me . . . Does it matter whether you are logged in?

Ah, indeed. I believe that you have an account over there so you should be able to reproduce. However even when logged in https://www.semantic-mediawiki.org/ does not show the issue either.

Ooh! It does matter. No error when I am not logged in.

A stack trace would help

I am not getting one. That's the strange part. MediaWiki's error log is empty and MediaWiki's exception log is being spammed with MinervaNeue.

Yes, I know :-) Our messages passed each other on their way across the ocean.

That is odd, indeed. However, never fear - I was able to reproduce on my wiki once I logged it. And, I get an error in the error log, but no stack trace.

These are my settings. Even with an additional $wgDebugLogFile = "/var/log/mediawiki/{$wgDBname}-debug-all.log"; I do not get a stack trace and this I believe should spill everything into the file. :|

Change 388253 had a related patch set uploaded (by Cicalese; owner: Cindy Cicalese):
[mediawiki/extensions/DisplayTitle@master] Fixed error for logged in users on info action

https://gerrit.wikimedia.org/r/388253

Change 388253 merged by jenkins-bot:
[mediawiki/extensions/DisplayTitle@master] Fixed error for logged in users on info action

https://gerrit.wikimedia.org/r/388253

CCicalese_WMF claimed this task.

Thanks a lot! Just deployed the new version and it works fine now.