How do I import issues and articles from spreadsheet?

Hi @troelsk,

Have you tried validating your XML against the schema (plugins/importexport/native/native.xsd) using an XML editor or a tool like xmllint?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, no, I have not - but perhaps I ought to. I will check it out :slight_smile: (not too proficient in working with xml, unfortunately…)

Btw, do you know if it’s possible to copy an OJS from one installation to another? It seems natural that there would be such an option, but I can’t figure out what import/export-option to use…

Can you send me an example xml file or part of a file where I can see what that section looks like.

I suspect that the order of the tags is not correct (which is of course a fault in my conversion script).

There is no tool for transfering whole OJS3 journals. There is one for OJS2 (GitHub - lepidus/fullJournalTransfer: OJS plugin for importing/exporting a journal with all its private information (e.g. submitted articles, reviews, editorial decisions, etc.)), but I do not think that it will be available for OJS3 any time soon.

Done (to your gmail)! Thank you again :slight_smile:

Found it: pkp/pkp-lib#3084 Remove all references to file uploader user group ID · pkp/ojs@8dfcd53 · GitHub

A new version of tsvConverter will be available in a few minutes.

Let me know if that works.

It works perfectly. Thanks for saving me once again! :finland::finland:

Back again, @ajnyga. I am trying to create another batch of xml (since I forgot some articles the last time), but now I get this error:

Notice : Undefined index: language in /public_html/troelskolln/tsvconverter/convert1.php on line 190

Would you have time to take a look at what’s wrong? It would be much appreciated.

The php and xlsx files are here: https://1drv.ms/f/s!AqKk7B8dXegegocEcptH2IdyhSbUeQ

is that the latest release Releases · ajnyga/tsvConverter · GitHub ?

Yes, it is. I just tried replacing the convert-file again and it seems that the error is on line 196, not 190.

Could it be some error in my spreadsheet?

on line 196 try

if (isset($article['language'])){

Now the scripts runs perfectly and creates all the xml-files. However, when I try to upload import the xml-files into OJS (both 3.1.1-2 and -4), nothing happens. The screen is just blank :thinking:

did you check what it says in the error logs?

It seems there are a bunch of different errors (and I don’t understand any of it, of course…). Not sure if it’s just my setup that’s broken. E.g.:

[16-Jan-2019 09:11:06 Europe/Copenhagen] PHP Strict Standards: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/public_html/troelskolln/ojs/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24

[16-Jan-2019 09:11:06 Europe/Copenhagen] PHP Deprecated: Non-static method Config::getContextBaseUrls() should not be called statically, assuming $this from incompatible context in /home/public_html/troelskolln/ojs/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 199

[16-Jan-2019 09:26:47 Europe/Copenhagen] PHP Strict Standards: Declaration of CategoryGridHandler::doSpecificFetchGridActions() should be compatible with GridHandler::doSpecificFetchGridActions($args, $request, $templateMgr) in /home/isbuddet/public_html/troelskolln/ojs/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php on line 0

[16-Jan-2019 09:18:47 Europe/Copenhagen] PHP Strict Standards: Declaration of UserGridHandler::renderFilter() should be compatible with GridHandler::renderFilter($request, $filterData = Array) in /home/isbuddet/public_html/troelskolln/ojs/lib/pkp/controllers/grid/settings/user/UserGridHandler.inc.php on line 0
[16-Jan-2019 09:18:47 Europe/Copenhagen] PHP Strict Standards: Declaration of UserForm::display() should be compatible with Form::display($request = NULL, $template = NULL) in /home/isbuddet/public_html/troelskolln/ojs/lib/pkp/controllers/grid/settings/user/form/UserForm.inc.php on line 18

[16-Jan-2019 09:26:47 Europe/Copenhagen] PHP Strict Standards: Declaration of SystemInfoGridCategoryRow::initialize() should be compatible with GridRow::initialize($request, $template = NULL) in /home/isbuddet/public_html/troelskolln/ojs/lib/pkp/controllers/grid/admin/systemInfo/SystemInfoGridCategoryRow.inc.php on line 0
[16-Jan-2019 09:26:47 Europe/Copenhagen] PHP Strict Standards: Declaration of SystemInfoGridHandler::initialize() should be compatible with CategoryGridHandler::initialize($request, $args = NULL) in /home/isbuddet/public_html/troelskolln/ojs/lib/pkp/controllers/grid/admin/systemInfo/SystemInfoGridHandler.inc.php on line 19

those strict standard and deprecated errors do not matter, should be a fatal error that creates a blank page.

Have you tried importing using the command line tools?

Ok. I have not tried importing via command line. Let me try that and get back to you. Not sure how to do it, but I guess there’ll be instructions in the documentation.

php tools/importExport.php NativeImportExportPlugin import filename.xml journalpath admin_username

Dear @ajnyga
I figured that two things might need to be replaced in order to validate against native.xsd
firstname → givenname
lastname → familyname

Regards
Klaus