Extension talk:Page Forms

Unicode error with autoedit, and formredlink
Hi, I'm having a "It appears that your browser does not support Unicode. It is required to edit pages, so your edit was not saved. " error when trying to use autoedit and formredlink. Specific correction for MW 1.30 in PF_FormPrinter.php only solved gui form editing error. Standard page edition with text including formredlink with "create page" option doesn't even save content. Please help!

Multi Instance fields - parser functions only parse once.
Mediawiki 1.29 I have an uploadable field in a multiple template which I would like to auto-generate filenames to ensure they are unique. I thought using the page name with a timestamp would be simple enough, but the timestamp doesn't update when you "Add Another".

I have also tried: Similar results except that it does increment once. First filename gets a 1. When I "Add Another" the filename there gets a 2, and all added after that remain 2. Is there a way to ensure each uploaded file is unique regardless of the incoming filename. I thought this approach should work, but clearly I'm missing something. Thanks. Paul


 * I'm aware of the issues resulting from multiple-instance templates only being parsed once, and I don't know of a solution for them, unfortunately. Yaron Koren (talk) 03:02, 3 January 2018 (UTC)

Is there another way to do what I'm trying to do? A way to generate unique filenames in a multiple-instance template? Any workaround suggestions are welcome. Thx.

(SOLVED) Upload file field gives blank page
Hi Yaron, I'm running MW 1.30 (http://csdms.colorado.edu/wiki/Special:Version) using your PageForms (latest version). It operates great with Cargo and Sementic Mediawiki except for the 'Upload file' function. It was working well running MW1.29 with an older PageForms version but after updating I get a blank page as soon as I try to upload a file, see screenshot. . Any idea what might cause that? Happy new year, --Albert Ke (talk) 17:34, 3 January 2018 (UTC) Ps.1 File upload function MediaWiki provides standard works fine. Ps.2 Same result when using chrome or Safari


 * Please see this page for how to get error messages, instead of blank pages, to be displayed. Yaron Koren (talk) 02:25, 4 January 2018 (UTC)


 * Thank you Yaron, and good point, but I have the 'get error messages print to screen' always on using last lines in LocalSetting.php:

error_reporting( E_ALL ); ini_set( 'display_errors', 1 );


 * And I wish there where but no error message shows up, also not in the web log files. Any idea / hint more than welcome!

--Albert Ke (talk) 19:37, 4 January 2018 (UTC)


 * Oh, okay. Does the JavaScript console in the browser show any errors? Yaron Koren (talk) 22:39, 4 January 2018 (UTC)


 * Never mind - I was able to reproduce this problem. It's a JS bug due to the jump in the jQuery version, to 3.0, in MW 1.30. I just checked in a fix for this, so if you get the very latest code, the problem should go away. Yaron Koren (talk) 04:08, 5 January 2018 (UTC)


 * Awesome, thank you for the quick fix Yaron! Problem solved with the latest fix. Much appreciated! --Albert Ke (talk) 14:46, 5 January 2018 (UTC)

Multi Instance Forms Within Form Not Working
I had updated PageForms the other day via git and didn't notice any issues, but I was reported that the buttons to create a multi instance form do not bring up the form. If an instance already exists it shows up but can't add. I updated to mediawiki 1.30 just in case it was a version mismatch issue and the problem persists. Page with the Form, the Form --Cody3647 (talk) 22:42, 12 January 2018 (UTC)


 * The fact that this is a public wiki makes debugging a lot easier. Clearly this is a JavaScript problem. Your form appears to have two JS errors, either of which may be blocking the "Add another" button from working:
 * The problem described here, with WikiEditor
 * The importScript calls not working in MediaWiki:Common.js


 * I would try removing "editor=wikieditor" from the form, and if that doesn't fix the problem, simplifying MediaWiki:Common.js. If neither of those fixes the problem, let me know. Yaron Koren (talk) 23:29, 12 January 2018 (UTC)


 * Removing the wikieditor worked, though I do like having it. And I fixed the other error as well. --Cody3647 (talk) 01:10, 13 January 2018 (UTC)

input type "tokens" no longer working
After the update to 4.2.1 the input type tokens is no longer working on a MW 1.27.4. After rolling back to 4.2.0 things a fine again. --&#91;&#91;kgh&#93;&#93; (talk) 20:51, 24 January 2018 (UTC)


 * I'm guessing that this is actually an unrelated JavaScript error. If you look in the browser console, do you see any error messages? Yaron Koren (talk) 22:03, 24 January 2018 (UTC)


 * Just had a look at console:

