Extension talk:Page Schemas

[Download link does not work]
Hi there, I would love to download the extension Page Schemas, but have unfortunately not been able to. I went onto the Extesion:PageShemas, under “Code and download” area where it says: “You can download the Page Schemas code, in .tgz format, here.” The download link “here” was as follows: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PageSchemas.git;a=snapshot;h=4dd93fe74c8c39b6438b92f4927cfa71ca3b901a;sf=tgz Once I am clicking on the above link I am getting the following error message: “Unable to download gitweb from gerrit.wikimedia.org. Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.” Would anybody please be able to help? Many thanks Pan


 * The link works for me. Could you try again? Gerrit may have been unavailable for a short time. Instead of clicking, you could also try "right-click / save as". Cavila MW 1.19.2, MySQL 5.1.66, Php 5.3.3-7, SMW 1.8, SF 1.5.1 11:21, 15 February 2013 (UTC)

Hello Cavilla, I've just tried again and got the same error message. However, completely by chance I found the following link http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Autoincrement and by selecting the extension I wanted it did allow me to download the PageSchemas files. Thanks for your reply. Pan

Issue with side infobox
Hi, I am having an odd error. The infobox came out as expected when I was using the other way to use a form (manually create property, create template, create form). When I deleted the template/form and tried to re-make the exact same thing in page schemas, i get a jumpled mess peppered with red links that say "Template:!" where the infobox should be.

Thanks so much for any help,

Matt


 * You should create the page at "Template:!", with just a single character as the contents: "|". I think the latest version of Semantic Forms takes care of creating that page automatically. Yaron Koren (talk) 19:23, 30 July 2013 (UTC)


 * Perfect, thank you. I did download the semantic bundle maybe 2 days ago which had semantic forms. Wondering if that doesnt have the latest version and perhaps I should go update it....Matt

Two minor questions on page schemas (image upload, edit function)
Question 1: I am having trouble creating a form input field in a side infobox template of form created in page schemas - what I want is to have the user hit an upload button, they upload an image from their desktop, and then the picture shows (not the filename eg xyz.png). I did read in "Working with Mediawiki" by Yaron Koren about uploading files - where he says "This is done simply by adding the parameter "uploadable" to that field's declaration in the form definition (although this was for the shows filename xyz.png example) and I was unsure where exactly I put "uploadable" - any guidance here would be much appreciated.

Question 2: In Page Schemas if you select the output to be "sections" - when the user is reading the page each section has an "edit" hyperlink above it. unfortunately this takes you to editing the source code, not the form. Is it possible to either change this to point to the form, or remove it entirely? Thanks for any advice - I believe these answers will help the average person use page schemas more! --Matt


 * Hi - (1) you should add it in the form input's "parameter names and their values..." field. (2) you should add to the template. That's really a bug in the software - that tag should get added to the template directly. Yaron Koren (talk) 16:21, 31 July 2013 (UTC)


 * Yaron, in response to (1), within the edit schema function, I added to the "additional XML field" of each field in the template that uses sections.  I also tried to manually add it to the code by hitting edit on the category page rather than edit schema, in many different places.....the latest one I pasted below just to see if you can let me know if I am doing something wrong:







NOEDITSECTION (I took out the __  __ on this posting)

