jenkins-bot has submitted this change and it was merged.

Change subject: Don't crash when a revision is not found

Don't crash when a revision is not found

In some cases (to be discovered), the recent changes
or watchlist page crashes with "Revision not found in revisionCache".

This change logs a warning and returns false for that specific
revision instead of throwing an exception. It's only a bandaid
until we fix the problem and will allow us to collect more
information if we're not able to fix it now.

Bug: T145125
Change-Id: I74de54336aec8f9c6d709d60ca4c6f655bb5d46d
M includes/Formatter/ChangesListQuery.php
1 file changed, 9 insertions(+), 1 deletion(-)

  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified

diff --git a/includes/Formatter/ChangesListQuery.php 
index b55cf56..9e7c006 100644
--- a/includes/Formatter/ChangesListQuery.php
+++ b/includes/Formatter/ChangesListQuery.php
@@ -8,6 +8,7 @@
 use Flow\FlowActions;
 use Flow\Model\UUID;
 use Flow\Repository\TreeRepository;
+use MediaWiki\Logger\LoggerFactory;
 use RecentChange;
 class ChangesListQuery extends AbstractQuery {
@@ -152,7 +153,14 @@
                $alpha = UUID::create( $changeData['revision'] 
                if ( !isset( $this->revisionCache[$alpha] ) ) {
-                       throw new FlowException( "Revision not found in 
revisionCache: $alpha" );
+                       LoggerFactory::getInstance( 'Flow' )->error(
+                               'Revision not found in revisionCache: {alpha}',
+                               array(
+                                       'alpha' => $alpha,
+                                       'rcParams' => $rcParams,
+                               )
+                       );
+                       return false;
                $revision = $this->revisionCache[$alpha];

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I74de54336aec8f9c6d709d60ca4c6f655bb5d46d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <>
Gerrit-Reviewer: Mattflaschen <>
Gerrit-Reviewer: jenkins-bot <>

MediaWiki-commits mailing list

Reply via email to