Topic on Extension talk:PubmedParser

Summary by Kghbln

Fixed in version 4.0.0

Kghbln (talkcontribs)

Probably I has something to do with manually creating the database table, though I currently cannot imagine why (table prefix used?). However, when trying to insert an Pubmed-ID via the parser function I get the following error:

Query
INSERT INTO `49275_pubmed` (pmid,xml) VALUES ('123456','<?xml version=\"1.0\"?>\n<!DOCTYPE PubmedArticleSet PUBLIC \"-//NLM//DTD PubMedArticle, 1st January 2015//EN\" ...)
Function
DatabaseBase::insert
Error
1062 Duplicate entry '123456' for key 'PRIMARY' (localhost)
Setup
  • MediaWiki 1.23.9
  • MySQL 5.5.43
  • PHP 5.4.41

I found out that the "reload" paramter to the parser function is causing this issue. These are the errors I found in the server's log:

PHP Notice:  Undefined variable: xml in /.../extensions/PubmedParser/PubmedParser.Core.php on line 150, referer: https://www.example.org/w/index.php?title=Testseite&action=edit
[client 91.65.247.53] PHP Notice:  Undefined variable: _writeDb in /.../extensions/PubmedParser/PubmedParser.Core.php on line 259, referer: https://www.example.org/w/index.php?title=Testseite&action=edit

Another thing I realised is that the #pmid parser function is not registered in its section on "Special:Version" as it should.

It will be very cool if this could be fixed.

Bovender (talkcontribs)

I'll get back to this...

Bovender (talkcontribs)

Fixed in the development branch, [https://github.com/bovender/PubmedParser/commit/b11ec69c0b09148335f60959aa6893a8dbe1469e b11ec69]. Target milestone: v4.0.0.

Kghbln (talkcontribs)

Great, thanks a lot!