Course Overview


 * All my tries yielded nothing. I can't help but wonder if perhaps I have a setting either wrong, or not in, localsettings.php.  especially since it looks like the  worked on this page....


 * As for item (2) about uploading docs, In the "Enter parameter names and their values as key=value pairs, separated by commas (if a value contains a comma, replace it with "\,"). For example: size=20, mandatory" field of "Form Input" in the Edit Schema section, I added "uploadable" (without " ") - when I refresh and go to my page, oddly it displays the following in my field on the Read tab of the page using the schema: "File:Mail-envelope.png" - I did not type or put that in. The code from the edit tab of the Category page for this, as created by edit schema, looks like this (BTW, i tried not to but maybe i killed the edit tabs in this page....can delete after.

  Score Card  Text   text <Parameter name="uploadable"/> </semanticforms_FormInput> </Field>
 * Thanks again for the time you have spent on this subject, and all others, Matt


 * For (2) (which you called (1)), I don't think there's way to add it via Page Schemas at all - which is unfortunate. For (1) - that's very strange; I can't replicate that strange behavior. What version of MediaWiki are you using? Yaron Koren (talk) 13:48, 1 August 2013 (UTC)


 * Version MediaWiki 	1.21.1


 * PHP 	5.3.24 (cgi-fcgi)


 * MySQL 	5.0.96-log


 * Page Schemas (Version 0.3.1)


 * http://coursecaddy.org/index.php?title=Special:Version


 * Just to summarize since I screwed up the numbering (2 threads next time) - no way to ad NOEDITPAGES on a massive scale through page schemas, you have to do it page by page manually. for "uploadable," the way I have it should work, but something odd is going on - I re-did it this morning and instead of insterting envelope.png, its just a blank box I can type in, you can see that here: http://coursecaddy.org/index.php?title=Rustic_Canyon - Matt


 * It looks like "uploadable=", instead of "uploadable", is being added to the form, which causes the problem. This may have been fixed in the most recent SF version; I'm not sure. Yaron Koren (talk) 15:38, 1 August 2013 (UTC)
 * Thanks! That was an easy fix.....and easy to implement on a mass scale but simply upating the form: after generating pages. Folow up question, once you upload a file through semantic forms, it loads the file into the file namespace and images directory, which is great.  How would you (if its possible) have it automatically display the image on the page in which you uploaded, after you upload it through semantic forms?  Again, trying to make this user friendly so they dont have to then type the [{FILE:...) to display.  thx as always, matt


 * The string "File:" needs to be added to the template, right before the variable that holds the file name, like " File: ". Again, that's a bug in Semantic Forms - it might have been fixed in the most recent version, but I'm less sure about this one. Yaron Koren (talk) 14:51, 2 August 2013 (UTC)


 * Worked perfectly, thanks. BTW I did update page schemas and semantic forms, both were a rev behind.  The uploadable bug is still there, and this one. - Matt

Output Format:Sections
I wonder if its a bug or I am doing something wrong. In using the Output Format:Sections functionality of page schemas, an odd thing happens with the template output. A " | " is added to the beginning of each section in the actual page that executes the templates through forms. I tinkered around with removing | from various parts of the template, with no luck. Any idea? example of output below:

Course Overview


 * Rustic Canyon is a tribute to the....


 * No idea. Can you link to the template? Yaron Koren (talk) 12:49, 5 August 2013 (UTC)


 * Sure, check out how the page looks here (see the " | " at the beginning of each section?) http://coursecaddy.org/index.php?title=Rustic_Canyon. The template is here: http://coursecaddy.org/index.php?title=Template:Course_Body & http://coursecaddy.org/index.php?title=Template:Yardage_Book.


 * I am also having some trouble with the field descriptions & display labels in the Yardage Book section of the form itself, and I don't know if perhaps it's related to the above. Once we get root cause on the above i'll decide if i should start another thread....Thanks,  Matt


 * Those extra pipes are coming from the "Course Body" template. Yaron Koren (talk) 15:58, 6 August 2013 (UTC)


 * I saw that too. When i change the output format in Page schemas to plain text and remove them from the template manually (i'm still wondering why Page Schemas adds them?) it looks great.  Perhaps I will just revert back to plain text.  When I try to remove them when the page schemas output is "sections" - it goes haywire.


 * Sorry, I didn't understand. Yaron Koren (talk) 11:35, 7 August 2013 (UTC)

Create Schema page - Does not initialize
After successfully installing this plugin, I get the expected "Create Schema" on my category pages; however, these pages fail to initialize, and I am not able to get back any debug info. Any ideas? Oh, and this is not skin related. ~z929669 Talk 20:29, 29 September 2013 (UTC)


 * Do you mean that you're seeing blank pages? And if so, could this help to diagnose the issue? Yaron Koren (talk) 17:56, 30 September 2013 (UTC)


 * Here is what PHP is reporting:


 * ... and the code snippet (270 is last line):


 * ~z929669 Ixian_Insignia_SM.png Talk 05:27, 1 October 2013 (UTC)


 * What versions of Semantic Forms and Page Schemas are you using? Yaron Koren (talk) 12:12, 1 October 2013 (UTC)


 * I am using 2.5.3 and 0.4-alpha, respectively. ~z929669 Ixian_Insignia_SM.png Talk 14:58, 1 October 2013 (UTC)


 * Ah, okay. It looks like this issue has already been fixed in the version of SF on Git - I guess it was fixed recently. You can either update your code via Git, if you have that, or just wait until the next version of SF is released, which I think will be this week or next. Yaron Koren (talk) 19:54, 1 October 2013 (UTC)


 * Wonderful, thanks! ~z929669 Ixian_Insignia_SM.png Talk 21:46, 1 October 2013 (UTC)

Form to PageSchema conversion
see http://stackoverflow.com/questions/19186528/page-schema-addition-for-converting-forms-to-schema


 * That's great! I just added that URL to the list of PS importing tools. Yaron Koren (talk) 12:32, 7 October 2013 (UTC)

Thanks Please add your PS importing tools link as an answer to the stackoverflow question. This cross-linking might be helpful. Also you are kindly invited for personal communication via my webpage (see my user's profile on Stackoverflow). Unfortunately I can not come to Berlin next week since the event is sold out.


 * Unfortunately, I don't have a Stack Overflow account. Yeah, it's crazy how much interest there was in this SMWCon - hopefully we'll get to meet at a future event. Yaron Koren (talk) 02:54, 17 October 2013 (UTC)

Generate pages doesn't work
MW 1.22.2 PHP 5.3.28 SMW 1.9.1 Page Schemas 0.4.1 7d4e35e 7 Feb 2014

I've designed a schema, but the Generate Pages does nothing.
 * I've read everything available on the extension and talk pages.
 * I've watched the tutorial video
 * I've executed runJobs.php manually and via cron.
 * I've queried the 'job' table (empty).
 * I've played with the $wgPhpCli setting.

The apache error log contains the following when I edit the schema: [Tue Feb 11 03:34:46 2014] [error] [client 127.0.0.1] PHP Notice: Undefined variable: fieldDelimiterSet in /usr/local/devmediawiki-1.22.2/w/extensions/PageSchemas/specials/PS_EditSchema.php on line 260, referer:

I'm out of ideas. Thanks.


 * Hi - I'm familiar with that error message (it'll be fixed), but I'm pretty sure that's not the cause. How many pages are you trying to generate? And what happens if (using the checkboxes) you try to only generate one or two of them at a time? Yaron Koren (talk) 13:21, 11 February 2014 (UTC)

Hello, I am having the exact same issue, I can create the schema with no issues, but page generation will not work. Also tried generating pages one at a time and still a no go...


 * Did you try running runJobs.php? Yaron Koren (talk) 01:10, 19 March 2014 (UTC)

That worked, I'm assuming then that it is a permissions issue? Also, i have to do a null edit with forms to get the updated changes to work, is this normal?


 * Hi - no, it's not a permissions issue; if you're using MW 1.22 (which I'm guessing you are), it's a bug in that version of MediaWiki - see the "Common problems" section. I didn't understand the second question, though. Yaron Koren (talk) 02:43, 20 March 2014 (UTC)

Uploadable issue, partial handling of list of value in a field issue, and some suggestions
Hi there,

After using MW 1.22.5 + SMW 1.9.2 + SF 2.7 + PageSchema 0.4.2 for a week, I have noticed some issues, and some enhancements to perform to get a fully usable extension without need to manually custom templates or forms generated.


 * Issue 1 : Whereas I work with all most recent extension versions, the issue of “uploadable=” in the form generated through PageSchema is still present. So the equal sign still needs to be manually removed, and the bad thing is that you will to need to do it each time you want make evolution on the form.

! Display label But in order to embed the picture in the generated page I would need to have this : ! Display label
 * Enhancement 1 : To go further with uploadable feature, when a field is set to be uploadable, would it be possible to automatically add to the generated template the file name property. For example, if I want a field to import a picture, “Picture” will be the label of the field. By using current feature and adding file namespace to my field, I can get in my template :
 * File:
 * [[File::File:]]


 * Issue 2 : I got another trouble by using multiple values for the same field. So I created through Page Schema a template using a field that can hold a list of values. On the model I ticked “Can hold a list of values” option. On the property, I wrote the allowed values. At generating form, all is ok, list option is appended to the field in the form. At generating model, the parser function #arraymap is not used for the field. That means that even if I can choose on the form multiple values for the field, field in the page generated through the form doesn’t support multiple values in it. Again, I have then to manually modify my template by using #arraymap. So I think when, on a particular field for a template, we choose “Can hold a list of values”, the template generated should use #arraymap. Moreover this is the behavior of the special page CreateTemplate.


 * Enhancement 2 : Finally, I have a suggestion for next version of page schema: can you add an optional category field for the template, as it is done on the special page CreateTemplate : “Category defined by template (optional) “?


 * Issues #1 and #2 both sound like bugs - I'll have to look into those. (I'm especially surprised by issue #2.) I'm also surprised by enhancement #1 - if you add a property for that field, it should show up in the template - not in the syntax you have it, but with a #set call, which should have the same effect. Does the #set call not show up for you? And for enhancement #2, I felt that that was not necessary because the category where the page schema is defined is already being added to the template. Do you need to add a 2nd category? Yaron Koren (talk) 13:44, 28 April 2014 (UTC)

generate pages doesn't work
M.W. 1.22.5 smw 1.8.0.5

Schemas looks like a great extension.

I get this message when i try to generate: Fatal error: Call to a member function getNsText on a non-object in /home/yidtrave/public_html/mw/extensions/PageSchemas/PageSchemas.classes.php on line 66


 * That's strange... what version of Page Schemas are you using? Yaron Koren (talk) 21:07, 28 April 2014 (UTC)
 * Version 0.4.1


 * Alright. My guess is that it's something specific to this schema, in some way. Is this a public wiki? If not, could you put the schema XML somewhere, like pastebin, or email it to me? Yaron Koren (talk) 11:54, 29 April 2014 (UTC)


 * Thanks for emailing it to me. I couldn't reproduce the problem; but I just realized that you're using an older version of Page Schemas - 0.4.1 instead of 0.4.2. Could you try upgrading, and see if that fixes the problem? Yaron Koren (talk) 20:48, 30 April 2014 (UTC)


 * This was resolved - the issue was something I should have thought about right at the beginning, which was the MW 1.22 jobs bug. Yaron Koren (talk) 12:51, 6 May 2014 (UTC)

MW 1.23
''If you are using MediaWiki 1.22, there is a good chance that trying to generate pages automatically will not work, because of a bug in MW 1.22 in which jobs that modify pages simply do not get run. If that is happening for you, it is recommended to add this call in LocalSettings.php, which should restore the correct behavior:''

I have same problem with MW 1.23.1 and SMW 1.9.2, but $wgPhpCli = false; don't solve the problem.


 * It's not surprising that that fix would not help. If you call runJobs.php, do the pages get created? Yaron Koren (talk) 23:40, 29 June 2014 (UTC)


 * Yes, this is the solution I use now. Baxi69 (talk) 16:22, 3 July 2014 (UTC)


 * Alright - this problem came up for the Replace Text extension as well, which similarly makes page edits via jobs, and there some people were able to get around the problem in MW 1.23 by adding this to LocalSettings.php:

$wgRunJobsAsync = false;
 * That might work here. Yaron Koren (talk) 16:42, 3 July 2014 (UTC)


 * Now i installed an identical configuration on a new server, i just took the current versions via composer and git. I copied the Page schema from the older wiki (installed about 1 month ago) to the new server. The schema is diplayed corret on the catogory page, but gererating pages don't even create jobs... (i checked this in phpmyadmin...)
 * Baxi69 (talk) 12:32, 28 July 2014 (UTC)


 * That's strange; what's the difference between the two setups? Yaron Koren (talk) 12:47, 28 July 2014 (UTC)


 * Nothing, that's the real strange point. I made a setup protocol for the first, and made the second in same setup. All error scripts are empty. Baxi69 (talk) 13:41, 28 July 2014 (UTC)


 * I updated now a second wiki on another server with MW 1.23.2 and SMW 2.0, and i have the same effect. Even with adding

$wgRunJobsAsync = false;
 * No jobs get created at all.Baxi69 (talk) 16:38, 19 August 2014 (UTC)


 * Is the issue that the jobs are not being created, or that they're not being run? You can check the "job" DB table to see. Yaron Koren (talk) 18:42, 19 August 2014 (UTC)


 * Not being created. I checked in the job table. Baxi69 (talk) 09:41, 21 August 2014 (UTC)

Blanks at end of parameters
When defining a menuselect forminput for a field the structure parameter needs a blank at the end: <Field name="Thema"> <semanticforms_FormInput> menuselect</InputType> <Parameter name="size">150</Parameter> <Parameter name="structure"> </Parameter> </semanticforms_FormInput>  Seite</Type> </semanticmediawiki_Property> </Field> so that the form field is generated as: Thema:

because: Thema:

does not work. Currently the blank is removed when using the schema editor. Manually adding it works. I think this is a bug.


 * Thanks for letting me know about that. For now, I think you could work around it by switching the order of the parameters. Yaron Koren (talk) 13:44, 14 October 2014 (UTC)

Adding additional information to generated templates
Hi

I am using Semantic Titles to set the Title of my pages to a Semantic Property contained on a page. I then use DEFAULTSORT on the page to tell the category page to sort on the Semantic Title by adding the following to the page:

I am using Page Schemas to create Semantic Forms and would like the templates it generates to include this statement after the statement it inserts. Is there a way to get Page Schemas to include additional statements such as this when it generates templates?

Many thanks

Duncan


 * I don't think so, but I'm not sure. Yaron Koren (talk) 22:53, 7 November 2014 (UTC)

JSMW_Pageschema
To be better able to handle PageSchemas I have created the following GitHub project: I am willing to show applications for it at SMWCON 2015 - what do I need to do to get a slot there? Also I'd like to be able to change the way the Template are generated. Where would I have to start to do so or is there some kind of callback I could use? --Seppl2013 (talk) 17:53, 13 January 2015 (UTC)
 * https://github.com/WolfgangFahl/JSMW_PageSchema


 * You just need to sign up for SMWCon. If you mean changing the template wikitext that's generated automatically, at the moment you'd have to either change the relevant Semantic Forms code or write your own template-creation code. Yaron Koren (talk) 19:05, 13 January 2015 (UTC)

Uncaught Error: Unknown dependency: jquery (load.php:167) with MW 1.24.1
I can't seem to get PageSchemas working properly on my wiki with MediaWiki 1.24.1. The extension seems to have been loaded properly and I can get to the Create Schema page, but the Add template and Add section buttons don't work. The Javascript console says:

Same problem in Chrome & Firefox (latest versions).

I've tried:
 * 1) Upgrading to the latest SemanticForms (instead of the version included with SemanticBundle)
 * 2) Adding $wgIncludejQueryMigrate = true; to my LocalSettings.php
 * 3) Removing SemanticBundle and installing the latest version of SemanticMediaWiki (with Composer) and all extensions manually
 * 4) Clearing out my database & mediawiki directory and setting up brand new a new MW 1.24.1 installation from scratch, then manually reinstalling SemanticMediaWiki + extensions (latest versions)

