Extension talk:Page Forms

How to easily rename a property value ?
I'm using Forms + SMW, and I have lots of pages on which I have set properties like

Each keyword has a corresponding page on its namespace (Keywords:car, Keywords:train, Keywords:plane). Problem is that sometimes I want to rename a property, lets say, replace "train" with "railway".

Presently, I have to rename the page "Keywords:train" to "Keywords:railway", and replace its definition in every page that sets Keywords=train (with the help of more or less efficient search and replace operations with Special:ReplaceText).

Since I guess I'm not the only one who faces this kind of renaming necessities, I was wondering if anyone has a better advice on how to do that? --Varlin (talk) 10:43, 2 May 2021 (UTC)


 * Okay, you want to rename a property value, not a property. What's the downside of using Replace Text for that? Yaron Koren (talk) 23:43, 2 May 2021 (UTC)


 * First because using regex is technical and potentially dangerous, so not suitable for daily moderation tasks. Secondly because I never managed to find a correct regex working with ReplaceText. Though this one works out of the box when I test it on regex101.com : . When I try it in ReplaceText it seems it is greedy by default, but if I try to add   or , I get a Fatal exception. --Varlin (talk) 17:31, 4 May 2021 (UTC)


 * Sorry, I didn't see your response before. How about just searching for "Keywords=(.*)train"? Maybe the greedy search would be less of an issue there? Yaron Koren (talk) 16:58, 12 May 2021 (UTC)


 * With  there is a risk that is wrongly match part of a keyword (like "training" idk). But it's ok I found my solution:  . Thanks anyway! --Varlin (talk) 18:04, 12 May 2021 (UTC)


 * I'm glad you were able to get it working with Replace Text - that's really the only standard way to do a site-wide renaming. Yaron Koren (talk) 02:15, 13 May 2021 (UTC)

When using ask request, how to get a link to the namespace ?
I use forms and i enter a username based on "from namespace User" autocompletion in the form. It's ok et i got the link to the user page inside the page. But when i use the ask feature, i have a redlink to an inexistant page because "ask feature" is not inserting the "user:" namepace before the link. Is there any solution to get the right link ? Here is an example :


 * You can have the template prepend "User:" to the value, when setting the property. Yaron Koren (talk) 23:44, 2 May 2021 (UTC)

Sorting values from property
in a form, when getting values from a property (thanks to input type=) I need a way to display values in a custom order and not alphabetically. Is it possible ? Nicolas NALLET Wiki-Valley.com (talk) 06:57, 19 May 2021 (UTC)


 * I don't know of a way to do that, unfortunately. Yaron Koren (talk) 18:05, 19 May 2021 (UTC)

Page forms #queryformlink Button Styling
In previous MW (1.33.1) + PageForms (not sure) version I was using, the button used to be a rectangle shaded with a grey gradient. Now in MediaWiki 1.35.2 I see bluish text with a ">" prefix to the button text.




 * That's a totally different issue. That's the new display of the #formlink button, which is now using MediaWiki's OOUI JavaScript library. Yes, there are ways to change the display using CSS. Do you not like the current display? Yaron Koren (talk) 17:48, 19 May 2021 (UTC)

Great that it is not a real issue. I really liked the previous button since it looked like a button and took less screen space. If you let me know the CSS class I could try to return the appearance to the previous style. Ideally I would like buttons like the green ones shown. --GMShimokura (talk) 21:20, 21 May 2021 (UTC)

Related to this it seems that the OOUI based Button Text cannot include any Styling or inline images.. in my case I need to have the playing card suit images as part of the button text (Spades, Hearts, Diamonds, Clubs).. Is this possible? --GMShimokura (talk) 10:47, 25 May 2021 (UTC)


 * Not at the moment, I don't think, unless you override the CSS. Yaron Koren (talk) 16:11, 25 May 2021 (UTC)

I am going back to Version 4.6 of Pageforms to get back the shaded grey button style without the icons and the ability to have html/inline image button text. GMShimokura (talk) 01:08, 26 May 2021 (UTC)

Special:MultiPageEdit edits more than only inside the template
Hello Yaron,

