Extension talk:Page Forms

Is there anyway to use this extension with another. If I wanted to use lets say.. the imagemap extension for an input instead of the input types that I can use with the semantic forms already? --198.70.22.217 19:58, 29 May 2007 (UTC)


 * I don't really understand how that would work. The imagemap extension, as far I know, just arranges links within an image; it doesn't allow for data input. Yaron Koren 00:05, 30 May 2007 (UTC)

You are right, that is a bad example. More along the lines of a flash video extension or something like that. More importantly, just any extension that requires some sort of input. --72.21.245.86 12:44, 30 May 2007 (UTC)


 * There would be no automatic way to combine the extensions, no; but if someone wanted to write code for data entry in Flash (or, say, AJAX), I'd certainly look into combining the two in some way, because that would be a neat feature. Yaron Koren 14:43, 1 June 2007 (UTC)


 * To continue this discussion a little, is it not possible to be able to use wikitext in any of the input types?? Would that be difficult to implement? --75.107.9.104 02:24, 29 July 2007 (UTC)


 * It's a possible enhancement. Yaron Koren 16:46, 30 July 2007 (UTC)


 * I think this would be a wonderful enhancement!!! I think what you have done already is just specatular, but something like this would make me feel like a little boy getting a puppy for the first time!!!--198.70.22.217 17:25, 30 July 2007 (UTC)


 * Yea, I need to be able to use wiki markup text in forms instead of HTML (linking to same-wiki links is annoying using HTML, for example, when it would be much easier with wiki markup). —Eep² 03:49, 15 August 2007 (UTC)


 * You can use wiki markup in the freetext area, can't you?--Robert Buzink 13:53, 3 September 2007 (UTC)


 * Sure, but I need the wiki markup in the form titles to provide links to what they mean (or javascript/CSS popups). Having to write out URLs for local (and/or interwiki) links to wiki pages is ridiculous. —Eep² 02:20, 4 September 2007 (UTC)

Help Help
I'm new to the Wikipedia extensions. I tried installing this extension along with the recommended Semantic Wiki as had been instructed. Copied all files and included the statements as instructed into the LocalSettings.php file. But...I'm getting two errors that I'm not sure how to resolve.

I get the following error when I try to create a new template: Fatal error: Class 'SMWInlineQuery' not found in /wiki/extensions/SemanticForms/includes/SF_GlobalFunctions.php on line 161

I also get this error a couple of times if I tried to incorporate a template as part of the form: Fatal error: Cannot access protected property SMW_LanguageEn::$smwDatatypeLabels in /wiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 704

I am using the following: * MediaWiki: 1.10.1 * PHP: 5.2.3 (apache2handler) * MySQL: 4.0.18-log

Any help on this would be greatly appreciated. Thanks.


 * It sounds like you don't have Semantic MediaWiki installed; is that possible? Yaron Koren 14:16, 7 August 2007 (UTC)


 * I did install it. I tried running a very simple test with a couple of relations, and it looks like it's picking them up properly.  Is there any way to tell for sure whether it was properly installed or not?


 * If you're still having this problem, please contact me directly; this talk page is a very inefficient way of communicating. In general, that goes for everyone: if you have a question or a problem running this extension, you're better off emailing me directly, or joining the mailing list and posting the problem there. Yaron Koren 05:16, 13 August 2007 (UTC)

Creating a SemanticForm and using tags
Hi guys hope you can help. If I can get this working, this will be a MAJOR thing for us :>)

Example: Lets say I have an extension called NewTaskTag, which lets you insert a  into a wiki page, then you manually insert parameters as follows..

 Task = This task completed at.. Time = 6pm Priority = Severe Updated by =   Task = Time = Priority = Updated by = 

The extension then renders the html into a table like format.

Because this is a manual job, I wanted to make it easier to do this.

So, Ive installed Semantic Mediawiki along with SemanticForms.

These are great, but I wanted to know if you could use a form to do the above instead of using the normal edit option with Mediawiki.

The problem I see is how will the form know how to interpret and pass the entered bits/eg. the fields to the extension, and how would you say, in a form, place a filed to say to use ?

To further clarify what Im trying to say is the following.

If I want to use the  in a wiki page, I just go to a new page, click on Edit, and enter the following:

 Task = Time = Priority = Updated by =   Task = Time = Priority = Updated by = 

I then complete each line, eg.Task = This new task, Time = 6pm, etc etc.

What Id like to do is the following:

Create a new form that has this format:

Task: [___ Text Box for Task entry___] Time: [___ Text Box for Time entry___] Priority: [___ Text Box for Priority entry___] Updated By: [___ Text Box for Updated By entry___]

All the user would have to do is then input in the text boxes the required data, then the  would do the rest. The questions I have though are:

1)How would the form know that each text box is actually in the format: Task = to proper wiki tables.


 * The reason you need to do all these re-saves is because of an SMW bug (which can be fixed) - it's in the SF documentation now, under "Semantic Forms issues". Yaron Koren 23:25, 24 January 2008 (UTC)


 * I got the above error when upgrading from SMW .7 although I was upgrading to SMW Version 1.0.1, the latest version. Perhaps this should be noted in the documentation. --Tosfos 01:50, 31 March 2008 (UTC)
 * Got it again with SMW 1.1.1 --Tosfos 03:31, 12 June 2008 (UTC)

Adding Namespaces
I would like to add some namespaces to our wiki after having installed "semantic wiki" and "semantic forms". Now I am not sure which ones I can use. In the "LocalSetting.php" I put $sfgNamespaceIndex = 150. Does that mean that I can continoue with the namespace 152 ? My best, --Gollum 12:23, 26 January 2008 (UTC)


 * Yeah, you can use a lot of namespace numbers, but 152 should work fine. Yaron Koren 02:58, 28 January 2008 (UTC)

