Import / export users , articles

Hi, I 'm having problems when importing the articles , a web OJS users with version 2.4.3.0 to 2.4.7.1

The errors are:
When importing users tells me the following “DB Error: Column ’ first_name ’ can not be null”

And for the articles:

There were one or more errors during import. Check that the format of the import file matches the specification. The details of the import errors are displayed .

Number Untitled
Number Untitled
Number Untitled

P.D. I extract the files are in XML format.

Hi @gardbeat,

Have you validated these XML files against the DTDs? For the users import, it would be plugins/importexport/users/users.dtd; for the articles/issues, it would be plugins/importexport/native/native.dtd.

Regards,
Alec Smecher
Public Knowledge Project Team

As I make this validation? I have to install a plugin?

Hi @gardbeat,

Validating an XML file against a DTD is part of a standard toolset for working with XML files. Personally, I use xmllint, which is usually available on Linux/UNIX/MacOS platforms.

Regards,
Alec Smecher
Public Knowledge Project Team

Could you provide a link or a guide to follow? Why I can not validate it. Thank you!

Hi @gardbeat,

See e.g. this wikipedia page, which has some information about xmllint:

Regards,
Alec Smecher
Public Knowledge Project Team

I followed these steps and have validated with a software validation and I’m OK .

But it still does not work and gives me the same error. My pegunta is this, that I must validate if the xml information I estraigo is an export tool and goes to another OJS OJS tool that matters.

I hope your help…

Hi @gardbeat,

It’s possible for an XML document to validate but still not be correct – a DTD can only check certain kinds of things.

The first_name problem you reference suggests that you have a user with an empty <firstname> element supplied. Have you checked for those?

Regards,
Alec Smecher
Public Knowledge Project Team

If you’ve checked everything and I have the same fields. To which may be due?

He adds, will not let me export anything. Everything shows me error when exported any XML file.

Hi @gardbeat,

The cause of the DB Error: Column ' first_name ' can not be null message is an empty or missing firstname element.

Can you provide the error message you encounter when you try to export data?

Regards,
Alec Smecher
Public Knowledge Project Team

Exporting does not give me any errors. The only mistake I indicated when importing text and is indicated in white background and black letters .

If you could send the xml. I’ve checked everything and I can not find the key. I urge quite the import of commodities and numbers ( the error that is the second I indicated ) . For users, if I have to create them by hand, nothing would happen . Thank you!

Hi @gardbeat,

I can’t put much time into it – but if you PM me a link to the XML document, I can take a quick look.

Regards,
Alec Smecher
Public Knowledge Project Team

I just sent direct links private message.

Thank you!

Hi @gardbeat,

The problem with the issue import is that your issues are defaulting to identification="title" but you haven’t specified titles in your XML. You either need to include title child elements for your issue elements, or you need to specify another kind of identification as an attribute to the issue element. The specifics are described in the DTD.

I was able to import the articles.xml file without problems.

Regards,
Alec Smecher
Public Knowledge Project Team

But that version of OJS ? Tell it to version 2.4.3.0 exported and imported with the other version 2.4.7.1 .

But then , what should I do? Because honestly, that is not. Thank you very much and sorry for the inconvenience.

Hi @gardbeat,

The DTD evolves slightly between releases; it’s not intended as a fixed standard, but as a tool for bringing in back-issue content. The DTD for 2.4.3 is slightly different than the one for 2.4.7-1. If you adjust the XML slightly to include the identification attribute suggested above, your issues will import.

Regards,
Alec Smecher
Public Knowledge Project Team

Tell me exactly what I need to do or a manual to follow, because, really, failed to work.

Hi @gardbeat,

The DTD specifies that <issue> elements should have an identification attribute:

The default for this is title, meaning that your issues are identified primarily by the title. So if you leave identification at its default, but don’t specify a title, you’ll run into errors.

One way around this would be to specify identification="vol" on your <issue> elements. This means your issues are identified primarily by volume.

If that doesn’t make sense, you might need to do some general reading about XML. See e.g.:
http://www.w3schools.com/xml/

Regards,
Alec Smecher
Public Knowledge Project Team

Would I could send private message correction that you refer to me ? Thank you!

Hi @gardbeat,

Can you describe where you’re getting stuck?

Regards,
Alec Smecher
Public Knowledge Project Team