Cannot create a new user
Virtual Research Environment / On-line Bibliography Manager
Brought to you by:
sirfragalot
Hi,
I am trying to add new users as a superuser.
I log in, click Users > Add.
After filling in the form and pressing Add
I get an error message:
This page isn’t working right now
<webpage> can't currently handle this request.
HTTP ERROR 500
What is wrong?</webpage>
Addition: The error obviosly comes from this line in the php script:
$this->formData['creatorId'] = \UTF8\mb_trim($this->vars['creatorId']);
Last edit: Mikhail Mikhailov 2026-02-18
Hello Mikhail,
Sorry to hear you are having problems—thank you for reporting.
"Because email is enabled, a new user will be emailed a link inviting them to enter their own password."
Or are you able to enter their password yourself?
Mark
Hello Mark,
Hi again,
I forgot to mention that the program is installed on a Red Hat server and I am using it online.
Version 6.12.1.
Php 8.2
Thanks Mikhail.
PHP and WIKINDX version match mine. I added a user 'julia' without email enabled entering just password and email address—the user was created without issues.
Are you adding other details (the second row of the form)?
I tried both ways - with all details and only first row -- no difference.
In Firefox browser I get a blank page, in Edge I get the error message "This page isn’t working right now". And the user name does not matter, I tried different. And with different passwords.
Last edit: Mikhail Mikhailov 2026-02-19
OK. A 500 error can be quite unspecific as to its cause.
Can you try the following please?
Mark
Hi,
Here are the error messages:
Warning: Undefined array key "creatorId" in /var/www/html/wikindx/core/modules/admin/ADMINUSER.php on line 1024
Fatal error: Uncaught TypeError: UTF8\mb_trim(): Argument #1 ($string) must be of type string, null given, called in /var/www/html/wikindx/core/modules/admin/ADMINUSER.php on line 1024 and defined in /var/www/html/wikindx/core/libs/UTF8.php:213 Stack trace: #0 /var/www/html/wikindx/core/modules/admin/ADMINUSER.php(1024): UTF8\mb_trim() #1 /var/www/html/wikindx/core/modules/admin/ADMINUSER.php(214): ADMINUSER->validateInput() #2 /var/www/html/wikindx/index.php(124): ADMINUSER->add() #3 {main} thrown in /var/www/html/wikindx/core/libs/UTF8.php on line 213
Thank you Mikhail.
That helps and I now think I know what is happening. Do you have the 'User is creator' select box in the add user form? I suspect not (i.e. you have no resources added or resources with creators).
Mark
No, I don't.
OK. The following should fix the issue then (I assume you have access to the code):
Replace the line at 1024 with:
And, so you don't have the same issue editing a user, do the same with the line at 1106.
That should do the trick. The issue is my fault—I didn't check for the existence of resources with creators when adding/editing users. If you have such resources, you can then assign the new user as being the same as one of the creators of a resource (opening up further search and browse options).
Let me know if it works please and then I will commit the change.
Mark