Page MenuHomePhabricator

Cannot mark thread as read: Call to a member function getPrefixedText() on a non-object in /api/ApiThreadAction.php
Closed, ResolvedPublic

Description

Works for most threads on Special:NewMessages on twn, but I have at least one thread which cannot be marked as read. The following error is thrown:
PHP Fatal error: Call to a member function getPrefixedText() on a non-object in /www/sandwiki/extensions/LiquidThreads/api/ApiThreadAction.php on line 65

Name of the thread is "Sidebar using UI language?"


Version: unspecified
Severity: major

Details

Reference
bz24931

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:06 PM
bzimport set Reference to bz24931.
  • Bug 24964 has been marked as a duplicate of this bug. ***

The thread was created outside the Thread namespace and subsequently deleted, because Thread doesn't appear in Language::getNamespaces, which is because Nikerabbit has been futzing with the Namespace code.

It seems to work on my trunk installation now.

I had to, since you requested the support for i18ned namespaces. If there is something wrong with the latest code, you should state it explicitly.

What I do know is that with the latest changes we are getting Internal Server Errors for those pages where the problematic thread would show.

Right, there seems to be actual problem of adding the namespaces if the hook is not available - either because the version check passes and we register into non-existing hook, or if the version check fails, we call that function directly instead of as delayed in extension setup functions.