Last modified: 2014-07-23 14:17:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64218, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62218 - SMWSparqlStore datatype error
SMWSparqlStore datatype error
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
REL1_22-branch
All Linux
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 54714 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-04 17:00 UTC by Giacomo Carnevale
Modified: 2014-07-23 14:17 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Giacomo Carnevale 2014-03-04 17:00:09 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)
....
....
....
Comment 1 Giacomo Carnevale 2014-03-04 17:03:43 UTC
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 = '';
Comment 2 Gerrit Notification Bot 2014-03-04 17:09:22 UTC
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
Comment 3 Gerrit Notification Bot 2014-03-07 20:39:17 UTC
Change 116760 had a related patch set uploaded by Nemo bis:
Possible fix to bug 62218

https://gerrit.wikimedia.org/r/116760
Comment 4 MWJames 2014-07-23 10:39:44 UTC
Solved with [0].

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/338
Comment 5 MWJames 2014-07-23 14:17:17 UTC
*** Bug 54714 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links