strange Characters show up on german sematic wikis
Having installed semantic forms on a german wiki (http://wiki-products.org) there are some problems with displaying some of the page titles. E.g. in special pages it says: "&lt;createcategory&gt;" instead of "Erstelle eine Kategorie". Also the form page itself (in the second step) (http://de.wiki-products.org/Formular:Fahrzeuge) shows a strange title e.g. "&lt;sf_adddata_title&gt;" instead of "Füge Seite hinzu:Audi A4 TDI". Is there anything I cn do about this? Everything else seems to be working fine. Keep up the good work! My best, --Gollum 12:48, 26 January 2008 (UTC)


 * Hi, congratulations on releasing your wiki. What you're seeing are some language values that weren't translated. It looks like you're using an old version of SF; if you upgrade to the latest version, those problems should go away. You should probably upgrade to the latest version of SMW while you're at it. Yaron Koren 16:27, 27 January 2008 (UTC)


 * Perfect, that worked! Thank you very much!! --Gollum 08:17, 8 February 2008 (UTC)

Upgraded from Sematic 1.0-RC3 to 1.0 and Edit with Form has disappeared
I had a completely working system running Mediawiki 1.11, PHP 5.2.5, MySQL 5.45a, Semantic wiki 1.0-RC3 and Sematic Forms 0.9.2. I upgraded Semantic wiki to 1.0 and followed the upgrade procedure carefully. Now the "Edit with Form" tab has disappeared from all my templated forms. I have the categories set correctly with Has default form::Form: Any help greatly appreciated. Fixed Sematic wiki has an upgrade script SMW_refreshData.php. Naturally I ran this after installing sematic 1.0. However, I did not run it after I upgraded Forms to 0.9.2. I ran the script again and the "Edit with Form" tab appeared again.

Errors showing after Edit with Form save
I'm running Mediawiki 1.11, PHP 5.2.5, MySQL 5.45a, Semantic wiki 1.0 and Sematic Forms 0.9.2. After clicking "Save Page" on the Edit with Form page, the following 4 notices are shown at the top of the page: Notice: Undefined offset: 0 in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 465 Notice: Undefined offset: 1 in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 465 Notice: Undefined offset: 0 in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 465 Notice: Undefined offset: 1 in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 465


 * That problem should be gone in version 0.9.3 (just released). Yaron Koren 00:04, 5 February 2008 (UTC)

Fast work! Thanks Yoran :) However I'm now getting the following error: Notice: Undefined index: free text in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.in on line 456 Of course, it's only on forms that have the default free text section at the bottom.

I'm also getting the following errors when adding data with my forms: Notice: Undefined index: Title in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: Status in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: Owner in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: EM in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: Progress in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: PTS in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: Dependencies in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

Notice: Undefined index: Background, Description and Business Rationale in /var/www/mediawiki/extensions/SemanticForms/includes/SF_FormPrinter.inc on line 456

There is one error for each property within the form. All forms are throwing similar errors.


 * Yikes! Apparently I hadn't fixed things fully for sites with PHP in debug mode. I fixed it now, so if you re-get the latest version, it should work fine (let me know if it doesn't). Also, my name's Yaron. Yaron Koren 16:50, 5 February 2008 (UTC)

Fantastic. That's fixed it Yaron. Great job. Sorry about getting your name wrong. I had some sort of vowel dyslexia going on there!


 * Cool, I'm glad it worked. Yaron Koren 18:39, 8 February 2008 (UTC)

drop down menue does not appear
I really like the way this form creates drop-down menues with properties that allowa only a limited range of values. It worked perfect in one case (Form for cars), but did not work in the second case (Form for Handys). I really looked carefully for any differences in the way it set up the two, but could not find any. Are there probably some less obvious reasons for this? --Gollum 21:31, 8 February 2008 (UTC)


 * Hi, which field(s) are supposed to have a dropdown? Also, it's generally better to use the mailing list for questions like this than this talk page. Yaron Koren 22:35, 8 February 2008 (UTC)

It's the "nichtmehrproduziert" field. (Sorry for posting here, I will use the mailing list in the future...) My best, --Gollum 04:38, 9 February 2008 (UTC)


 * Hi, you've discovered a bug in SF; the first line of your "Handys" template is just a little too complex for SF to parse correctly. It reads:




 * If you change it to the following, it should work:




 * Eventually, SF's parsing will need to be improved. Yaron Koren 14:51, 10 February 2008 (UTC)


 * Hi Yaron, Thank you very much. This helped a lot. I fould a nice workaround for this issue and I think now everything works just fine. My best, --Gollum 19:55, 11 February 2008 (UTC)

more flexibility with autocomplete ?
Hi Yaron,

thanks for the good work on SF!

Is it possible to use non-page-type values for auto completion? As far as I understand you either have to specify a namespace or a category and the auto completion is based on a search in the 'pages' table of the wikiDB. Is there an option to check against the set of 'so-far-used' values for a property (regardless of its type)? Is it possible to have a user template exit for the auto completion feature (something like 'autocomplete by template')? The template would receive the characters typed in so far and it would return the list of suggestions, maybe as a comma separated list of values?


 * Algorithmix 17:39, 22 February 2008 (UTC)


 * Hi, thanks. The first question isn't a bad idea; there's no reason why string properties shouldn't be allowed to have autocompletion. You could have a parameter in the field definition called "autocomplete on property" or even just "autocomplete", to indicate that this field should have autocompletion even though it's not a page-type property. Or maybe that should even be the default... The second question I don't understand - are you talking about a template to let you format the results of an autocompletion, so that, for instance, you could have an image show up alongside every result? Yaron Koren 20:51, 22 February 2008 (UTC)

Problem with "edit with form" when using "Allow for multiple (or zero) instances" check box for templates
I first want to compliment you on a great extension.

The problem that I have is when I try to edit a form with multiples of the same template. I have created a form that has a template called "distribution". When I created the form, I selected the zero or multiple checkbox for the template. When I go and create the form for the first time, I can add multiple "distribution" templates and edit the form just fine. However, when I go back and edit the form later to add another "distribution" template, it overwrites the first "distribution" template and the rest of the templates remain intact. Is this operator error, a problem with how I created the form, or is it how the "edit with form" saves the page? Has anyone seen this before.

I am using mediawiki 1.11.1 and SF 0.9.5 and Semantic Mediawiki 1.0.1


 * Hi, thank you. Sorry, I don't understand your question - you edited the form to have two multiple templates, both with the name "distribution"? If so, you shouldn't do that - it'll confuse the parser. Though maybe I just didn't understand. Yaron Koren 04:08, 24 February 2008 (UTC)

Yaron, I think I may know what's going on here. When I use a for template construct such as ...

tag:

the entry of multiple templates works OK the first time, however when I re-edit the form and add a few more templates the first templates get replaced with the added data when it should be adding it to the end of the collection of templates. It seems to be related to the num_elements global variable starting counting from 0 and [num] being replaced with the global value. The changes below fixes the addInstance function for this addition --Ian Homer 20:24, 26 February 2008 (UTC)

