OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Importing XML fails for users, articles and issues

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.

Importing XML fails for users, articles and issues

Postby Astro » Tue Nov 26, 2013 12:22 am

I am having difficulties importing users, articles and issues backed up in XML format. I.e. anything.

When I try to import users, I get the traditional Internal Server Error (n. 500). When I try to import articles or issues, I get:

"One or more errors occurred during import. Please check to ensure that the format of the import file correctly matches the specification. Specific details of the import errors are listed below. The upload failed; please ensure that uploads are allowed on your server and that the file is not too big for your PHP and web server configuration".

I tried recreating the XML backups from the original server, with no luck. I've searched the forum and while I have found a few suggestions from much older posts, I didn't see any solution that works here.

Anyone would be able to provide some ideas here?

Many thanks!
Astro
 
Posts: 12
Joined: Mon Nov 25, 2013 8:57 pm

Re: Importing XML fails for users, articles and issues

Postby asmecher » Tue Nov 26, 2013 8:33 am

Hi Astro,

Check your server's PHP configuration to enure that the file upload limits aren't being exceeded.

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

Re: Importing XML fails for users, articles and issues

Postby Astro » Tue Nov 26, 2013 11:21 am

Hi Alec, thanks for the quick response!

I don't think that is the case, because I have also uploaded all XML files directly to the server via FTP and it worked. Any other possibilities?
Astro
 
Posts: 12
Joined: Mon Nov 25, 2013 8:57 pm

Re: Importing XML fails for users, articles and issues

Postby asmecher » Tue Nov 26, 2013 11:22 am

Hi Astro,

The PHP upload limits do not apply to FTP uploads; they only apply to files uploaded via PHP applications such as OJS.

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

Re: Importing XML fails for users, articles and issues

Postby Astro » Tue Nov 26, 2013 2:39 pm

Oh I see. I've check the limits and it seems that some XML were above, some were not.

Increasing the limit, now I receive many error messages saying that:

An article title was missing for the issue "MyIssue1" in the section "MySection1". Please ensure that the XML document conforms to the appropriate DTD, and that a title has been supplied for the journal's locale.

I went back to my previous OJS installation from which I have generated the XMLs backups. I've check every article in every issue in all the 3 languages supported in the journal. All have titles in their metadata.

Any ideas on how to solve that?

One more thing: would there be a way to import the XML directly from within the server, i.e. not getting the XML files from the desktop computer, but from a folder in the server? The search for a file to open when I click to browse the XML files only shows my desktop computer folders, not allowing me to pass a server location.

Thanks again for all the assistance.
Astro
 
Posts: 12
Joined: Mon Nov 25, 2013 8:57 pm

Re: Importing XML fails for users, articles and issues

Postby asmecher » Tue Nov 26, 2013 3:07 pm

Hi Astro,

You can use tools/importExport.php to invoke import/export plugins on the server side.

To check the XML, I'd suggest validating it against the DTD. Any good XML editor should be able to do this; I use xmllint on the command line, which should be available on most platforms. If that checks out, check the importing journal's primary locale under Journal Management > Languages; you must specify a title for every article in that language (plus optionally other languages).

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

Re: Importing XML fails for users, articles and issues

Postby Astro » Sun Dec 01, 2013 2:59 pm

Hi Alec,

Before doing the validation, I was able to correct the problem by doing the following (which I will register here for future people that may profit by this solution). Before importing articles XML files or issues XML files, I imported a previously saved backup of mySQL dataset directly within the SQL admin page. That made things work properly, so suggesting that there was some kind of mismatch between the XMLs generated by a previous version of the OJS and the entries in the SQL.

Hope it helps someone.
Astro
 
Posts: 12
Joined: Mon Nov 25, 2013 8:57 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 4 guests