https://bugzilla.wikimedia.org/show_bug.cgi?id=62178

            Bug ID: 62178
           Summary: Flow: NULL workflow in UrlGenerator exceptions from
                    NotificationFormatter
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Flow
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: sp...@wikimedia.org
                CC: ebernhard...@wikimedia.org, mpinc...@wikimedia.org,
                    pandiculat...@gmail.com, sp...@wikimedia.org
       Web browser: ---
   Mobile Platform: ---

We're getting roughly one "$workflow is not UUID or Workflow instance"
exception a day in production from includes/UrlGenerator.php, triggered either
from a notification API query or Special:Notifications.

BasicFormatter is passing a NULL workflow to generateUrlData(), so I guess the
event object's getExtra() didn't contain the expected 'topic-workflow' key, or
it was null.

It might be worth catching the exception, logging it in a Flow file, and
returning a dummy formatter rather than aborting the other user notifications.
(If that's what's happening.)

Here's one of the exceptions from the notification API query. You have to be
logged in, and if I paste the URL it seems to work, so to reproduce we'd have
to try to find the user(s) with the troublesome notifications. I wonder if it
could be notifications regarding a deleted or suppressed workflow.

2014-03-03 19:26:00 mw1145 enwiki: [5c973112]
/w/api.php?action=query&format=json&meta=notifications&notformat=flyout&notlimit=7&notprop=index%7Clist%7Ccount&_=1393874759279
  Exception from line 144 of
/usr/local/apache/common-local/php-1.23wmf15/extensions/Flow/includes/UrlGenerator.php:
$workflow is not UUID or Workflow instance
#0
/usr/local/apache/common-local/php-1.23wmf15/extensions/Flow/includes/Notifications/Formatter.php(39):
Flow\UrlGenerator->generateUrlData(NULL, 'view')
#1
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/formatters/BasicFormatter.php(647):
Flow\NotificationFormatter->processParam(Object(EchoEvent), 'post-permalink',
Object(Message), Object(User))
#2
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/formatters/BasicFormatter.php(361):
EchoBasicFormatter->processParams(Array, Object(EchoEvent), Object(Message),
Object(User))
#3
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/formatters/BasicFormatter.php(260):
EchoBasicFormatter->formatFragment(Array, Object(EchoEvent), Object(User))
#4
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/formatters/BasicFormatter.php(222):
EchoBasicFormatter->formatNotificationTitle(Object(EchoEvent), Object(User))
#5
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/controller/NotificationController.php(338):
EchoBasicFormatter->format(Object(EchoEvent), Object(User), 'web')
#6
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/api/ApiEchoNotifications.php(144):
EchoNotificationController::formatNotification(Object(EchoEvent), Object(User),
'flyout')
#7
/usr/local/apache/common-local/php-1.23wmf15/extensions/Echo/api/ApiEchoNotifications.php(26):
ApiEchoNotifications::getNotifications(Object(User), 'flyout', 8, NULL)
#8 /usr/local/apache/common-local/php-1.23wmf15/includes/api/ApiQuery.php(279):
ApiEchoNotifications->execute()
#9 /usr/local/apache/common-local/php-1.23wmf15/includes/api/ApiMain.php(861):
ApiQuery->execute()
#10 /usr/local/apache/common-local/php-1.23wmf15/includes/api/ApiMain.php(362):
ApiMain->executeAction()
#11 /usr/local/apache/common-local/php-1.23wmf15/includes/api/ApiMain.php(333):
ApiMain->executeActionWithErrorHandling()
#12 /usr/local/apache/common-local/php-1.23wmf15/api.php(76):
ApiMain->execute()
#13 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#14 {main}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to