Page MenuHomePhabricator

Turnstile not working in Visual Editor (MW 1.41)
Closed, InvalidPublicBUG REPORT

Description

The ConfirmEdit wiki page mentions Turnstile being available for MW equal to or higher to 1.41, but requiring usage of the master branch.
It seems that is not actually possible, as master has a MW 1.42 requirement (since before Turnstile was implemented as it seems) and when adjusting that and trying to use Turnstile, VisualEditor will throw a popup with "Missing Captcha" when trying to send a change.
I hence tried to just apply the changes in the Turnstile patches to the released ConfirmEdit, which does work fine for registration page, but breaks on Visual Editor. (The user that made the patch did note it was tested working in MW 1.40: https://phabricator.wikimedia.org/T319068#9218120)

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

What happens?:
When trying to send a change via Visual Editor, the Cloudflare Captcha appears normally, but goes into a verification loop.
It shows "Verification", then "Success", then shows "Verification" again and then again "Success". That is repeated about ten times until a rate limit reached error appears and the page cannot be left anymore.

image.png (1×2 px, 1 MB)

Note that it works fine on the registration page.

What should have happened instead?:
The captcha not going into a loop and allowing to send the change.

Software version (skip for WMF-hosted wikis like Wikipedia):
MediaWiki 1.41 with bundled ConfirmEdit and Turnstile patches applied

I can not confirm if it would work in master, but it seems like the change made for 1.40 is already broken for 1.41.

We have serious issues with spambot registrations and other Captchas aside of ReCaptcha v3 (which was only available via a custom solution from Mirazhe no longer working as of MW 1.41, as ConfirmEdit natively doesn't support it) are fully ineffective, including hCaptcha, hence this was something I looked forward to.
I understand if the issue can't be addressed due to not using MW 1.42, but maybe then at least the info on the wiki could be changed to say "MW >= 1.42".

Event Timeline

D3nnis3n updated the task description. (Show Details)
D3nnis3n updated the task description. (Show Details)
D3nnis3n updated the task description. (Show Details)

and when adjusting that

Hi, what does "adjusting" mean exactly?

but it seems like the change made for 1.40 is already broken for 1.41.

Which "change made for 1.40" exactly, in which codebase? https://www.mediawiki.org/wiki/Extension:ConfirmEdit#Turnstile says that Turnstile requires at least MW 1.41... not sure I can follow.

Turnstile is mentioned to work as of MW 1.41 (which I have), but requiring the master branch of ConfirmEdit - that is locked to MW 1.42 in extension.json though and hence conflicting (will throw 500 on wiki). With adjusting that I meant changing this requirement in extension.json to MW 1.41, to see if it works.

Which it does not, as then "Missing Captcha" will appear as error in Visual Editor when trying to send a change. Given Confirm Edit 1.42 master is likely not suitable for MW 1.41 I hence manually applied the patchsets from the implementation task (https://phabricator.wikimedia.org/T319068) and applied them to MW 1.41 bundled ConfirmEdit, and the issue described here is the result, e.g. Turnstile does not work in MW 1.41 - and hence likely not in MW 1.42 either, as of that task the implementation was originally made and tested for MW 1.40, but merged many months later to be released in MW 1.42.

The request behind the report is to either get Turnstile working on MW 1.41 or confirming if it actually does work on MW 1.42 and changing the wiki entry to reflect it needs MW 1.42, not MW 1.41. The former would be preferable for me personally, but potentially not what you want :)

TL;DR:

  • Wiki states that Turnstile can be used on MW 1.41 with Confirm Edit master branch, but Confirm Edit master branch requires MW 1.42
  • Changing that via extension.json leads to Visual editor on sending throwing an error "Missing captcha"
  • Applying the implementation patchsets for Turnstile to MW 1.41 bundled confirm edit causes the issue reported here

Turnstile neither works with Confirm Edit 1.41 nor Master 1.42 on MW 1.41. I'm not sure it will work on MW 1.42 either.

https://www.mediawiki.org/w/index.php?title=Extension%3AConfirmEdit&diff=6370896&oldid=6359198 incorrectly marked it as {{MW 1.41|and after}} when it should be {{MW 1.42|and after}}. As it was only added in rECOEfbf6c1c7ea1a: Add Turnstile support, which is only in master. Docs fixed in https://www.mediawiki.org/w/index.php?title=Extension%3AConfirmEdit&diff=6429541&oldid=6429473

The ConfirmEdit wiki page mentions Turnstile being available for MW equal to or higher to 1.41, but requiring usage of the master branch.

Wiki states that Turnstile can be used on MW 1.41 with Confirm Edit master branch

No it doesn't/didn't.

Currently only available in master branch of the extension.

Available in, doesn't mean usage of.

We generally don't backport features like this.

And as per the infobox at the top of the page...

Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.

We'll have to disagree on that one, it saying >= 1.41 (Currently only available in master branch of the extension.) for the average user clearly means it can be used in that version and higher with that branch and that is exactly what I am, not a developer.
The conflict in information to the one in the infobox can barely be on me. Especially given the master branch of many other extensions typically works fine in the released version.

I took the time to test it on MediaWiki master, and it shows the same error picture there, but given the obvious rudeness in your answer it is clear to me that my input isn't desired and I am hence leaving this report.