Extension talk:Page Forms

Special:UploadWindow example?
Is there documentation with examples of how I would include Special:UploadWindow in a pageform? Thanks!Tenbergen (talk) 02:21, 10 August 2023 (UTC)
 * I'm guessing you mean the file upload option, which calls Special:UploadWindow. The documentaton for that is here: Extension:Page Forms/Input types. Cavila 10:58, 10 August 2023 (UTC)

Unregistered users can't edit with forms (solved!)
Hello!

We have a wiki using PageForms and unfortunately we have a strange problem with it: Both registered and unregistered users should be able to create and edit pages of a certain namespace using a form. For registered users it works without problems. For unregistered users creating pages with the form works, too. However, when they try to edit a page using the form and try to save their edit, they get an error message: "Die Änderung von (name of the page) ist fehlgeschlagen." It's a German wiki, but the text seems to be from MediaWiki:Pf autoedit fail, if that helps.

(I don't know why the link isn't properly parsed but displayed as HTML.)

I don't even use the #autoedit parser function or something like that, just a normal form.

Does anyone here by chance know what might be the reason for this error and how to get rid of it? Timo Müller (talk) 18:36, 18 August 2023 (UTC)


 * Hi Timo. In MediaWiki in general, 'createpage' and 'edit' are two seaprate user rights and Page Forms depends on the settings for them. Is it possible that anonymous users only have the 'createpage' permission? Cavila 06:58, 19 August 2023 (UTC)
 * Thank you for your reply! But as far as I understand without the "edit" permission they shouldn't be able to edit at all? They can edit pages (even in that namespace) without using the form. The error only occurs when they use the form to edit the page. Timo Müller (talk) 19:41, 19 August 2023 (UTC)
 * We tested some more. We deactivated all extensions with exception of Page Forms and Semantic Media Wiki. I created a very simple form with only one field and a simple template with only one parameter and tested it in both the namespace we use and the main namespace. We tried to reverse all changes we made to the localsettings.php. No matter what, the error still occurs. Timo Müller (talk) 23:15, 19 August 2023 (UTC)
 * We solved the problem! For some reason I don't understand (maybe some bug in Page Forms?) it seems like there is an edit conflict occurring whenever an unregistered user edits a page with a form (even if there is in fact no edit conflict as no other user edits the page at the same time). As diff3 wasn't working in our wiki, the "conflict" couldn't be resolved. Now that diff3 works, the error disappeared. Timo Müller (talk) 00:06, 20 August 2023 (UTC)


 * Good to hear you solved it! Cavila 10:05, 20 August 2023 (UTC)

Field Defaults and Free Text input stopped working with lastest Page Forms update
Miraheze recently updated to the latest version of Page Forms. After doing so Default settings for all Fields and Free Text inputs stopped working. They worked properly before updating. Specifically before updating, all default settings and free text inputs would load as they should; now fields using them remain blank as if they didn't exist. After reporting the issue to Miraheze's support team, they confirmed being on the latest update of Page Forms and suggested I report the issue here. Ertosiangel (talk) 23:01, 4 September 2023 (UTC)


 * Ooh, that's really bad - this turned out to be a real bug, due to a change I made two months ago. Sorry about the problem, and thanks for pointing it out. I just checked in the one-line (actually one-character) fix, here. Yaron Koren (talk) 13:30, 5 September 2023 (UTC)
 * Thank you for the quick reply. All of your work is appreciated; Page Forms is such a great extension! Ertosiangel (talk) 01:18, 7 September 2023 (UTC)

Bots and Page Forms
Is there a way for bots to interact with Page Forms? I'm trying to write a bot that will adjust a form value on the articles it interacts with. Some of the articles already have this value set, some do not. Is there a recommended way for my bot to edit these articles? 70.160.223.43 11:26, 18 September 2023 (UTC)


 * You can use the "pfautoedit" API action. Yaron Koren (talk) 13:16, 18 September 2023 (UTC)
 * Thank you very much! I didn't see that before.
 * I went through its documentation, and I've been able to add a value to a field on an existing page, but I ended up blanking the rest of the page. I thought maybe it was because of not using the preload, but that failed too.Would you be able to tell me what I'm doing wrong?
 * 70.160.223.43 22:55, 18 September 2023 (UTC)
 * What version of Page Forms are you using? There were some bugs with field handling that were in the code from about mid-July to early September. Yaron Koren (talk) 02:03, 19 September 2023 (UTC)
 * I'm using version 5.6.1. I can download the latest version from github and try again later today. Could you tell me if the top or bottom line above is correct? 70.160.223.43 09:00, 19 September 2023 (UTC)
 * If it's really version 5.6.1, i.e. from April, then I don't know what would be causing this problem. But trying out the latest code could help, yes. The first one is correct - there's no need to use "preload". Yaron Koren (talk) 12:59, 19 September 2023 (UTC)
 * If it's really version 5.6.1, i.e. from April, then I don't know what would be causing this problem. But trying out the latest code could help, yes. The first one is correct - there's no need to use "preload". Yaron Koren (talk) 12:59, 19 September 2023 (UTC)

Bug regarding checkboxes and properties
In any form where you take checkbox, checkboxes or a dropdown and assign a property (values from property=) to them it doesn't work. A list with manual entries works. This bug has been already fixed in master branch, but not yet in 5.6.1. When is a release of 5.6.2 planned? Thank you! Driedmueller (talk) 07:54, 27 September 2023 (UTC)


 * Hopefully soon - it's definitely overdue. Yaron Koren (talk) 13:57, 27 September 2023 (UTC)

Data is not updated after editing
Hello!

I'm a beginner at MediaWiki.

After editing a form using the PageForms extension and clicking the 'Save page' button, the data is not updated in the 'Read' tab. This is relevant for Chrome, Safari (requires one more page refresh to get the correct content). Everything works fine in Firefox.

If I use Xdebug the data is saved correctly in any browser (I think this is due to the delays that occur when using Xdebug).

Notes:


 * MediaWiki 1.39.2


 * Page Forms 5.6


 * Semantic MediaWiki 4.1.1

P.S. If I am the only one with this problem, please tell me in which code fragment I should look for the cause of this problem. Mikasa7 (talk) 08:28, 29 September 2023 (UTC)


 * Does the underlying wikitext look correct right after the edit? It sounds like yes - in which case this is not a Page Forms issue. I'm guessing your infobox template is structured in such a way that the page is querying itself (via SMW, in your case) to get its own data. If so, hopefully that's not actually necessary to do. But if it is, I'm not sure there's anything you can do to get around that problem of the data initially being old. Yaron Koren (talk) 13:27, 29 September 2023 (UTC)

deletes parameters which are not called
After updating from MW 1.35 to 1.39.5 and all other extensions it seems that the behavior of  has changed.

The below example (which is called by a template) increases a counter parameter on a page. This works but by doing so it now deletes al other parameters in the template.

This was not the case before the update. The count parameter value was increased but the rest of the parameters where left alone.

I do not know if this is intended behavior but for the moment I solved this by passing all the parameters to the template so they stay on the page.

Could it have something to to with Field Defaults and Free Text input stopped working with lastest Page Forms update? We are running Page Forms version: (95b9a3a) and PHP version: 8.1.24.

Thanks and regards, Felipe (talk) 05:31, 3 October 2023 (UTC)