semantic-mediawiki.org:Community portal

From semantic-mediawiki.org
Jump to: navigation, search
Community portal of Semantic MediaWiki

Welcome to the community portal. This is the place for general inquiries, your ideas or comments concerning this wiki. Here you may get in touch with one of the admins of this wiki, who also use this portal as a noticeboard.

If you are looking for support with problem about the software itself, please have a look at the info page on getting support.


We are always looking for ways to improve documentation and communication with the community therefore it would help us if you could take 5 minutes of your time and fill out the survey form. Thank you.

Contents

Thread titleRepliesLast modified
Issues with the "sep" function in mode Query template.407:37, 19 November 2016
#github exception110:21, 11 July 2016
Link to Tips on main page219:02, 1 June 2016
Illegal property values + sorting410:55, 28 April 2016
How to escape links in properties220:54, 27 April 2016
Could anyone explain unexpected behavior please?300:57, 22 April 2016
Help:Incoming format219:30, 30 March 2016
Is it possible to specify and obtain another pages properties in a query results table?1014:04, 12 March 2016
Talk/Discussion Pages213:23, 10 February 2016
Product database809:34, 8 February 2016
Expired Security Certificate120:44, 21 December 2015
SMW and ShortUrl011:29, 29 November 2015
SMW 2.3 and #ask format=template211:06, 29 November 2015
Error on talk pages101:46, 17 November 2015
The phrase, "... in conjunction with many spinoff extensions ..."023:00, 3 November 2015
Semantic search in documents (indexing)806:40, 21 October 2015
Images in Graphviz nodes - which path to use?023:23, 20 October 2015
Strange Properties appearing413:37, 20 October 2015
Version support111:04, 13 October 2015
Creating new content (tables) through other tables1722:40, 21 September 2015
First page
First page
Previous page
Previous page
Last page
Last page

Issues with the "sep" function in mode Query template.

There is a issue since the 2.1 SMW version when we use a "sep" function with the Template format.

Here is the code:

{{#ask: [[Category:City]] [[located in::Germany]]
              | format = template
              | template = Link
              | sep =  • 
              | link = none
}}.

Here is the result:

Main PageMain PageMain PageMain PageMain PageMain Page

There should be a separator between the each value. That's not the case obviously. It seems to be a bug.

LIMAFOX76 (talk)17:05, 24 August 2015

`sep` is only used as divider for when multiple values are assigned to same field (property) for querys like:

