Extension talk:Page Forms

tag 'create title' parameter not displaying parser function values correctly
I use the following info tag in my form definition:

When adding a new page using the form, on the form edit page, the form headline becomes: you|edit title=you

If i remove the parser function only from the 'create title' param it works fine (also when editing an existing page with PageForms)

Any clues why this is happening and/or how it can be fixed?

--Schtom (talk) 16:54, 2 January 2019 (UTC)


 * FYI, Schtom created patch to fix this, which was checked in a few weeks ago. Yaron Koren (talk) 21:07, 4 March 2019 (UTC)

PageForms 4.4.2 and MW 1.31.1
Is PageForms 4.4.2 compatible with MW 1.31.1? I'm getting JQMIGRATE warnings in the Chrome console when I use FormEdit. Those warnings do not show up when simply viewing the page. The problem I am encountering is when using FormEdit to add multiple uploadable files to a page, clicking on the Upload button does not activate the popup for choosing files. However, the "Change file" does work for an existing file. I assume these jquery warnings are interfering with the upload function? Here is my setup:

MW 1.31.1 PageForms 4.4.2 Cargo 2.0.1 PHP 7.2.11 MySQL 8.0.13

I have tried to rule out other extensions as the problem.

Here are the JQMIGRATE warnings:

JQMIGRATE: jQuery is not compatible with Quirks Mode This page is using the deprecated ResourceLoader module "jquery.ui.widget". This page is using the deprecated ResourceLoader module "jquery.ui.core". Please use OOUI instead. JQMIGRATE: jQuery.fn.bind is deprecated This page is using the deprecated ResourceLoader module "jquery.ui.position". JQMIGRATE: jQuery.fn.delegate is deprecated JQMIGRATE: jQuery.unique is deprecated; use jQuery.uniqueSort JQMIGRATE: jQuery.fn.removeAttr no longer sets boolean properties: disabled

Longphile (talk)


 * Those warning messages need to be dealt with (by copying jQuery UI files into Page Forms), but I don't think they're related to any actual errors. After you click on "Upload", does anything else show up in the console? Yaron Koren (talk) 14:26, 6 January 2019 (UTC)


 * I don't see anything else showing up in the console after clicking "Upload". I went back and realized that the Upload button stopped working when I started using "$wgPageFormsSimpleUpload = true;".  When I go back to the default upload function, the upload popup does work (despite the JQMIGRATE warnings still present).  So it seems to be due to the SimpleUpload feature being turned on.  Again, the SimpleUpload window does show up for an existing uploaded document but not when adding a new document.  Is this something that is fixable?  Longphile (talk) 02:42, 7 January 2019 (UTC)


 * That sounds like a bug - or maybe two bugs. And yes, I'm guessing they're fixable. Yaron Koren (talk) 18:58, 7 January 2019 (UTC)


 * I think the likely culprit is in PageForms/libs/PF_simpleupload.js. Starting with line 28, the jquery code to trigger the click on the upload button does not function because of a security issue with .trigger('click').  Here's the relevant line:

$( ".simpleupload_btn" ).click(function {                $(this).parent.find("input[type='file']").trigger('click');        });


 * There is a post in stackoverflow about this issue: https://stackoverflow.com/questions/793014/jquery-trigger-file-input.  I don't know the fix for this but hopefully this could help point you in the right direction.  Would be great if simple upload works.  Longphile (talk) 04:25, 18 January 2019 (UTC)


 * Can you please test if this works for you? https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/PageForms/+/487489/

Nischayn22 (talk) 13:04, 1 February 2019 (UTC)

Empty parameters in forms
I'm facing issues with empty parameters in forms. Based on my research, this problem exists since 2012 (Query parameters not passed) and I haven't come across any solution yet.

In a nutshell, if you have your template like this:

The empty values of popis4, dadav4 and Predchproc4 are parsed into the wiki article as an empty line/character. It's visible that a page section grows in length when the parameters are missing. So I tried several ways of getting rid of the issue with templates, parser functions or deleting the variable from the template definition but it did not help either - if a variable is missing from the definition, it will show up in the wiki text as " " so that's a no go either.

