Extension talk:Semantic MediaWiki

Jump to navigation Jump to search

About this board

The best way for getting support for Semantic MediaWiki is to post to its user mailing list. Comments made below are not very well monitored by the developers. There are various options for making yourself heard:

  • If you have a usage question, please post them to the SMW support mailing lists (archives).
  • If you found a bug or want to propose a new feature, please file it at GitHub. Bugs and requests are regularly considered by core developers and have a great impact on the future development of SMW.
  • If you want to contribute to the development, please contact the development community at the SMW developers' mailing list (archives).

When asking for help or describing bugs, do not forget to provide necessary details about your configuration, version details for all relevant components, information about other extensions that are used, and, if possible, a URL where the problem can be seen. See the help page on reporting bugs for detailed information.

The below talk page is most useful for comments regarding the wiki page, but of course you may do as you like (it's a wiki, after all).

previous talk on this page

While upgrading MediaWiki from 1.31.8 to 1.35.1 I'm getting the following errors

Legaulph (talkcontribs)

While upgrading MediaWiki from 1.31.8 to 1.35.1 I'm getting the following error:

MediaWiki 1.35.1
PHP 7.4.15 (apache2handler)
MySQL 8.0.23
Semantic MediaWiki 3.2.3
Semantic Extra Special Properties 2.1.0

\SemanticMediaWiki\maintenance\rebuildData.php -v

Semantic MediaWiki: 3.2.3 MediaWiki: 1.35.1

--- Notice ----------------------------------------------------------------

Long-running scripts may cause memory leaks, if a deteriorating rebuild process is detected (after many pages, typically more than 10000), please abort with CTRL-C and resume this script at the last processed ID using the parameter -s. Continue this until all pages have been refreshed.

Using the --auto-recovery option should help with unexpected events or disruptions (CTRL-C, exceptions etc.) during the rebuild process to recover and restart from the last successful processed ID.

Any progress displayed is an estimation and is self-adjusting during the maintenance process.

--- Data rebuild ----------------------------------------------------------

Storage engine: SMWSparqlStore

Disposal (outdated) ---

Removing outdated and invalid entities ...

  ... checking outdated entities ...
      ... cleaning up entity                                 417830 (100%)
      ... removed (IDs) ...                                              1
  ... checking invalid entities by namespace ...
      ... cleaning up entity                                 436597 (100%)
      ... removed (IDs) ...                                              1
  ... done.

Removing query links ...

  ... checking query links (invalid) ...                                 ✓
  ... checking query links (unassigned) ...                              ✓
  ... done.

Rebuild (property) ---

Find and rebuild property pages ...

  ... selected pages ...                                               637
  ... 1 / 637 (  0%)    Property:Has_domain_and_range
  ... 2 / 637 (  0%)    Property:Has_max_cardinality
  ... 3 / 637 (  0%)    Property:Has_min_cardinality
  ... 4 / 637 (  1%)    Property:Is_inverse_of
  ... 5 / 637 (  1%)    Property:Is_equal_to
  ... 6 / 637 (  1%)    Property:Question
  ... 7 / 637 (  1%)    Property:Description
  ... 8 / 637 (  1%)    Property:DiscourseState
  ... 9 / 637 (  1%)    Property:Has_URL
  ... 10 / 637 (  2%)   Property:Has_document_type
  ... 11 / 637 (  2%)   Property:Is_owned_by
  ... 12 / 637 (  2%)   Property:Is_located_in
  ... 13 / 637 (  2%)   Property:Is_part_of

MediaWiki\Revision\RevisionAccessException from line 1033 of D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionStore.php: Failed to load data blob from tt:16171: Unable to fetch blob at tt:16171

  1. 0 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionStore.php(1280): MediaWiki\Revision\RevisionStore->loadSlotContent()
  2. 1 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
  3. 2 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\SlotRecord.php(307): call_user_func()
  4. 3 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionRecord.php(175): MediaWiki\Revision\SlotRecord->getContent()
  5. 4 D:\Bitnami\wampstack\apps\mediawiki\includes\page\WikiPage.php(805): MediaWiki\Revision\RevisionRecord->getContent()
  6. 5 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(366): WikiPage->getContent()
  7. 6 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(284): SMW\DataUpdater->addAnnotations()
  8. 7 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(198): SMW\DataUpdater->runUpdate()
  9. 8 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\ParserData.php(454): SMW\DataUpdater->doUpdate()
  10. 9 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(303): SMW\ParserData->updateStore()
  11. 10 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(216): SMW\MediaWiki\Jobs\UpdateJob->updateStore()
  12. 11 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
  13. 12 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
  14. 13 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DistinctEntityDataRebuilder.php(193): SMW\MediaWiki\Jobs\UpdateJob->run()
  15. 14 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DistinctEntityDataRebuilder.php(170): SMW\Maintenance\DistinctEntityDataRebuilder->doUpdate()
  16. 15 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(267): SMW\Maintenance\DistinctEntityDataRebuilder->doRebuild()
  17. 16 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(318): SMW\Maintenance\DataRebuilder->rebuildFromSelection()
  18. 17 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(222): SMW\Maintenance\DataRebuilder->rebuildAll()
  19. 18 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\maintenance\rebuildData.php(198): SMW\Maintenance\DataRebuilder->rebuild()
  20. 19 D:\Bitnami\wampstack\apps\mediawiki\maintenance\doMaintenance.php(107): SMW\Maintenance\rebuildData->execute()
  21. 20 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\maintenance\rebuildData.php(294): require_once('D:\\Bitnami\\wamp...')
  22. 21 {main}

MediaWiki\Storage\BlobAccessException from line 295 of D:\Bitnami\wampstack\apps\mediawiki\includes\Storage\SqlBlobStore.php: Unable to fetch blob at tt:16171

  1. 0 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionStore.php(1031): MediaWiki\Storage\SqlBlobStore->getBlob()
  2. 1 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionStore.php(1280): MediaWiki\Revision\RevisionStore->loadSlotContent()
  3. 2 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
  4. 3 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\SlotRecord.php(307): call_user_func()
  5. 4 D:\Bitnami\wampstack\apps\mediawiki\includes\Revision\RevisionRecord.php(175): MediaWiki\Revision\SlotRecord->getContent()
  6. 5 D:\Bitnami\wampstack\apps\mediawiki\includes\page\WikiPage.php(805): MediaWiki\Revision\RevisionRecord->getContent()
  7. 6 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(366): WikiPage->getContent()
  8. 7 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(284): SMW\DataUpdater->addAnnotations()
  9. 8 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\DataUpdater.php(198): SMW\DataUpdater->runUpdate()
  10. 9 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\ParserData.php(454): SMW\DataUpdater->doUpdate()
  11. 10 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(303): SMW\ParserData->updateStore()
  12. 11 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(216): SMW\MediaWiki\Jobs\UpdateJob->updateStore()
  13. 12 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
  14. 13 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\MediaWiki\Jobs\UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
  15. 14 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DistinctEntityDataRebuilder.php(193): SMW\MediaWiki\Jobs\UpdateJob->run()
  16. 15 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DistinctEntityDataRebuilder.php(170): SMW\Maintenance\DistinctEntityDataRebuilder->doUpdate()
  17. 16 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(267): SMW\Maintenance\DistinctEntityDataRebuilder->doRebuild()
  18. 17 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(318): SMW\Maintenance\DataRebuilder->rebuildFromSelection()
  19. 18 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\src\Maintenance\DataRebuilder.php(222): SMW\Maintenance\DataRebuilder->rebuildAll()
  20. 19 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\maintenance\rebuildData.php(198): SMW\Maintenance\DataRebuilder->rebuild()
  21. 20 D:\Bitnami\wampstack\apps\mediawiki\maintenance\doMaintenance.php(107): SMW\Maintenance\rebuildData->execute()
  22. 21 D:\Bitnami\wampstack\apps\mediawiki\extensions\SemanticMediaWiki\maintenance\rebuildData.php(294): require_once('D:\\Bitnami\\wamp...')
  23. 22 {main}


Display Result position with #ask

Paul LEMPERIERE (talkcontribs)

Hello !

When I use #ask to query data, is it possible to display the rank of each row ?

Jaideraf (talkcontribs)
Paul LEMPERIERE (talkcontribs)

Oh very nice ! the #rownumber seems to be what I need !

I'm exactly trying to bypass NumerAlpha because it doesn't work very well in conjonction with the @annotation tag that I use in some #ask. Due to the double record he provide, the numerotation is distorted

Reply to "Display Result position with #ask"
Lordhelpus (talkcontribs)

As discussed here, the purge/refresh link under the three dot menu seems to be disabled ( class="is-disabled" ) for users that should have the ability to purge and refresh articles. What should be done to enable this link for users that should have the ability to purge/refresh?

Under three dot ( class="page-actions-more" ) menu, "Refresh" is currently marked as disabled:


Another skin with the option available to click:


Jaideraf (talkcontribs)
Lordhelpus (talkcontribs)

Thank you for the response! I have verified that we were running SMW version 3.2.2 when this bug was first identified.

Jaideraf (talkcontribs)

I don't know about other skins, but if it works with Vector, so the problem is probably within the other skins.

Or you can try to use the development version of SMW, like so:


"require": {

"mediawiki/semantic-media-wiki": "dev-master",

"mediawiki/semantic-result-formats": "~3.1",

"mediawiki/semantic-extra-special-properties": "~2.0"



With composer update --no-dev


php maintenance/update.php

Reply to "Purge/Refresh Disabled"

Developing an extension in Semantic MediaWiki

Tilottama Sen (talkcontribs)

We need to write some validation logic to validate data that has been entered in the PageForms of SMW before saving it to the database. We are suing MediaWiki 1.34. I came across this : https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/architecture/developing.extension.md

and have been trying to follow the instructions to write a custom extension.

a) I want to confirm that this is the right way to proceed.

b) Are there any instructions on how i can deploy this extension to my installation of Semantic MediaWiki ?

