Page MenuHomePhabricator

The button "format query" removes all prefixes
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • the query is formatted but all the lines with the command prefix disappear

What should have happened instead?:

  • the query should be formatted but the lines with the command prefix should not disappear

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

We believe that we see the same erroneous behaviour on wikibase cloud (T347023) (and I would assume on other 3rd party wikibases). We're still determining what the actual desired behaviour is

@Epidosis - as the original author I was wondering how you would feel about the actual output the default formatting output of SPARQL.js?

This would mean no prefixes but each URI fully expanded. Would this be an improvement on the current situation or would it be worse?

If I understand correctly, this would mean having e.g. https://database.factgrid.de/entity/ instead of wd: inside the queries, and no prefixes at the start of the queries; such a solution would not be an improvement, since it would make the queries much longer and, what is most concerning, much less readable, since prefixes significantly improve readability.
I think that the easiest fix should be simply avoiding that the "format query" button erases prefixes.

Thanks for your feedback; looking at the code not removing the prefixes is probably harder to do but it's good to get your opinion.

I suspect this means that the solution we build for wikibase.cloud will look different to the slightly more distant work on wikidata.org

After the solution of T347023 this seems solved too: in Wikibase Cloud the prefixes aren't removed, whilst in Wikidata they are removed and in the queries they are substituted by the full URIs; so in both the problem is fixed.