From 6ddb12cb28a97da863635a5b01e2af2d2452e360 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 10 Apr 2024 11:32:44 -0400 Subject: [PATCH] TitleLibrary: Don't register external titles as dependencies In TitleLibrary::getContentInternal(), an external (interwiki) title will fail when we try to `Parser::fetchCurrentRevisionRecordOfTitle`, but by that time we've already tried to add it to the dependency list for the page via `ParserOutput::addTemplate()`, which causes issues further on. Bug: T362222 Change-Id: I171e97f17b6de176f92ced47757d10c341c979fd (cherry picked from commit 5bde75bf382c0baa8e45691c73ec92d9f42480b7) --- includes/Engines/LuaCommon/TitleLibrary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Engines/LuaCommon/TitleLibrary.php b/includes/Engines/LuaCommon/TitleLibrary.php index b152344b..967d9e6a 100644 --- a/includes/Engines/LuaCommon/TitleLibrary.php +++ b/includes/Engines/LuaCommon/TitleLibrary.php @@ -290,7 +290,7 @@ class TitleLibrary extends LibraryBase { */ private function getContentInternal( $text ) { $title = Title::newFromText( $text ); - if ( !$title ) { + if ( !$title || $title->isExternal() ) { return null; }