From a85be7d7b557dd06f1a76adba2763583a2d51acd Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 29 Oct 2024 09:50:36 +0000 Subject: [PATCH] Show empty state message if subject doesn't exist but talk page exists If the subject page/user doesn't exist it usually makes sense not to show the "Start a discussion about X" message, but when the talk page itself exists but without any discussions (e.g. after a Flow archiving), then we _should_ show message to start a new discussion. Bug: T378392 Change-Id: I20dab0089691ba7a429c9a50f23b9e3afe61aaaf --- includes/Hooks/HookUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Hooks/HookUtils.php b/includes/Hooks/HookUtils.php index 0d59f65e1..4fb807b96 100644 --- a/includes/Hooks/HookUtils.php +++ b/includes/Hooks/HookUtils.php @@ -518,7 +518,7 @@ class HookUtils { // Only in talk namespaces, not including other namespaces that isAvailableForTitle() allows $title->isTalkPage() && // Only if the subject page or the user exists (T288319, T312560) - static::pageSubjectExists( $title ) && + ( $title->exists() || static::pageSubjectExists( $title ) ) && // The default display will probably be more useful for links to old revisions of deleted // pages (existing pages are already excluded in shouldShowNewSectionTab()) $req->getIntOrNull( 'oldid' ) === null &&