I'll write my question again since it might have been overlooked and I think it's severe enough to hinder the usability of the Special:MultiPageEdit page.

I edited a lot of pages through Special:MultiPageEdit today and it's really working wonderful and saving a lot of time. Except for the following thing.

For some reason that I ignore, the variable "cat2" in template "Article ACGM 2" is getting completely deleted when I edit things in "Article" template. Here's what got edited, as an example, when I was working on "def" in "Article" template.

"Funny" thing is that other variables, like classe2 and def2, in the same template, stays untouched, as it should.

Kind regards. (original post from 12:29, 20 March 2021 (UTC)) DSwissK (talk) 09:20, 25 May 2021 (UTC)


 * I remember looking at this before... this is clearly a bug, but did it have to do with the similarity of the template names "Article" and "Article ACGM 2"? There was, and maybe still is, a problem with Page Forms' parsing of templates whose names are substrings of one another. Yaron Koren (talk) 16:11, 25 May 2021 (UTC)


 * Hello, thank you for your answer. I tried with lastest Page Forms version (5.2.1), the bug is still happening. Kind regards. DSwissK (talk) 12:12, 7 June 2021 (UTC)

Runquery: Links to pages do not work with format=template
Page Forms / Cargo performs differently if a query is ran from the Runquery option rather than running the query in a standard page.

I have the following setup: Template1 - holds the cargo query that returns me the field values I wish to display. If I run this with format=table then links to pages work correctly. In my case I use format=template, template=Template2. Template2 - holds the code to put the results of the cargo query into a table format. The table formatting is perfect with no issues.

However if I run the query in Template1 using Runquery it does not display any page links in the results. I have tried using CONCAT in Template1 which doesn't work, but my preferred option is to use Field2 within Template2. Neither option works in Runquery. If I use the characters | I get a blank column returned. If I use the Template1 in a normal page it works perfectly with the links appearing as expected. It is only when the Cargo Query is called from the Form through Runquery that it does not work. I tried switching to using the ASCII ( |&#91;&#91;&#124;&#93;&#93; ). If I use the ASCII I get the ( Implement April's Law ) but not the link. Using ASCII doesn't work on a normal non-form page either. Also I've usesd | instead of pipe in one test. It doesn't solve the issue though

Michaeldakin (talk)

File type and data
Hello again, Yaron! I'm currently using Page Forms on my wiki (alongside Cargo) and I will make my wiki public soon, however, some of the forms have a upload form and I wonder if it's possible to restrict the selection of files to upload to a specific file type (like .mp3 or .gif).

Another question I have related to this is: is it possible to get some "parameters" (such as metadata) for files selected with Page Forms? Currently I have a module tracker player (old PC music) on my wiki and I wonder if it would be possible for the JS "get" some of the file data and input that automatically to the available fields (such as title, length, author, etc.).

Thanks! Lakelimbo (talk) 14:07, 26 May 2021 (UTC)

"mapping property" fails when used on multiple comboboxes
Version: 5.1 (9eeed94) 14:43, 10 February 2021

In a example similar to the following:

Only combobox4 functions properly. CBs 1-3 have Bar4 as their mapping property, which does not tie back to the "Foo" item correctly. When changed from combobox to dropdown, it functions as expected.

Thanks in advance.

Blank page after uploading media
Mediawiki version 1.35.1. PageForm version 5.2.1. When trying to upload any media from the forms blank page appears (clicking Upload File). Adt it's name does not appear in the field. But the file is loaded. So I have to paste it's name to the field manually. It worked correct in previous version of MediaWiki.

Problem with previewing
On any of the forms I have set up, when trying to preview I get "EditPage does not have a context title set" and no preview. Recently upgraded to MW 1.36 and PageForms from git--Cody3647 (talk) 02:47, 4 June 2021 (UTC)
 * Seems to be some kind of conflict or issue with Code Editor and Page Forms, I've disabled Code Editor and previewing works again. --Cody3647 (talk) 19:39, 14 June 2021 (UTC)
 * Thank you for that detective work! And sorry about the problem. I just added a note about that to the "Known bugs" page. Yaron Koren (talk) 20:17, 14 June 2021 (UTC)