I'd like to ask whether there is some kind of a solution to this issue?

Thank you,

Peter


 * That doesn't sound like the 2012 problem. And actually, I'm not sure this is a forms issue at all. What does the relevant part of the template look like, though? Yaron Koren (talk) 18:59, 7 January 2019 (UTC)


 * Okay, I was playing around with it a bit and it seems like the issue is not with Page forms but with the wiki parser. I was able to resolve it using parser functions like this:
 * but I still need to fill in the form some character, in this case it is "-" that I can substitute for something else. In this case it's a paragraph " " and I added a CSS class with "display:none" attribute. It does the job. Thanks.


 * My guess is that there's a much easier way of doing what you're trying to do, but - whatever works. Yaron Koren (talk) 18:42, 8 January 2019 (UTC)

Problems generating a tree input structure using a Cargo query
Hi

I have a form that uses a tree input. Originally I had entered the tree structure as wiki text onto another page on the wiki (in this case called 'Risk Taxonomy') and was able to get it to successfully load into the tree structure using:

structure = {(:Risk Taxonomy}}

I then created a Template (in this case called 'Generate Risk Taxonomy') to generate the tree structure using a Cargo query. This generates a bulleted list in wiki code which is stripped of all HTML (I checked this with the Expand Template special page). I placed this template as the sole text in the 'Risk Taxonomy' page but now the tree input field display nothing. I also tried referencing the new template directly as follows, but this didn't work either:

structure =

I wonder if there is something else I have to do to get the tree input to load when using a cargo query to generate the structure or is this something that's not possible?

Many Thanks, Duncan (11 Jan 2019)


 * Adding "|no html" to the Cargo query may help, if you don't have it there already. Yaron Koren (talk) 21:12, 11 January 2019 (UTC)


 * Thanks Yaron, that did, indeed, solve my problem. I'd started there but removed the 'no html' when I introduced CONCAT to strip out the html code! I now see both are needed. Many thanks, Duncan 14 Jan 2018

RFE: Assigning red-link forms based on a new special-property annotating other properties
I want to make a suggestion for rather "integrated" enhancement to both SMW & PF extensions based on the following problem:

I'm using semantic-templates that render their field-values based on #ask queries, so as to have them properly formatted (think of "record/reference properties"). To apply the #formredlink: function on these formatted values, i need to pass along also the unformated valuem, or else, the 'target' parameter will not work, and this is cumbersome.

Would it make sense for PF to introduce a special-property that can annotate properties with which form to use for all their values, and retrofit the SMW-code to use that when rendering red-links?

Should i file a new RFE in github?


 * Well, Page Forms used to do it that way, back when it was called Semantic Forms - there were special properties called "Has default form" and "Has alternate form", which were applied to regular properties, among other things. I'm not planning to re-introduce them, because, among other things, they would only work when SMW is installed, and I want to keep Page Forms a more generic solution. I'm sorry that it's cumbersome, and I hope you can get everything working. Yaron Koren (talk) 17:36, 14 January 2019 (UTC)

Formlink does not return to refreshed page
In my form template Template:MyForm I included a formlink to the edit form Form:MyForm for the page:

After editing, it returns to the page where the template is included as expected, but that page does not show the update. Only after I ask my browser to refresh the page, the updated data is shown.

I tried disabling caching in the browser as well on server side, but this does not help. I removed the "link type" parameter as recommended in an old response, displaying it as a pure link only, did not work. I added a |returnto=, did not help either (in fact, if I set the returnto to some other page, that does not work either, I still return to the original page). Also, if I omit the |target=, I see an error message stating that no target page has been defined, contradicting the formlink documentation.

In one old response I saw that "returnto" seems to be used as part of the "query string", in the form "&returnto=", and not as "|returnto=" parameter to formlink. Would that help? And how should the query string then look like?

Any suggestions?

I found a solution: when I remove the "popup", it works; makes sense, witha popup, when closng the popup, the underlying page is not reloaded.


 * Sorry for the delay. If you specify "popup", there's actually a parameter called "reload" for both #formlink and #forminput, which causes the main page to reload once the popup form has been submitted. Unfortunately, this was missing from the documentation for some reason - I just added it. Please try adding the "reload" parameter, and see if that works for you. Yaron Koren (talk) 04:39, 23 January 2019 (UTC)


 * Great, that works! Thank you very much!