Exception in module-execute in module ext.pageforms.main: load.php:178:411 TypeError: func is undefined TypeError: func is undefined getFunctionFromName@https://example.org/w/load.php?debug=false&lang=en&modules=ext.Lingo.Scripts%7Cext.echo.api%2Cinit%7Cext.headertabs%2Cpageforms%7Cext.headertabs.large%7Cext.pageforms.autogrow%2Cbrowser%2Ccheckboxes%2Cdatepicker%2Cdynatree%2Cfancybox%2Cimagepreview%2Cmain%2Crating%2Cselect2%2Csimpleupload%2Csubmit%2Cwikieditor%7Cext.scite.tooltip%7Cjquery.async%2CbyteLength%2CcheckboxShiftClick%2Ccookie%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%2CtextSelection%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CTitle%2CUpload%2CUri%2Capi%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Ctemplate%2Cuser%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%2Cconfig%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.api.edit%2Cmessages%2Cparse%2Cupload%2Cuser%2Cwatch%7Cmediawiki.language.data%2Cinit%2CspecialCharacters%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategorySelector%2CDateInputWidget%2CStashedFileWidget%7Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cutil%7Coojs-ui-core.styles%7Coojs-ui.styles.icons%2Cicons-content%2Cicons-editing-advanced%2Cindicators%2Ctextures%7Cskins.foreground.js%2Cmodernizr%7Cuser.defaults&skin=foreground&version=f6f4492ae581:128:439 @https://example.org/w/load.php?debug=false&lang=en&modules=ext.Lingo.Scripts%7Cext.echo.api%2Cinit%7Cext.headertabs%2Cpageforms%7Cext.headertabs.large%7Cext.pageforms.autogrow%2Cbrowser%2Ccheckboxes%2Cdatepicker%2Cdynatree%2Cfancybox%2Cimagepreview%2Cmain%2Crating%2Cselect2%2Csimpleupload%2Csubmit%2Cwikieditor%7Cext.scite.tooltip%7Cjquery.async%2CbyteLength%2CcheckboxShiftClick%2Ccookie%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%2CtextSelection%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CTitle%2CUpload%2CUri%2Capi%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Ctemplate%2Cuser%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%2Cconfig%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.api.edit%2Cmessages%2Cparse%2Cupload%2Cuser%2Cwatch%7Cmediawiki.language.data%2Cinit%2CspecialCharacters%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategorySelector%2CDateInputWidget%2CStashedFileWidget%7Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cutil%7Coojs-ui-core.styles%7Coojs-ui.styles.icons%2Cicons-content%2Cicons-editing-advanced%2Cindicators%2Ctextures%7Cskins.foreground.js%2Cmodernizr%7Cuser.defaults&skin=foreground&version=f6f4492ae581:128:765 fire@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:45:104 add@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:45:656 jQuery.fn.ready@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:49:40 @https://example.org/w/load.php?debug=false&lang=en&modules=ext.Lingo.Scripts%7Cext.echo.api%2Cinit%7Cext.headertabs%2Cpageforms%7Cext.headertabs.large%7Cext.pageforms.autogrow%2Cbrowser%2Ccheckboxes%2Cdatepicker%2Cdynatree%2Cfancybox%2Cimagepreview%2Cmain%2Crating%2Cselect2%2Csimpleupload%2Csubmit%2Cwikieditor%7Cext.scite.tooltip%7Cjquery.async%2CbyteLength%2CcheckboxShiftClick%2Ccookie%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%2CtextSelection%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CTitle%2CUpload%2CUri%2Capi%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Ctemplate%2Cuser%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%2Cconfig%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.api.edit%2Cmessages%2Cparse%2Cupload%2Cuser%2Cwatch%7Cmediawiki.language.data%2Cinit%2CspecialCharacters%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategorySelector%2CDateInputWidget%2CStashedFileWidget%7Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cutil%7Coojs-ui-core.styles%7Coojs-ui.styles.icons%2Cicons-content%2Cicons-editing-advanced%2Cindicators%2Ctextures%7Cskins.foreground.js%2Cmodernizr%7Cuser.defaults&skin=foreground&version=f6f4492ae581:128:238 @https://example.org/w/load.php?debug=false&lang=en&modules=ext.Lingo.Scripts%7Cext.echo.api%2Cinit%7Cext.headertabs%2Cpageforms%7Cext.headertabs.large%7Cext.pageforms.autogrow%2Cbrowser%2Ccheckboxes%2Cdatepicker%2Cdynatree%2Cfancybox%2Cimagepreview%2Cmain%2Crating%2Cselect2%2Csimpleupload%2Csubmit%2Cwikieditor%7Cext.scite.tooltip%7Cjquery.async%2CbyteLength%2CcheckboxShiftClick%2Ccookie%2CgetAttrs%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%2CtextSelection%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CTitle%2CUpload%2CUri%2Capi%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Ctemplate%2Cuser%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%2Cconfig%7Cmediawiki.Upload.BookletLayout%2CDialog%7Cmediawiki.api.edit%2Cmessages%2Cparse%2Cupload%2Cuser%2Cwatch%7Cmediawiki.language.data%2Cinit%2CspecialCharacters%7Cmediawiki.libs.jpegmeta%2Cpluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.regexp%7Cmediawiki.widgets.CategorySelector%2CDateInputWidget%2CStashedFileWidget%7Cmoment%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cutil%7Coojs-ui-core.styles%7Coojs-ui.styles.icons%2Cicons-content%2Cicons-editing-advanced%2Cindicators%2Ctextures%7Cskins.foreground.js%2Cmodernizr%7Cuser.defaults&skin=foreground&version=f6f4492ae581:100:104 runScript/<@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:163:74 fire@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:45:104 add@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:45:656 always@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:46:865 runScript@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:162:944 checkCssHandles@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:163:774 cssHandle/<@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:163:904 fire@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:45:104 fireWith@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:46:431 fire@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:46:474 fireCallbacks@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:157:607 addEmbeddedCSS@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:158:681 addEmbeddedCSS/cssBufferTimer<@https://example.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=foreground&version=HCxTBC9n:157:832 load.php:178:449
 * Stack trace:

