Page MenuHomePhabricator

Unhelpful error when trying to view contributions of an IP range
Closed, DeclinedPublic

Description

When trying to view the contributions of an IP range from the mobile site (link), you get the following error:

Cannot look for contributions without a user or with a user that does not exist.

IMHO this has two problems:
1 - It's impossible to view range contribs from mobile (although that can be worked around with the desktop site)
2 - The error message is too generic and doesn't provide any help in this case

I'm unsure whether this lack of feature (1.) is already known, nor how would it take to implement it. But I guess having a more detailed message would do the trick for now.

Developer notes:

It's lack of feature, Also the MobileContributions is designed to show contributions only from single user. The UI doesn't show the contributor name next to the change, if we decide to show changes from an IP range, then the only way to find out who is the contributor is to see the change (the desktop version shows both the article and the ip).

The SpecialMobileContributions::executeWhenAvailable() does a check:

if ( $this->user && ( $this->user->idForName() || User::isIP( $par )  ) {
 // use ContribsPager to retrieve history
  return;
} 
$this->showPageNotFound();

The ContribsPager supports usernames, ips and IP ranges, if we change the if statement and add IP::isValidRange( $par )

if ( $this->user && ( $this->user->idForName() || User::isIP( $par )  || IP::isValidRange( $par ) ) ) {

it works, I checked a smoke test and it renders the page properly (but as I mentioned, only shows the list of articles without contributor IPs.

For code please check: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/182535a6160afb96a95890c71e2787bcfe72584c/includes/specials/SpecialMobileContributions.php#L59)

Acceptance criteria

  • change the copy on this page as suck: "Unfortunately, our default mobile site does not provide contributions for a range of IP addresses. Please enable advanced mobile contributions in your settings or view this page on a desktop computer to see the list of contributions. "

pre-deployment criteria

  • Make sure AMC is out on all wikis

Event Timeline

@Daimona it's 1 -> the MobileSite requires a valid user name or an IP. Showing contributions from an IP range is not supported.

@ovasileva what do we want to do in this case?
a) change the error message, and when lookup is performed on an IP range - show customized error message. It's easy change.
b) support the IP ranges, bit more difficult as requires more testing. Code change looks like an easy thing, but it requires verification and QA.

I think we can do B, and start supporting IP ranges. I'm not sure what is the priority here as, AFAIK there is a plan to remove all special mobile pages, so it this wouldn't be a problem.

ovasileva triaged this task as Low priority.
ovasileva moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.

@Daimona it's 1 -> the MobileSite requires a valid user name or an IP. Showing contributions from an IP range is not supported.

@ovasileva what do we want to do in this case?
a) change the error message, and when lookup is performed on an IP range - show customized error message. It's easy change.

I think we should go with this option. Assigning it to myself to come up with the copy

pmiazga raised the priority of this task from Low to Needs Triage.
pmiazga updated the task description. (Show Details)

^ sorry, I edited the task and reverted changes by mistake

pmiazga triaged this task as Low priority.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

Jdlrobson subscribed.

This issue can be worked around by using the advanced mobile mode setting in the settings page.

The mobile enhancement can be disabled on a per wiki basis using wgMFUseDesktopContributionsPage'

Change 735455 had a related patch set uploaded (by Simon04; author: Simon04):

[mediawiki/extensions/MobileFrontend@master] Contributions for IP range unsupported

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

Change 735455 abandoned by Simon04:

[mediawiki/extensions/MobileFrontend@master] Contributions for IP range unsupported

Reason:

SpecialMobileContributions is frozen.

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

Jdlrobson changed the task status from Open to Stalled.Jan 7 2022, 4:39 PM

Will be fixed when T293268 is done.

The MobileContributions page has been removed. The desktop version of the page will be shown instead after train deployment commencing the week beginning Feb 7th.