#formredlink does not use the invocation's query string
When I call #formredlink with both a 'query string' argument (to specify a value to prefill in the template) and the 'create page' argument to automatically create the page, the expected behavior is for the page to be auto-generated with those query string arguments specified. However, this is not the case; the page is generated with a completely blank form. EliteMasterEric (talk) 04:52, 21 January 2019 (UTC)


 * What do you mean by a blank form - is the generated page blank? Yaron Koren (talk) 04:39, 23 January 2019 (UTC)


 * The form being auto-created contains one template which powers the entire page. It contains one mandatory/hidden ID field (which I am using with other modules/templates to generate the majority of the page) and several optional Notes fields; the Page Forms extension will allow them to easily edit these fields without disturbing the rest of the template. My #formredlink call contains this mandatory ID as part of the query string.


 * By "blank form," I mean the created page contains the template associated with the form, but does not include the argument specified in the query string. This leaves the generated page as incomplete until the form is manually fixed to add the correct ID, and if I do that, there is no point in using the "create page" option at all. EliteMasterEric (talk) 15:05, 23 January 2019 (UTC)


 * Oh, I see. What does the "query string=" value look like? Yaron Koren (talk) 15:35, 23 January 2019 (UTC)


 * I have a template called  that contains  .   is replaced with the template argument, the template populated by the form is , and   uses a module to convert the name provided into the value of the mandatory ID field (which is used by other modules/templates called by Form Troop to populate the infoboxes etc in the page). Even if I replace   with a hardcoded ID, when the page is generated it only contains   even though I expect it the query string to make it   or something similar. If I don't use 'create page', clicking the link populates the ID field as expected. EliteMasterEric (talk) 03:42, 24 January 2019 (UTC)

No valid JSON response, 400 Bad Request

 * MW 1.27.5
 * PHP 7.0.32-0ubuntu0.16.04.1
 * MySQL	5.7.24-0ubuntu0.16.04.1

I'm mass uploading ~5 pages/second through MWs API. This worked fine before https://github.com/wikimedia/mediawiki-extensions-PageForms/commit/8cb76e3cd7caa28fbb218012a8a2dacf824df35c.

