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)