Last modified: 2014-03-06 18:28:59 UTC
When trying to import an ontology using the Ontology import page, right after choosing the statements to import, a blank page with the message: "Fatal error: Class 'SMWURITypeHandler' not found in /wiki_path/SemanticMediaWiki/includes/SMW_Datatype.php on line 105" is shown, and nothing is imported. The versions of the softwares used are: Mediawiki 1.7.1, SMW 0.5, Php 5.1.6, Mysql 5.0.24 Debian OS. After emailing the smw-user list with this problem, S Page suggested to add a few lines on the code, as seen in the transcription that follows: "Here's my guess at what might be happening. Instead of loading the PHP code for every datatype on every request to MediaWiki, SMW does lazy-loading of the PHP file implementing each datatype as needed. So SMW_Datatype.php tells itself (in announceTypeHandler() calls around line 286) that email,uri, url, and annouri datatypes are implemented by class SMWURITypeHandler in SMW_DT_URI.php , but doesn't actually include this file. Somehow the lazy-loading is broken in your case. A possible fix is to explicit put ## My temp Workaround for ontology import bug global $smwgIP; include_once($smwgIP . '/includes/SMW_DT_URI.php'); towards the top of SMW_Datatype.php, just after require_once('SMW_DT_Float.php'); to force the code to be loaded. Good luck, -- =S" With that little change the ontology import worked as expected.
Ontology import is currenty not supported. The feature has always been experimental, but ceased to work since some time. We might implement a new function for importing existing data at some time, but this time is not now. We have, however, successfully imported data with simple external scripts, as described in the SMW documentation.
[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html and announced in https://sourceforge.net/mailarchive/forum.php?thread_name=CALFVSbXkiffYy6HkhEWE0RtRrJ%2B2ebPz3g00gsr%2Bdz%2B1nZWsDA%40mail.gmail.com&forum_name=semediawiki-devel . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]
Is this still an issue and something that could be "easily" fixed by newcomers, or should the "easy" keyword be removed and/or the ticket closed?
Currently there are not plans to support ontology imports what I am aware of. I am not aware of the import scripts either but there is a help page on smw.o [1] about importing vocabularies. Probably the best shot at the moment. Thus closing as RESOLVED WONTFIX. WONTFIX means in the foreseeable future. [1] https://semantic-mediawiki.org/wiki/Help:Import_vocabulary