Since this change, I get '''400 Bad Request, Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.'''. The error is reproducible and occurs always after ~200 pages. These pages has nothing to do with forms (in my case these are MediaWiki system messages). [E] [0218/0996] [EDIT]    Property:Subregion [E] invalidjson: No valid JSON response {   "code": "invalidjson", "info": "No valid JSON response", "response": "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n \n 400 Bad Request \n  \n Bad Request \n Your browser sent a request that this server could not understand. \nSize of a request header field exceeds server limit. \n  \n" } Error: invalidjson: No valid JSON response at rawRequest.then (C:\Users\Alex\Workspace\mobo\node_modules\mwbot\src\index.js:249:31) at tryCatcher (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues (C:\Users\Alex\Workspace\mobo\node_modules\bluebird\js\release\async.js:17:14) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 400 Bad Request Bad Request Your browser sent a request that this server could not understand.

Size of a request header field exceeds server limit.

Can the above mentioned change be modified to be not breaking for mass uploading through API? Btw. same issue occures with current dev-master of PF as well as MW 1.31.

--Planetenxin (talk) 12:03, 21 January 2019 (UTC)


 * Sorry about that, and thanks for isolating the problem. I just checked in what I think is a fix - if you can, please get the latest code and let me know if it works better now. Yaron Koren (talk) 15:37, 23 January 2019 (UTC)


 * Thanks for having a look into this. I'll have a look at your changes and let you know. --Planetenxin (talk) 10:11, 28 January 2019 (UTC)


 * I have tested 83b17aa8710166dd3aca66c5ee4431fa559d639e which works now. Many thanks for the fix, Yaron! --Planetenxin (talk) 10:18, 30 January 2019 (UTC)

Why settings in "Project:" namespace
In The "edit with form" tab based on namespace, the method described is to save a setting in a page in the "project:" namespace.

What's the rationale behind this choice?

In the light of this namespace being used for content that is human readable, while settings intended for machine processing are usually saved in the "mediawiki:" namespace.


 * For some reason I never really thought to use the "MediaWiki:" namespace for this - now I don't remember why. This decision was made a long time ago; I'm not sure how I would do it now if I had to design it over again. Maybe a single page, in the MediaWiki: namespace, which held all of the namespace-to-form mappings in CSV format, or some such. Yaron Koren (talk) 01:46, 5 February 2019 (UTC)

editor=wikieditor not working [RESOLVED IN NEXT TOPIC]
When I use  it just shows up the same as when I don't include. How can I change this? Thanks. Jonathan3 (talk) 22:25, 3 February 2019 (UTC)

editor=wikieditor messes up tree input type [RESOLVED]
When I include  in a textarea input type, the tree input type in the same form doesn't display properly... it all shows up behind the text inputs etc, doesn't get sized, and can't be clicked on. Also, as mentioned in the topic above, the Wikieditor doesn't appear either (whether or not the tree input type is in the form). What am I doing wrong? Thank you. Jonathan3 (talk) 22:27, 3 February 2019 (UTC)

Just spotted that it prevents all Javascript from working, e.g. the tokens type. Jonathan3 (talk) 14:19, 4 February 2019 (UTC)


 * Is there a JavaScript error message in the console? And if so, could this be the same error causing the problem in the section above? Yaron Koren (talk) 14:25, 5 February 2019 (UTC)


 * Yes, I think it is the same (I just mustn't have noticed the other problems when I typed that one). Here is the error:


 * It looks the same when I use the Vector skin too. Jonathan3 (talk) 14:39, 5 February 2019 (UTC)


 * Just checked, and editor=wikieditor works fine on my test wiki... could I email you a link to my website, if necessary? Jonathan3 (talk) 14:43, 5 February 2019 (UTC)


 * Sure. By the way, does this happen every time, or only some of the time, you load the form? Yaron Koren (talk) 18:44, 5 February 2019 (UTC)


 * Every time so far (though not at all in the test wiki so I guess something else is causing the problem). 19:00, 5 February 2019 (UTC)


 * I was using an older version of Page Forms so, as you suggested, updated and it worked all right. Thanks. Jonathan3 (talk) 08:39, 6 February 2019 (UTC)

PageForms + TinyMCE: make "MinimizeOnBlur" configurable
Hi Yaron,

we are using PageForms together with TinyMCE (for textareas and free text inputs). This works really great but there is one thing that we wanted to change: the automatic hiding and showing of the TinyMCE editor controls! The thing is that first we don't like it and second it doesn't always work - on Firefox the controls get hidden but do not reappear when the field is clicked.

So I would like to propose a change to PageForms that makes this behaviour configurable. This is how I implemented it and how it works for me: diff --git a/extension.json b/extension.json index 0629870..8c388dc 100644 --- a/extension.json +++ b/extension.json @@ -460,6 +460,7 @@               ]        },        "config": { +              "PageFormsTinyMCEMinimizeOnBlur": true, "PageFormsUseDisplayTitle": true, "PageFormsSimpleUpload": false, "PageFormsMaxAutocompleteValues": 1000, diff --git a/includes/forminputs/PF_TextAreaInput.php b/includes/forminputs/PF_TextAreaInput.php index 4a67809..cb7e42b 100644 --- a/includes/forminputs/PF_TextAreaInput.php +++ b/includes/forminputs/PF_TextAreaInput.php @@ -70,7 +70,12 @@ class PFTextAreaInput extends PFFormInput { $this->mEditor = 'tinymce'; global $wgTinyMCEEnabled; $wgTinyMCEEnabled = true; +                       $newClasses = 'mceMinimizeOnBlur'; +                      global $wgPageFormsTinyMCEMinimizeOnBlur; +                      if ( $wgPageFormsTinyMCEMinimizeOnBlur == false ) { +                              $newClasses = ''; +                      }                        if ( $input_name != 'pf_free_text' && !array_key_exists( 'isSection', $this->mOtherArgs ) ) { $newClasses .= ' mcePartOfTemplate'; } Now if I add  to my LocalSettings.php the TinyMCE controls stay visible all the time.

What do you think? Are you willing to include this into your code?

Greetings

HermannSchwärzler (talk) 09:33, 4 February 2019 (UTC)

Unchecking doesn't work in sub-items
Hello,

I use Page Forms to enter new words in this Dictionary. When I edit words to change the category (for example https://dicoado.org/wiki/index.php?title=dilemme&action=formedit). I have to uncheck the selected one and check another one. If the new category is a subcategory (which is listed as a sub-item), the unchecking isn't registered and I get two categories : the subcategory and the main one (that was previously used on that word).

Any idea how to correct this ?

Thanks.

--DSwissK (talk) 06:26, 5 February 2019 (UTC)


 * I'm not exactly sure what the problem is, but you're using a somewhat old version of Page Forms. Maybe upgrading will fix the problem? Yaron Koren (talk) 14:17, 5 February 2019 (UTC)


 * Updated to 4.4.2, it works now. Thanks ! :) Is there a changelog anywhere ? I couldn't find it. DSwissK (talk) 13:41, 6 February 2019 (UTC)
 * Nevermind, there it is : https://www.mediawiki.org/wiki/Extension:Page_Forms/Version_history DSwissK (talk) 13:43, 6 February 2019 (UTC)

Tree input type has two check boxes per item in Foreground skin
There's a  (which should appear, I think), a   (which I don't think adds anything), and within   there's an   (which I imagine should be hidden but isn't).