I read that SemanticMediaWiki 2.0 is officially compatible with MW 1.24.1, which is why I decided to switch to the latest version. I also read about jquery issues with MW 1.24.1 which are supposedly addressed with $wgIncludejQueryMigrate = true;... Could this be the root cause?

Is there anything else I should be tweaking?

Am really at a loss for what to do next, and would appreciate any advice!


 * You should add "?debug=true" (or "&debug=true") to the URL, so you can see a more helpful JS error message. Yaron Koren (talk) 22:25, 15 January 2015 (UTC)


 * Ah, now I think I know the issue. This was a JS bug that was fixed way back in September; I assume you're using Page Schemas code from before then. I just released a new version of Page Schemas, that was well overdue; if you get the latest code, the problem will hopefully go away. Yaron Koren (talk) 14:54, 16 January 2015 (UTC)

--- Fixed! Thanks!

ArrayMaps in Schemas?
How does one format fields for arraymapping? It doesn't appear to be a part of any default selection - therefore, does one edit the xml?


 * You just need to specify that a field can hold a list of values - I think that's one of the options, no? Yaron Koren (talk) 15:35, 19 January 2015 (UTC)

Thanks Yaron. I'm sorry I asked the wrong question. I'm new to all this and I really like schemas. I watched the YouTube video - which was a great primer. And I'm reading your eBook. My question really is, what about multidimentional data - compound data. How is that handled in schemas? I assume if Internal Objects is part of SB, there has to be a hook into schemas. Thanks for your help.