Menu bar for WikiEditor not showing up
After upgrading to MW 1.35.2 we found also encountered the issue of the missing WikiEditor toolbar / menu bar as it is described here (T284307). Bmulckhu (talk) 08:00, 9 June 2021 (UTC)

Multiple with partial form
I have a form that includes a "multiple" template where I try to create flex-boxes. It looks like thisː

<ǃ--contains the starting div for the flex container-->

<ǃ--creates multiple boxes within the flex container-->

<ǃ--conains the ending div for the flex container-->

I would like to have regular text above and below this flex container. For that, I addedː

After adding the "partial form" instruction to the form, I get the problem that each time the form is saved, the existing flex boxes get duplicated, although no boxes were added. So if 3 boxes exist, after saving the form, I suddenly have 6 boxes. Is there any way to avoid this or do I need to take the "partial form" part out of the page which would mean the boxes can only be displayed at the beginning of the page? --MLRodrigue (talk) 09:18, 10 June 2021 (UTC)


 * "Partial form" functionality never worked that well, and it was actually removed completely from Page Forms a few weeks ago. Unfortunately there's no good way, given Page Forms' parsing, to have free text at both the top and bottom of the page; you'll have to choose one. Yaron Koren (talk) 16:59, 11 June 2021 (UTC)

Textarea too wide
Hi Yaron, I have a minor responsiveness issue happening with textareas using rows= and autogrow. Css classes are used to make sure that they are 100% wide and no wider than 100%, but on mobile views the textarea extends its allotted space, forcing a horizontal scrollbar for the entire screen, which is ugly. Apparently, Page Forms overrides the width setting with a value set to "auto" (perhaps because of this). One solution on the user end is to force width:100% with !important, but maybe there's a more elegant solution. Cavila 18:42, 16 June 2021 (UTC)

"Multiple" function not working
Hi! I reported this bug on Phabricator here, but since it hasn't been addressed yet, I hope you don't mind me putting it in here as well.

Currently, the "multiple" parameter does not work -- it makes the template form disappear on the form page. Removing the "multiple" parameter does make it work, but that does not have the functionality of "multiple" forms. This function has been really helpful for our wiki, so I hope it gets fixed soon. Thank you! Kiwibasket (talk) 17:21, 21 June 2021 (UTC)

Special:RunQuery generating invalid http-requests?
In an otherwise perfectly functioning wiki (1.34) with PF v5.1, using Special:RunQuery occasionally provides clients with a "400 Bad Request" response from the server. In trying to understand this seemingly random behavior, we have confirmed that A) the "400 Bad Request" is generated from our Haproxy front-end, and B) Haproxy is notoriously strict [1] about the adherence to RFC7230 in terms of message parsing and (from the haproxy documentation): This means that invalid characters in header names are not permitted and cause an error to be returned to the client. This is the desired behaviour as such forbidden characters are essentially used to build attacks exploiting server weaknesses, and bypass security filtering.

Sometimes, a buggy browser or server will emit invalid header names for whatever reason (configuration, implementation) and the issue will not be immediately fixed. In such a case, it is possible to relax HAProxy's header name parser to accept any character even if that does not make sense, by specifying this option.

Similarly, the list of characters allowed to appear in a URI is well defined by RFC3986, and chars 0-31, 32 (space), 34 ('"'), 60 ('<'), 62 ('>'), 92 ('\'), 94 ('^'), 96 ('`'), 123 ('{'), 124 ('|'), 125 ('}'), 127 (delete) and anything above are not allowed at all. Haproxy always blocks a number of them (0..32, 127). The remaining ones are blocked by default unless this option is enabled. This option also relaxes the test on the HTTP version, it allows HTTP/0.9 requests to pass through (no version specified) and multiple digits for both the major and the minor version.

Is it possible that PF Special:RunQuery is constructing an http-request in some situations is not in strict compliance with RFC7231 section 4.3.6? [1]

[1] https://stackoverflow.com/questions/39286346/extra-space-in-http-headers-gives-400-error-on-haproxy