function addInstance(starter_div_id, main_div_id, tab_index, last_instance_num) { if (!last_instance_num) var last_instance_num=0; .... children[x].name = children[x].name.replace(/\[num\]/g, '[' + (num_elements + last_instance_num) + ']');

and with passing of the instance number in to the addInstance call:



It seems to work even when there are two "for template" loops (with different template names) in the form even though the num_elements variable is global.


 * Okay, now I know what the issue is. As noted today on the mailing list, this is a bug that I accidentally introduced a few weeks ago, in version 0.9.2. It'll be fixed in the next version, coming soon; there's actually an easier fix than this one. Yaron Koren 03:42, 27 February 2008 (UTC)


 * This bug is a very serious problem for me - it has disrupted some mission-critical operations in my student government. Will a fix be available soon?  Do you recommend the hack listed above until then?


 * I can't tell you how much we at SUNY New Paltz appreciate your amazing work. This extension is the best thing to happen to campus activism since the cell phone.  Thank you very much. RadicalHarmony 03:20, 28 February 2008 (UTC)


 * Wow, gosh, thanks. It's funny how I usually get compliments only in the midst of bug reports - you all are subconsciously encouraging me to keep introducing bugs. :) In any case, this problem should have been fixed in the latest version, 0.9.7, released earlier today. Try upgrading to that one and see if it works. Yaron Koren 04:28, 28 February 2008 (UTC)


 * Heh, I imagine that it's simply an effort to avoid appearing ungrateful when bitching about free (and amazing) software. If you are interested in how your extension is helping to foster the revolution, please check out www.wikipaltz.com.  We are using semantic forms for more and more of our functionality, and we now use it to track every single piece of legislation in our student senate.  RadicalHarmony 00:27, 7 March 2008 (UTC)


 * Cool, that's a very interesting usage. I'm glad I can help to foster some grassroots democracy, and I hope your revolution's a peaceful one. :) Yaron Koren 03:29, 7 March 2008 (UTC)

Crash when adding data to a form
I've upgraded from 0.9.3 to 0.9.7 and now one of my forms has died. When I click the Add or edit button I get: Fatal error: Call to a member function getNamespace on a non-object in /var/www/mediawiki/includes/Article.php on line 160 In the httpd log I see: [Fri Feb 29 14:37:24 2008] [error] [client 127.0.0.1] PHP Fatal error: Call to a member function getNamespace on a non-object in /var/www/mediawiki/includes/Article.php on line 160, referer: http://localhost/mediawiki/index.php/Special:AddPage/PREQ

I have a number of forms and only one of them is doing this.

Here's the the template and form:

Template

This is the 'PREQ' template. It should be called in the following format:

Edit the page to see the template text.

Form

This is the 'PREQ' form. To add a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page.

Free text

Any help greatly appreciated!


 * Hi, can you try removing one field at a time from the form, and seeing at what point the form starts working again? My guess is that it's one field in the form, through some combination of what's in the form definition, what's in the template, and the semantic property it covers, that's causing this error. Please let me know what you find. Yaron Koren 16:44, 29 February 2008 (UTC)

Thanks for replying. So far I have removed every field in the form except the first one and it still crashes. I guess it must be the template. I'll now edit that. Update- Hmm. Deleted all but the first field in the template. Then created a whole new form from that template and it still crashes. Totally baffled now. Going to try recreating the template from scratch. Okay. created both template and form from scratch and get the same error. Also, when I created the form I got the following errors: [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm [Mon Mar 03 09:40:44 2008] [error] [client 10.23.132.14] PHP Notice: Undefined variable: text in C:\\www\\webapps\\mediawiki\\extensions\\SemanticForms\\includes\\SF_FormClasses.inc on line 452, referer: http://l063193/mediawiki/index.php/Special:CreateForm

Okay. The main problem is caused by a clash with the glossary extension http://www.mediawiki.org/wiki/Extension:Glossary PREQ was a term in the glossary. I deleted the glossary term. Not giving up Semantic Forms! :)


 * Hi, good detective work there. Okay, so you figured out the problem. One easy solution is to just rename the template and field named "PREQ" to anything else - users never see either name, so it won't affect the display. Then you can restore that glossary term. Also, that set of "PHP Notice" errors you saw is not related to this problem, but thanks for including it - I'll fix it in the code. Yaron Koren 14:15, 3 March 2008 (UTC)

Populating input type=listbox
So I've got a listbox and it corresponds to property that has a finite list of allowed values. How do I get the listbox to be populated with those values? —Sledged (talk) 19:34, 29 February 2008 (UTC)


 * That should happen automatically... feel free to send me the form and template source, if it's not a public wiki. Yaron Koren 20:44, 29 February 2008 (UTC)


 * Thanks. Fortunately, I was able to figure out the problem, but now I have another question.  My finite list of values are links.  Example:

* Page]]


 * This shows up in the listbox as wiki syntax ( Page </tt>). Is there any way to have to have the displayed text different from the underlying value? —Sledged (talk) 20:58, 29 February 2008 (UTC)


 * Yeah, you should have the tag instead be Page . Yaron Koren 21:41, 29 February 2008 (UTC)


 * That gives me  Namespace:Page </tt> displayed in the list box and the same thing for the wikitext in the created/edited page. What I want the listbox to display is Page</tt>, and produce the wiki-markup  Page </tt> in the created/edited page.
 * I've also tried [ [Allows value:=Page|[ [Namespace:Page|Page]]]]</tt> and Page|Page]]</tt>, neither of which gives me the results for which I'm looking. —Sledged (talk) 21:59, 29 February 2008 (UTC)


 * Oh, I see. I think you're confusing properties and templates; I think what you want is Allows value:=Page in the property page, and Some property:=Namespace: in the template. Yaron Koren 22:20, 29 February 2008 (UTC)


 * Not quite. That would assume that the local name of the page to which I'm linking is the same as the text I want displayed, which is not the case for all of the values.  My mistake for using such an example.
 * Right now, no matter what I do, the value attribute is the same as the text nested in the option tag, like so:

<option value="Article">Article <option value="Foo:Bar">Foo:Bar <option value="Hello World!">Hello World!


 * I want the nested option tag text to be different than the text in the value attribute, so I want the underlying HTML to be produced as

<option value="Article">Article


 * or

<option value="Follow Me!">Page


 * or even (if I were so inclined)

<option value="Foo">World!


 * The page name, the dislayed link text, and the displayed option text are not guaranteed to be related in any form or fashion. —Sledged (talk) 23:51, 29 February 2008 (UTC)

Ah, okay, sorry for the misunderstanding. Well, unfortunately, there's no way to have the display value for an option be different from its value; such a thing might eventually be implemented, using something like the format you tried initially, but for right now I think it's impossible, alas. Yaron Koren 00:24, 1 March 2008 (UTC)

subst:</tt>
So  </tt> inserts a template into a page:

How do I get the form to preform substitution?