c) Is it possible to call an external service endpoint from SMW when an event is triggered. We want to define the validation rules using Shacl and would like validate the data entered against Shacl rules - any suggestions on how this can be done would be very helpful.

Thank you for your help!

Phofx (talkcontribs)

Please don't "sue" Mediawiki, its the best bunch of folks around :-)

Reply to "Developing an extension in Semantic MediaWiki"

Is aggregation of recurring events and normal events possible for format icalendar?

Andreas Plank (talkcontribs)

Hej-hej, Can one combine a query of recurring events and normal events so that it can be aggregated and provided as a single result in the format of an icalendar? Thanks

Andreas Plank (talkcontribs)
Reply to "Is aggregation of recurring events and normal events possible for format icalendar?"

mediawiki/semantic-media-wiki: 2.5.0 installed, ~2.5 required.

Summary by Kghbln

use "update.php --skip-external-dependencies"

Spas.Z.Spasov (talkcontribs)

I'm not sure is it a bug or I'm doing something wrong but after the command composer require mediawiki/semantic-media-wiki "~2.5" --update-no-dev when I'm running php $IP/maintenance/updae.php this message appears:

mediawiki/semantic-media-wiki: 2.5.0 installed, ~2.5 required.
Error: your composer.lock file is not up to date. Run "composer update" to install newer dependencies