I hope this helps debugging. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 22:21, 24 January 2018 (UTC)

About "formredlink"_parser_function
This is still happening in 4.2.0 and 4.2.1 which is a pretty big issue since I have to remove superflous content from many pages. I am using the following syntax to create the page:

On the glossary page created not only the  template gets added but also the whole content of the originating page. Sometimes I have up to 6 edits creating the missing page. In the following example I got 3 edits:

2018-01-24 22:07:55 SMW\FulltextSearchTableUpdateJob Glossary:Plexus slot:id=dermosco_mw378-mwyv_:smw:diff:284fb9a5c27f200720efe2f46f36980f requestId=WmkDpCU87d0AALiveukAAAAP (id=32921,timestamp=20180124220737) STARTING 2018-01-24 22:07:55 SMW\FulltextSearchTableUpdateJob Glossary:Plexus slot:id=dermosco_mw378-mwyv_:smw:diff:284fb9a5c27f200720efe2f46f36980f requestId=WmkDpCU87d0AALiveukAAAAP (id=32921,timestamp=20180124220737) t=84 good 2018-01-24 22:07:55 htmlCacheUpdate Philosopy_of_Dermoscopedia table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=72a4525c6a67e807fa435b7a9c51613d02bdf118 rootJobTimestamp=20180124220734 requestId=WmkDpCU87d0AALiveukAAAAP (id=32914,timestamp=20180124220734) STARTING 2018-01-24 22:07:55 htmlCacheUpdate Philosopy_of_Dermoscopedia table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=72a4525c6a67e807fa435b7a9c51613d02bdf118 rootJobTimestamp=20180124220734 requestId=WmkDpCU87d0AALiveukAAAAP (id=32914,timestamp=20180124220734) t=2 good 2018-01-24 22:07:55 SMW\ParserCachePurgeJob Glossary:Plexus idlist=[70348,31] requestId=WmkDpCU87d0AALiveukAAAAP (id=32923,timestamp=20180124220737) STARTING 2018-01-24 22:07:55 SMW\ParserCachePurgeJob Glossary:Plexus idlist=[70348,31] requestId=WmkDpCU87d0AALiveukAAAAP (id=32923,timestamp=20180124220737) t=18 good 2018-01-24 22:07:55 htmlCacheUpdate Glossary:Plexus table=pagelinks recursive=1 rootJobIsSelf=1 rootJobSignature=6412e9bfe867c39e9721b6311cb5fbfef0f4f4cd rootJobTimestamp=20180124220737 requestId=WmkDpCU87d0AALiveukAAAAP (id=32922,timestamp=20180124220737) STARTING 2018-01-24 22:07:55 htmlCacheUpdate Glossary:Plexus table=pagelinks recursive=1 rootJobIsSelf=1 rootJobSignature=6412e9bfe867c39e9721b6311cb5fbfef0f4f4cd rootJobTimestamp=20180124220737 requestId=WmkDpCU87d0AALiveukAAAAP (id=32922,timestamp=20180124220737) t=1 good 2018-01-24 22:07:55 SMW\ParserCachePurgeJob Glossary:Plexus idlist=array(32) requestId=WmkDpCU87d0AALiveukAAAAP (id=32920,timestamp=20180124220737) STARTING 2018-01-24 22:07:55 SMW\ParserCachePurgeJob Glossary:Plexus idlist=array(32) requestId=WmkDpCU87d0AALiveukAAAAP (id=32920,timestamp=20180124220737) t=375 good 2018-01-24 22:07:55 createPage Glossary:Plexus user_id=8 page_text= requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32916,timestamp=20180124220736) STARTING 2018-01-24 22:07:56 createPage Glossary:Plexus user_id=8 page_text= requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32916,timestamp=20180124220736) t=403 good 2018-01-24 22:07:56 createPage Glossary:Plexus user_id=8 page_text=string(2063) requestId=WmkDpCU87d0AALiveukAAAAP (id=32915,timestamp=20180124220735) STARTING 2018-01-24 22:07:56 createPage Glossary:Plexus user_id=8 page_text=string(2063) requestId=WmkDpCU87d0AALiveukAAAAP (id=32915,timestamp=20180124220735) t=349 good 2018-01-24 22:07:56 EchoNotificationDeleteJob Glossary:Main_Page userIds={"4":4} requestId=WmkDpCU87d0AALiveukAAAAP (id=32918,timestamp=20180124220737) STARTING 2018-01-24 22:07:56 EchoNotificationDeleteJob Glossary:Main_Page userIds={"4":4} requestId=WmkDpCU87d0AALiveukAAAAP (id=32918,timestamp=20180124220737) t=4 good 2018-01-24 22:07:56 EchoNotificationDeleteJob Main_Page userIds={"1":1} requestId=WmkDpCU87d0AALiveukAAAAP (id=32917,timestamp=20180124220737) STARTING 2018-01-24 22:07:56 EchoNotificationDeleteJob Main_Page userIds={"1":1} requestId=WmkDpCU87d0AALiveukAAAAP (id=32917,timestamp=20180124220737) t=3 good 2018-01-24 22:07:56 recentChangesUpdate Special:RecentChanges type=cacheUpdate requestId=WmkDpCU87d0AALiveukAAAAP (id=32912,timestamp=20180124220734) STARTING 2018-01-24 22:07:56 recentChangesUpdate Special:RecentChanges type=cacheUpdate requestId=WmkDpCU87d0AALiveukAAAAP (id=32912,timestamp=20180124220734) t=8 good 2018-01-24 22:07:56 htmlCacheUpdate Glossary:Plexus table=templatelinks recursive=1 rootJobIsSelf=1 rootJobSignature=aa9f6358d1b69664c494107ce0e4e37378d32811 rootJobTimestamp=20180124220756 requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32924,timestamp=20180124220756) STARTING 2018-01-24 22:07:56 htmlCacheUpdate Glossary:Plexus table=templatelinks recursive=1 rootJobIsSelf=1 rootJobSignature=aa9f6358d1b69664c494107ce0e4e37378d32811 rootJobTimestamp=20180124220756 requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32924,timestamp=20180124220756) t=0 good 2018-01-24 22:07:56 EchoNotificationDeleteJob Glossary:Index userIds={"4":4} requestId=WmkDpCU87d0AALiveukAAAAP (id=32919,timestamp=20180124220737) STARTING 2018-01-24 22:07:56 EchoNotificationDeleteJob Glossary:Index userIds={"4":4} requestId=WmkDpCU87d0AALiveukAAAAP (id=32919,timestamp=20180124220737) t=0 good 2018-01-24 22:07:56 htmlCacheUpdate Glossary:Plexus table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=e2993cc4660e5b3ca1a28d4af54b235b5ea28e56 rootJobTimestamp=20180124220756 requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32925,timestamp=20180124220756) STARTING 2018-01-24 22:07:56 htmlCacheUpdate Glossary:Plexus table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=e2993cc4660e5b3ca1a28d4af54b235b5ea28e56 rootJobTimestamp=20180124220756 requestId=WmkDpyU87d0AABPX2-wAAAAA (id=32925,timestamp=20180124220756) t=1 good
 * Jobs executed

N b 00:07  	Plexus‎‎ (3 changes | history). . (+2,040)‎ . . [AutoCreateBot‎ (3×)] b  	00:07 (cur | prev). . (+2,024)‎ . . AutoCreateBot (talk | contribs | block) b  	00:07 (cur | prev). . (-2,024)‎ . . AutoCreateBot (talk | contribs | block) N b  	00:07 (cur | prev). . (+2,040)‎ . . AutoCreateBot (talk | contribs | block)
 * Respective revision history

Cheers --&#91;&#91;kgh&#93;&#93; (talk) 22:16, 24 January 2018 (UTC)