When you click on the left box, it ticks both boxes. When you tick on the icon it does nothing. When you click on the right box it ticks the left box (but not the right box itself). When you click on the title text it ticks both boxes.

It works fine when I use the Vector skin, so I guess there's something about the Foreground skin that's causing the problem. Maybe it does something different with the a  class? When I add style="display:none" to the input tag it works the way it should. Any ideas? Thanks. Jonathan3 (talk) 08:55, 6 February 2019 (UTC)

Lines 201-207 of PF_TreeInput.php make the checkbox look like :

Lines 448-451 of foreground.css sets, which seems to prevent Page Forms from using   and   to make it  :

It's possible to get round this by adding the following to Common.css:

An alternative is to add the following to the Page Forms code on line 205 above:

I'm using an old version of the Foreground skin - 1.2.0 (44667e9) - so I don't think they'd change the skin just for this. Maybe you have similar views about your code! :-) Jonathan3 (talk) 21:17, 6 February 2019 (UTC)


 * I'm happy to add more CSS to Page Forms, if it doesn't break anything else... but why are you using an old version of the Foreground skin? Maybe this problem no longer exists in the current version? Yaron Koren (talk) 00:45, 7 February 2019 (UTC)


 * Thanks. I'm postponing upgrading the skin until I finally upgrade MediaWiki (which entails rewriting some PHP 5 code that's on the same website)... Jonathan3 (talk) 12:06, 7 February 2019 (UTC)


 * I now have the latest version of PF and Foreground and the same problem arises (and can be dealt with in the same way). Jonathan3 (talk) 23:49, 10 February 2019 (UTC)


 * Thanks for letting me know; your suggested fix was just checked in to Page Forms. Yaron Koren (talk) 20:50, 4 March 2019 (UTC)

