Page MenuHomePhabricator

Can't configure OAuth and Quickstatements
Closed, DeclinedPublic


I've been trying to get this going for several hours now with no real luck. I'm hoping someone can shed some light on the problem, because I've reached the end of what I can decipher by looking at all the code involved.

The problem is that I can Log In from QuickStatements via OAuth and approve the OAuth Consumer, but then when I am returned to the QuickStatements interface, I am not logged in.


I have MagnusTools (from bitbucket) and QuickStatements (from github) both copied to my server. They are in an adjacent folder to that of our MediaWiki installation.

I've configured Apache to display QuickStatements on the root of port 9191 and that seems to be working well enough.

My OAuth Key and Secret are configured correctly because I can click the login link and receive the OAuth approval request, which is then saved in MediaWiki.

How did I get here

Well, for one, I had to make a lot of edits to make the Magnustools and Quickstatements work. There were hardcoded paths throughout the code, which I had to replace with my own paths. I've had to stumble over several other settings and changes in both the config.json config file as well as the code itself. Once I can get this working, I am happy to document those things that needed changing. (And this is something that should be addressed as part of making these components more ready for general use)

(additionally, the magnustools repo has a lot of repeated code, which is frustrating)

I see there is a schema.sql file in the QuickStatements /public_html/ directory, but there are no instructions on whether it's needed or how to configure it. I think it's needed. I created a database to add and maybe configured it, but no luck.

The README for QuickStatements is, in total, this.... and it's almost entirely unhelpful.

Using addwiki:

Copy public_html/config.json.template to config.json and modify for your needs

I have the mediawiki-api installed via composer in the QuickStatements folder, which I have done.


I'm stuck. I'm in over my head with the unfamiliarity with all of the code and I've reached the end of what I can do to solve this. I don't know what the code is supposed to be doing, not without reading through every line of and spending another several hours making heads or tails of it.

Has anyone installed QuickStatements outside of Docker, and can they advise me on getting it running?


Event Timeline

Hello @Cajunjoel,
a few possibly not very helpful hints from the WMDE past struggles with setting up Quickstatements, and some general remarks on the support of this tool below

On the general note: Quickstatements have been created for use with Wikidata and be run on Wikimedia Toolforge Infrastructure ( I have to say that the tool does not really work outside of that Toolforge environment. The version WMDE managed to include in our prototypical Wikibase docker images only works to degree, e.g. all functionality related to user specific process (Last Batches, for example) have never worked. It is exactly due to assumptions made in the code there is a user database present, as it is in the Toolforge infrastructure, and, as far as I know, no one has made an effort to reverse engineer the schema.sql you asked about.
I am not saying it is impossible to tweak one's environment to get it run - it certainly is a non-trivial task. Lack of documentation on technical aspects of the tool does not help, certainly.

For what it is worth, in our partly successful attempts to hack Quickstatements for the purposes of Docker image prototype, we got some parts working by providing tweaked configuration for the tool and for the Oauth authorization.
See notes under "filesystem layout" section of where it is explained where those config files are getting put in the container (might be similar location in your case).
It seems you've got to the state we managed to achieve so I am not going to provide any further text on this matter, as it wouldn't be of much relevance for you.

For the end, I would like to make the general remark regarding Quickstatements from WMDE side.
While somewhat functioning copy of Quickstatements is included in the current prototype of Wikibase bundle docker image, WMDE does not guarantee that the tool will be included in the official Wikibase release packages (that will be provided in Docker image and tarball format), that we're working on providing now.
We are still in the process on defining what software components will be included in the Wikibase software suite, and we have not reached the decision on including Quickstatements yet.
Should we decide to include it, we'll provide a working solution (also for non-Docker environment), including the necessary documentation. Given our limited resources, we have not been able to provide this yet, and we will also not do it, should the decision on including Quickstatements in WMDE's Wikibase suite be a negative one.
I understand this might not be the best news to you, but we are aware of our limited capabilities, and don't want to promise providing services that we'll not be able to deliver on the quality level we intend to.


Thank you so much for the thorough response. I might spend some of my spare time over my new years' holiday to look at this some more and see what else I can sort out. I feel like I am close, but we shall see. I'll close this ticket for now, and reopen it if I make any breakthroughs.

For posterity, the correction to this is listed in this phabricator ticket:

I have worked around this by forking the Dockerfile and using

RUN git clone magnustools && cd magnustools && git checkout d791f84cba556a29fa5c84543b3c4717a0c63876

A later version(s) of Magnustools changed something that adversely affected the OAuth connection between Quickstatements and MediaWiki.