Error importing users in OJS 3.1.1.4

Hi,
I’m trying to prepare a valid XML file to import users to my OJS 3.1.1.4 based on file generated via Export users feature.

When I to import my XML I got confusing errors:

"\n\t

Validation errors:

\n\t

\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t\t\t* Element ‘{http://pkp.sfu.ca}user’: Missing child element(s). Expected is one of ( {http://pkp.sfu.ca}gossip, {http://pkp.sfu.ca}signature, {http://pkp.sfu.ca}password ).\n
\n\t\t\t

\n"

Please help me to figure out what’s going wrong. XML file I’m using is here https://pastebin.com/CLzMScw7

Okay. Next issue. How can I set a plaintext password for imported users in XML? It seems the string
<password is_disabled="false" must_change="true">
<value>11111111</value>
</password>
won’t do the trick. The users are imported but i can’t enter using the plain password.

Hi @arckest,

In OJS 3.1.1, the password needs to be hashed before you can include it in the XML. Starting with OJS 3.1.2, plain-text import is possible: Refine password element for user import (and possibly export) · Issue #3462 · pkp/pkp-lib · GitHub

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like