OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



a bug in the article export?

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.

a bug in the article export?

Postby elicohen » Fri Oct 14, 2005 9:35 pm

I believe that I found a bug in ExportArticle. While testing, I created a test article with two authors, "eli cohen", and "Author2 lastname". I made the second author the primary contact. (See http://journals.isjournals.org/index.php/testjournal/article/view/3 and http://find.isjournals.org/viewrecord.php?id=3). But the XML file that comes out lists the second author twice and does not list the primary author at all:
<article>
<title>A third Test paper</title>
-
<abstract>
Studies in gender have offered many reasons for the differing attitudes and ...
</abstract>
<date_published>2005-10-14</date_published>
-
<author primary_contact="true">
<firstname>Author2</firstname>
<lastname>LastName</lastname>
<email>test@1is.us</email>
<biography>second author bio</biography>
</author>
-
<author primary_contact="true">
<firstname>Author2</firstname>
<lastname>LastName</lastname>
<email>test@1is.us</email>
<biography>second author bio</biography>
</author>
-
<indexing>
<discipline>junk science;</discipline>
</indexing>
<pages>1-20</pages>
-
<galley>
...
...
elicohen
 
Posts: 2
Joined: Mon Sep 05, 2005 4:25 pm

Postby asmecher » Mon Oct 17, 2005 12:15 pm

Hello Eli,

This appears to be a reference oddity that affects certain versions of PHP; see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=1899 for the bug report and http://research2.csci.educ.ubc.ca/cgi-bin/cvsweb/ojs2/plugins/importexport/native/NativeExportDom.inc.php.diff?r1=1.6.2.1;r2=1.6.2.2 for a patch to correct.

Regards,
Alec Smecher
Open Journal Systems Team
Last edited by asmecher on Wed Dec 13, 2006 12:25 pm, edited 1 time in total.
asmecher
 
Posts: 9207
Joined: Wed Aug 10, 2005 12:56 pm

Postby leo » Tue Nov 01, 2005 11:48 am

Where/how should the patch be applied?
leo
 
Posts: 6
Joined: Tue Oct 11, 2005 7:46 am

Postby asmecher » Tue Nov 01, 2005 12:46 pm

Hello Leo,

Since this is literally a single-character change, it's easy enough to apply by hand. Edit plugins/importexport/native/NativeExportDom.inc.php, go to approx. line 147. You should fine a line that reads:
Code: Select all
$authorNode = NativeExportDom::generateAuthorDom($doc, $journal, $issue, $article, $author);

Insert an ampersand after the equals sign to make it read:
Code: Select all
$authorNode =& NativeExportDom::generateAuthorDom($doc, $journal, $issue, $article, $author);

This should correct the problem.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9207
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests