Page MenuHomePhabricator

RelatedArticles shows on editor
Closed, ResolvedPublic

Description

... and confusingly the results differ from those in view mode.

Screen Shot 2015-12-07 at 2.50.37 PM.png (659×1 px, 101 KB)

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: RelatedArticles.
Jdlrobson subscribed.

... and confusingly the results differ from those in view mode.

We randomly choose 3 items when there are more than 3.

Can you share the URL of the attached screenshot's page? I cannot reproduce this locally. Thanks.

Can't reproduce locally, however, you shouldn't load the module on pages with action other than view, btw.

Previously it worked on http://en.wikipedia.beta.wmflabs.org/wiki/Related_test but whilst we are on the train we cannot test on beta labs.

The problem is we don't guard against running in edit mode so if relatedPages.getForCurrentPage( LIMIT ) returns results then it will show.

Change 258061 had a related patch set uploaded (by Jdlrobson):
Disable RelatedArticles when editor enabled

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

Change 258062 had a related patch set uploaded (by Jdlrobson):
Disable RelatedArticles when editor enabled

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

Change 258061 merged by jenkins-bot:
Disable RelatedArticles when editor enabled

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

Change 258062 merged by jenkins-bot:
Disable RelatedArticles when editor enabled

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

There are some comments in the patch. Also the solution is a temporary one as described in the commit message. I think we should re-open the bug and fix it properly.