—Sledged (talk) 17:44, 1 March 2008 (UTC)


 * In general, the mailing list is better for these kinds of questions. But my question is, why would you want to use "subst:"? It means you can no longer edit that template through the form. Yaron Koren 14:46, 2 March 2008 (UTC)


 * Mostly due to the headers in templates problem, and I don't necessarily want to place " " in every page.  Ideally, you'd always use the form to edit a page, but realistically, there's always exceptions.  I'll direct semi-related comments and questions to the mailing list.  Thanks.  —Sledged (talk) 20:59, 2 March 2008 (UTC)

using 'multiple'
Hi, Compliments and thanks for this great extension.

I have a problem in inserting a 'multiple' set of fields in my form. Here is the code I insert in the categoryExperiment:form page

Category :

Here is the code in the template:FormCategoryMore page This is the 'formCategory' template. It should be called in the following format:

Edit the page to see the template text.


 * when I go to the page presenting the form I get the 'add another' button and clicking it I can insert my values.
 * when I click on save everything looks fine.
 * But in the final generated page there is nothing; The extension hasn't generated a single template call.

I have: MediaWiki: 1.11.0, Semantic Forms (version 0.9.7) and Semantic MediaWiki (version 1.0.1)

Please help me, I tried many things, but none seemed to work. All the other forms work properly and only the multiple thing doesn't

How could I solve this?

thank you,

--DonGiulio 23:52, 6 March 2008 (UTC)


 * Hi, thanks. I just tested this out, and it worked for me. Are you sure that no template calls are being added to the page? Please check the source code and let me know. Yaron Koren 03:26, 7 March 2008 (UTC)


 * Hi, thanks for getting back, I tried to generate a page using the form, I inserted three categories, and pressed save. the resulting page doesn't even get created, and I get the message: There is currently no text in this page, you can search for this page title in other pages or edit this page. when I use the 'multiple' in other forms the pages do get created, containing all the templates except from all the ones from multiple blocks. I think it's also strange that I can see the 'minor edit', 'whatch this page', 'summary' and the other buttons even if I didn't include them in the form. You can see the form at this link. http://www.wikijava.org/index.php?title=Form:CategoryExperiment the login and password to access are Yaron Yaron (first capital). Thank you, --DonGiulio 11:21, 8 March 2008 (UTC)


 * Hi, I can't log in now with that account... feel free to email me with further details. Yaron Koren 16:18, 9 March 2008 (UTC)


 * Hi, thank you for your interest, the issue appears to be solved. (Magically?) I'll give you the details as soon the site will be public. thank you again, --DonGiulio 22:54, 9 March 2008 (UTC)


 * Great, I wish every bug were so easy to fix. :) Yaron Koren 17:30, 10 March 2008 (UTC)

I'm getting some weird errors
I'm getting this on my special pages page:

&lt;adddata&gt; &lt;addpage&gt; &lt;createcategory&gt; &lt;createform&gt; &lt;createproperty&gt; &lt;createtemplate&gt; &lt;editdata&gt; &lt;forms&gt; &lt;templates&gt;

Only, the left and right angle braces are the html equivalent, like &lt and &gt

Also, when I try to create a form or do anything associated with this extension, I get the same thing, such as:

<sf_addpage_noform_docu>

or "&lt;addoreditdata&gt;" as the button name. I don't know why it's doing this, but I can't get it to work. The last issue is that when I do try to create the form, I get a red error message, no matter what I do.

Something like <sf_formerrors_header>

I would like to get this sorted out, because this extension looks awesome.

Thanks in advance.


 * Hi, I'm guessing that this is a language issue. What language do you have set in your user preferences? Yaron Koren 02:11, 19 March 2008 (UTC)


 * I'm using English. I've set that as the default in my Localsettings.php file, and I double checked and it's set in my preferences as English.  Here's an actual screenshot. [[Image:Picture_2_semForms.png]]

--Craig


 * Hm. Nice screenshot. Out of curiosity, what do you have in your file /languages/SF_Messages.php for the value for 'adddata' (should be around line 77)? Yaron Koren 04:03, 20 March 2008 (UTC)


 * Here's what I have, it all looks like it should work to me. And this is in the array being passed to the messages[en] variable right around lines 76-77

'addoreditdata'                     => 'Add or edit', 'adddata'                           => 'Add data', 'sf_adddata_title'                  => 'Add $1: $2', --Craig

Two things: what version of MediaWiki are you using? And are you fairly sure that all of your files in the SF directory are the current versions? Yaron Koren 04:49, 20 March 2008 (UTC)

I'm currently running 1.10.1 and all the files in my sf folder are as of the 18th of March 2008. --Craig


 * Don't know. Do you have SMW installed? If so, what version? Yaron Koren 21:54, 25 March 2008 (UTC)

I installed it the same day, 18th of March, it's version 1.0.1 Xman 22:26, 25 March 2008 (UTC)


 * I have no clue, then. If you want, you can post this problem to the mailing list; someone else might have seen this problem before. Yaron Koren 01:58, 26 March 2008 (UTC)


 * Hi, if you're still reading this, I figured out what the problem was; it should be fixed in the latest version, which is 1.0.3. Yaron Koren 16:33, 15 April 2008 (UTC)


 * I kind of moved to the latest version on another server, and it worked there, so I didn't check back. I'm curious though, was it the parser? Craig 22:42, 30 April 2008 (UTC)

How to use info tag 'page name' attribute?
Hi together,

I have upgraded the semantic forms extension in order to use the new very useful feature "info|page name" because of avoiding different (eventually ambiguous) page names. I just edited the form as follows:

Please, specify the page name:

Free text:

You can see, there is an info tag within includeonly tag before fillig template (for template ...).

That means, the page title should look like that: "Meeting with Ramin at 2008-03-25 (1)". On the top the form placeholder is inserted (within noinclude tags).

The creation of a new page looks like follows:

1. Click at the link http://localhost/mediawiki/index.php?title=Form:Meeting (somewhere in the sidebar)