Line returns within checkboxes and radiobutton input type
I'm sure that someone asked how to add line returns within the radiobutton input type (as otherwise the options appear one after the other, like a paragraph). But I can't find the question now... Anyway, this should work, in MediaWiki:Common.js, though I guess it may have unintended consequences (I don't know how whether the class is used elsewhere in MediaWiki):

Jonathan3 (talk) 14:07, 6 February 2019 (UTC)

I found the original question, on the main Page Forms page, and will cut and paste it below: Jonathan3 (talk) 21:27, 6 February 2019 (UTC)

QUESTION [SOLVED]: Default behavior produces an inline list of checkboxes. How does one force a "break" after each option to result in a left justified listing? User:rkevans Me too. Tenbergen (talk) 19:16, 5 February 2019 (UTC)
 * SOLUTION - to making checkboxes display in list for is by css found here: http://smw.referata.com/wiki/Display_form_checkboxes_in_an_orderly_table .. see also: http://smw.referata.com/wiki/Category:Tips :-)

update on cross-template (spreadsheet-like) editing
With SMW & Page Forms & SRF - is it possible to generate a semantic results table that is editable like a spreadsheet.. and hit save on the whole query?

I have users who like to edit a standard wikitable in VE because they can edit and save the whole thing at once.. but I'd like that data to be the result of a Semantic query (format=wikitable) which requires them to visit a different page to edit each rows data.. is it possible to have it both ways somehow?

(word on the street is that Yaron is working on this capability.. Any truth to that User:Yaron Koren? :-)


 * Check out the page Special:MultiPageEdit for something sort of like what you're asking about. Yaron Koren (talk) 01:30, 8 February 2019 (UTC)

Datepicker limits selectable year
Unless I can't figure something out, when I use the datepicker, by default it seems to limit the years available to ±10 years (2009-2029) and there doesn't seem to be a way to extend the range using the scroll bar. Using the parameters values, first date, or last date to modify the range only allows me to further limit the range. Once a date is selected though, the year can then be modified in the text area and then the scroll bar will have a new range around the new selection (±10 years). --Bryandamon (talk) 10:50, 17 February 2019 (UTC)

DatePicker will not popup Resolved

 * Mediawiki 1.32 php7.0 I have tried multiple skins and versions of pageforms via git or extension distributor.  I cannot get the datepicker to pop up, it appears a a basic text field.  When I inspect the page I get a bunch of jquery.ui messages in yellow, and the following in red Uncaught TypeError: initFunction is not a function.  Everything was working flawlessly in 1.29 so I am assuming its not an issue with syntax. Blyoak (talk) 23:06, 21 February 2019 (UTC)
 * This started working today with the latest iteration of pageforms, however autocomplete based on values from namespace stopped working 192.12.184.7 17:23, 26 February 2019 (UTC)
 * switching from text with autocomplete to combobox or tokens has fixed the autocomplete.


 * Great! I'm guessing that it started working due to the fix from yesterday. I can't reproduce that problem with "values from namespace", though. Do you see any error messages in the JavaScript console when that happens? Yaron Koren (talk) 20:29, 26 February 2019 (UTC)
 * I see a lot of deprecated ResourceLoader module, and a Uncaught ReferenceError: mwTinyMCEInit is not defined. These errors are constant on all forms though, not just ones with values from namespaces. 192.12.184.7 18:01, 11 March 2019 (UTC)
 * I am updating with composer these days; when I just ran a composer update, no update to pageforms came down. Do I misunderstand that composer should get these updates? Tenbergen (talk) 17:11, 8 March 2019 (UTC)
 * I don't know how Composer works; maybe someone else does. Yaron Koren (talk) 17:21, 8 March 2019 (UTC)
 * I believe that the most recent updates are from Git. I would recommend using this for Pageforms. 192.12.184.7 18:01, 11 March 2019 (UTC)


 * Yes - I've only used composer for the vendor directory, not for extensions, but Page Forms here seems not to have the latest version. Jonathan3 (talk) 22:56, 25 March 2019 (UTC)

Datetime input type and Foreground 2.1.0 skin [RESOLVED]
Originally each of the six fields showed up stacked on top of each other, with the hours-minutes-seconds each being 100% width. The following seems to fix it, in Common.css (though there may be better ways):

Best wishes, Jonathan3 (talk) 14:20, 23 February 2019 (UTC)


 * Do you know if this CSS change works fine with other skins, most notably Vector? Yaron Koren (talk) 17:17, 25 February 2019 (UTC)


 * Sorry for the delay. I've checked with  and it works fine. (It worked fine to begin with on Vector, but the CSS to get it working on Foreground hasn't broken it on Vector.) Jonathan3 (talk) 14:54, 25 March 2019 (UTC)

Update on issue saving form with hotkey after previewing issue
A while ago I reported an issue that when you edit a form page (e.g. Form:Infobox Player), and then preview it, and press Alt+Shift+S, it won't actually save the page - you thought it was a Gamepedia-only problem, but it turns out I think that it's a Firefox-only problem, it works fine for us in Chrome.

