Page MenuHomePhabricator

Remove "namespace" parameter for "combobox", "tokens" input types
Closed, ResolvedPublic

Description

The "combobox" and "tokens" input types support a parameter called "namespace", which adds the specified namespace name to the beginning of all value(s) selected. As noted in task T250759, there are bugs in the implementation of this parameter - and it seems pretty useless anyway. (It's better to just have the template attach that string.) So this parameter should just be removed, for both input types.

Event Timeline

Hi @Yaron_Koren , I have tried and reproduced the issue explained here- https://phabricator.wikimedia.org/T250759 . The task is to remove the namespace parameter from both the input types and update in the documentation here https://www.mediawiki.org/wiki/Extension:Page_Forms/Input_types#combobox , is that correct?

Yes, that's right. The code change is the main thing.

Hi @Yaron_Koren , I have recently installed the latest PageForms extension 5.2-alpha version. I have installed MediaWiki version 1.35.1.
I have created a template Author :
"

{{Author
|first name=The author's first name; used for sorting
|last name=The author's last name; used for sorting
|political affiliation=Liberal, Conservative, etc. (This is a very subjective field)
}}

"
When I try to create a new Form - say Form 3(here) and add this template - "Author", I am not able to set input types as shown in images here

image.png (367×717 px, 24 KB)
image.png (450×774 px, 29 KB)
. Please help me here.

@Yaron_Koren, I tried creating a form at https://www.discoursedb.org/wiki/Special:CreateForm And I can see that after selecting the template, I can see option to choose input type.

image.png (212×320 px, 21 KB)

Change 670904 had a related patch set uploaded (by Yashvarshney02; owner: Yashvarshney02):
[mediawiki/extensions/PageForms@master] Remove namespace parameter from Combobox and Tokens input types

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

Hi @Yaron_Koren , I installed MediaWiki version 1.34.1, and there I do not see the problem of the Template and input types not getting displayed while creating a form. Thus, with my understanding, I have submitted a patch. Kindly let me know your reviews on this.
Thanks.

Change 670904 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Remove namespace parameter from Combobox and Tokens input types

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

Yaron_Koren closed this task as Resolved.EditedMar 11 2021, 9:45 PM
Yaron_Koren claimed this task.

Regardless of whether or not there's a bug, I think getting rid of this parameter was the right thing to do - I don't think anyone should be using it (and I'm not sure if anyone was using it). Thank you for the patch - it's great!