Topic on Extension talk:RDFIO

MahamBeg (talkcontribs)

Hello,

While testing the sample import I get the following exception

/mediawiki/index.php/Special:RDFImport Error from line 729 of /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_Store.php: Call to a member function escape() on null


Here is my installation detail

MediaWiki 1.34.2

PHP 7.4.3 (apache2handler)

MySQL 8.0.21-0ubuntu0.20.04.4

Semantic MediaWiki3.1.6

RDFIO v3.0.2


Another additional detail that I find weird is that I have to set up store every time I visit Special:RDFIOAdmin page.

I am able to successfully setup store on each attempt.

72.208.69.4 (talkcontribs)

I'm getting this exact same error message (same line #729). Am hoping @SHL can help!

Here's my installation details:

MediaWiki 1.34.2

PHP 7.3.21 (litespeed)

MariaDB 10.3.23-MariaDB-cll-lve

Lua 5.1.5

Semantic MediaWiki 3.1.6

RDFIO v3.0.2

semsol/arc2 2.5.1


The code from line 727 to 729 shows the following - I've bolded line 729:

/* exact match */

        else {

            $sql = 'SELECT id FROM '.$this->getTablePrefix().$tbl." WHERE val = BINARY '".$this->db->escape($val)."' LIMIT 1";

            $row = $this->db->fetchRow($sql);

            if (null !== $row && isset($row['id'])) {

                $r = $row['id'];

            }

        }

        if ($r && (strlen($val) < 100)) {

            $this->term_id_cache[$term][$val] = $r;

        }

        return $r;

    }

-Suzy (suzyemail (at) gmail (dot)com)

72.208.69.4 (talkcontribs)

Here's the backtrace for the error:


[X1QH3BjFAzimaGlZi2m3AQABBAg] /wiki/index.php/Special:RDFImport Error from line 729 of /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_Store.php: Call to a member function escape() on null

Backtrace:

#0 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreQueryHandler.php(31): ARC2_Store->getTermID(string, string)

#1 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1023): ARC2_StoreQueryHandler->getTermID(string, string)

#2 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getTriplePatternSQL(array, string)

#3 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1005): ARC2_StoreSelectQueryHandler->getPatternSQL(array, string)

#4 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getDefaultPatternSQL(array, string)

#5 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1005): ARC2_StoreSelectQueryHandler->getPatternSQL(array, string)

#6 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getDefaultPatternSQL(array, string)

#7 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(924): ARC2_StoreSelectQueryHandler->getPatternSQL(array, string)

#8 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(475): ARC2_StoreSelectQueryHandler->getWHERESQL()

#9 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(68): ARC2_StoreSelectQueryHandler->getQuerySQL()

#10 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(36): ARC2_StoreSelectQueryHandler->getSQL()

#11 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_Store.php(648): ARC2_StoreSelectQueryHandler->runQuery(array, integer)

#12 /home/bookbin1/public_html/wiki/vendor/semsol/arc2/store/ARC2_Store.php(598): ARC2_Store->runQuery(array, string, integer, string)

#13 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/RDFIO_ARC2StoreWrapper.php(138): ARC2_Store->query(string)

#14 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/RDFIO_ARC2StoreWrapper.php(162): RDFIOARC2StoreWrapper->getURIForEquivURI(string, boolean)

#15 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/parsers/RDFIO_URIToWikiTitleConverter.php(68): RDFIOARC2StoreWrapper->getWikiTitleByEquivalentURI(string)

#16 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/parsers/RDFIO_URIToWikiTitleConverter.php(51): RDFIOURIToTitleConverter->getExistingTitleForURI(string)

#17 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/parsers/RDFIO_ARC2ToWikiConverter.php(31): RDFIOURIToTitleConverter->convert(string)

#18 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/RDFIO_RDFImporter.php(77): RDFIOARC2ToWikiConverter->convert(array, array, array)

#19 /home/bookbin1/public_html/wiki/extensions/Rdfio/classes/RDFIO_RDFImporter.php(48): RDFIORDFImporter->importFromArc2Data(array, array, array)