Steps to reproduce - make any page in Form namespace, then preview, then press Alt+Shift+S. I think that the save button from the form's preview is interfering with the save of the form itself. --RheingoldRiver (talk) 11:15, 28 February 2019 (UTC)

Cannot get autoedit to work. Strange error on namespace and not updating [Resolved]
I am trying to use autoedit to update a page with no success. This is the an example where I have hardcoded the write to test it. First I put this:



CN00002 is in the main namespace, but I get this error: "Error: Invalid namespace ""; only content namespaces are allowed for #autoedit." .

So I give the the path to the page I want to edit like so:



That clears the error with the content namespace issue, but doesn't carry out the update. So the form "Manage Company" is the form I used to create the page, the target is the page name and the template is called "Manage Company". The template variable is called "companyname" and is the cargo table field name too, although I appreciate the cargo element should be irrelevant. I've tried "form=Manage_Company" as I thought it might not like spaces. I tried setting up a form name with no spaces, with no success. Michaeldakin (talk) 20:36, 3 March 2019 (UTC)


 * The second of those definitely won't work. The first one should work, though. Have you modified $wgContentNamespaces in LocalSettings.php? Yaron Koren (talk) 19:00, 4 March 2019 (UTC)


 * No I haven't changed $wgContentNamespaces in LocalSettings.php. I am on a wikifarm (Miraheze), so I don't have access to change it. I can follow up with Miraheze and see if they have being doing anything. Although they are very good, so I can't imagine they will have done anything like that. Let me go check my other Wiki on Miraheze and get back to you. Interestingly I have noticed that the two wikis have some differences that I wouldn't have expected. For example on one wiki the php setting allows me to use to completely change the title, while the other wiki works in the Parser out of the box way, where you can only change capitalisation. Michaeldakin (talk) 19:42, 4 March 2019 (UTC)
 * **UPDATE**
 * I tested on my other wiki. The page I wished to update was "OD000123" created by form "OpenDemocracy Article" which is linked to template "Auto Add Article". I added the following line:




 * This resulted in OD000124 being created with only the articleauthor field populated rather than my target being updated. I didn't get an error with content space. Michaeldakin (talk) 20:06, 4 March 2019 (UTC)

Indeed you were correct. I realised that Miraheze have an extension to check NameSpaces and yes their Main Namespace was not set to content. I have changed mine and informed them. Many thanks. Michael 11:02, 11 March 2019 (UTC)

Upload file (Special:UploadWindow) and MediaWiki 1.31.0+
Ran into an issue trying to upload images from a Page Form in MW 1.32.0. The pop-up window would throw a ConfigException. Turns out that EnableAPI was deprecated in MW 1.31.0 and removed in 1.32.0. I commented out the check for that config setting on line 350 of PF_UploadForm.php to get it up and running for me at the moment but wanted to pass the info along to you for a proper fix. Thanks for the incredibly useful extensions!


 * Thanks for diagnosing the problem! I just checked in a change that includes this fix. Yaron Koren (talk) 20:55, 4 March 2019 (UTC)

The gallery CSS module disappears when reviewing changes
I have a form that below the fields displays a gallery from query-results (this is not related to any form tags). But it works only the first time i enter to edit some page - any subsequent reloads of the form (preview, show changes) does not load all CSS modules needed, that is, the `mediawiki.page.gallery` module is gone, and rendering of the images falls back to UList. Any ideas why that might happen, and how can i workaround it?


 * MW: 1.31.0
 * SMW: 2.5.8
 * PageForms: 4.4.2
 * Ankostis (talk) 16:02, 5 March 2019 (UTC)


 * If you don't mind, could you try putting in a standard &lt;gallery&gt; tag in the form, and see if that works in the same conditions? That will help determine if it's a PF or SMW issue. Yaron Koren (talk) 03:15, 7 March 2019 (UTC)

Is there a way to get when I've created the page with formlink?
I have a form for creating journals. I use formlink because I don't want the users to create the name. On the form I have the template set as multiple. The journal is tabular with a row per journal entry. I want them to be able to total up the journal occasionally to ensure they are putting in the figures correctly. This follows the logic that their credit column should add up to the same amount as their debit column.