This problem was solved when I changed 'semantic-media-wiki' directive in composer.json from:

"mediawiki/semantic-media-wiki": "~2.5"


"mediawiki/semantic-media-wiki": "2.5.0"

It it the right solution?

Kghbln (talkcontribs)

This way you will have to update your file every time a new version is released. See here for another way around this.

Rajeshrajesh.35 (talkcontribs)

Still i am getting this error, i am user MW 1.31 on Linux

php mediawiki/maintenance/update.php

[75e73f31277a0653322c648c] [no req]   Error from line 163 of /var/www/html/mediawiki/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php: Call to undefined method SMW\SQLStore\SQLStoreFactory::newEntityIdManager()


#0 /var/www/html/mediawiki/extensions/SemanticWatchlist/extensions/SemanticMediaWiki/src/StoreFactory.php(61): SMW\SQLStore\SQLStore->__construct()

#1 /var/www/html/mediawiki/extensions/SemanticWatchlist/extensions/SemanticMediaWiki/src/StoreFactory.php(42): SMW\StoreFactory::newFromClass(string)

#2 /var/www/html/mediawiki/extensions/SemanticMediaWiki/src/Store.php(478): SMW\StoreFactory::getStore()

#3 /var/www/html/mediawiki/includes/installer/DatabaseUpdater.php(482): SMW\Store::setupStore(MysqlUpdater, array)

#4 /var/www/html/mediawiki/includes/installer/DatabaseUpdater.php(450): DatabaseUpdater->runUpdates(array, boolean)

#5 /var/www/html/mediawiki/maintenance/update.php(200): DatabaseUpdater->doUpdates(array)

#6 /var/www/html/mediawiki/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()

#7 /var/www/html/mediawiki/maintenance/update.php(245): require_once(string)

#8 {main}

Rajeshrajesh.35 (talkcontribs)

When i am usering SMW 2.5.0 then getting this error:

[d89ddfe66d9704ab0310f45e] [no req]   Error from line 132 of /var/www/html/mediawiki/extensions/SemanticMediaWiki/load.php: Call to undefined method SMW\Setup::run()


#0 /var/www/html/mediawiki/extensions/SemanticMediaWiki/load.php(54): SemanticMediaWiki::onExtensionFunction()

#1 /var/www/html/mediawiki/includes/Setup.php(940): SemanticMediaWiki::{closure}()

#2 /var/www/html/mediawiki/maintenance/doMaintenance.php(81): require_once(string)

#3 /var/www/html/mediawiki/maintenance/update.php(245): require_once(string)

