Page MenuHomePhabricator

PageForms with 1.34 and editor=wikieditor does not work
Open, Needs TriagePublic

Description

From the support desk:

The editor=wikieditor parameter doesn't work for free text inputs, or any textarea inputs either any more. I've recently upgraded to MW1.34.1 and have Page Forms 4.8 (4d2 68f8). I've checked and the textarea does have class="wikieditor".

[Edited to break up the PF version number so that it didn't automatically link to an unrelated task.]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 21 2020, 8:53 PM
Jonathan3 updated the task description. (Show Details)Apr 22 2020, 8:21 PM
Jongfeli added a subscriber: Jongfeli.EditedOct 20 2020, 12:54 PM

I am a little confused. I remembered this problem but back then (in 2018) it seemed to be fixed by adding the following to a form:

input type=textarea

Back then I was happy :-) that the fix was so easy but now this does not work anymore with MW 1.34 and PF 4.9.5 (9e17cd7).
The same thing is happening on the SMW sandbox site, no more wikieditor in a form.
But reading my original comment it worked back then.

It could be that I missed something but it is not clear to me what the problem is, there is a jQuery exception on the Sandbox Site.

Thanks.

Best regards,

Felipe.

@Nikerabbit - what does this mean? If you get that change into WikiEditor, can I switch Page Forms to using the simpler code, at least for MW 1.34+?

It is just a quick hack for now, sharing in case someone else finds it useful. It would need more work to get it to WikiEditor proper.

@Nikerabbit, thanks for the fix. This also works in MW-1.35.0

I assume this is not a definitive fix because you also need to alter the WikiEditor code. Can you explain (in a nutshell) what the "problem" is and if this can be fixed without altering the WikiEditor code. Thanks.

WikiEditor extension (no longer) exposes a convenient public method to create a wikieditor on a given textarea using the normal config. My patch adds such a method. In theory it's possible to do the setup code independently, but it's unnecessarily messy and complicated in my opinion.

@Nikerabbit, thanks for the fix. This also works in MW-1.35.1, PageForms-5.0.1 and WikiEditor-0.5.3

@Nikerabbit - that's great! I plan to add that patch (or something like it) to Page Forms. How difficult would it be to get the WikiEditor patch into the WikiEditor code? Can I help with that?

Technically easy, but needs an approval of the suggested approach from the maintainers. The Maintainers page says that stewards are Contributors > Editing team and Derk-Jan Hartman is a maintainer.

@TheDJ - what do you think about accepting a patch like this into WikiEditor? It would be for use by the Page Forms extension.

Change 655784 had a related patch set uploaded (by Yaron Koren; owner: Yaron Koren):
[mediawiki/extensions/PageForms@master] Re-add WikiEditor support for MW 1.34+ - patch by Nikerabbit

https://gerrit.wikimedia.org/r/655784

Change 655784 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Re-add WikiEditor support for MW 1.34+ - patch by Nikerabbit

https://gerrit.wikimedia.org/r/655784

Yaron_Koren added a comment.EditedWed, Jan 13, 6:07 PM

I just added in a change to Page Forms based on Nikerabbit's patch - which should make things easier for administrators, since they now just have to patch only one extension, WikiEditor (to add the addWikiEditor() function). Hopefully, though, WikiEditor can be modified also, so that admins won't have to do anything.