In respect of getting a total I thought I had it cracked, because Save and Continue writes to the cargo table. Excellent I have what I have entered so far. I add a cargo query and I can have the totals showing at the bottom everytime the user presses Save and Continue. Except I can't get the page name on a formlink with. As you'd expect I get "Page Forms permissions test" returned. If I could get the page name while working in the form I could test that name against -pageName in the cargo table and voila I'd be doing a jig. I cannot go down the forminput route although I know that will get me the page name. I know the page name is there somewhere because I saved and continued and can see the records created in the cargo table.

Any ideas? Is there a better way? Michaeldakin (talk) 14:17, 11 March 2019 (UTC)


 * That's interesting - you want to get the name of the page that will be created by the form, to use in a query. I can't think of a way to do that, unfortunately. Actually, I'm somewhat surprised that "Save and continue" works, although I guess it makes sense. But for this, there would need to be some new parser function or variable added, I would think. Although another option, for your specific use case, is to add in some custom JavaScript, via MediaWiki:Common.js or something, to do the same thing - it wouldn't be querying Cargo, it would just go by the numbers right on the form page. That way you could have the total value get updated in real time, as opposed to requiring the user to press some button to see the current total. Yaron Koren (talk) 13:55, 15 March 2019 (UTC)


 * Yes a script is probably more sensible. My users will do regular saves because they worry about losing data, but querying cargo is heavy handed. Thanks for your reply. Michaeldakin (talk) 20:12, 16 March 2019 (UTC)

Query Form - Clicking back button in browser doesn't bring you back to previous query form.
Mediawiki 1.29.1 PageForms 4.3.1

I use a dropdown to query pages, Then I click on one of the resulting pages, but if I go back (back button), I get this error: Confirm Form Resubmission Is there a way to allow going back without this error? Thanks.


 * That's true - I didn't think about that. It only happens in some browsers, though. Anyway, I just checked in a change so that Special:RunQuery now uses GET, instead of POST, to send its data, so if you get the latest code, this problem should go away. Yaron Koren (talk) 22:39, 18 March 2019 (UTC)

Extension Translate together with Page Form editing ?
Hej-hej,

is it possible to use extension page forms together with extension translate without seeing the translation markers (e.g. instead of  just see “Text to edit”) ? How can this be accomplished? --Andreas P. 22:10, 20 March 2019 (UTC)


 * I don't know. Other people have used Translate along with Page Forms, so hopefully someone out there can answer this. Yaron Koren (talk) 02:29, 21 March 2019 (UTC)

Add tag to form edits?
Similar to how Visual Editor has its own tag, could there be a tag for form edits? Either one generic "Edited with a form" tag or something you can set in a form definition as a per-form thing - mostly I just want to be able to track when people aren't using a form to edit a page, but if edits with a form have any kind of tag I can filter that myself. --RheingoldRiver (talk) 09:40, 22 March 2019 (UTC)


 * This is nearly the opposite of what you want, but what about a hidden "last edited by form" field, Date type, default "now"? Or, even simpler, but maybe less useful, have it as an "edited by form" field, Boolean type, default true. The template could add it to a "edited by form" category if that field is set, or "not edited by form" category otherwise. You could have it as a restricted field so that you could reset it yourself when you've dealt with the page. Jonathan3 (talk) 14:46, 25 March 2019 (UTC)


 * Or what about a separate "Form edits" table that's attached to the main table, and to which the form sends the page name and current date when the page is saved? You know Lua - could that be used to analyse which edits were by form (i.e. on the "Form edits" table) or otherwise (i.e. in page history/recent changes, but not in that table). Jonathan3 (talk) 14:50, 25 March 2019 (UTC)

Free text in middle of page
To have a header, free text, then footer (which takes one parameter: category), which option would you recommend? I'd be happy to provide further information if needed. Thanks. Jonathan3 (talk) 14:37, 25 March 2019 (UTC)
 * 1) Header template, free text, footer template; or
 * 2) Single template containing header, field for the text, footer?