#4 {main}

Reply to "mediawiki/semantic-media-wiki: 2.5.0 installed, ~2.5 required."

SemanticMediaWiki/src/SQLStore/SQLStore.php: Call to undefined method SMW\SQLStore\SQLStoreFactory::newEntityIdManager()

Summary by Kghbln

Issue to be reported at Semantic Watchlist at GitHub.

Rajeshrajesh.35 (talkcontribs)

Hi All,

I am getting this error while setup new MW1.31.

[root@ashsd95054 mediawiki]# php extensions/SemanticMediaWiki/maintenance/setupStore.php

[cccde8e3a1f59400b2e5359c] [no req]   Error from line 163 of /var/www/html/mediawiki/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php: Call to undefined method SMW\SQLStore\SQLStoreFactory::newEntityIdManager()


#0 /var/www/html/mediawiki/extensions/SemanticWatchlist/extensions/SemanticMediaWiki/src/StoreFactory.php(61): SMW\SQLStore\SQLStore->__construct()

#1 /var/www/html/mediawiki/extensions/SemanticWatchlist/extensions/SemanticMediaWiki/src/StoreFactory.php(42): SMW\StoreFactory::newFromClass(string)

#2 /var/www/html/mediawiki/extensions/SemanticMediaWiki/maintenance/setupStore.php(210): SMW\StoreFactory::getStore(string)

#3 /var/www/html/mediawiki/extensions/SemanticMediaWiki/maintenance/setupStore.php(139): SMW\Maintenance\SetupStore->getStore()

#4 /var/www/html/mediawiki/maintenance/doMaintenance.php(94): SMW\Maintenance\SetupStore->execute()

#5 /var/www/html/mediawiki/extensions/SemanticMediaWiki/maintenance/setupStore.php(271): require_once(string)

#6 {main}

Kindly help me here.


Kghbln (talkcontribs)

Which Version of Semantic with which Version of MediaWiki

5 (talkcontribs)

I don't understand, which version are compatible.

I use Composer, composer.local.json:

"require": {"mediawiki/semantic-media-wiki": "~2.5", ....

I have checked out MediaWiki REL1_31 and composer install --no-dev --> Result: remove mediawiki/core dev-REL1_31|remove mediawiki/semantic-media-wiki 2.5.8

I have checked out MediaWiki REL1_32 and composer install --no-dev --> Result: remove mediawiki/core dev-REL1_31|remove mediawiki/semantic-media-wiki 2.5.8 (talkcontribs)

I have the same problem with Semantic Version 3:

remove mediawiki/core dev-REL1_31|remove mediawiki/semantic-media-wiki 3.0.1

Kghbln (talkcontribs) (talkcontribs)

My problem was in the file composer.local.json the line:

       "extra": {

               "merge-plugin": {

                       "include": [


composer are not understand this recursively... I don't know why.

Kghbln (talkcontribs)

Good to know what the issue was. Admittedly I only explicitly call extension's "composer.json" files here, e.g. by adding "extensions/SyntaxHighlight_GeSHi/composer.json". The issue is probably that not every extension provides such a file and Composer errors out when not finding one.

How to get all future ''end'' dates of a recurring event?

Summary by Kghbln
Andreas Plank (talkcontribs)

I know how to get the beginning date time of a recurring event (a usual #ask will do so) but I did not figure out how to get the end of date times of future recurring events. How can I #ask for recurring end dates that come in the future? Is it possible? Or do I have to program a work around by let’s say using Unix timestamps, and add it to the #ask result to get the corresponding end time of the future event?

Kghbln (talkcontribs)

Trouble installing SMW 3.0

Summary by Kghbln

See the respective mailing list thread.

Amagnien2 (talkcontribs)


I have installed SMW 3.0 on top of MW 1.27.5 (PHP 5.6.38, MySQL 5.6.39-log, ICU 52.1)

Installation went fine. I ran PHP update in the local directory, and got in return "Your composer.lock file is up to date with current dependencies! Set $wgShowExceptionDetails = true; in LocalSettings.php to show detailed debugging information."

... from which I infer that no updates were made. The Mediawiki stuff is in the subdirectory '/mw'

When I add the instruction enableSemantics( 'www.railwayobjects.eu/mw' ) at the end of LocalSettings.php in the file on the server, and try to reload my wiki, all I get is a blank page. The Firefox console only says:


Promise rejected after context unloaded: Promised response from onMessage listener went out of scope


Unchecked lastError value: Error: Promised response from onMessage listener went out of scope page_performance.js:18


I'm sorry to say, I am stuck... any help is more than welcome.


Kghbln (talkcontribs)