You are viewing the PKP Support Forum | PKP Home Wiki

XML Galley plugin bug

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

XML Galley plugin bug

Postby MMeijer » Tue May 28, 2013 7:13 am

Dear OJS friends,
I think I've found (and solved) a tiny bug in the XML Galley plugin. We are migrating our OJS installations from Solaris to Linux systems, and the XML Galley plugin didn't work anymore. It appeared that the mimetype of uploaded xml files had changed from 'text/xml' to 'application/xml', in the database table 'article_files'.
The XML Galley plugin has two spots where it only checks for 'text/xml', while at other places it checks for more mimetypes.

Code: Select all
if ($galley->getFileType() == "text/xml") {

should read:
Code: Select all
if ($galley->getFileType() == "text/xml" || $galley->getFileType() == "application/xml") {

(or something more elegant than calling $galley->getFileType() twice)

Code: Select all
if ($galley->getFileType() == "text/xml") {

should read:
Code: Select all
if ($galley->getFileType() == "text/xml" || $galley->getFileType() == "application/xml") {

and as a byproduct of scanning for 'text/xml' I saw this typo:
Code: Select all
if (($type == 'text/xml' || $type == 'text/xml' || $type == 'application/xml' || $type == 'application/xslt+xml')

should read:
Code: Select all
if (($type == 'text/xml' || $type == 'text/xsl' || $type == 'application/xml' || $type == 'application/xslt+xml')

All this pertaining to the OJS 2.3.8 release, btw.
Posts: 36
Joined: Fri Nov 10, 2006 3:25 am
Location: Utrecht

Re: XML Galley plugin bug

Postby asmecher » Mon Jun 03, 2013 3:29 pm

Hi Maarten,

Thanks for contributing, and for the clear description. I've posted a Bugzilla entry and committed the above; see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8244 for details.

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest