Page MenuHomePhabricator

Unable to enter a statement with a URL typed property unless logged in as admin
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Using a docker based installation of wikibase (this was based on 1.35.2)
  • You will need a property with datatype url
  • Ensure you are not logged in or if you are then not with an administrator account
  • On an item page add a statement, select the url typed property
  • Enter a valid URL, then try to save it

What happens?:
In a browser this will generate an error message next to the url property statement "Could not save due to an error. The save has failed.". I have not found any explanation for why there might be an issue or restriction preventing this.

I first encountered this using a simple bot through the API, which resulted in the same basic error of failed-save, no additional information in either case is presented as to what caused the failure.

So far only being logged in as an administrator lets this work. I did look at modifying some of the wikibase source code to output some additional information. However being a docker based installation I wasnt sure of the best way to output any logging information (sorry relatively new to the whole stack). I was able to determine it appeared to be an issue with the Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php running the editFilterHookRunner which was returning a FILTERED error code. I was then able to append a serialisation of the apiHookResult to the error message and pass it out, which contained the following:

[apiHookResult] => Array ( [captcha] => Array ( [type] => simple [mime] => text/plain [id] => 1519385723 [question] => 8+9 ) )

At this point i thought maybe there was some kind of captcha requirement being triggered but not being passed back correctly in the web UI and I'm not sure what if anything should happen via the API in this scenario. Is this why using an administrator role by passes this?

I've assumed this is a bug of some sort rather than a bad configuration but at the very least i'm hoping someone more familiar with the components can shed a bit of light on this.

What should have happened instead?:

It should let me save the statement with the url property (abiding by any normal user restrictions).

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Docker based installation of wikibase based on 1.35.2 releases, as of August 15th as per https://github.com/wmde/wikibase-release-pipeline/tree/main/example)

Event Timeline

Hi

This definitely looks like the ConfirmEdit captcha functionality kicking in for the addurl action. Which is why I haven't encountered issues with any other api and browser edits on this installation using other property datatypes. I haven't seen any captcha for any other actions in the browser. I can for the time being at least turn this off in the configuration. It would be good to understand why the captcha isn't being triggered and for api usage with bots.

Thanks

Tony

It looks like this might be a slightly different manifestation of https://phabricator.wikimedia.org/T285959 and as noted above also impacts usage through the API.