Extension talk:Page Schemas

Only for editors
Is it possible to use   in combination with Page Schemas?


 * What is "onlyforeditors"? Yaron Koren (talk) 17:22, 15 May 2018 (UTC)

I think I can help here by clarifying things: what we would like to have is something like this in the schema XML:  This should result to this in the generated template: {#if:| ! somefieldlabel Is this possible? Does it need a code change? If yes, any hints where and how complex?
 * - class="somehtmlclassname"
 * somepropertyname::}}


 * I don't think there's any way to add an HTML class to a generated table row, unfortunately. I don't know how complex it would be to add it. Yaron Koren (talk) 17:23, 23 May 2018 (UTC)

Change allowed values
If I change the names of the allowed values (e.g. to correct a typo) I get the message "[new name] is not in the list of the allowed values of the ... property". Is it possible to change the spelling of the allowed values?


 * The ReplaceText extension may help with this, if I understand the issue correctly. Yaron Koren (talk) 14:26, 19 March 2018 (UTC)

Customise templates
This is similar to a query back in 2014 but I wondered if anything had changed. I would like to add some custom information to the template, but each time I edit the Schema and generate pages, this is lost. (In my case I'd like to add a Cargo query which displays a location on a map.) Is this possible, without having to manually cut and paste each time? Thanks. Jonathan3 (talk) 23:41, 21 November 2016 (UTC)


 * Still no. There's a lot that could be improved in Page Schemas - it's not that popular an extension, I don't think, so it hasn't gotten a lot of attention. Yaron Koren (talk) 03:30, 22 November 2016 (UTC)


 * That's a shame, as the ability easily to change the data structure and the associated template/form pages seems invaluable. I found it very useful at the start when working things out. Jonathan3 (talk) 00:37, 3 December 2016 (UTC)


 * Regarding "popularity", I've tried both the manual and the schema way, and this extension has the potential to make really smooth the use of of Forms. And this little feature is the stumbling block.  Untill it's fixed, you have to edit + generate forms in 2-steps, to redo customizations.
 * Thanks anyways Ankostis (talk) 02:41, 20 September 2018 (UTC)

tooltips in page forms using Cargo
--138.232.124.69 12:42, 28 March 2018 (UTC)

Since switching to Cargo from SMW the tooltips I have on my forms don't display as tooltips. They're just text on the page, even though the schema generator has this notation in it "Show description as pop-up tooltip"


 * I'm guessing that the template is calling #info. That's no longer working because #info is defined by SMW (strangely, SMW includes its own tooltip functionality). I would recommend installing the SimpleTooltip extension - then, if you recreate the template from the schema, the #info calls will hopefully get changed to #tip-text calls. Yaron Koren (talk) 14:01, 2 June 2017 (UTC)


 * that does it! The new class is actually:  #tip-info  cheers --Anrake (talk) 14:53, 2 June 2017 (UTC)

Jobs not running
I've had several Page Schemas jobs in the queue for over 3 days. I'm adding a new category and want to use it to scaffold the template, form and new semantic properties. I've tried all the tricks I can find to force them to run including changing job_attempts to 0, various combinations of $wgJobRunRate and $wgRunJobsAsync but nothing seems to work. Tonight I tried to delete the jobs and run Generate Pages again, but they still got stuck. I even ran update.php and rebuilt the Semantic index. The last time I used Page Schemas was probably last July. Are there any ideas to force these to run?

MediaWiki 1.28.0 PHP 5.6.33 (cgi-fcgi) MySQL 5.6.38-83.0 Semantic MediaWiki 2.5.5 Page Schemas 0.4.6

--Anrake (talk) 11:39, 22 January 2018 (UTC)


 * Have you tried calling runJobs.php? Yaron Koren (talk) 14:08, 22 January 2018 (UTC)


 * yeah, many times. --Anrake (talk) 14:43, 22 January 2018 (UTC)


 * And what happens? Yaron Koren (talk) 17:35, 22 January 2018 (UTC)


 * nothing, there's no output, as though the jobs don't exist. Other jobs run, if they exist, but not anything from "pageSchemasCreatePage". showJobs.php outputs 0. --Anrake (talk) 21:19, 22 January 2018 (UTC)

Unregistered users may see only certain fields
Is it possible to configure Page Schemas/MediaWiki so that unregistered users are able to see only certain fields?


 * No. Yaron Koren (talk) 00:41, 26 March 2018 (UTC)


 * To bad. Is a woraround possible? --138.232.124.69 12:42, 28 March 2018 (UTC)


 * Could you explain what the need is? Yaron Koren (talk) 19:15, 28 March 2018 (UTC)


 * I'm using Mediawiki in combination with PageSchemas to create a DB. Until now the DB is only a working tool, but we plan to go online in a few weeks.

Since it is for the moment a private DB there are some fields in our schemas containing notes that are supposed to be only private notes for the contributors.

Is it possible to cofigure MediaWiki/PageSchemas in such a way, that certain fields may not bee seen by unregistered users? --93.70.101.215 07:45, 1 April 2018 (UTC)


 * Oh, I see - you mean actual data fields; I thought you meant fields within the Special:EditSchema form. In either case, the answer is no. If there's data that you don't want certain users to see, the best solution is to keep it out of the wiki altogether - and it may make sense to create a separate, more restricted wiki to contain just that data. Yaron Koren (talk) 18:00, 2 April 2018 (UTC)

Issue Installing to MW 1.31
Should this extension work with 1.31?

I Downloaded the version of this extension marked for MW 1.31.

Trying to run update.php.

Getting the following error: /home/gunsywtx/public_html/maintenance$ php update.php

Fatal error: Uncaught Exception: /home/gunsywtx/public_html/extensions/PageSchemas/extension.json does not exist! in /home/gunsywtx/public_html/includes/registration/ExtensionRegistry.php:107 Stack trace: thrown in /home/gunsywtx/public_html/includes/registration/ExtensionRegistry.php on line 107
 * 1) 0 /home/gunsywtx/public_html/includes/GlobalFunctions.php(50): ExtensionRegistry->queue('/home/gunsywtx/...')
 * 2) 1 /home/gunsywtx/public_html/LocalSettings.php(230): wfLoadExtension('PageSchemas')
 * 3) 2 /home/gunsywtx/public_html/includes/Setup.php(94): require_once('/home/gunsywtx/...')
 * 4) 3 /home/gunsywtx/public_html/maintenance/doMaintenance.php(81): require_once('/home/gunsywtx/...')
 * 5) 4 /home/gunsywtx/public_html/maintenance/update.php(245): require_once('/home/gunsywtx/...')
 * 6) 5 {main}


 * Yes, using the "ExtensionDistributor" with any of my extensions is generally not a good idea, because it just represents a random, and usually outdated, snapshot. I would try using the latest Page Schemas code instead. Yaron Koren (talk) 15:13, 25 June 2018 (UTC)