#20 /home/bookbin1/public_html/wiki/extensions/Rdfio/specials/SpecialRDFImport.php(87): RDFIORDFImporter->importTurtle(string)

#21 /home/bookbin1/public_html/wiki/extensions/Rdfio/specials/SpecialRDFImport.php(35): RDFImport->importData(RDFIORequestData)

#22 /home/bookbin1/public_html/wiki/includes/specialpage/SpecialPage.php(575): RDFImport->execute(NULL)

#23 /home/bookbin1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)

#24 /home/bookbin1/public_html/wiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#25 /home/bookbin1/public_html/wiki/includes/MediaWiki.php(900): MediaWiki->performRequest()

#26 /home/bookbin1/public_html/wiki/includes/MediaWiki.php(527): MediaWiki->main()

#27 /home/bookbin1/public_html/wiki/index.php(44): MediaWiki->run()

#28 {main}


-Suzy

MahamBeg (talkcontribs)

#0 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreQueryHandler.php(31): ARC2_Store->getTermID()

#1 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1023): ARC2_StoreQueryHandler->getTermID()

#2 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getTriplePatternSQL()

#3 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1005): ARC2_StoreSelectQueryHandler->getPatternSQL()

#4 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getDefaultPatternSQL()

#5 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(1005): ARC2_StoreSelectQueryHandler->getPatternSQL()

#6 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(996): ARC2_StoreSelectQueryHandler->getDefaultPatternSQL()

#7 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(924): ARC2_StoreSelectQueryHandler->getPatternSQL()

#8 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(475): ARC2_StoreSelectQueryHandler->getWHERESQL()

#9 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(68): ARC2_StoreSelectQueryHandler->getQuerySQL()

#10 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_StoreSelectQueryHandler.php(36): ARC2_StoreSelectQueryHandler->getSQL()

#11 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_Store.php(648): ARC2_StoreSelectQueryHandler->runQuery()

#12 /var/lib/mediawiki/vendor/semsol/arc2/store/ARC2_Store.php(598): ARC2_Store->runQuery()

#13 /var/lib/mediawiki/extensions/Rdfio/classes/RDFIO_ARC2StoreWrapper.php(138): ARC2_Store->query()

#14 /var/lib/mediawiki/extensions/Rdfio/classes/RDFIO_ARC2StoreWrapper.php(162): RDFIOARC2StoreWrapper->getURIForEquivURI()

#15 /var/lib/mediawiki/extensions/Rdfio/classes/parsers/RDFIO_URIToWikiTitleConverter.php(68): RDFIOARC2StoreWrapper->getWikiTitleByEquivalentURI()

#16 /var/lib/mediawiki/extensions/Rdfio/classes/parsers/RDFIO_URIToWikiTitleConverter.php(51): RDFIOURIToTitleConverter->getExistingTitleForURI()

#17 /var/lib/mediawiki/extensions/Rdfio/classes/parsers/RDFIO_ARC2ToWikiConverter.php(31): RDFIOURIToTitleConverter->convert()

#18 /var/lib/mediawiki/extensions/Rdfio/classes/RDFIO_RDFImporter.php(77): RDFIOARC2ToWikiConverter->convert()

#19 /var/lib/mediawiki/extensions/Rdfio/classes/RDFIO_RDFImporter.php(25): RDFIORDFImporter->importFromArc2Data()

#20 /var/lib/mediawiki/extensions/Rdfio/specials/SpecialRDFImport.php(83): RDFIORDFImporter->importRdfXml()

#21 /var/lib/mediawiki/extensions/Rdfio/specials/SpecialRDFImport.php(35): RDFImport->importData()

#22 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(575): RDFImport->execute()

#23 /var/lib/mediawiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run()

#24 /var/lib/mediawiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath()

#25 /var/lib/mediawiki/includes/MediaWiki.php(900): MediaWiki->performRequest()

#26 /var/lib/mediawiki/includes/MediaWiki.php(527): MediaWiki->main()

#27 /var/lib/mediawiki/index.php(44): MediaWiki->run()

#28 {main}

MahamBeg (talkcontribs)

Posted my stack trace above!

Reply to "RDF Import not working"