User:Tenbergen/MultiPageEdit

Using this page to pull together some of the info about the MultiPageEdit functionality of Extension_talk:Page_Forms.

When does it work?
This page only displays a minority of my tables. I wonder what I could do to get more added. The extension page states: "It currently supports text, text area, checkbox, date, combobox and tokens input types."
 * Extension_talk:Page_Forms/Archive_January_to_March_2020]

Looking at one of them, it has Wikitext (size=2000), String and Date input types. Would changing the first two to Text work?

Also is it relevant that the template has a #cargo_attach statement in it?

Thanks Jonathan3 (talk) 22:51, 17 February 2020 (UTC)

This should probably be explained somewhere. Page Forms' selection actually has nothing to do with Cargo data, if I remember correctly. Rather, I believe it only picks form/template pairs where there is a direct, 1:1 connection between the form and the template. So if two or more forms include the same template (presumably as a multiple-instance template in both cases) then I believe Special:MultiPageEdit doesn't include either form. Could that be case on your wiki? If not, there may be some other rules too. Yaron Koren (talk) 21:50, 18 February 2020 (UTC)

I don't have any multiple-instance templates (that I am aware of!). I deleted a couple of test forms which made one extra form show up in Special:MultiPageEdit, so the 1:1 relationship must be part of it. I would be interested to hear the other rules. Jonathan3 (talk) 23:19, 20 February 2020 (UTC)

I think it's basically "any form that contains a template that's in more than one form is excluded". Yaron Koren (talk) 00:06, 21 February 2020 (UTC)

I'm not positive but I think I'm experiencing a related bug. My Special:MultiPage says "Showing below up to 6 results in range #1 to #6." but nothing is visible. The top/bottom view per page options are there but nothing in between them. I used the Special Pages 'Create Form' and 'Create Template' on a brand new pair just to test but no change. AgentIrons (talk) 03:11, 22 February 2020 (UTC)

I hadn't thought anything of it until your comment, but mine says "Showing below up to 50 results in range #1 to #50" then lists templates for four of my 13 forms. Jonathan3 (talk) 09:40, 22 February 2020 (UTC)

The code is correctly saving the the 1:1 template:form relationships in an array.

But when it comes to displaying the templates, it takes the limit (default 50) and runs through the first 50 templates in the wiki, which means that it misses any relevant templates beyond that. A workaround for now is to change the limit to a number which is higher than the number of templates in the wiki, e.g. title=Special:MultiPageEdit&limit=500&offset=0 Jonathan3 (talk) 10:48, 22 February 2020 (UTC)

This seems to fix it. Change function getQueryInfo in PF_MultiPageEdit.php so that the 'conds' line also restricts results to those templates identified as being linked to by one form.

'conds' => array( 'page_namespace' => NS_TEMPLATE, 'page_title IN ("' . implode( '", "', array_keys( $this->templateInForm ) ). '") ' )

I have spent all morning working through the code, so really hope you haven't fixed this already :-) Jonathan3 (talk) 12:18, 22 February 2020 (UTC)

Thank you for that patch! I just checked it in - it does indeed seem to fix that problem. Yaron Koren (talk) 20:22, 24 February 2020 (UTC)

Yes it works fine - thank you. Jonathan3 (talk) 21:04, 25 February 2020 (UTC)

Select Columns
Is it possible to do this? It would help for tables with many fields.

Thanks. Jonathan3 (talk) 19:02, 23 February 2020 (UTC)

No, but you can "X" out the columns you don't want, if there are a lot of them. Yaron Koren (talk) 04:36, 24 February 2020 (UTC)

I hadn't noticed those! Thanks. Jonathan3 (talk) 21:06, 25 February 2020 (UTC)

Problem with similar names
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 @Yaron Koren:, 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)

Tie in
Would need to be linked from:
 * Extension:Page_Forms/Special_pages