Extension talk:Page Forms/Archive July to August 2010
This page is an archive. Do not edit the contents of this page. Please direct any additional comments to the current talk page. |
Create forms automatically
Hello, i've done a form to create a personal page (user caracteritics) and i would create automatically a new form for each new user who create an new account on my wiki then, i would like a user to update only the page that bears his name Is it possible? And how can i do? thanks for your answers
- You probably mean create a new page, not create a new form. You can do this by making this form the default form for the "User" namespace, in addition to using Extension:KeepYourHandsToYourself. Yaron Koren 01:58, 7 July 2010 (UTC)
- yes i mean create a new page. But which file do i edit to modify the default form for the "User" namespace?
- Eva 09:30, 7 July 2010 (UTC)
- yes i mean create a new page. But which file do i edit to modify the default form for the "User" namespace?
- I've managed to do this but i've some problem with the display. I've one part on the left side and an other part in a sort of box (a box called as User, here it's called Eva) and it create some links to non-existent pages but my fields are not of type page
- If you don't define a type for a property, by default it will be of type "Page" - I assume that's the issue here. Yaron Koren 14:27, 8 July 2010 (UTC)
Show on select question
Hi,
I have been trying to set up a form using "show on select" in the {{{field}}} section. There is an interconnected set of choices i.e. choices for field1 are field2, choices for field2 are field3 and so on till field5. A typical field is set up as follows
{{{field|order|values=value1,value2|show on select=value1=>div1;value2=>div2}}}
I want only field1 to show up in the beginning and depending on what the user chooses, show up appropriate choices in field2 and so on. I think i have set up the fields properly, but evidence - the form not showing up correctly - goes against that. many of the "next" fields -field3,field4,field5 etc. - show up even before field1 is selected. but when i select field1, extra fields - with the correct choices in the dropdown menu based on field1 choice - show up while the previously displayed incorrect fields still are very much there.
i would be really glad if someone could provide me some help on how to get the form set up correctly and avoid showing the "next" fields till the "previous" choices are selected. Pointers to some existing code would also be greatly appreciated.
Thanks a lot! Veryhuman 01:09, 8 July 2010 (UTC)
Preview won't work
I have installed Semantic MediaWiki + Semantic Forms, and everything works fine except one aspect. When I use a form to create or edit a page, if I press the "show preview" (I'm not sure of the English translation) button, it starts loading something but it never ends. The only way to use my forms is to fill in the gaps, and press the "show differences/changes". Then I can press "show preview", but my users don't know this way. I have tried with the same form and the same template in another wiki which has another installation of the Semantic Forms and it works. Thanks for your help. --Wikypedista 00:15, 9 July 2010 (UTC)
- I've had the same problem, but have assumed that parsing data from forms and displaying it as preview would be kinda difficult. I dont really need the preview function though... Veryhuman 02:14, 9 July 2010 (UTC)
- Sometimes it does take a long time - you can solve this problem easily, by removing the line in the form that starts with '<div id="wikiPreview"...'. Yaron Koren 14:22, 9 July 2010 (UTC)
- Wow, thank you so much, Yaron Koren. This problem has taken me crazy for months. I have thanked your help in my wiki. I don't still understand what was wrong with that line and what is it's purpose, but at least it works perfectly! --Wikypedista 11:42, 10 July 2010 (UTC)
blank screen uploadwindow
Sorry, its me again Burgy Zapp with Semantic Forms update to version 1.9.1 problem on MediaWiki 1.12.4 with an error:
- Call to undefined function wfStripIllegalFilenameChars() in /var/www/vhosts/kunstbewegung.info/httpdocs/wikide7/extensions/SemanticForms/specials/SF_UploadWindow.php on line 423
In Order to fix the call to an yet non existing funktion in MW 1.12.4 you need to add this function wfStripIllegalFilenameChars( $name ) { $name = wfBaseName( $name ); $name = preg_replace ( "/[^".Title::legalChars()."]|:/", '-', $name ); return $name; } to your GlobalFunction.php but beware, it is actually a hac to add a funktion into original files. Sincerely Yours Burgy
blank form after update
I did update Semantic Forms to version 1.9.1 (MW 1.12.4), since then the actual form (2 step process) is shown as blank page. I hope somebody can hint me to the problem. Sincerely Yours Burgy Zapp
- Hi - this might help debug the issue. Yaron Koren 23:55, 11 July 2010 (UTC)
-
Thank you very much. First of all it might seem that proc open function is necessary, but I can not validate that information. But after activating it, I got a more helpful error message:
- Fatal error: Call to private method Xml::expandattributes() from context 'SFFormUtils' in /var/www/vhosts/kunstbewegung.info/httpdocs/wikide7/extensions/SemanticForms/includes/SF_FormUtils.php on line 457
By the way ;-) Thank you Yaron for pushing the borders of semantic information infrastructure with your much appreciated work!
Suggestion: Preserve location of template in the markup
I set it up so that pages in the Template namespace use a form. The purpose is to allow standardized documentation of every template, so that it will require an act of will not to provide any. There's just one catch: the SemanticForms extension insists that the template associated with the form appear first. This means that if I put the template inside of a <noinclude> tag, where it belongs, then edit using the form, then when I save it the template is back outside the <noinclude> tag.
Any objection to making it preserve the location of the template in the markup? Is there any particular reason why it doesn't already? Is this going to be a hard thing to do?
Thanks for any feedback you might have.
-- John at Irie dash Inc dot com
- Hi - it sounds like the issue you're asking about is preserving the order of free text, template call, free text, etc. Partial forms might work better for that case, although only for editing existing template pages. I'd say a cleaner solution, though, would be to have a separate page for the full documentation - maybe at Template:Template-name/doc. Yaron Koren 00:13, 12 July 2010 (UTC)
Where can I view/change property details?
I defined a Property, ProgramTitleEN, which is defined as follows: This is a property of type [[Has type::String]].
It is used in the form as follows: ! Program Title (English): | {{{field|ProgramTitleEN|mandatory|rows=1|size=55}}}
It is used in the template as follows: ! Program Title (English): | [[Program Title (English)::{{{ProgramTitleEN|}}}]]<br>
On a page that uses the form, in Firebug it shows up like this: <input type="text" size="55" cols="80" value="Passport to Prosperity" name="Program_Information[ProgramTitleEN]" class="createboxInput mandatoryField" tabindex="5" id="input_5">
Where is "cols=80" coming from, and how can I change it? Stlauc 18:55, 12 July 2010 (UTC)
- That's strange - it looks like a bug in SF; it could be that your (unnecessary) setting of "rows" is confusing it. Yaron Koren 20:22, 12 July 2010 (UTC)
Displaying bullets in forms
1. I want to display a list of categories as a bullet list. The first bullet appears correctly, but subsequent bullets are appended to the first one as follows: <ul><li>OBPG Advice&Consultation<br />*OBPG Entrepreneurship<br /> </li></ul>
This is the template code to insert the wikitext:
{{#arraymap:{{{OBPGCategories|}}}|,|x|[[Category:x]]|}}{{#arraymap:{{{OBPGCategories|}}}|,|x|*x<br />|}}
2. Also, in a text area I want to use wikitext for a bullet list, so I entered this wikitext:
*Updated keywords
*Changed URL
It displayed as an asterisk on line 1 and a bullet on line 2.
Can anyone see the errors? Stlauc 19:27, 12 July 2010 (UTC)
- For the first issue - use "\n" instead of "<br>"; for the second, this is probably the answer. Yaron Koren 20:20, 12 July 2010 (UTC)
1. This works great - thanks Yaron:
{{#arraymap:{{{Organization|}}}|,|x|*x|\n}}
2. Got it - In the template, you need to place the field in column one of a new line, E.g.,
! My label:
|
{{{myfield}}}
3. I found a new, deal-breaker issue with "&" characters in category names. They cause me to lose data. For example, my initial data when I click "Edit" is this:
- OBPGCategories=OBPG Advice&Consultation, OBPG Entrepreneurship
- However, when I click "Edit with form", only "OBPG Entrepreneurship" is selected. Therefore I drop "Advice & Consultation" whenever I save the form. This is a serious issue and I've isolated it to the "&" in the category name, e.g., Category:OBPG_Advice&Consultation.
- My form code is this: {{{field|OBPGCategories|input type=categories|top category=OBPG_Topic_Categories|height=200}}}
- My template code is this: {{#arraymap:{{{Organization|}}}|,|x|[[Category:x]]|}}
{{#arraymap:{{{Organization|}}}|,|x|*x|\n}}
Any help on this critical issue would be much appreciated.
Stlauc 15:21, 13 July 2010 (UTC). Logged as a bug, Stlauc 18:53, 15 July 2010 (UTC)
Show on select seems to be broken
I tried to setup show on select as in: here, but instead of producing a drop down menu as expected, it is instead creating a standard text entry field. I was able to replicate this problem: here in addition to my private wiki. I do not know what about the DiscourseDB site is set differently which is allowing it to instead be a drop down selection. I even tried explicitly setting input type to drop down, but it still remains a text entry. Not sure what's wrong here. Thorncrag 00:09, 13 July 2010 (UTC)
- I am having the same problem. I followed exactly the code on DiscourseDB, but doesnt work. Have been fiddling with different options for 3 days now. Veryhuman 05:24, 18 July 2010 (UTC)
- That seems unrelated to "show on select" - the issue there is just that the input needs to have a pre-defined set of allowed values for it to be a dropdown. In the case of the Discourse DB form, those allowed values are defined on the corresponding property page. Yaron Koren 16:06, 18 July 2010 (UTC)
- That the values are defined by a property makes sense, except that how exactly is the Property:Publication type associated to the field "type"? I think this is the bit that is less than straightforward. Thorncrag 19:07, 18 July 2010 (UTC)
- That seems unrelated to "show on select" - the issue there is just that the input needs to have a pre-defined set of allowed values for it to be a dropdown. In the case of the Discourse DB form, those allowed values are defined on the corresponding property page. Yaron Koren 16:06, 18 July 2010 (UTC)
- Ah - the two are associated in the template, which SF parses when it creates the form. Yaron Koren 00:10, 19 July 2010 (UTC)
- Hi Yaron, Thanks again for your reply, but I'm not sure if I understand correctly. I have a property (Medicinal significance) of type Boolean with allowed values Yes and No. I have even tried changing property type to String. The field is structured like this {{{field|Medicinal significance|show on select=Yes=>medicinal details; No=>no med details}}} with <div id="no med details"></div> and <div id="medicinal details"></div> following. The values show as dropdown alright. But still the fields which are supposed to show up after selecting Yes (medicinal details) or No (no med details) show up even before that. Am I missing something? I wonder whether Thorncrag got his problem resolved with your reply? Thanks Veryhuman 02:25, 19 July 2010 (UTC)
- Hi - that doesn't sound like the same problem; it sounds like a totally different problem. I don't know what's causing it, but your property should either be a Boolean with no allowed values, or a String with allowed values. Yaron Koren 10:40, 19 July 2010 (UTC)
- Thanks Yaron. Will post a solution here if I find one. Veryhuman 14:53, 19 July 2010 (UTC)
âââââââââââââââââââââââââââââââââââ
I haven't had time to revisit this just yet, but I will share what I learn when I do. Thorncrag 18:37, 21 July 2010 (UTC)
Hi, i have a similar Problem with this Tag. I see the div all the time and it should only be visible if "unterbrochen" is selected.
I user SMF 1.91 with MW 1.16
{| class="formtable" ! Stand: | {{{field|Stand |input type=radiobutton |values=abgeschlossen, laufend, geplant, abgebrochen, unterbrochen |default=abgeschlossen |show on select=unterbrochen=>unterbrochen |mandatory}}} |} <div id="unterbrochen"> {| class="formtable" ! Unterbrochen seit: | {{{field|Unterbrochen_Von|input type=date}} |- ! Voraussichtlich Bis: | {{{field|Unterbrochen_Bis|input type=date}}} |} </div>
SBachenberg 07:01, 4 August 2010 (UTC)
I found a Bug! The Form Fields of the Type Radiobutton doesn't have hmtl id tags, so i get the JS error
the_input is null if (the_input.value == options_array[i]) { SF_yui...tion.js (Line 156)
But I dont know if this is a failure in your extension or my wiki SBachenberg 09:10, 5 August 2010 (UTC)
I'm also having issues, and Yaron seemed to delete the example on the DiscourseDB.
No matter what I do, I can't get the "show on select" enabled field to link to any divs I try to link to it. If I don't put "values=" in, it doesn't even show up as a dropdown, it shows up as an empty textbox (but from my research, it seems we have to link it to a property or something to give it values, even though the instructions didn't seem to specify that.
if I do link it, I end up with a dropdown, but the divs act as if there's no connect between them and the select field - they will show up with their contents, and selecting something from the drop down functionally does nothing.
This addition to semantic forms seems very useful, I just can't get it to work for the life of me.
Any suggestions would be greatly appreciated, especially because it seems others have the same issue.
--173.156.204.25 18:27, 12 August 2010 (UTC)
- I plan to look into the whole "show on select" issue soon - in the next few weeks. In the meantime, you shouldn't use Discourse DB as a test wiki - you should use http://scratchpad.referata.com. Yaron Koren 20:52, 12 August 2010 (UTC)
Thanks Yaron for fixing the Bug with your latest Patch! I have a little addtion to your Help Text for "show on select".
If you want to show more than just One <div> to your selected value show on select=value-1=>divID-1;value-1=>divID-2;
...
SBachenberg 06:22, 25 August 2010 (UTC)
Add a template for each edit?
Is it possible to add a template for each form edit, rather than for the form edit to make a new templatre? IE If I edit Forum with form edit, could I make it so this template appears every time I edit with form? Thanks in advance--Technobliterator 08:33, 21 July 2010 (UTC)
- No, that's not possible. If your goal is to create a forum, you might be better off using the Liquid Threads extension. Yaron Koren 13:15, 21 July 2010 (UTC)
Learning Process
Hi people!
I'm here learning Semantic Forms to apply on my Wiki. Some questions:
1. I'm making a Wiki about a city in Brazil. I'd like to have stantard information form Hotels, Restaurants, etc. I think Forms would help a lot! But, I don't know if I'm using it properly. I have created properties like:
a. Property:Hotel_Room_TV Property type Has type::String Prossible values:
b. Property:Hotel_Pool Property type Has type::String Prossible values:
c. Etc
The result is something like this: http://www.wikirio.com.br/Caesar_Park_Hotel
Is it ok? What do you guys think?
2. On the same page http://www.wikirio.com.br/Caesar_Park_Hotel how can I remove the red links on Sim/NĂŁo (Yes/No)?
3. How can I insert a file name I updated using Forms "[[Image:[[Picture_1::{{{NAME OF THE FILE|}}}]]" on a Wiki image: |style=" vertical-align: top;"|[[Image:[[Picture_1::{{{NAME OF THE FILE|}}}]]|none|thumb|Pictures]]. Is there something like concatenate? (The problem is on the same page http://www.wikirio.com.br/Caesar_Park_Hotel)
Regards,
Edgard.
- Hi - for the properties, they should be of type "Boolean" instead. For the image, you should separate out the display from the property setting - have something like "[[Image:{{{NAME OF THE FILE|}}}|none|thumb|Pictures]] [[Picture_1::Image:{{{NAME OF THE FILE|}}}|]]". Yaron Koren 14:42, 21 July 2010 (UTC)
- Yo! Thanks for the reply. I did not use bloolean beacause some answers, like ROOM INTERNET, could be "No", "Yes, free" and "Yes, paid". Edgard...
- Maybe you could set that property's type as 'String' instead of the default 'Page'--Klh5u 17:51, 30 August 2010 (UTC)
Is there any way to put a default form edit in a template? Like, does page has default form::foo work? Oh and thanks for your other answers.--Technobliterator 18:51, 28 July 2010 (UTC)
- You're asking whether a feature listed in the documentation actually works? Er, yes it does... Yaron Koren 21:12, 28 July 2010 (UTC)
User does not fill in all the entries..
Hello. If a user does not fill in all the entries to a form and submits it, how can you make it so the final page does not show the property (ex. {{{Colorway}}}) in the spot where the user did not enter data for.
Instead I would like it to show a blank or even a link saying "ADD" that will link to the form edit page where those values are blank.
Thanks. Anyone know?
- use parser function in the templateMsevero 02:15, 1 August 2010 (UTC)
- You should change {{{Colorway}}} to {{{Colorway|}}} - there's a way to do the "add" link thing too, but I wouldn't recommend it. Yaron Koren 15:50, 1 August 2010 (UTC)
- Awesome, thanks a lot both of you. And Yaron, why do you recommend not doing that? Just curious.--65.87.227.156 17:55, 1 August 2010 (UTC)
- I just think it looks awkward to have "add data" links all over the place. I mean, I'd think most people could figure that they can use the "edit with form" tab to add missing information. Yaron Koren 23:31, 1 August 2010 (UTC)
Unsupported type "_geo" defined for property.
I get this. Noted it is even on http://halo-smw.ontoprise.com/lod/index.php?title=Wikitext_programming_workshop_1&action=annotate So, my system is MediaWiki 1.15.1, PHP 5.3.2-1ubuntu4.2 (apache2handler), MySQL 5.1.41-3ubuntu12.3, Forms 1.9.1 built from Semantic Bundle (Version 0.4.2.20100719). I even typed a real simple deal to input and display a simple address and still get the error. Is this a bug or am I doing something wrong? Below is my simple form:
The template:
{{testaddress |Address= }}
How it looks in Edit:
This is the "testaddress" template. It should be called in the following format: <pre> {{testaddress |Address= }} </pre> Edit the page to see the template text. </noinclude><includeonly> {| class="wikitable" ! Yard Address | [[Freight Yard Coordinates::{{{Address|}}}]] |} </includeonly>
Didn't know how to pull the property for Freight Yard Coordinates, but it was defined in properties using the geocode dropdown.
This might be all user error; I don't know, but I found it odd that the ontoprise site has the same issue. Thanx.
- This isn't a Semantic Forms issue - it's because the handling for the "geographical coordinate" type moved from Semantic MediaWiki to Semantic Maps. Yaron Koren 15:16, 2 August 2010 (UTC)
So, I guess the next question becomes how to solve it? I mean do I need to learn some new programming; do I sacrifice the ability to add a map in forms, what specifically do I need to do? Thanx --Vincit Omnia Veritas 21:47, 2 August 2010 (UTC)
- You should install Semantic Maps. Yaron Koren 14:49, 3 August 2010 (UTC)
Ah, I see now. OK, all the extensions in the Bundle come commented out. So, I set them up. Kicked an error for Revs (1146), but I'll deal w/that on its appropriate area. New question (the ! icon went away so I am REALLY happy), but I believe it is best addressed on the Maps Talk area. So, thanx for getting me in the right direction! --Vincit Omnia Veritas 10:46, 4 August 2010 (UTC)
How to add javascript to new input type
Hi, I'm still learning about mediawiki extensions. I need to make a new input type for semantic forms, and that input type needs to use JavaScript. I have it working as expected on a regular web page, but in a mediawiki form the javascript doesn't seem to have any effect. I have it set up like:
$output = "<input type=" ...etc
$js = "function dosomething(x){" ...etc
return array($output,$js);
The JavaScript function shows up right under the auto-complete functions in the source code, and the autocomplete is working in the forms, but my function isn't. What am I missing? Thanks in advance!
- Hi - it sounds like you have a bug in your Javascript. I'd recommend looking at the page in Firefox, with the Firebug extension. Yaron Koren 16:45, 3 August 2010 (UTC)
- Thanks, that is a great tool and it found my error- I was just missing a double quote in my JavaScript function.
Autocomplete on category and its subcategories
Hello. Autocompletion on category show only pages in that category. But what I need to change to show subcategories of that category too? Thanks, Taras, Kyyiv, Ukraine.
- Do you want both subcategory and page names, or just page names? Yaron Koren 16:46, 3 August 2010 (UTC)
Both subcategory and page names.
- I doubt SF will ever support such a thing - how could there be a field for which both a page name and a category name would make sense as valid data? Yaron Koren 13:52, 4 August 2010 (UTC)
I have a cookbook site. When creating a receipt, pages with ingredients(categories of the article) are creating automatically when they do not exist. So, the page "Category:Tomato" in the category "Ingredients" is creating. And I want the autocompletion in the form for new receipt ingredients from the subcategories of category "Ingredients". I did that subcategories for the searching by categories.
- Your data structure is of course up to you, but I would say that you would be better off using semantic properties to define which ingredients are contained in which recipe, rather than categories... Yaron Koren 15:25, 4 August 2010 (UTC)
But how can I make the search by that properties? I need to search recipes that are in a few categories (or properties) in he same time. I used for this extension "Multi Category Search"
- Semantic Drilldown is one option; so is SMW's Special:Ask page. Yaron Koren 20:15, 4 August 2010 (UTC)
"Add Item" button for multiple Fileds not working with the new MW 1.16 stable release
Hi, I had some multiple Fields with these "Add Item" Buttons. After switching to the new MW 1.16 release the buttons have no effect, there is no item pop off on clicking :-( SBachenberg 07:33, 4 August 2010 (UTC)
- Hi - by "Add Item" do you mean "Add another"? If so, I can't reproduce the problem - I would recommend looking at the form page in Firefox, with the Firebug extension installed, so you can see the exact Javascript error - my guess/hope is that it's coming from somewhere outside of SF. Yaron Koren 13:56, 4 August 2010 (UTC)
- Hi, I found the my Error in a Field statement before theses Buttons was a linebreak in the "show on select" statement which killed all the JS for the Page. SBachenberg 08:50, 5 August 2010 (UTC)
Auto-append to page name when adding new through form.
I'm sure there is a way to do this after looking through this extension's page. Only problem is I still have no idea how to actually do it.
What I want: When users create a new page through "Form:Glossary_term", I want the text " (term)" to automatically be appended to the page's name. Right now, there are two ways to get to this form: the sidebar of the wiki and the Category:Glossary page.
I couldn't find any examples (besides the ones buried in the text) that were illustrative enough for me. Sxtynnmach1 14:31, 4 August 2010 (UTC)
- You'd need to use the one-step process for that. Yaron Koren 14:38, 4 August 2010 (UTC)
- I'm confused about syntax as well. The only example I could find did not specifically show an example of how to append text to a page name. Any help on this? I can code, but I'm not a coder! --Shanarosenberg 15:45, 9 August 2010 (UTC)
- For the original question: if the main template is called "Glossary term", the template (and form) should have a field called, say, "Term", and then the form should contain "{{{info|page name=<Glossary term[Term]> (term)}}}". Yaron Koren 23:51, 9 August 2010 (UTC)
- I really need help with this. Is there a "newbie semantic forms" forum somewhere?
- Yeah - use the main SMW mailing list or IRC channel; see here. Yaron Koren 17:14, 10 August 2010 (UTC)
Include a link in a text or string property
Hi! I'd like to know if it is possible to add a link to some wiki page inside the value of a string or text property. I don't want just a page property, just need to be able to add links inside text, as the following example:
This is a value of a text property called PropertyName, and [[this is a link to the main page|Main Page]]
I'm checking here, but it looks like the [[ and ]] characters are been misunderstood, making the following appear as the property value when the page is loaded (template created with special:createclass)
[[PropertyName::This is a value of a text property called PropertyName, and Main Page]]
instead of
This is a value of a text property called PropertyName, and Main Page
Does anyone know if it's possible to put this links correctly working, and how can I do that?
Matheus Garcia15:29, 4 August 2010 (UTC)~
- The setting you're looking for might be $smwgLinksInValues. Yaron Koren 20:16, 4 August 2010 (UTC)
arraymap images into a gallery.
I have a form that allows users to upload several images into a field. What I want is all those images mapped into an image gallery.
discourcedb.org maps images like this: {{#arraymap:{{{Other images|}}}|,|x|[[Has image 2::Image:x| ]] [[Image:x]]}}. But how would I make it map it into a gallery. Thanks.
- I'd recommend doing it the way Discourse DB does it, and then using the 'gallery' format in Semantic Result Formats to display the images. Yaron Koren 03:01, 5 August 2010 (UTC)
- I had a slightly different problem. Maybe this is not the right place to ask this question (sorry!). My images are interwikied through Commons through use of $wgForeignFileRepos. The image names and captions are associated with a semantic property through a template. However, they are not really assigned to a category (I dont know how to assign interwikied images to a category...help here?). If I understand correctly, SRF extension gallery format requires a set of images to work from. I can get the list of all image names like this: {{#arraymap:[[Category:+]] | ?Header image | format=list |mainlabel=- }} . How do I get a gallery then of the "semanticized" images? Thanks! Veryhuman 06:58, 7 August 2010 (UTC)
- I still can not figure out how to have the images all mapped into a gallery. I have something like this right now but it does not work.
{{#arraymap:{{{images|}}}|,|x|[[Other images::Image:x| ]]}} {{#ask:[[Other images::{{PAGENAME}}]]|format=gallery}}
What is wrong? I understand because it is taking all the other images with the property Page Forms/Archive July to August 2010 and I want it to display all the images that are under Page Forms/Archive July to August 2010. Anyone know what I have to do?> thanks
- Hi - sorry, I gave you bad advice before; the query you have is incorrect, but that's not the issue; the 'gallery' format won't work in this case. Instead, you should use the #tag parser function, so that the contents of <gallery> will be parsed - something like "{{#tag:gallery|{{#arraymap...}} }}". Yaron Koren 15:16, 10 August 2010 (UTC)
- Awesome! Thanks alot. This is what finally worked: {{#tag:gallery|{{#arraymap:{{{images|}}}|,|x|File:x|\n}}}}
Multiple-instance template values are being de-duplicated on 'edit with form'
I am new to Semantic MediaWiki & Semantic Forms and am trying to put together a form to track items installed in a computer. The form is working great for the initial creation of an article but when I click 'edit with form' the form removes duplicate instances of the multiple-instance template.
For example, I have a template to enter hard drive size (as a text field) and type (as a dropdown) which is set multiple in my form. When I create the article I add two instances of drive size=500 G and drive type=SATA then save the form. Both items show up in the article. I then click 'edit with form' and the form is populated with only one instance of the values. If I save the form only the one instance is saved in the article.
I can add as many entries to the form in any order such as 500 G;SATA , 80 G;SATA , 500 G;SAS , 80 G;SATA and 500 G;SATA and they will all show in the article on save but only one instance each of 500 G;SATA , 80 G;SATA and 500 G;SAS appears in the form when I edit.
I tried using SIO in the template to wrap the values but the form still de-duplicates the instances on edit. Is this by design or is there an option to have all the saved values displayed on edit?
Thanks, --Roy
- That sounds like, potentially, a very serious bug. What version of SF are you using? Is this on a public wiki? If not, is there any way you could try to replicate it on a public wiki, like scratchpad.referata.com? Yaron Koren 01:33, 5 August 2010 (UTC)
It is a private wiki so I will put up a sample at scratchpad.referata.com. My version info is as follows:
MediaWiki 1.15.4 Semantic Bundle (Version 0.4.2.20100719) which contains - Semantic MediaWiki (Version 1.5.1.1) - Semantic Forms (Version 1.9.1) - Semantic Internal Objects (Version 0.6)
Thanks, --Roy
- Ok, I have the test pages up. It is de-duping the instances here too. http://scratchpad.referata.com/wiki/Hddtest is the page I created with the form. It has 3 instances of the template on it. The form is http://scratchpad.referata.com/wiki/Form:HDD and the template is http://scratchpad.referata.com/wiki/Template:HDD . --Roy
- That was a very interesting bug - thanks for replicating it so I could see it, and debug it. The problem came about because you had two instances that had the exact same data, which confused SF. I just fixed this problem in SVN; the fix will go into the next version as well. Yaron Koren 05:53, 6 August 2010 (UTC)
- Thank you very much for your quick responses! I've patched my install with your fix and things are working for me now. No more lost data on edit! --Roy
After MediaWiki update to 1.16, buttons and titles showing up as <sf_formedit_edittitle> and other tags
Also, the "Edit with form" tabs appear as <formedit>. What's going on and what do I need to change? It looks like if I explicity define things, such as "edit title=blah" in the info field of the form, that text shows up correctly. Did the text defaults get lost somewhere? Sxtynnmach1 19:49, 6 August 2010 (UTC)
- What version of SF are you using? If it's not a recent-ish version, upgrading might help. Yaron Koren 12:41, 9 August 2010 (UTC)
- SF 1.9.1, MediaWiki 1.16.0
- When I updated MediaWiki from 1.15.3 the symptoms appeared. I tried reinstalling the latest version of SF to see if that fixed it, but alas. Did some default values get corrupted? Sxtynnmach1 14:01, 9 August 2010 (UTC)
- What do you see when you go to the page "MediaWiki:Formedit"? It could be that SF's messages file isn't getting read, for some reason. Yaron Koren 14:18, 9 August 2010 (UTC)
- That may be the problem. That page does not exist. It must have gotten deleted somehow. What is the page supposed to contain and how do I get it? Sxtynnmach1 14:51, 9 August 2010 (UTC)
- Well, that page should be getting automatically populated, via SF's message definitions. Does your 'SemanticForms' directory contain the file /languages/SF_Messages.php? If so, how closely does it resemble this? Yaron Koren 15:38, 9 August 2010 (UTC)
- The file is there, and looks to have everything that SVN copy does (I didn't do a diff). Could the localization of the wiki have been corrupted? Sxtynnmach1 16:30, 9 August 2010 (UTC)
Well, I don't think I've heard of such a thing happening before. Without knowing more about your setup, I don't know if I could help much more. Feel free to send me a private email with more information, like the contents of your LocalSettings.php file. Yaron Koren 18:46, 9 August 2010 (UTC)
- I experienced the same problem "no edit with form header tab" after upgrading (Mediawiki to 1.16.0beta3, also extensions were upgraded). Disabling Vector skin or disabling headertabs didnt help. used extensions: semantic mediawiki 1.5h-SVN, Semantic Forms 1.8.8 and others, MediaWiki:Formedit is empty here too, despite languages/SF_Messages.php seems complete. Is there perhaps an Admin Script to populate things like MediaWiki:Formedit ? --RScheiber 12:02, 18 August 2010 (UTC)
- This may or may not work, but try commenting out SMW and SF within LocalSettings.php, refreshing the page in the browser, then including them back in. My guess is that this is somehow due to a PHP caching issue. Yaron Koren 22:52, 20 August 2010 (UTC)
Multiple value fields with values from a single category
I have "desperately" been looking for a mechanism in Semantic Forms to set multiple page-type values from one category into a single field using e.g. a multiple-item-selectable list box. If not currently available, this is the single functionality I now need to complete my Semantic Forms-based application.--Even Thorbergsen 10:35, 8 August 2010 (UTC)
- Use the "values from category=" parameter - I hope this ends your desperation. :) Yaron Koren 12:42, 9 August 2010 (UTC)
FCKeditor won't work in 'Add another' free text field
It seems the FCKeditor works perfectly in the semantic forms. However, if there is a free text field behind an 'add button' ('multiple' syntax for a template in a form) the FCKeditor fails to work. The "Rich Editor" and the "Open Rich editor in new window" show up, but won't work properly (FCK does not get loaded). Is it a bug, or am i missing something? Thanks in advance.
Turning forms into tabbed sections
Hi, I am not sure how to rewrite this section to avoid a problem I just stumbled into. In case you want to have tabs within the form template you have to place "<headertabs/>" at the bottom of the form, right above {{{end template}}}
. Otherwise it will break the skin. Apart for that I just realised that the showcase for this feature was deleted just a week ago. ;-) Cheers --kgh 19:00, 16 August 2010 (UTC)
One step process:
For the one step process. Say I use several different fields to compile a page title. And then a user changes the value in one of those fields or adds a value to one that did not have one in it. Is there a way to have the page name regenerated and then move all the information that was on the page to the new page name? Thanks
- Not automatically, unfortunately; the only way I can think to do it would be using some custom script or bot. Yaron Koren 13:50, 17 August 2010 (UTC)
input type=checkboxes and mandatory fields
It should be noted that there is currently a bug in SF 1.9.1 (Bugzilla #24847} that stops all mandatory fields from working if any field with input type=checkboxes or any multiple value string field is set as a mandatory field. The form just will just save. This can especially cause serious issues if you have mandatory fields that are used to determine the page name using the one step process. No doubt this will be fixed soon!
Mitchelln 13:27, 18 August 2010 (UTC)
Auto populate red links
Is there a way to have the red links to a property be auto populated with some pre filled values. So when a user goes to the page it is already made with some values in it which are depended on the page it is made.
- Unfortunately, no. But if the original page already links to the new page with a semantic property, you could presumably get those values using #ask queries. Yaron Koren 14:54, 22 August 2010 (UTC)
Remove Red Links
I have some areas in my forms which I am simply entering text that I don't want to populate via red linking (don't know the term). I want the info to save to the file the form creates and still be able to add/edit it, but as it's merely some general notes on stuff I don't want pages created for these fields. Is there a switch or whatever to do this? Thanx! --Vincit Omnia Veritas 01:16, 25 August 2010 (UTC)
- If I understand the question: you need to define the relevant properties as some type other than "Page" - probably "String". Also, there's no need for all caps in section titles. :) Yaron Koren 01:35, 25 August 2010 (UTC)
- Sorry on the caps wasn't thinking! :) So, as I hand code all my stuff I realized I didn't set the properties. You were absolutely correct and it works like a charm! Really appreciate it! --Vincit Omnia Veritas 14:15, 28 August 2010 (UTC)
Source-code in text property
I've created some forms to document source code (java, c++, etc). I´m using Extension:SyntaxHighlight_GeSHi to format the source according to each language in the template, like the following example:
{{#tag:syntaxhighlight|{{{MyJavaProperty}}} | lang=java}} [[MyJavaProperty::{{{MyJavaProperty}}}]]
The problem is that when the property contains [[, like in SearchString = "^\[[0-9]+\]", the output is broken.
Do you know if there is any way to handle that? Matheus Garcia15:49, 25 August 2010 (UTC)
- $smwgLinksInValues might help. Yaron Koren 16:45, 25 August 2010 (UTC)
- Thanks, Yaron, but that's not a problem with links. Neither the syntax highlight extension I mentioned. The problem occurs every time a text property contains [ or }}, for example. It seems those characters, when replaced in the page source, are been interpreted as mediawiki special characters. You can reproduce that creating a simple class with only a text property, and set as value the text: "just testing }}". That would generate a source like below
{{SampleTemplate
|myProperty=just testing }}
}}
- The }} in the property value seems to be interpreted as closing the template, not appearing in the property value, and the extra }} is been rendered in the page. So, I'm wondering if there's something that can be done in these cases to avoid breaking the output, just like scaping the special characters or something else. Matheus Garcia 23:04, 25 August 2010 (UTC)
- Ah, I get it. Unfortunately, that's a limitation in MediaWiki. The two ways to get around it are to use <nowiki> tags, and to use HTML escapings, like [ , etc. Yaron Koren 01:04, 26 August 2010 (UTC)
How to disable FCKeditor in Semantic Forms' free text field in certain situations?
At my work we use semantic forms to tag metainformation and attach documents and stuff to mediawiki pages. Our content pages have a default form, with tabs, and Semantic Forms is almost always 'in use', and content editing is done through Semantic Forms free text field, mostly in WYSIWYG mode. Semantic Forms rocks! But I have an issue... maybe someone could help?
The problem is that for some content pages FCKeditor should always be OFF, because it messes with the formatting styles and such. We still like to use Semantic Forms to edit the page; however the free text field should the use the regular editor, not the FCKeditor. This does not seem possible. Semantic Forms seems to ignore all checks for the free text field if FCKeditor is disabled or not.
Neither $wgFCKEditorExcludedNamespaces= in LocalSettings.php or magic word __NORICHEDITOR__ have any effect on Semantic Form's free text field. My users are allowed to toggle FCKeditor, so a user can always disable it when editing, but my users wont know themself when to do this. And as soon as FCKeditor loads, it messes with the wikitext anyways.
I think it would be really great if Semantic Forms could implement $wgFCKEditorExcludedNamespaces and __NORICHEDITOR__ to work as it does with the standard editor! --Ovoned 15:56, 30 August 2010 (UTC)
- Hi - that sounds like a pretty clear-cut bug; thanks for the bug report. I hope to be able to fix this in the next version. Yaron Koren 16:26, 30 August 2010 (UTC)
- Great! And thanks a lot for your awesome work! --Ovoned 16:56, 31 August 2010 (UTC)
- This was fixed with SF version 2.0.1. I'm runnng fckeditor 2.6.6 with mw 15, and now it works without a glitch. --Ovoned 11:43, 2 July 2011 (UTC)
automatically fill in user page?
Is there a way to specify a default template for a namespace? Specifically, I want to add some starter text to the "User" pages? --Klh5u 20:08, 30 August 2010 (UTC)
- You can definitely specify a default form for a namespace - then users just have to click on "edit with form" at the top. Or if you want to guarantee that users fill in the data, you can use the "SemanticSignup" extension. Yaron Koren 22:37, 30 August 2010 (UTC)
Upgrading to 2.0
I just upgraded from SF 1.9 to 2.0 and my installation (MW 1.16, SMW 1.5.1) isn't recognizing it at all, I've triple checked that everything's good in LocalSettings and the extensions folder. The entire Form: namespace has also vanished along with everything in it. Any idea what the problem might be? If not, should rolling back save my data? Bteed 07:57, 31 August 2010 (UTC)
- Hi - that's very odd. Someone on the mailing list had a similar issue, although in that case the problem came from switching to SMW 1.5.2 (while using SF 2.0) - when they went back to 1.5.1, everything was fine. This may or may not be the same issue. Unfortunately, I haven't been able to duplicate the problem. Yes, you could try rolling back. What language is your wiki in? Yaron Koren 14:40, 31 August 2010 (UTC)
- Thanks Yaron, I installed 1.9.1 and my forms are back. I then tried upgrading from that to 2.0 (had been from 1.9 to 2.0) and again it didn't work so I'm currently on 1.9.1. My wiki's in English. Bteed 00:19, 1 September 2010 (UTC)
- Okay, a few more questions - what do you mean by "isn't recognizing it at all" - did SF not show up in Special:Version? What about SF's special pages like 'Special:Forms' and 'Special:CreateProperty'? And did you try including SF using both 'SemanticForms.php' and /includes/SF_Settings.php' (the new way and the old way, respectively - both should work)? Yaron Koren 03:11, 1 September 2010 (UTC)
- Alright - I looked into it some more and I'm pretty sure I know the issue. The .zip and .tar.gz downloadable files, when unzipped, didn't contain the new SemanticForms.php file - which is a very major issue. Assuming you were calling SemanticForms.php from LocalSettings.php, that would be the culprit. I just re-created those two files, this time containing all the right stuff (I think). If that was the problem, my guess is that downloading v2.0 again will work. Yaron Koren 04:06, 1 September 2010 (UTC)
- That fixed it. Thanks for the great extensions :) Bteed 05:46, 1 September 2010 (UTC)