OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Import error

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.

Import error

Postby makemywish » Sun Oct 06, 2013 8:34 am

I have been trying to import a users xml file (exported from 2.2.2) into a fresh install of OJS (2.4.2).

Whenever I try to import, of around 400 users, only 48 are being imported and the following resultant error message is displayed:
"DB Error: Column 'first_name' cannot be null".

There are no user names with blank first names. A validation check identifies 113 errors. It is not clear what the error message means (this is a sample of the error message from http://www.validome.org/:

Line File name: users.xml
28 Column: 3137
Error: Content of element type "user" must match "(username?,password?,salutation?,first_name,middle_name?,last_name,initials?,gender?,affiliation?,signature?,email,url?,phone?,fax?,mailing_address?,country?,interests*,biography*,locales?,role*)".
Error Position:
...hor"/><role type="reader"/></user><user><username>maria_xxxxxxxx</usernam

Any help would be appreciated
makemywish
 
Posts: 34
Joined: Tue Jul 22, 2008 12:30 pm

Re: Import error

Postby makemywish » Sun Oct 06, 2013 10:24 am

OK. It turns out 2.2.2 exported the user data in a different order (signature after email) and the latest DTD wants it in a different order. Now the XML file is valid -- yet the web site returns a "DB Error: Column 'first_name' cannot be null". error.

What is going on?
makemywish
 
Posts: 34
Joined: Tue Jul 22, 2008 12:30 pm

Re: Import error

Postby makemywish » Sun Oct 06, 2013 10:50 am

Turns out only the first 48 entries are being imported and it stopped after that. So the solution was to delete the top 48, reimport and then go on till all the users had been imported. Problem solved for now but surely is not the ideal.

And strangely, when I re-exported the users back from the fresh install of OJS -- all entries failed xml validation.

Two types of errors:

a) Attribute "locale" must be declared for element type "affiliation".

Code: Select all
...untry><affiliation locale="en_US">University of Johannesburg</affiliation


b) Content of element type "user" must match "(username?,password?,salutation?,first_name,middle_name?,last_name,initials?,gender?,affiliation?,signature?,email,url?,phone?,fax?,mailing_address?,country?,interests*,biography*,locales?,role*)".
Code: Select all
...ature><role type="reader"/></user><user><username>********</username><pa


The file which was used to import the same data into OJS is valid.

Anyone know why this might be occurring?
makemywish
 
Posts: 34
Joined: Tue Jul 22, 2008 12:30 pm

Re: Import error

Postby asmecher » Mon Oct 07, 2013 11:43 am

Hi makemywish,

The XML format has evolved over the years, particularly as elements added support for multilingual content. I suspect you'll find that the exports validate against the native.dtd descriptor for that specific version, but not necessarily against the new install you're importing into. Make sure the document validates against the DTD for the target version before you import it.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests