Page MenuHomePhabricator

Show moveddeleted on 404s for all pages if the user has a session
Closed, ResolvedPublic

Description

Currently for performance reasons (since 404s are not cached by varnish and bots sometimes mass request non-existent pages) we only show the moveddeleted message saying that a non-existent page was previously deleted, if the user is logged in or if the page was recently deleted.

However this misses editors who don't log in but still do edit. Well not perfect, we could capture this group by looking to see if a session currently exists (Which happens if the user had previously previewed a page this browsing session). (Using $this->getContext()->getRequest()->getSession()->isPersistent() )

Relavent code is includes/page/Article.php line 269

Event Timeline

Bawolff created this task.Oct 12 2017, 6:40 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 12 2017, 6:40 PM
Bawolff updated the task description. (Show Details)
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 12 2017, 6:44 PM
Bawolff updated the task description. (Show Details)Oct 12 2017, 6:45 PM

Hi @Bawolff , I am interested in looking into this issue. I have a question. Is the error occuring when user is logged out and page is deleted? This statement is confusing me: "if the user is logged in or if the page was recently deleted". Is it "if the user is logged in and if the page was recently deleted"?

Groovier claimed this task.Oct 23 2017, 4:21 PM

So there are 2 variables in play - logged in status and how recently the page was deleted:

  • user logged in and page recently deleted: current behaviour is show log
  • user logged in and page deleted long time ago: current behaviour is show log
  • user logged out and page deleted recently: current behaviour show log
  • user logged out and page deleted long time ago: current behaviour do not show log. This is the case we want to change. We want to show log if the user has a session.

If you want to test, you can get a list of recently deleted pages at https://en.wikipedia.org/wiki/special:log/delete

If you are trying to test with a local mediawiki setup, ensure that you have wgMainCacheType set to something other than CACHE_NONE or CACHE_ANYTHING (otherwise the is page recently deleted thing will work differently).

Change 387223 had a related patch set uploaded (by Groovier1; owner: Groovier1):
[mediawiki/core@master] Article: Show moveddeleted on 404s for all pages if the user has a session

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

Bawolff closed this task as Resolved.Oct 30 2017, 3:57 PM

Change 387223 merged by jenkins-bot:
[mediawiki/core@master] Article: Show moveddeleted on 404s for all pages if the user has a session

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