Last modified: 2014-07-23 14:17:17 UTC
MediaWiki: 1.22 SemanticMediaWiki: 1.9.1 $smwgDefaultStore = 'SMWSparqlStore'; Error when creating new category: Unexpected non-MediaWiki exception encountered, of type "InvalidArgumentException" [acddfe5f] /mediawiki/index.php/Speciale:ModificaDati/Lifecycle_Step/aszss Exception from line 253 of mediawiki/extensions/SemanticMediaWiki/includes/export/SMW_Exp_Element.php: $datatype needs to be a string Backtrace: #0 mediawiki/extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlResultParser.php(143): SMWExpLiteral->__construct(string, boolean) #1 [internal function]: SMWSparqlResultParser->xmlHandleCData(resource, string) #2 mediawiki/extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlResultParser.php(79): xml_parse(resource, string, integer) .... .... ....
Proposed fix: In the file extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlResultParser.php (line 115, method xmlHandleOpen) the property m_xml_datatype is set to false when the xml datatype attribute is not present in attributes array; but the SMWExpLiteral __construct (extensions/SemanticMediaWiki/includes/export/SMW_Exp_Element.php file) throw new InvalidArgumentException (line 253) if the datatype param is not a string. We fixed this replacing at line 115 of the extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlResultParser.php file: $this->m_xml_datatype = false; with $this->m_xml_datatype = '';
Change 116760 had a related patch set uploaded by Carnevalegiacomo: Possible fix to bug 62218 https://bugzilla.wikimedia.org/show_bug.cgi?id=62218 https://gerrit.wikimedia.org/r/116760
Change 116760 had a related patch set uploaded by Nemo bis: Possible fix to bug 62218 https://gerrit.wikimedia.org/r/116760
Solved with [0]. [0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/338
*** Bug 54714 has been marked as a duplicate of this bug. ***