Semantic MediaWiki

From GeilThings

Jump to: navigation, search
Semantic MediaWiki
File-SMW logo 180px.png
General
Version 1.8.0.4
Stable 1.8.0.5
Function Wiki Software Module
Scripts


Contents

General

http://www.mywiki.com/api.php?action=ask&query=[[PageName]]|%3FPropertyName&format=yaml.
Available formats are listed under API:Data_formats.

Installing Semantic MediaWiki

ABSPATHTOMWEXTENSIONS=/var/w_wiki/extensions
VERSION=20110824
 
cd ${PATHTOMWEXTENSIONS}
wget https://semantic-mediawiki-bundle.googlecode.com/files/SemanticBundle-${VERSION}.zip
unzip SemanticBundle-${VERSION}.zip
cd semantic-bundle/
cp SemanticBundleSettings.sample.php SemanticBundleSettings.php
 
# Add to LocalSettings.php
##### require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" );
##### require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
 
# Beware creating properties using the page Special:CreateProperty;
# it replaces existing Property: pages if you create a new one with the same name.
 
#### Login in MediaWiki as admin, navigate to Special:SMWAdmin, and 
#### click on "Initialize or upgrade tables".
 
# Uncomment desired extensions.
vi ${PATHTOMWEXTENSIONS}/semantic-bundle/SemanticBundleSettings.php

Bugs

MySQL 1044 on some Semantic MediaWiki pages

Semantic Bundle Version 2011-08-24.20110824, Semantic MediaWiki 1.6.1

Clicking on Special pages / Unused properties (Special:UnusedProperties) or Special pages / Create a template (Special:CreateTemplate):

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "SMWSQLStore2::getUnusedPropertiesSpecial". Database returned error "1044: Access denied for user 'themediawikiuseruser'@'localhost' to database 'themediawikidatabase' (localhost)".

Solution: See http://www.mail-archive.com/wikibugs-l@lists.wikimedia.org/msg40327.html

GRANT CREATE TEMPORARY TABLES on mediawikidatabase.* TO 'themediawikiuser'@'localhost';

Log file: PHP Warning: filemtime(): stat failed for

MediaWiki 1.18.1-3, SMW 1.7.1

The log file is full of PHP warnings: PHP Warning: filemtime(): stat failed for /path/to/wiki/extensions/SemanticResultFormats//JitGraph/jquery.progressbar in /path/to/wiki/includes/resourceloader/ResourceLoaderFileModule.php on line 380, referer:...

Solution: See https://bugzilla.wikimedia.org/attachment.cgi?id=10356&action=edit

Modify the file /path/to/wiki/extensions/SemanticResultFormats/SRF_Resources.php

It is supposed to be fixed in MW 1.19 after it is declared stable.

Upgrading Semantic MediaWiki

DATE=`date +%Y-%m-%d`
ABSPATHTOMWEXTENSIONS=/var/w_wiki/extensions
VERSION=20130226
 
cd ${ABSPATHTOMWEXTENSIONS}
 
mkdir SemanticBundle_${DATE}
mv AdminLinks SemanticBundle_${DATE}/AdminLinks
mv ApprovedRevs SemanticBundle_${DATE}/ApprovedRevs
mv Arrays SemanticBundle_${DATE}/Arrays
mv DataTransfer SemanticBundle_${DATE}/DataTransfer
mv ExternalData SemanticBundle_${DATE}/ExternalData
mv HeaderTabs SemanticBundle_${DATE}/HeaderTabs
mv Maps SemanticBundle_${DATE}/Maps
mv PageSchemas SemanticBundle_${DATE}/PageSchemas
mv ReplaceText SemanticBundle_${DATE}/ReplaceText
mv SemanticBundle SemanticBundle_${DATE}/SemanticBundle
mv SemanticCompoundQueries SemanticBundle_${DATE}/SemanticCompoundQueries
mv SemanticDrilldown SemanticBundle_${DATE}/SemanticDrilldown
mv SemanticForms SemanticBundle_${DATE}/SemanticForms
mv SemanticFormsInputs SemanticBundle_${DATE}/SemanticFormsInputs
mv SemanticImageInput SemanticBundle_${DATE}/SemanticImageInput
mv SemanticInternalObjects SemanticBundle_${DATE}/SemanticInternalObjects
mv SemanticMaps SemanticBundle_${DATE}/SemanticMaps
mv SemanticMediaWiki SemanticBundle_${DATE}/SemanticMediaWiki
mv SemanticResultFormats SemanticBundle_${DATE}/SemanticResultFormats
mv SemanticTasks SemanticBundle_${DATE}/SemanticTasks
mv SemanticWatchlist SemanticBundle_${DATE}/SemanticWatchlist
mv Widgets SemanticBundle_${DATE}/Widgets
 
cd ${ABSPATHTOMWEXTENSIONS}
wget https://semantic-mediawiki-bundle.googlecode.com/files/SemanticBundle-${VERSION}.zip
unzip SemanticBundle-${VERSION}.zip
cd SemanticBundle/
cp SemanticBundleSettings.sample.php SemanticBundleSettings.php
 
#### Login in MediaWiki as admin, navigate to Special:SMWAdmin, and 
#### click on "Initialize or upgrade tables".
# Uncomment desired extensions.
vi ${ABSPATHTOMWEXTENSIONS}/SemanticBundle/SemanticBundleSettings.php
:w
# For Widgets, make the subdirectory "compiled_templates" writable by the httpd server
 
chown -R apache. Widgets/
 
cd ..
cd maintenance
php runJobs.php

Versions

Software name Version number Version date
Semantic MediaWiki 1.8
1.8.0.2
1.8.0.4
15 December 2012
19 February 2013
1 March 2013

Comments

blog comments powered by Disqus