More Documentation?
Besides the video and the landing page for this extension, is there any other source of documentation? Ankostis (talk) 14:06, 19 September 2018 (UTC)


 * There's also this, though it's not much. Yaron Koren (talk) 01:05, 20 September 2018 (UTC)

Page Schema Infobox Templates
Can you set a template created by Page Schemas to output an Infobox or that can only be done by editing the source code after Page Schemas creates the template?


 * What do you mean by an "infobox"? Yaron Koren (talk) 16:13, 15 November 2018 (UTC)

Schema Not Saving
I have two issues, really.

1) I've found a scenario where the "Save Page" function in the "Edit Schema" tab no longer actually saves the schema.

If I create a schema from a blank category, and use the form in "Edit Schema" to do so, everything is great.

If, however, I edit the schema using the "Edit" tab, then I'm no longer able to save changes made to the schema using the "Edit Schema" form. The schema is locked to the revision created during the manual "Edit".

I first noticed this when I was attempting to manually fix another issue...

2) When adding a Semantic property of type "Telephone Number", the "Edit Schema" form would show it in the dropdown as "Telephone 2ber" if it was the 2nd field, or "Telephone 3ber" if it was the third, and so on. That strange "2ber" or "3ber" or "7ber" would show up in the raw schema XML.  I changed it manually in the "Edit" tab, but then realized that I was locked to that revision.

I thought I was losing my mind for a bit, but I was able to determine the above.

Any thoughts?

I enabled debug in LocalSettings.php, but no messages show up.

--dvicci (talk) 02:23, 29 December 2018 (UTC)


 * Sorry about that! No, you're not losing your mind. I actually had a fix for this right after you reported it, but forgot to check it in until now. I just checked it in. Yaron Koren (talk) 19:22, 14 January 2019 (UTC)

Values parameter + Documentation
How do I enter multiple values for a dropdown input type? I can easily get this working with Page Forms but can't figure out what to put in the field to make this happen in Page Schemas. It would be very helpful to have some documentation for this plugin that outlines how to write parameters and values for each input type as well as providing direct examples. Thx. TiltedCerebellum (talk) 05:13, 5 June 2019 (UTC)


 * Sorry for the long delay. I think you're using neither Cargo nor SMW, so the set the values has to be defined for the form input itself. If you add into the big "Enter parameter names ..." input something like "values=A\,B\,C", that should hopefully work. Yaron Koren (talk) 16:26, 12 August 2019 (UTC)

Mysterious error
When I try to create a schema, I get this error after trying to save:

I've turned on PHP debugging and nothing shows up. I don't know how to debug this.


 * If you add "$wgShowExceptionDetails = true;" to LocalSettings.php, it may produce a more useful error message. Yaron Koren (talk) 15:53, 12 August 2019 (UTC)

Link to schema value?
If I were to include a field in the schema that provided a unique ID for the page could I link to the page using the value of the field?


 * If you're using Cargo or SMW, you can do it by querying on the ID field... if I understand your question correctly. Yaron Koren (talk) 18:35, 3 October 2019 (UTC)

Template from Schema with display="nonempty"
The template code seems to be missing two brackets closing the #if statement.

This is the schema:

This is the template generated:

Installed versions are: MW 1.33.1, PHP 7.3.10 (cgi-fcgi) , SMW 3.1.1 , Page Forms 4.6 , Page Schemas 0.4.9 , ParserFunctions 1.6.0

Maybe it is related to the other problem i am having?

Thanx for your great work! Any suggestions? Andi 3ö (talk) 16:03, 6 December 2019 (UTC)

No permission on Create Schema
Hi, I haven't used SMW since 2008 so forgive me if this is something obvious.

After installing the extension the Create Schema button is showing up in a Category page, but on clicking it I only get:

''Permission error

''You do not have permission to edit this page, for the following reason: ''The action you have requested is limited to users in the group: Users.

This is as admin, staff, etc. across multiple users. I edited LocalSettings.php with:

and added:

for safe measure. Also tried with 'staff' and 'admin' but the message never changes.

Thanks!


 * What version of Page Schemas and MediaWiki are you running? Yaron Koren (talk) 02:41, 3 March 2020 (UTC)