Skip to content

SLOP-375: replace removed Title::isWatchable() (fatal on every page view on MW 1.38+) - #5

Open
tosfos wants to merge 1 commit into
masterfrom
SLOP-375-replace-iswatchable
Open

SLOP-375: replace removed Title::isWatchable() (fatal on every page view on MW 1.38+)#5
tosfos wants to merge 1 commit into
masterfrom
SLOP-375-replace-iswatchable

Conversation

@tosfos

@tosfos tosfos commented Aug 23, 2026

Copy link
Copy Markdown

Summary

Title::isWatchable() was removed in MediaWiki 1.38. Two call sites remained:

  • includes/ReviewHandler.php:40 (ReviewHandler::setup) — invoked from the PageViewUpdates hook, i.e. every page view by a logged-in user fatals the deferred update with Call to undefined method Title::isWatchable().
  • specials/SpecialPageStatistics.php:38 — fatals Special:PageStatistics.

Adds a ReviewHandler::isWatchable( Title ) helper that delegates to MediaWikiServices::getInstance()->getNamespaceInfo()->isWatchable( $title->getNamespace() ) (available since MW 1.34), falling back to the removed method's old talk-page heuristic on older branches. Both call sites now use the helper.

Verification

Closes SLOP-375.

…Watchable()

Title::isWatchable() was removed in MW 1.38; calling it fatals the
PageViewUpdates deferred update on every page view (ReviewHandler::setup)
and breaks Special:PageStatistics.

Adds ReviewHandler::isWatchable( Title ) helper delegating to
MediaWikiServices NamespaceInfo::isWatchable( ns ) on 1.34+, with the
old talk-page heuristic as pre-1.34 fallback.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 09585aef-b26e-43ef-8a56-7e31bac5419a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant