Page MenuHomePhabricator

Facebook adds fbclid ==> you cant paste in WDQS tiny URLSs
Closed, ResolvedPublic

Event Timeline

Salgo60 created this task.Nov 22 2018, 11:27 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptNov 22 2018, 11:27 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Salgo60 updated the task description. (Show Details)Nov 22 2018, 11:28 AM
Salgo60 updated the task description. (Show Details)Nov 22 2018, 11:49 AM
Salgo60 renamed this task from Facebook adds fbclid to Facebook adds fbclid ==> you cant paste in WDQS tiny URLSs.Nov 23 2018, 11:45 AM
Salgo60 updated the task description. (Show Details)

I’d say this is a TinyURL bug – when you request http://tinyurl.com/y85d86c7?foo=bar and the target URL contains a fragment, they just append that query string (?foo=bar) to the fragment (which we use to store the query). That’s going to break not just WDQS, but other services as well.

However, unless T112715: Enable different URL shorteners for WDQS (stalled on T108557: Review and deploy UrlShortener extension to Wikimedia wikis) suddenly moves ahead unexpectedly, we may still have to work around the issue.

Salgo60 added a comment.EditedNov 23 2018, 5:31 PM

Agree but as Facebook is one place we publish a lot of our WD queries (and has done) it looks bad when instead of a nice result we get Query is malformed

Multichill triaged this task as High priority.Dec 2 2018, 10:10 AM
Multichill added subscribers: Jane023, Multichill.

Can we just add a simple rewrite rule on the proxy/webserver for now if it encounters https://query.wikidata.org/<something>?fbclid=<click id> to rewrite it to https://query.wikidata.org/<something> ? Otherwise we'll be stuck with this bug for ages

That was a question for @Smalyshev ^

Why should we do this in the proxy? Much easier to do it in the web UI IMHO.

Why should we do this in the proxy? Much easier to do it in the web UI IMHO.

All fine with me as long as it gets fixed fast.

I don't think we need to support fbcid in query strings themselves, but I see no problem in UI stripping it when translating hash to the query.

In the meantime, before creating a permalink you can append "#" to the query as the terminal character. Perhaps the query service could do this automatically before it's sorted out.