2. An input field appears. The user has to define the page name, for example "our meeting" (Currently, I understand why this form still appears because there is the form tag above, but I cannot remove it because in this case there would be only a blank page and I don't know how the user could load the form page without specifying the page title before. However, I think this page name defined by the user will be replaced through the values of the automatically generated key that I defined with "page name" attribute).

3. Now the form appears.

4. The user will put some values into the form. (here I can see that the info tag works correctly, because the text "Create a new meeting:..." is displayed).

5. The user sends the values. Now there is a new page "our meeting" and NOT "Meeting with Ramin at 2008-03-25 (1)"

What should I do so that the page name will be created by semantic forms with the specified formula (see 'page name' attribute)?

Thx --Wikifan 12:07, 25 March 2008 (UTC)


 * Hi, instead of sending users to that URL, you should send them to http://localhost/mediawiki/index.php?title=Special:AddData/Meeting . I'll add something to the documentation to make this clearer. Yaron Koren 13:42, 25 March 2008 (UTC)


 * Hi, thx for your comment. It works! But there is a problem with the title because the date value is not a part of the page title. The page title looks like "Meeting with Ramin at (1)". Probably it is ignored due to date format YYYY/MM/DD. There is also a javascript error in the function validate_madatory_field (object missing or something like NullPointerException), but I don't think It is the cause of my date problem:

function validate_mandatory_field(field_id, info_id) { field = document.getElementById(field_id); if (field.value.replace(/\s+/, ) == ) {  //NullPointerException infobox = document.getElementById(info_id); infobox.innerHTML = "Darf nicht leer sein!"; return false; } else { return true; } }

Any idea? Many thanks. --Wikifan 17:18, 25 March 2008 (UTC)


 * You might have found a bug in SF. If you can, please try changing line 642 or so of /includes/SF_FormPrinter.inc from

$generated_page_name = str_ireplace("<$true_input_name>", $cur_value, $generated_page_name); to $generated_page_name = str_ireplace("<$true_input_name>", $cur_value_in_template, $generated_page_name); ...and let me know if that has any effect. Yaron Koren 21:57, 25 March 2008 (UTC)


 * Hi, there are two issues I could recognize:

1. Javascript-Error (independent from the second issue):

I have a field with multiple (two) values rendered as a radiobuttongroup (sorry, my mediawiki is configured as german version, the value "Erlaubt Wert" = "Allows Value"):

Attribute configuration:
 * Erlaubt Wert:=yes
 * Erlaubt Wert:=no

Configuration within the form:

I suppose, there is an incompatibility with the key word (mandatory) and input type = radiobutton.

The SF extensions tries to check the value of the input field 9 ('input_9')

function validate_all { //.... if (! validate_mandatory_field('input_9', 'info_9')) num_errors += 1; //.... }

... but there isn't control with the id 'input_9', because the radiobuttongroup is rendered as follows (without id, the 'yes'-value is already checked):

<input type="radio" tabindex="39" name="Templatename[Fieldname]" value="yes" checked="checked" /> ja <input type="radio" tabindex="39" name="Templatename[Fieldname]" value="no" /> nein

In order to avoid this javascript error following hack has been inserted:

function validate_mandatory_field(field_id, info_id) { field = document.getElementById(field_id); if( field == null ) return true; //<======== HACK if (field.value.replace(/\s+/, ) == ) { infobox = document.getElementById(info_id); infobox.innerHTML = "$blank_error_str"; return false; } else { return true; }	}

2. The second-issue refers the date field.

The date field html representation looks like:

<select tabindex="4" id="input_4_month" name="Templatename[Fieldname][month]" > Januar Februar <option value="03" selected="selected">März April Mai Juni Juli August September Oktober November Dezember <input tabindex="4" id="input_4_day" name="Templatename[Fieldname][day]" type="text" value="26" size="2" /> <input tabindex="4" id="input_4_year" name="Template[Fieldname][year]" type="text" value="2008" size="4" />

I already tried to change the 'page name' attribute in order to reference a "part" of the date value, i.e.:

<Templatename[Fieldname][year]>

but it didn't work. Your patch hasn't any effects, too.

What method does build the page name? I could debug it.

The version of my Semantic Wiki (perhaps necessary for further work):
 * MediaWiki: 1.11.0
 * Semantic MediaWiki (version 1.0-RC1)
 * Semantic Forms (version 1.0.1)

Thx --Wikifan 09:41, 26 March 2008 (UTC)


 * Hi - yeah, to your first issue, there's no point making a radiobutton mandatory; but thanks for the fix. For the second, if you could debug it yourself, that would be ideal. That line I told you to change before is really where everything happens. Yaron Koren 12:52, 26 March 2008 (UTC)


 * Hi, it seems as if there would be many problems with the date field after upgrading from 0.7.2 to 1.0.1. When I load an existing page (that has been created with the same form), the date field value is set on now-value (today).

My field definition is:

--Wikifan 13:24, 26 March 2008 (UTC)


 * Right, that's a separate issue. Yaron Koren 17:48, 26 March 2008 (UTC)


 * Hi, I couldn't solve the issue about ignoring date for page name creating, but I could solve the issue regarding 'date reset' when loading data into the form.

Change the row

old: if ($input_type == 'date' || $input_type == 'datetime' ||                 $input_type == 'datetime with timezone' ||                  ($input_type == '' && $form_field->template_field->field_type == 'Date')) {

to: if ($cur_value == '' && ($input_type == 'date' || $input_type == 'datetime' || $input_type == 'datetime with timezone' || ($input_type == '' && $form_field->template_field->field_type == 'Date'))) {

Currently I don't know if this change could have negative affects. --Wikifan 16:50, 30 March 2008 (UTC)


 * Thanks, I was hoping there'd be simple fix like that. That looks good, and I'll add it to the next version. Yaron Koren 02:25, 31 March 2008 (UTC)

Trouble Preloading Freetext
I've got a "free text" field but when I use the preload option I don't see the preloaded text; any ideas?

Here is my syntax:

And Template:preloadtest just has some random characters


 * Hi, this works for me, so I don't know what the problem is. You're missing a bracket at the beginning, could that be it? Also, what version of SF are you using? Yaron Koren 03:56, 31 March 2008 (UTC)


 * Thanks for the response, I got it to work; there was a syntax error above this code causing the problem.

Erratic template markup
I have a form that will create a page just fine, but if the markup for the page contains a template with undefined parameters, the form breaks upon editing it the next time around. For example, compare the form editing the page to a regular edit. RadicalHarmony 17:06, 9 April 2008 (UTC)


 * Yeah, templates within templates aren't parsed correctly; it's a known bug. Yaron Koren 18:37, 9 April 2008 (UTC)


 * Is there anything I can do to help resolve this issue more quickly? RadicalHarmony 22:03, 9 April 2008 (UTC)


 * Well, you (or someone else) could go into the page-parsing code in /includes/SF_FormPrinter.inc, figure out the necessary changes and send them to me; the problem is the reliance on regular-expression matching, instead of going through the page character by character, which is probably what's needed. Barring that, I hope to have the time to look at it at some point soon; I suppose you or anyone else could contact me privately about funding the development, which would definitely speed up the process. Yaron Koren 16:29, 10 April 2008 (UTC)

Preloading new form name into a field?
Hi Yaron, first of all, thanks for an excellent extension!

I have a form for adding bars to the wiki. If the user adds the bar "Revolver" is there a way I can default load the bar name into a field? E.g. I have a gallery template with the field "image" in it. I'd like the default of that form field to be Revolver.jpg so when the user submits the form that image link is created. I've tried playing around with inserting PAGENAME (with the curly braces) but it just seems to interfere with the functioning of the forms. Thanks man! Rodeoclash 12:37, 25 April 2008 (UTC)


 * Hi, thanks. Unfortunately, I don't think there's any way to do it; you'll have to ask users to enter the page name manually. Although, if they upload the image before they fill out the form, you can have autocompletion on the image name, which should help somewhat. Yaron Koren 13:22, 25 April 2008 (UTC)


 * Ok, thanks for that :) 59.167.71.222 04:28, 26 April 2008 (UTC)

Mandatory textareas lose column width capability
Hi there. I have noticed that when making a form entry mandatory, the cols variables seem to be ignored. For example: Title: correctly makes a textarea of two rows by 50 columns, however, if I change it to: Title: I get a textarea of two rows but 84 columns wide. Any idea why this is?

Thanks Mitchelln 15:02, 25 April 2008 (UTC)


 * Hi, you discovered a bug. I'll fix it for the next version. Thanks. Yaron Koren 14:16, 27 April 2008 (UTC)
 * Great! Thanks Yaron. Mitchelln 10:42, 1st May 2008 (UTC)

Restricted totaly nonsense
The restricted field in the forms is total nonsense when the page can be edited in normal textmode. There should be a possibility to denie normal editing without the formedit beeing denied. DaSch 23:28, 25 April 2008 (UTC)
 * In my case even the viewtab permission does not work. DaSch 23:41, 25 April 2008 (UTC)


 * Hi, 'viewedittab' permissions should work. What calls are you making to set those permissions? Yaron Koren 14:20, 27 April 2008 (UTC)


 * First I tried with Lockdown Extension to make it only for one namespace, that did not work, then I tried $wgGroupPermissions[*]['viewedittab'] = false;</tt> and it did not work. DaSch 20:48, 27 April 2008 (UTC)
 * Okay I think I see where the problem was. I've set the permission before requiering the extension. DaSch 20:56, 27 April 2008 (UTC)
 * And in fact this permission only hides the edittab but does net prevent user to enter the page manualy. So in my opinon there should be another solution. The best solution would be to make a formedit permission. When the edit permission is false but the formedit permission is true the user could edit the page with the form. In fast then protected pages also must have the formedit permission denied. Not easy and not that important, something for later releases I think. And will only work with Lockdown Extension I think. DaSch 21:14, 27 April 2008 (UTC)

Form labels and HeaderTabs don't mix!
If you have label=SomelabelorOther and then use header tabs in a form then the page formatting gets severely messed up. No a biggie, but I just thought you'd like to know! Mitchelln 14:22, 2nd May 2008 (UTC)

Form Link no longer available?
Attemping to build a form using the one step process, however it seems that the formlink parser function no longer works? A quick check the of parser include doesn't seem to have it parsing the page. Thanks, Rodeoclash 06:45, 18 May 2008 (UTC)


 * I think you might be misunderstanding #formlink - it creates a link to a form - it's not meant to be included in the form page. Or did I not understand your question? Yaron Koren 15:21, 18 May 2008 (UTC)


 * Sorry, I should have included an example, see here. The #formlink is not getting parsed at all by the parser. I checked the parser include file in the SemanticForms/includes folder and it does no seem to be setup to handle the #formlink. Rodeoclash 22:04, 18 May 2008 (UTC)


 * Okay, I see. You should upgrade your version of Semantic Forms - you have the one right before #formlink was added. Yaron Koren 00:41, 19 May 2008 (UTC)


 * The most obvious thing to do really when I think about it ;) Thanks Yaron Rodeoclash 10:11, 19 May 2008 (UTC)

autocomplete does not work
Somehow the autocomplete does not work on my page (wecowi.org). I had some strang JavaScript problems in the last days, but I've fixed them all, but the autocomplete still does not work. --DaSch 20:44, 31 May 2008 (UTC)


 * Can you give a URL where I can see this problem, and the name of a field that isn't autocompleting? Yaron Koren 13:24, 1 June 2008 (UTC)


 * 4example here the fields 'Region:' and 'Regierungsform:' are using a page and the Same Attribut is used at other pages. --DaSch 16:26, 1 June 2008 (UTC)
 * I think the resaon is here, this is the created JavaScript that should make the autocomplete. But it's empty. But i don't know why they are empty.

YAHOO.util.Event.addListener(window, 'load', attachAutocompleteToAllDocumentFields); autocompletemappings[4] = 'Lage (Region)'; autocompletestrings['Lage (Region)'] = ''; autocompletemappings[5] = 'Regierungsform'; autocompletestrings['Regierungsform'] = ''; autocompletemappings[6] = 'Hauptstadt'; autocompletestrings['Hauptstadt'] = ''; --DaSch 17:46, 1 June 2008 (UTC)

Well, that's certainly odd. Did this work before? If so, have you made any major changes on the site recently? Did you upgrade your version of SF or anything else? Yaron Koren 02:00, 2 June 2008 (UTC)


 * I've moved my page to an new server, then it did not work, then I made an update to a new version and it still does not work. --DaSch 16:38, 2 June 2008 (UTC)


 * Okay I suggest that there is something with the "function createAutocompleteValuesArray" this creates the input for the

autocompletestrings. So maybe its the reason is that I`m using the SVN Version of SemanticMediaWiki. --DaSch 18:02, 2 June 2008 (UTC)


 * Wow, that's a major bug on my part; thanks for letting me know about this. I just found the problem, which is not a bug in SMW but rather a change in version 1.2 of SF. I'll release a new version soon, but if you (or anyone else) wants to quickly fix the problem, you can just change line 689 of /includes/SF_GlobalFunctions.php to:

Yaron Koren 18:46, 2 June 2008 (UTC)


 * kay no problem, really happy I could help you. Have picked the new Version from SVN and it works. Thanks :). And I thought it was something with my server. Okay very nice, so I think it's a real successful day :) --DaSch 19:20, 2 June 2008 (UTC)


 * Cool. I actually just made another fix that I checked in, to avoid those multiple identical values that you might be seeing in autocompletion, so if you get that fix it should be fully back to normal. Yaron Koren 19:56, 2 June 2008 (UTC)


 * Kay, Genius. Thank you --DaSch 20:32, 2 June 2008 (UTC)
 * Small thing "_" → " " :) --DaSch 22:13, 2 June 2008 (UTC)


 * Sorry, what do you mean? Yaron Koren 16:44, 3 June 2008 (UTC)


 * The Autocomplete Values are given with "_" and not with " ". --DaSch 17:40, 3 June 2008 (UTC)

Okay, wow, I clearly didn't do enough testing. I just checked in a small fix for this problem. Thanks again for the bug report. Yaron Koren 21:27, 3 June 2008 (UTC)
 * no Problem --DaSch 19:06, 4 June 2008 (UTC)


 * I when you want me something specific to test just ask me. One thing I've just seen. The format of dates is in American-Style. Can you plz give an option or somethin for changing this. --DaSch 19:25, 4 June 2008 (UTC)

File upload facility
Hello. This is a fantastic extension. Regarding the file upload facility. I was kind of expecting that once you've uploaded the file and saved the form that the filename would then be clickable to allow the user to open the uploaded content. As it is it just lists the filename. This does not seem particularly useful. Or perhaps I am doing something wrong?

Thanks --Mitchelln 16:47, 3 June 2008 (UTC)


 * You should modify the template to have either a semantic property or something like "[[Image:]]" around the field. Yaron Koren 16:42, 3 June 2008 (UTC)
 * Ah, okay. Got it. That's really great. Thanks for the fast reply. Now for the million dollar question, can you have an arraymap of these? Mitchelln 12:04, 4 June 2008 (UTC)


 * That's hopefully coming in the next version; currently the upload always overwrites whatever's in the field, instead of appending as it sometimes should. Yaron Koren 15:02, 4 June 2008 (UTC)
 * Thanks for the heads up Yaron. That capability would be really useful. Mediawiki's upload functionality is not intuitive for normal users and your functionality addresses this :) Mitchelln 11:54, 5 June 2008 (UTC)
 * File uploading for fields with multiple values has indeed been implemented in version 1.2.3 --Tosfos 20:50, 13 June 2008 (UTC)
 * This is fantastic news. This is the last major feature I needed. Thanks! Here's an example of use (as it took me a while to work it out!):

Where Review Report is a property of type string. Mitchelln 10:01, 16 June 2008 (UTC)]]

Compatibity with Halo Extension
I've just put version 1.1 of the Halo extension on to get the excellent Ontology Browser functionality. Everything initially seemed fine. I can create new pages as normal using Semantic Form's forminput function. However the "Edit with Form" tab has stopped working. Is Semantic Forms compatible with Halo or are you aware of problems Yaron? Many thanks Mitchelln 13:57, 6 June 2008 (UTC)


 * This came up before on the mailing list - see here. It looks like there's a bug in Halo - specifically, the function smwfAnnotateTab in the Halo code returns 'true' at the end when it should return 'false'. Can you change that and see if that fixes the problem?


 * By the way, the mailing list is generally a better place for questions like these. Yaron Koren 18:56, 7 June 2008 (UTC)
 * Thanks for that Yaron. I put SematicForms before Halo in LocalSettings.php and this seemed to fix my problem, but it busts other things. I cannot find the smwfAnnotateTab function to try your fix. Perhaps they have changed this with version 1.1. I have now joined the mailing list :) Mitchelln 11:07, 9 June 2008 (UTC)

Create Property: Language Problem
Hi, I've installed the latest version of Semantic Forms in the following German Mediawiki installation:

http://potsdam-infos.mecopo.de/index.php?title=Spezial:Version

The problem: When I want to create a new Property ("Erstelle eine Eigenschaft") I receive English terms:

http://potsdam-infos.mecopo.de/index.php?title=Spezial:CreateProperty

Instead "Seite" it shows "page" etc.

In other German installations these terms were in German language. See for example:

http://www.wecowi.org/view/Spezial:CreateProperty

Has somebody an idea how I could fix this language problem in the "Create Property" function?

Thanks and my respekt for this in its functionalities marvelous extension, Hajosch, Potsdam/Germany


 * Hi, thanks. Hm, very strange... have you made any unusual changes to your copy of either LocalSettings.php or /includes/DefaultSettings.php? Yaron Koren 12:40, 12 June 2008 (UTC)


 * Der Yaron. Thanks for your quick feedback. No, I have not made any unusal changes in LocalSettings.php or /includes/DefaultSettings.php. I have used a fresh installation of the latest MediaWiki, Version 1.12.0. But the problem occurs also in MediaWiki, version 1.11.2. I have made you a PDF-printout of both files ("X"ing the sensitive data), so that you can have a look at my configuration. Perhaps you will find the cause of thos problem:


 * LocalSettings.php
 * /includes/DefaultSettings.php


 * Thank you,
 * Hajosch


 * That's helpful. In your LocalSettings.php, please try moving the includes for the extensions to the bottom of the file - I suspect that they might have to be placed below the setting of the language code. Yaron Koren 16:21, 12 June 2008 (UTC)


 * Hurrah, Hurrah! That was the solution for the problem. Thanks a lot for your help!
 * Hajosch

Single property in a form is blanked when updating
I've got a form that works pretty well. You fill it out, data gets populated into an infobox and in SMW. When you edit with form, everything is normal except for one property, which is blank each time you go to edit the form regardless of what was there before.

My wiki is here, the property in question is Property:License, and the form is Form:Virtual World. It uses the template Infobox Virtual World. Go to a page like Second Life and you can see that the data for license is there. However, if you edit the form, it is blank.

I created a duplicate property - Property:Licenses- that has the same issue. However, none of my other properties restricted by allows values and populated by arraymap are broken. Thanks for the help! Staeiou 15:24, 12 June 2008 (UTC)


 * Is this still a problem for you? The license fields look fine to me. The "platform" fields seem to not be working, though - I think it's because of the extra spaces in the field. That looks like an SF bug, by the way, but it's fixable on your side. Yaron Koren 16:32, 12 June 2008 (UTC)
 * Whoops, it was the platform field. I don't know why I said it was the license field.  And that fixed the problem.  I don't know why I had spaces in there, but I also wouldn't consider it a bug.  I was telling the property that it should only accept " PC", " Linux", " Mac" and so forth, and was forcing the form to only give the property values "PC", "Linux", "Mac" through.  SF worked perfectly in that case.  Thank you very much! Staeiou 17:59, 12 June 2008 (UTC)


 * Cool. By SF bug, I mean that there's a problem with the #arraymap function's parsing, in that it can't handle whitespaces well - #arraymap is also part of SF. Yaron Koren 18:06, 12 June 2008 (UTC)

arraymaptemplate doesn't do transclusion
On mediawiki 1.12 with Semantic Wiki 1.1.1 and Semantic Forms 1.2.3 arraymaptemplate does not work for me. It does not seem to call into the template. Instead it leaves the text of the template call in the output. As an example:

produces the following output: , ,

With $wgParserConf['class'] = 'Parser_OldPP'; set in my LocalSettings.php it does work, but that breaks other template inclusions in my wiki with div tags that span multiple templates.

Hudson 18:53, 13 June 2008 (UTC)


 * Oh, that's a problem... it looks like it's cause by MediaWiki's new parser. Not having SSH access to a wiki that runs MW 1.12+, it's hard for me to debug this problem. Do you have any idea on how to get this working, i.e., how to get the output of the parser function to also be parsed? Yaron Koren 20:23, 13 June 2008 (UTC)
 * Okay, a solution may have been found: if you can, could you into the code, and in /includes/SF_ParserFunctions.php, change the second-to-last line from

return implode($new_delimiter, $results);
 * to

return array(implode($new_delimiter, $results), 'noparse' => 'false', 'isHTML' => 'false');
 * , and let me know if that works? Yaron Koren 20:36, 13 June 2008 (UTC)

Problem with autocomplete and edit with forms
Hi Yaron. First of all, thank you for this great extension. It's really good stuff, but unfortunately I can't get everything to work :( Hope you can help me...

Autocomplete
First of all, the autocomplete function does not work. I created a template and a form, which looks like this: If I access the form and start to type however, nothing happens (the field is for assigning a page-type property). I looked at the page source for this input and it looks like this: <input type="text" class="autocompleteInput yui-ac-input" size="35" value="" name="IFRS[parent]" id="input_7" tabindex="7" autocomplete="off"/> As you can see, there is a parameter 'autocomplete="off"', maybe this is the problem, however I don't know where it does come from. Any ideas? (There are no JavaScript errors, and as far as I can tell, all scripts are included)

Edit with form
I created the default form annotation on a category page and I can see the "edit with form" tab on those articles. However, if I click on it, the page loads but does only show a normal "page view" (that is simply the rendered article with no inputs or other editing functionality) (the "edit with form" tab however is highlighted). Any ideas on this one? (Also no JavaScript errors)

System Information
I'm working on my local PC at the moment which is why I can not send you a link. But here's the information I have: Maybe I could put the wiki online, but I would have to provide the link to you via email since it is not supposed to go public at the moment. You can contact me via nitsche (at) ontoprise (dot) de (or, of course, here on the discussion page :) ) 85.182.196.2 12:11, 16 June 2008 (UTC)
 * FireFox 2.0.0.14
 * MW 1.12.0
 * SMW 1.1
 * SF 1.2.3 (SVN 06-16)
 * Halo Extension 1.1
 * Treeview, Variables, ParserFunctions, MultiLang


 * Hi, it's nice to hear from you. For the autocompletion problem, there are a few things in that field definition that might be causing an error. Here is the definition I would use:


 * Let me know if that works. For the "edit with form" tab, I believe that's (I hate to say it) a Halo bug. It's come up before for SF users, and even been discussed on this talk page. I wanted to write you guys about it - basically the Halo function that gets called by the 'UnknownAction' hook needs to return false instead of true. If you could fix that (assuming that's the problem), it would be helpful to quite a few SF users. Yaron Koren 12:53, 16 June 2008 (UTC)


 * Hi Yaron! First of all, the edit with forms tab _is_ a Halo problem, just found it :). The problem is that we do not check if the action that calls the hook actually is the action that we want to "listen to". To fix the problem in Halo, insert the following code in extensions/SMWHalo/includes/SMW_Initialize.php right at the beginning of the function smwfAnnotateAction (around line 950):

if ($action != 'annotate') { return true; }
 * No luck however with the autocompletion. I used your code (which I think I already used at the very beginning) but still the same problem. There is still a parameter 'autocomplete="off"' in the source, I think that's not right, is it? Maybe also Halo-related, even though I can't really imagine why. I'll have another look and do some further investigations. Thanks for the help. 85.182.196.2 13:03, 16 June 2008 (UTC)


 * Well, it's great that you found a solution to that 'UnknownAction' problem - I'll add a note about that to the documentation. As for the autocompletion - I think that 'autocomplete="off"' is added by the YUI library, and it's actually much more innocent than it seems - the autocompletion it's talking about is the browser's own, which should be disabled. Still, you're having a problem, and, having just upgraded SMW on my site, Discourse DB, I'm having an autocompletion problem too, so it could be that you've discovered a bug. I'll look at this later today. Yaron Koren 14:09, 16 June 2008 (UTC)


 * Okay, it turns out that my problem with autocompletion has to do with SMW 1.2 (the alpha version), so it's unrelated to your issue. Yes, could you please email me the link, if this is still a problem for you? Yaron Koren 03:17, 17 June 2008 (UTC)

Errors after installation
I've just installed Semantic Forms, and before that I have made sure the SMW is working properly. However I always get the following error on my site:

Warning: Cannot modify header information - headers already sent by (output started at .../wiki/extensions/SemanticForms/languages/SF_LanguageZh_cn.php:26) in .../wiki/includes/WebResponse.php on line 10

Could you please help me solve this? I am using mediawiki-1.12.0, PHP 5.2, MySQL 4.1. Thanks a lot!

- June


 * It looks like there are some extra newlines at the end of that file. Since no one else has noticed the problem, yours might be the first mainland-Chinese wiki to use Semantic Forms... in any case, thanks for the bug report - it'll be fixed in the next version. If you want to fix it yourself until then, you can just remove the spaces from the end of that file. Yaron Koren 15:39, 18 June 2008 (UTC)
 * Oh yeah, it works now! Thanks for your help and the great extension you created!

Can SF automatically generate a "*" or "#" when people press ENTER in the field?
This is what wikihow does. Whenever people hit the enter key ,the field automatically generates a "*" or "#" at the beginning of the next line. This will facilitate the formating. I am wondering if SF has this capability. If so, how can I achieve that? Thanks a lot!


 * No, there's no way to do that in SF. Yaron Koren 14:27, 19 June 2008 (UTC)

In the preview mode, why the "edit source code" is turned on instead of the "edit with form"?
If I click on the "edit with form" tab, every change I made before the preview is gone (this is understandable since preview won't save the changes to the hard disk). Is there any way to modify the preview mode so the input form rather than the standard edit window with the source code is displayed? This is a critical issue to my website as the source code could easily be messed up by users unfamiliar with wikitext. Any solution? Thanks in advance!--24.6.151.20 08:35, 21 June 2008 (UTC)

SF seems to have a bug when included in a table
I need to use tables to organize my webpage, however I notice that if an input field is included in the table, then the first * or # cannot be understood by the parser. So only the second * or # will be converted into a bullet or number 1. Can you please help me solve this? Your help is highly appreciated!--24.6.151.20 05:18, 22 June 2008 (UTC)