Page MenuHomePhabricator

Flow is creating notification links that go to ?action=edit, which cause exceptions
Closed, ResolvedPublic

Description

When I click in one of my (Echo) notifications on mw.org it shows this:
[3b4db816] 2014-08-22 02:00:04: Fatal exception of type MWException
Any idea what that could be?

Also, the red icon for new notifications doesn't change to gray until I open Special:Notifications

Maybe it is related to Flow, since the notification in question is about someone creating a new topic.


Version: unspecified
Severity: blocker
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=62173

Details

Reference
bz69879

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 3:34 AM
bzimport set Reference to bz69879.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 16263
Screencast showing both bugs

Attached:

2014-08-22 02:00:04 mw1174 mediawikiwiki: [3b4db816] /w/index.php?title=Topic:Rs49btpjdntat0ar&fromnotif=1&action=edit&redlink=1 Exception from line 2238 of /usr/local/apache/common-local/php-1.24wmf$
#0 /usr/local/apache/common-local/php-1.24wmf18/includes/EditPage.php(938): EditPage->toEditText(Object(Flow\Content\BoardContent))
#1 /usr/local/apache/common-local/php-1.24wmf18/includes/EditPage.php(532): EditPage->initialiseForm()
#2 /usr/local/apache/common-local/php-1.24wmf18/includes/actions/EditAction.php(56): EditPage->edit()
#3 /usr/local/apache/common-local/php-1.24wmf18/includes/MediaWiki.php(439): EditAction->show()
#4 /usr/local/apache/common-local/php-1.24wmf18/includes/MediaWiki.php(307): MediaWiki->performAction(Object(Article), Object(Title))
#5 /usr/local/apache/common-local/php-1.24wmf18/includes/MediaWiki.php(609): MediaWiki->performRequest()
#6 /usr/local/apache/common-local/php-1.24wmf18/includes/MediaWiki.php(460): MediaWiki->main()
#7 /usr/local/apache/common-local/php-1.24wmf18/index.php(46): MediaWiki->run()
#8 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#9 {main}

Two issues here: 1) Flow is linking to notifications with ?action=edit. 2) Visiting a Flow page with ?action=edit throws an exception.

Lets keep this bug about #1, which is the real breakage. #2 has been around for a while and is tracked as bug 62173.

bsitu wrote:

Flow notification in the overlay doesn't get automatically marked as read, it can be marked as read by the following:

  1. click on the X on the upper right hand corner of the overlay
  1. click on 'mark all read'
  1. visit the page

I notice that the notification that throws exception was created 4 months ago, which was before we introduced the topic namespace. On top of my head, This is likely because it doesn't have a revision in revision table which generates action=edit in the url. We could write something to fix old data but I could be wrong in here

bsitu wrote:

Since that Flow topic page has been visited directly without action=edit, it should have automatically created a revision and you should not see the error anymore when clicking on it again from the overlay

(In reply to Kunal Mehta (Legoktm) from comment #5)

Two issues here:
...

Actually three.

(In reply to bsitu from comment #6)

Flow notification in the overlay doesn't get automatically marked as read,
it can be marked as read by the following:
...

  1. visit the page

As you can see in the screencast, when I visit the page of the first notification
https://www.mediawiki.org/w/index.php?title=Topic:S0vayt0hge34g5t3&fromnotif=1
the red icon is not changed to gray (it is still red today, and there is another notification with the same behavior - so, a red icon "[ 2 ]" ).

I'll split this into another bug later.

This bug is on trello at https://trello.com/c/p4xeXeji/

(In reply to Helder from bug 69879 comment 0)

Also, the red icon for new notifications doesn't change to gray until I open
Special:Notifications

I've split this to bug 69913

Thanks, Helder :)

gerritadmin wrote:

Change 156183 had a related patch set uploaded by Bsitu:
Redirect to Flow view action when url action is set to edit

https://gerrit.wikimedia.org/r/156183

gerritadmin wrote:

Change 156183 merged by jenkins-bot:
Redirect to Flow view action when url action is set to edit

https://gerrit.wikimedia.org/r/156183

Patch was merged. I suspect Jenkins bot was a bit slow that day.