Topic on Extension talk:PageProperties

XML error: "XML_WAR_NS_URI" on line 44

4
JayLiu7319 (talkcontribs)

Hi, my platform is 1.36. After I installed the extension, all pages in my wiki occured error as below:

EasyRdf\Parser\Exception: XML error: "XML_WAR_NS_URI" on line 44, column 4

Backtrace:

from /var/lib/mediawiki/extensions/PageProperties/vendor/easyrdf/easyrdf/lib/Parser/RdfXml.php(811)

#0 /var/lib/mediawiki/extensions/PageProperties/vendor/easyrdf/easyrdf/lib/Graph.php(245): EasyRdf\Parser\RdfXml->parse()

#1 /var/lib/mediawiki/extensions/PageProperties/vendor/easyrdf/easyrdf/lib/Graph.php(370): EasyRdf\Graph->parse()

#2 /var/lib/mediawiki/extensions/PageProperties/includes/PageProperties.php(249): EasyRdf\Graph->load()

#3 /var/lib/mediawiki/includes/HookContainer/HookContainer.php(338): PageProperties::BeforePageDisplay()

#4 /var/lib/mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#5 /var/lib/mediawiki/includes/HookContainer/HookRunner.php(1000): MediaWiki\HookContainer\HookContainer->run()

#6 /var/lib/mediawiki/includes/OutputPage.php(2629): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay()

#7 /var/lib/mediawiki/includes/MediaWiki.php(927): OutputPage->output()

#8 /var/lib/mediawiki/includes/MediaWiki.php(940): MediaWiki::{closure}()

#9 /var/lib/mediawiki/includes/MediaWiki.php(546): MediaWiki->main()

#10 /var/lib/mediawiki/index.php(53): MediaWiki->run()

#11 /var/lib/mediawiki/index.php(46): wfIndexMain()

#12 {main}


How can I fix it? Thanks!@Thomas-topway-it

Thomas-topway-it (talkcontribs)

@JayLiu7319 I'm not sure, can you try to install semsol/arc2 and using the following

				$parser = ARC2::getRDFParser( );
				$parser->parse(  $rdf_export );
 				$serialiser = ARC2::getSer('JSONLD');

 				$triples = $parser->getTriples();
				$index = $parser->getSimpleIndex( $triples, false );
				//$index = $parser->getSimpleIndex( 0 );

         		$output = $serialiser->getSerializedIndex($index);

in the function includes/PageProperties.php => BeforePageDisplay

instead than

				$foaf = new \EasyRdf\Graph( $rdf_export );
				$foaf->load();

				$format = \EasyRdf\Format::getFormat( 'jsonld' );
			
				$output = $foaf->serialise( $format, [
					'compact' => true,
				] );
JayLiu7319 (talkcontribs)
Thomas-topway-it (talkcontribs)

@JayLiu7319

so EasyRDF is not working and ARC2 does ?

I think we should investigate more about that ...

Reply to "XML error: "XML_WAR_NS_URI" on line 44"