Error importing XML files


I am currently migration a system between servers, I have created a new install of OJS 2.4.8. From my understanding the origin server was running the same version.

When trying to import the XML files for the articles I get the following error.

An article title was missing for the issue "Vol 4, No 1 (1985)" in the section "Subject Terminology". Please ensure that the XML document conforms to the appropriate DTD, and that a title has been supplied for the journal's locale.

How do I go about looking for the cause and fixing it?

In OJS 2.4.8, each article element should have at least one title element.

The error message indicates that a title element with a locale attribute matching the journal’s default locale could not be found.

If you open the XML file and look at each article within the issue “Vol 4, No 1 (1985)” under the section “Subject Terminology”, do they all have titles? If they all have titles, what locales are referenced for each title?


Thank you very much. One of the export files a received is over 400MB, importing that through the web interface will be problematic, do you have a cli import tool?


The CLI tool is in the “tools” directory under your OJS install.

$ sudo su apache -s/bin/bash -c 'php tools/importExport.php NativeImportExportPlugin'
Usage: tools/importExport.php NativeImportExportPlugin [command] ...
        import [xmlFileName] [journal_path] [user_name] ...
        export [xmlFileName] [journal_path] articles [articleId1] [articleId2] ...
        export [xmlFileName] [journal_path] article [articleId]
        export [xmlFileName] [journal_path] issues [issueId1] [issueId2] ...
        export [xmlFileName] [journal_path] issue [issueId]

Additional parameters are required for importing data as follows, depending
on the root node of the XML document.

If the root node is <article> or <articles>, additional parameters are required.
The following formats are accepted:

tools/importExport.php NativeImportExportPlugin import [xmlFileName] [journal_path] [user_name]
        issue_id [issueId] section_id [sectionId]

tools/importExport.php NativeImportExportPlugin import [xmlFileName] [journal_path] [user_name]
        issue_id [issueId] section_name [name]

tools/importExport.php NativeImportExportPlugin import [xmlFileName] [journal_path]
        issue_id [issueId] section_abbrev [abbrev]

Hi @ctgraham

Apologies, but how do I get the “journal_path”?

php importExport.php NativeImportExportPlugin import /home/files/2017-SATNT-Issues.xml journal_path tcd-ecs

Dos this format look correct ?


Your parameters look correct for the import file, “journal_path” to be determined, and a user of “tcd-ecs”.

The journal path is the journal’s “short name”. It is configured under User Home → Site Administrator → Hosted Journals → Edit → Path. It probably appears in the URL as: http://hostname.tld/ojs/index.php/journalpath/index/

Be sure to run the command as your webserver user to ensure any files imported are written with the permissions of the web user. This will also mean that your web user will need access to read the source xml file.