{{#ask: [[Category:City]] [[located in::Germany]]
 |?Has something --> used by/for sep

The template has to care for the formatting, values do not contain arbitrary separators (except those concatenated of multiple values) that weren't part of its value declaration.

You can make a feature request [0] to have the `sep` parameter made available as {{{sep}}} in a template (so it can be used further within a template).

BTW: I tested it against 1.9.2.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/

MWJames (talk)18:14, 24 August 2015

Yet it's working on a version 1.8

Here are the link (bottom template): http://stargate.shoutwiki.com/wiki/MacKenzie_%28doctor%29

And now the same template on a 2.1.3 version: http://battlestar.wiki/Mod%C3%A8le:Palette_Personnages

LIMAFOX76 (talk)22:18, 24 August 2015

I replaced |format = template by |format = list living the rest as this and now it's working well. With this, I can change the sep parameter using the template I need.

LIMAFOX76 (talk)11:34, 8 September 2015
 
 
 
 

#github exception

Edited by another user.
Last edit: 10:21, 11 July 2016

I just noticed that the #github parser (from the Github extension) is currently throwing exceptions. See Help:Sorting for an example.

Exception encountered, of type "FileFetcher\FileFetchingException"
[80edb86c] /wiki/Help:Sorting FileFetcher\FileFetchingException from line 30 of /.../w/vendor/jeroen/file-fetcher/src/SimpleFileFetcher.php: Could not fetch file: https://cdn.rawgit.com/SemanticMediaWiki/SemanticMediaWiki/master/issues/902
Backtrace:
#0 /.../w/vendor/jeroen/file-fetcher/src/CachingFileFetcher.php(44): FileFetcher\SimpleFileFetcher->fetchFile(string)
#1 /.../w/vendor/jeroen/file-fetcher/src/CachingFileFetcher.php(37): FileFetcher\CachingFileFetcher->retrieveAndCacheFile(string)
#2 /.../w/vendor/jeroen/mediawiki-github/src/GitHubParserHook.php(58): FileFetcher\CachingFileFetcher->fetchFile(string)
#3 /.../w/vendor/jeroen/mediawiki-github/src/GitHubParserHook.php(48): GitHub\GitHubParserHook->getFileContent()
#4 /.../w/vendor/jeroen/mediawiki-github/src/GitHubParserHook.php(36): GitHub\GitHubParserHook->getRenderedContent()
#5 /.../w/vendor/mediawiki/parser-hooks/src/FunctionRunner.php(49): GitHub\GitHubParserHook->handle(Parser, ParamProcessor\ProcessingResult)
#6 /.../w/vendor/mediawiki/parser-hooks/src/HookRegistrant.php(45): ParserHooks\FunctionRunner->run(Parser, array, PPTemplateFrame_DOM)
#7 [internal function]: ParserHooks\HookRegistrant->ParserHooks\{closure}(Parser, PPTemplateFrame_DOM, array)

etc, etc.

Cavila (talk)23:10, 10 July 2016

Heiya Cavila, thanks for finding. I just opened issue 4 on GitHub for this. Also I removed the offending lines from the page:

** {{github|issues/902|title=#902: Extend sort/order options for query / queryresults}}
** {{github|issues/874|title=#874: Do not filter when asked to sort}}
** {{github|issues/1045|title=#1045: Feature request: parameter for custom collation algorithm in query}}
[[kgh]] (talk)10:21, 11 July 2016
 

Link to Tips on main page

Hello, could we not have the tips on the main page? I was thinking under "Usage". For readers and contributors a good idea to promote them, I was thinking. It's a lovely format, are there ideas to expand/sort those?

Zabien (talk)18:39, 1 June 2016

Heiya Zabien, actually the link is already on main page but in the "User Community" section. Since we cannot have enough of it I also place it in the "Usage" section. Cheers

[[kgh]] (talk)18:54, 1 June 2016

Ah, was blind there! Hidden under support! Like it better where it is now, though! Superb, thanks! – As I am at it: Would the "Community portal" not be missing in the User Community list, too? I know this is redundant with the sidebar, but so are other links...

Zabien (talk)18:58, 1 June 2016
 
 

Illegal property values + sorting

Edited by another user.
Last edit: 19:00, 27 April 2016

Just a couple of short questions:

  1. Can SMW support "partial dates"? Let's say, I would like to make an event article with date set to 1990-01-xx as I'm still not sure what the correct date is, effectively read as "just January 1990". Is there any workaround to use it in SMW? (Maybe "Allows pattern" but with date-semantics, not text, somehow?)
  2. My "partial dates" lead to errors marked with exclamation marks, and that's fully clear why. However, would it be possible not to exclude broken pages from the #ask result refined with | sort = Has date?

Thanks.

Halo (talk)10:02, 25 April 2016
  1. Indeed, currently only things shown on the help page for datatype date are possible so this would be a feature request. Probably you could recreate an example setup at sandbox.semantic-mediawiki.org and link to this when creating and elaborating the feature request at github.com. Personally I cannot assess if it will be possible to support partial dates such as year-month or month-day.
  2. Perhaps you could additionally set some kind of "helper" property which is automatically set in a way that it allows sorting, e.g. a property of type text: So a date like January 1, 2016 could be 20160101 or January 1990 would be 19900100 etc. and sorted accordingly afterwards.
[[kgh]] (talk)19:02, 27 April 2016
 

> still not sure what the correct date is, effectively read as "just January 1990". Is there any workaround to use it in

I'm not sure what the problem is but annotations like Jan 1990 are supported, please have a look at [0].

Of course 1990-01-xx is not supported because the parser doesn't know how -xx should be interpret and I'm not entirely sure to have the parser in future to assume that it means Jan 1990.

[0] http://sandbox.semantic-mediawiki.org/wiki/Partial_dates

MWJames (talk)21:12, 27 April 2016

Oops, that's news to me. Did not know that this was working though admittedly a couple of years passed since I had a more intense peep at something like this. Great!

[[kgh]] (talk)21:24, 27 April 2016
 

> I'm not sure what the problem is

Me and my inattention... Reading the official documentation always helps, and I'm very sorry for being not careful reading it. Thank you very much! Also I noticed that for some reason I used Has type::Text instead of Has type::Date for one my properties whilst the rest were and are well-typed. Fixed it locally.

P.S. It looks like YYYY-MM can work as well thus I need neither xx nor 00. That's awesome!

Halo (talk)10:55, 28 April 2016
 
 

How to escape links in properties

Hi,

I would like to set and show a property that contains internal links (i.e. a description containing links to other pages). This however does not work for in-text annotations and the {{#set}} does not show the value. How to do it?

Kalas (talk)16:30, 27 April 2016

I guess you are looking for the $smwgLinksInValues configuration parameter.

[[kgh]] (talk)18:45, 27 April 2016
 

> {{#set}} does not show the value. How to do it?

[0, 1, 2] contains some examples that shows how #set can be used to display values with the help of a template.

[0] http://sandbox.semantic-mediawiki.org/w/index.php?title=Template:Human

[1] https://www.semantic-mediawiki.org/wiki/Examples/Parser/Text_that_includes_other_annotations

[2] https://www.semantic-mediawiki.org/wiki/Help:Setting_values#Template_parameter

MWJames (talk)20:54, 27 April 2016
 

Could anyone explain unexpected behavior please?

Recently I have finally found this gem: http://sandbox.semantic-mediawiki.org/w/index.php?title=Utilisateur:Cavila/previous_and_next&oldid=2336 - this page describes a nice example of getting previos and next pages against a certain query. And it would be very nice to introduce it to my wiki I'm currently developing. For example, I have 4 pages:

  • Live event:2012/05/26
  • Live event:2012/07/14
  • Live event:2012/12/03
  • Live event:2012/12/21

Each page above is categorized as [[Category:Live events]]. So the following query works perfect: [[Category:Live events]] returning all 4 pages.

However, if I add another greater-than predicate specifying a certain page, [[Category:Live events]] [[>Live event:2012/03/03]], I get a syntax error:

   Some part "<nowiki>...</nowiki>" of the query was not understood

I'm really confused on:

  • how the <nowiki> token got there
  • where the ellipsis came from

Not sure if it's possible to escape it somehow, and initially I thought that < or > might the reason of the issue. So I also tried !: [[Category:Live events]] [[!Live event:2012/03/03]] -- that simply gives nothing, and not three pages as it was expected.

If it would help:

  • I'm using SMW 2.3.1, however the current SMW sandbox version is 2.4-alpha (68d3701)
  • Live event is a wiki namespace

Has 2.4 something new that allows these queries to run? At least, the only place I found it described was a personal page of User:Cavila I provided above (or I'm blind to see it in the official documentation).

Thank you in advance.

Halo (talk)12:09, 21 April 2016

> Has 2.4 something new that allows these queries to run? At least, the only place I found it described was a personal page of User:Cavila I provided above (or I'm blind to see it in the official documentation).

https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/RELEASE-NOTES.md#new-features-and-enhancements

https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1291

MWJames (talk)12:59, 21 April 2016

I would never have found it myself. Thank you!

Halo (talk)13:08, 21 April 2016
 

Finally switched to a SMW 2.4 snapshot, and your pull request works like a charm! Thank you again! Navigation now got better. :)

Halo (talk)00:57, 22 April 2016
 
 

Hopefully, it's just a temporary glitch, but at the moment, I cannot access Help:Incoming format.

Cavila (talk)17:54, 30 March 2016

The problem has something to do with {{#smwdoc:incoming}}, which causes the page to black out.

Cavila (talk)17:58, 30 March 2016

Thanks for mentioning! I added issue 1484. Cheers

[[kgh]] (talk)19:30, 30 March 2016
 
 

Is it possible to specify and obtain another pages properties in a query results table?

Hi.

As I'm still researching SMW facilities, I've requested a test account in the SMW sandbox. The main interest for me is binding pages using the Has page property. I've managed to make it work using subqueries, but I have no idea how to make it work for tabular views generating a simple report.

As of March 7, 2016 my test page looks pretty cool for inline queries since I can "dive" through multiple pages using a query per a required page. (All of the objects are split into separate pages) But would it work for tables? Perhaps it's better to ask it as: "can I use multiple subqueries in a single query depending on the main label somehow?". There's a table and I'm aware of displaying "directly on page" properties only (Has text in my case). What I would like to achieve is

  Venue City Country
HaloTestHeinekenMusicHall Heineken Music Hall Amsterdam Netherlands

but I'm only able to get:

  Venue
HaloTestHeinekenMusicHall Heineken Music Hall

using this query: {{#ask: [[Has text::Heineken Music Hall]] | ?Has text = Venue | format = table}}. Still have no idea even how to fetch the city.

Is it possible to display properties of referenced pages per a single row in query result tabular representation? Could anyone review/suggest whether I'm doing it right?

Thank you in advance.

Halo (talk)08:42, 7 March 2016

Oops, maybe it's better to ask it at Help talk:Selecting pages?

Halo (talk)10:57, 7 March 2016
 

As far as I understand, this is not possible in Semantic MediaWiki directly, however it can be worked around. In short, the template format is required, and here it is:

 {{#ask: [[Category:Live events]]
 | ?Self date = Date
 | ?Ref venue = Venue
 | mainlabel = -
 | format = template
 | template = Row:Live events table
 | named args = yes
 }}
 

The Template:Row:Live events table template is as follows:

 <includeonly><!--
 -->{{#vardefine: DATE | {{{?Date}}}}}<!--
 -->{{#vardefine: VENUE | {{{?Venue}}}}}<!--
 -->{{#vardefine: CITY | {{SHOW_REF|{{#var: VENUE}}|?Ref city}}}}<!--
 -->{{#vardefine: COUNTRY | {{SHOW_REF|{{#var: CITY}}|?Ref country}}}}<!--
 -->{{#vardefine: CONTINENT | {{SHOW_REF|{{#var: COUNTRY}}|?Ref continent}}}}<!--
 -->{{#var: DATE}}, {{#var: VENUE}}, {{#var: CITY}}, {{#var: COUNTRY}} {{#var: FLAG}}, {{#var: CONTINENT}}<br/><!--
 --></includeonly>
 

In the template above I use named arguments for easiness. However, I use #vardefine and #var to store and retrieve some data from the current row. Also I use two auxiliary templates: SHOW SELF and SHOW REF to simplify data extraction. The first template, SHOW SELF, is just a shortcut:

 <includeonly>{{#show: {{FULLPAGENAME}} | {{{1|}}}}}</includeonly>
 

to extract a property for the current page. The second template called SHOW REF simplifies data extraction for the given page, not the current one:

 <includeonly>{{#show: {{PARSE_SMW_PAGE | {{{1|}}} }} | {{{2|}}}}}</includeonly>
 

And yes, the PARSE SMW PAGE just strips left and right brackets, and optional leading colon:

 <includeonly>{{#explode:
 {{#sub: {{{1}}} | {{#ifeq: {{#pos: {{{1}}} | [:}} | 1 | 3 | 2 }} | -2 }}
 | {{!}}
 }}</includeonly>
 

So I managed to crawl the following page relationships:

  • Venue to city
  • City to country
  • Country to continent
Halo (talk)23:45, 10 March 2016

This is surely a more elaborate example on how to use the template output and it would be nice if you could try to remodel this in a way that it would not require #vardefine/#sub (as we cannot use this in our test environment) so that we can convert this example into something like [0].

Examples like [0] are run by our test environment and help use to ensure that releases or developments don't break codified examples by running them as Help:Integration tests.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0203.json

MWJames (talk)11:15, 11 March 2016

Honestly I don't understand what context you're referring... However I'm not sure if it can be remodelled since I use the variables to hold intermediate data that's supposed to be propagated for "deeper" queries and templates to simplify some SMW aspects.

Halo (talk)17:48, 11 March 2016

> Honestly I don't understand what context you're referring

Well, the context is that the more we can include use cases such as yours in our integration test repository the more we are able to ensure that those will work in future.

> However I'm not sure if it can be remodelled since I use the variables to hold intermediate data

In this case, never mind. We can only work with examples that don't introduce extra inter-dependencies (we have no direct control over #var etc. therefore it cannot be used in our tests).

MWJames (talk)18:13, 11 March 2016

Would SMW ever support such a scenario out of box let's say that it won't ever require such a heavy and hard to understand template scenario as mine? Probably something being able to "peek deeper" across several pages? Or, as I asked in the question, I'm abusing the SMW facilities?

Halo (talk)18:50, 11 March 2016
 
 
 
 
 

Talk/Discussion Pages

I have a basic question that I haven't read yet...How do I get the talk pages to produce like the ones on here? I've added Template: Talk page, and I have Semantic Form up and running,

I'm guessing I have to do something with properties and classes, but haven't figured it out yet!

Thank you, Reziun

Reziun (talk)04:51, 10 February 2016

Hi Reziun,

The way the talk pages are set up has nothing to do with SMW or Semantic Forms. This site makes use of the LiquidThreads extension (v2.2 alpha). I'm not sure I could recommend it to you because it is no longer very actively maintained, but then as you can see, it's working alright.

Cavila (talk)09:14, 10 February 2016

Ah thank you,

That stinks because it's so easy to contribute in discussions with this! It might be easier just to get the group use to discussing the regular MediaWiki way, especially since it's unmaintained Alpha.

I appreciate the quick response!

Reziun (talk)13:23, 10 February 2016
 
 

Product database

Hi, we use MW as a source for basic information about our products in our company for internal use. Recently I have been asked, whether it is possible to return some information from the Wiki using some API. As it would be difficult to parse the source text and extract the info, I'm thinking about using the SMW.

Today the structure of our wiki pages is as follows:

  • Each product is described in a separate page (there are also pages not directly related to individual products)
  • Products are categorized
  • Products can consists of other products (such as CPU board in rack based system) via links
  • Each product has one or more model variants. The variants are described via a table where rows are models and columns are attributes. The attributes are usually number or availability of an interface, display resolution, redundancy support, etc. The table is created via a template.

My idea is to move some important information about the product from the plain text into SMW attributes. However I'm not sure, how to go with the model variants. I would like to avoid creating of individual pages for every model variant. Also the model variants are named using a slash and letter (product/A, product/B), which collides with MW sub-pages.

I would be thankful for any idea.

Kalas (talk)17:23, 4 January 2016

> I would like to avoid creating of individual pages for every model variant. Also the model variants are named using a slash and letter (product/A, product/B), which collides with MW sub-pages.

[0] should give you an idea how to accomplish this. Feel free to use the sandbox and adjust the example.

[0] http://sandbox.semantic-mediawiki.org/wiki/Product_A

Cheers

MWJames (talk)20:19, 4 January 2016

Thanks for the example! It looks so simple :-)

I have noticed that attribute names like in your demo are "Has component of", "Is product variant of", "Has description" e.g. long names using "Is", "Has". etc. What is the idea or requirement behind?

Our Wiki pages are in Czech. We often tend to use English in source code as sometimes we have to provide it to our customers and Czech is difficult to understand for foreigners and English is universal. This is not the case, but I always have in mind someday can change it. Do you recommend to use English for SMW or is there a way for multilanguage attributes?

Kalas (talk)09:53, 5 January 2016

> I have noticed that attribute names like in your demo are "Has component of", "Is product variant of", "Has description" e.g. long names using "Is", "Has". etc. What is the idea or requirement behind?

Help:Property naming should help to explain the idea of the naming convention and for a quick introduction to SMW, see Getting started.

> Do you recommend to use English for SMW or is there a way for multilanguage attributes?

It depends on your use case but in future we hope to support labels in different languages with work currently under way [0] which could look similar to [1].

I've just created Managing multilingual content to collect requirements and ideas on how to make this topic more actionable.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1344

[1] https://www.youtube.com/watch?v=jcau-ZA_uYc

MWJames (talk)16:42, 5 January 2016

I have successfully installed new MW 1.26 and SMW extension. Now I'm doing tests and thinking how to specify the properties of product and its variants, best if I do not need to repeat them.

For example we have a product A:

  • CPU: MPC5200B
  • LCD size: 10.4"
  • LCD resolution: 640x480 or 800x600
  • RAM memory: 256MB
  • MRAM memory: 1MB
  • Interfaces: Ethernet, USB, video in, audio out

Product A variant /A:

  • LCD resolution: 640x480
  • Interfaces: 3x Ethernet, 2x USB, 0x video in, 0x audio out

Product A variant /B:

  • LCD resolution: 800x600
  • Interfaces: 1x Ethernet, 1x USB, 1x video in, 1x audio out

You see there are attributes that are common to all variants, but there are attributes that are different for each variant. I would like to be able to find:

  1. all products that have LCD, resolution (at least) 800x600 and Ethernet and USB interfaces
    • will find "Product A"
  2. all product variants that have LCD, resolution (at least) 800x600 and Ethernet and USB interfaces
    • will find "Product A/B"
  3. all products that have LCD and at least 2xEthernet and 1xUSB interfaces
    • will find "Product A"
  4. all product variants that have LCD and at least 2xEthernet and 1xUSB interfaces
    • will find "Product A/A"

Actually the last two should satisfy our needs, as the search 1 and 2 is a subset.

I'm in doubt, how to specify the product "has interface" and how to specify the interface count. Also how to share the attributes between the product and its variants so I do not need to specify for example the changing attributes for product and the common attributes for variants.

I could do

[[Has interface:Ethernet]] [[Has interface:USB]]

or

[[Has Ethernet interfaces:3]] [[Has USB interfaces:2]]

Last but not least, on the product page I have now a table showing all variants and the available interfaces. The table shows, which exact interfaces are available: If there are 3 Ethernet ports, there are connectors labeled as ETH-1, ETH-2 and ETH-3. E.g. product variant A can offer ETH-1, ETH-2 and ETH-3 whilst variant B only ETH-2. This is than visualised in 3 columns - and each variant has either + or - if the interface is available or not. Not sure how to store and show this info using SMW.

I would be thankful for any tips.

Kalas (talk)10:56, 3 February 2016

I would point you to example [0, 1].

I'd prefer the record type for a truth or count matrix, similar on how [2, 3] is modeled which avoids having to create properties for every combination and apply constraints on values instead to permit certain values.

The data model maybe a bit difficult to understand at first but I hope [0, 1] can shed some light.

[0] http://sandbox.semantic-mediawiki.org/wiki/Intel_8%E2%88%9516_LAN_Adapter

[1] http://sandbox.semantic-mediawiki.org/wiki/Product/A

[2] http://sandbox.semantic-mediawiki.org/wiki/Property:Ethernet_device_classification

[3] http://sandbox.semantic-mediawiki.org/wiki/Property:Has_interface_device_name

MWJames (talk)14:31, 3 February 2016
 
 
 
 
 

Expired Security Certificate

Edited by 2 users.
Last edit: 20:40, 21 December 2015

It seems the site's security certificate expired on 11/8/2015 7:11 AM. Are there plans to renew it? All the embedded SMW links point here with https.

Alianin (talk)20:44, 8 December 2015

There were plans and now they became reality. :)

[[kgh]] (talk)20:44, 21 December 2015
 

SMW and ShortUrl

Is it possible to fix the incompatibility of SMW and mw:Extension:ShortUrl? This is a very simple extension, but extremely useful for non-Latin wikis. It works fine, but only in the absence of SMW. When SMW is installed: if I turn ShortUrl, all SMW special pages disappear from the list.

It is an old issue, at least since SMW 2.1

StasR (talk)11:29, 29 November 2015

SMW 2.3 and #ask format=template

SMW 2.3 has a problem with the mw:Extension:NamespaceHTML. I use query {{#ask: ...|format=template|template=SomeTemplate}}. The 'Template:SomeTemplate' transcludes a page 'HTML:SomePage' (from HTML namespace). SMW 2.2 accomplishes this correctly. In SMW 2.3 HTML-namespace flag is lost and the HTML-code is prohibited. How can this be overcome?

StasR (talk)21:00, 28 November 2015

I suspect this relates to [0] which has been fixed and will be released with 2.3.1.

Cheers

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1255

MWJames (talk)10:01, 29 November 2015

Thank you!

StasR (talk)11:06, 29 November 2015
 
 

Error on talk pages

Our talk/discussion pages are getting a SMW-related error that I have no clue about:

Catchable fatal error: Argument 2 passed to SMW\MediaWiki\Hooks\ArticleFromTitle::__construct() must implement interface Page, boolean given, called in /home/services/xf/public_html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Hooks/HookRegistry.php on line 446 and defined in /home/services/xf/public_html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Hooks/ArticleFromTitle.php on line 39

We're on the following versions:

MW 1.25.1 SMW 2.2.2 Semantic Forms 3.4

Anyone have any helpful insights? As-is, our talk pages are completely unusable.

Aerrin99 (talk)01:33, 17 November 2015

> Anyone have any helpful insights? As-is, our talk pages are completely unusable

Because we expect either a NULL or a page object and not a boolean (true, false) as value according to [0].

Please open an issue with [1] and in the meantime you could try removing the type check [2] (change from "Page &$article = null" to "&$article = null").

[0] https://github.com/wikimedia/mediawiki/blob/0a90e7ca653e1dae86887d8c454069015a725dd2/includes/page/Article.php#L121

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki

[2] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/fd777541ce0f455f6ae5c7774a66850fd1dcbcd9/src/MediaWiki/Hooks/ArticleFromTitle.php#L39

Cheers

MWJames (talk)01:46, 17 November 2015
 

The phrase, "... in conjunction with many spinoff extensions ..."

Could be, "... in conjunction with many spinoff extensions ...". I'd be bold, but the homepage is blocked for editing. Also, why not stick the survey in what was the SMWCon banner? kthxbi

Dan Bolser (talk)22:58, 3 November 2015

Semantic search in documents (indexing)

Hello everyone,

Recently I've started doing some research about semantic web and this amazing mediawiki. Currently i'm wondering if it's possible to do a full text search on documents such as docx and pdf on my wiki page. That's the reason why I want to make my search engine as smart as possible. For example if I fill in an unknown keyword that my search engine will search in everything like what I stated above such as documents/files on all pages.

Is there such extension or a way already that searches in documents ? I hope someone can help me out with this, because i've been stuck for days, for trying to reinvent the wheel.


PS: these are all educational purposes and it's all for my research.

Tinnie (talk)11:33, 9 October 2015

> Currently i'm wondering if it's possible to do a full text search on documents such as docx and pdf on my wiki page.

If we talk about Semantic MediaWiki then the answer is no.

> Is there such extension or a way already that searches in documents ? I hope someone can help me out with this, because i've been stuck for days, for trying to reinvent the wheel.

Maybe CirrusSearch [0] which underneath uses ElasticSearch can help with file indexing.

[0] https://www.mediawiki.org/wiki/Extension:CirrusSearch

Cheeers

MWJames (talk)13:51, 9 October 2015

Thank you for your reply I was actually wondering about this extension

https://www.mediawiki.org/wiki/Extension:SolrStore

Tinnie (talk)14:42, 9 October 2015

Right, forget about this one maybe it will work (I never used it).

MWJames (talk)14:48, 9 October 2015
 

I just created Help:Full-text search, it would be of great help if you could extend this page with your research experience about this topic.

MWJames (talk)14:53, 9 October 2015

Of course, will do

Tinnie (talk)15:12, 9 October 2015

apparently https://www.elastic.co/guide/en/elasticsearch/guide/current/full-text-search.html does support documented full text search since the engine is based on Lucene's ! Solrstore is outdated btw.

Tinnie (talk)12:22, 19 October 2015
 
 
 
 

Perhaps, you should think about converting your *.docs and *.pdfs into wikitext.

Alexander Mashintalk06:40, 21 October 2015
 

Images in Graphviz nodes - which path to use?

I need to create a graph with the Graphviz extension, in which the node is filled with an image. "Image" is used as an attribute in a "node" definition. An example is found here: http://www.graphviz.org/content/kennedyanc. However, that example does not run on MediaWiki, which has a different way to store images. That could be a problem. According to the extension description at https://www.mediawiki.org/wiki/Extension:GraphViz, a restriction states that "Any image attribute values are required to be the names of uploaded files". Okay... but whatever I do, just the filename, or the full link to the file in the images folder, it doesn't work. The system error message is "The dot image attribute must be the name of an uploaded file". Has anyone worked with this and found a solution?

Woudsma (talk)23:23, 20 October 2015

Strange Properties appearing

I've had a persistent problem with a Property I use: "CentralIndexRef" this is usually a reference number eg V51 or X1, it seems fairly straightforward. I use a form to build the data.

Article |CentralIndexRef=G T X W

However I get loads of junk entries appearing

CentralIndeB1Ref (134 uses)
CentralIndeC2Ref (88 uses)
CentralIndeP4Ref (56 uses)
CentralIndeR2Ref (54 uses)
CentralIndeA3Ref (52 uses)
CentralIndeK5Ref (40 uses)
CentralIndeN3Ref (39 uses)
CentralIndeS3Ref (34 uses)
CentralIndeN1Ref (24 uses)
CentralIndeK4Ref (24 uses)
CentralIndeDRef (22 uses)
CentralIndeG T X WRef (21 uses)

Etc, etc. It seems as though it's treating the x in the property title as a variable. I've just wiped and rebuilt all the data as suggested here: Help:Repairing_SMW's_data#Rebuilding_everything, but it doesn't seem to have solved it.

is this a known issue?

Stuarticus (talk)16:24, 16 October 2015

> Etc, etc. It seems as though it's treating the x in the property title as a variable

No, a property label (or title) doesn't make any arbitrary decisions about part of the character set it represents.

I don't fully understand the issue, maybe it would be good if you try the replicate your issue on [0] so we can attempt to eliminate or identify the potential problem.

[0] http://sandbox.semantic-mediawiki.org/

MWJames (talk)16:34, 16 October 2015

I have seen it to appear in [0] and I suspect that this relates to this code {{#arraymap:{{{CentralIndexRef|}}}|,|y|[[CentralIndexRef::y]]}} in your Template:Article that creates an empty property.

I think if you remove the arraymap call then those arbitrary properties should no longer be created but this isn't really related to smw-core (this parser is provided by SF).

I think the x in CentralIndexRef in combination with arraymap causes this strange appearance, if you would use something else without x the issue might also disappear but again this relates to the use of arraymap and not smw-core.

[0] http://sandbox.semantic-mediawiki.org/w/index.php?title=Special:Properties&limit=51&offset=0

MWJames (talk)18:31, 16 October 2015

I suspect that entries like CentralIndeB1Ref are empty (when created by the arraymap) and despite being void are still created as property reference hence the visibility in Special:Properties.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1217

MWJames (talk)19:42, 16 October 2015

That makes sense, thanks MWJames. Replaced the variable x with y and rebuilt data and it's all gone.

Stuarticus (talk)13:37, 20 October 2015
 
 
 
 

Version support

It says here that the latest SMW release is compatible with MW 1.19.0 - 1.24.x. What about MW 1.25?

Jackson667 (talk)10:04, 13 October 2015

Good catch! The whole point of this release was to provide compatibility with MW 1.25. I have just fixed this. More detailed and more up-to-date information on compatibiliy is also provided with the software itself. Have a look at COMPATIBILITY.md. Cheers

[[kgh]] (talk)11:04, 13 October 2015
 

Creating new content (tables) through other tables

What I have:

Manual created projects (movies) with master data for: Actor, Role, Voice Actor Example:

Actor Role Voice Actor
Actor 1 Role 1 Voice Actor 1
Actor 2 Role 2 Voice Actor 2

What I need:

An automatic generated table on the page of the actor/voice actor with the information:

for the Voice Actor:

Project Role Actor
Project 1 Role 1 Actor 1
Project 2 Role 2 Actor 2

for the Actor:

Project Role Voice Actor
Project 1 Role 1 Voice Actor 1
Project 2 Role 2 Voice Actor 2
Clemonde (talk)08:39, 15 September 2015
Edited by author.
Last edit: 15:40, 15 September 2015

In addition to table lines on the page about a project, your template (I hope you use template for this) should create subobjects: {{#subobject: | Project = {{FULLPAGENAME}} | Role = {{{Role|}}} | Actor = {{{Actor|}}} | Voice actor = {{{Voice actor|}}} }}.

The tables you want will then be produced by queries: {{#ask: [[Voice actor::{{{Voice actor|+}}}]] | ?Project | ?Role | ?Actor | format = table }} and {{#ask: [[Actor::{{{Actor|+}}}]] | ?Project | ?Role | ?Voice actor | format = table }}.

Of course, you will need to create properties Project, Actor, Voice actor of the type Page and Role of the type Text.

Alexander Mashintalk11:07, 15 September 2015
Edited by author.
Last edit: 12:09, 15 September 2015

Thanks for the quick reply,

yes I am using templates for the projects (not for the tables yet since I didnt know how to create n+1 tables as of yesterday since I found this extension)

but it shouldnt be a problem to change the projects.

the template looks like that for now:


{{Movies
|Picture=
|Title=
|Original Title=
|Release=
|Bluray=
|Trailer=
|Dubbing Studio=
|Dialogue Script=
|Dialogue direction=
|Description=
}}

and then I am adding the tables by hand

{| class="wikitable sortable"
|-
! scope="col"|Actor
! scope="col"|Role 
! scope="col"|Voice Actor
|-
| [[Actor 1 ]]||Role 1||[[Voice Actor 1]]
|-
| [[Actor 2 ]]||Role 2||[[Voice Actor 2]]
|}
Clemonde (talk)11:51, 15 September 2015

Hi Clemonde, Alexander made a mistake, probably by accident. Don't use #set for subobjects but #subobject, which is documented here.

Cavila (talk)12:07, 15 September 2015

Yes, it should be #subobject.

Alexander Mashintalk15:41, 15 September 2015
 
Edited by author.
Last edit: 23:38, 15 September 2015

You can define template {{role}} like this:

 <tr><td>[[{{{Actor|}}}]]</td><td>{{{Role|}}}</td><td>[[{{{Voice actor|}}}]]{{#subobject: | Project = {{FULLPAGENAME}} | Role = {{{Role|}}} | Actor = {{{Actor|}}} | Voice actor = {{{Voice actor|}}} }}</td></tr>

and call any number of times it on any project page between <table class="sortable wikitable"><thead><tr><th>Actor</th><th>Role</th><th>Voice actor</th></tr></thead><tbody> and </tbody></table>.

These table header and footer can also be wrapped in a template {{roles}}: <table class="sortable wikitable"><thead><tr><th>Actor</th><th>Role</th><th>Voice actor</th></tr></thead><tbody>{{{1|<tr><td colspan="3">put one or more role templates here</td></tr>}}}</tbody></table>.


Or better, create a Lua function that can accept a variable number of arguments.

Alexander Mashintalk15:48, 15 September 2015

thanks guys, I will see if it works and give feedback tomorrow

Clemonde (talk)17:43, 15 September 2015

before I can can even start testing:

maybe I am just too stupid for the basic installation of semantic mediawiki ...

do I need to install composer on my server where the wiki is located or on my local machine?

Maybe I should use the tarball method :D

Clemonde (talk)22:32, 15 September 2015
 

dear Alexander Mashin, could you show me the {{{role}}} and {{{roles}}} templates with an example in wiki please?

btw the ask function does work perfectly:


{{#ask: [[Actor::{{{Actor|+}}}]] 
| mainlabel=-
| ?Year
| ?Project 
| ?Role 
| ?Voice Actor
| format = sortable 
| sort = Year
| order = desc
}}


btw you can use "nocinclude" to make it look like I did

and is it possible to set a width for the output-table?

Clemonde (talk)23:07, 17 September 2015

I have not created those templates in any wiki. You could just copy the wikitext for them that I wrote in one of my previous replies.

As to table's width, you can use widetable format or set the table width for .smwtable class with site-wide CSS in MediaWiki:Common.css.

Alexander Mashintalk23:24, 17 September 2015
 
 
 
 
 
First page
First page
Previous page
Previous page
Last page
Last page