Page MenuHomePhabricator

Statements auto-complete does not work on mobile skin
Closed, ResolvedPublic

Description

When a user attempts to add a statement on the file page via the Statement Panel, the standard behavior is for an auto-complete dropdown element to appear as they start typing. Here's an example:

Screen Shot 2019-04-23 at 10.12.54 AM.png (1×1 px, 1 MB)

However, users viewing the file page in the mobile skin (perhaps they have set this theme as default in their preferences) currently do not get this drop-down element. This means they will have no way to add statements through the standard UI. This issue is present even if they are using a large screen. Example:

Screen Shot 2019-04-23 at 10.13.20 AM.png (1×1 px, 1 MB)

Event Timeline

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

Looks like this is a CORS error: when I attempt to add statements in mobile view on production, I get this error in the JS console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&origin=https%3A%2F%2Fcommons%2Em%2Ewikimedia%2Eorg&search=city&language=en&uselang=en&type=item. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Adding statements from the mobile skin works fine in a local dev instance:

Screen Shot 2019-04-23 at 3.44.44 PM.png (1×2 px, 1 MB)

Change 506151 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[operations/mediawiki-config@master] Allow cross-site requests from Commons' mobile domain

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

Change 506151 merged by jenkins-bot:
[operations/mediawiki-config@master] Allow cross-site requests from mobile domains

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

Ramsey-WMF subscribed.

Works on mobile in production now.