You are viewing the PKP Support Forum | PKP Home Wiki

xmlimport joins section names

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

xmlimport joins section names

Postby arnost » Wed Jun 09, 2004 2:04 pm

I have problem importing journal data with more than one section.

Here is beginning of my import XML file.
Code: Select all
<issue_description> ... deleted ...  </issue_description>

If I use xmlimport.php, I get folowing results:
• 1. articles
• 12. articlesreviews

Section name and section order for 'reviews' are joined together!

It should be:
• 1. articles
• 2. reviews

Is my import XML file broken? Or is it a bug in OJS?

I changed one line in xmlimport.php:
In function characterData, I changed line
Code: Select all
$_XML_DATA['section_data'][strtolower($matches[1])] .= $data;

Code: Select all
$_XML_DATA['section_data'][strtolower($matches[1])] = $data;

-> change ",= append" to "= set"

Now it display section names correctly. But it is maybe only stupid change which only hides problem :?

Posts: 5
Joined: Thu Jan 22, 2004 2:27 am

Postby kevin » Wed Jun 09, 2004 8:44 pm

Thanks, that is indeed a bug.

Here's a trivial patch that should fix it:

Code: Select all
Index: xmlimport.php
RCS file: /cvs/ojs/xmlimport.php,v
retrieving revision 1.7
diff -u -r1.7 xmlimport.php
--- xmlimport.php       13 May 2004 08:40:47 -0000      1.7
+++ xmlimport.php       10 Jun 2004 03:43:05 -0000
@@ -588,6 +588,7 @@
        } else if($_XML_DATA['current_tag'] == "^ARCHIVE^ISSUE^SECTION") {
                call_user_func($_XML_DATA['addSectionFunc'], $_XML_DATA['section_data']);
+               $_XML_DATA['section_data'] = array();
        } else if($_XML_DATA['current_tag'] == "^ARCHIVE^ISSUE^ARTICLE") {
                call_user_func($_XML_DATA['addArticleFunc'], $_XML_DATA['current_issue'], $_XML_DATA['issue_data']['year'], $_XML_DATA['article_data']);
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Importing old issues?

Postby ramon » Mon Jun 14, 2004 6:28 am


We tried to use the system to publish previous issues, but when we try to change the year of the publication it does not insert them into the previous issues, it changes the future issues.

The only way to publish previous issues is the XML import??? :cry:

Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Postby kevin » Mon Jun 14, 2004 7:32 pm

Well, in your initial setup of the journal you could specify the "Initial Issue" to be the year of your first issue, and then publish back issues in order up to the present.

But neither this method nor the XML import is designed for publishing older issues _after_ you have already published current issues.
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 2 guests