Importing Student Accounts

When I tried to import new students everything was fine, no red messages, buut my surprise was when I checked names, lastnames, etc, some of them are cutted, for example, instead of Richard Geere, it appears Ric Geer, and in some cases last names dont appear, what should I do?, obviously I dont want to be fixing one by one, I have 500 students with the same problem

Hi oflodac,

That is a strange error indeed. Gibbon limits some of the name fields to 30 characters, but it sounds like it’s being cutoff at much less than that. Perhaps there was a special character (quote or unescaped comma) that threw off the import. On that front, one way to know for sure would be to test the same file again on a local dev-only installation.

To fix the data you already have imported, there’s a module on the Gibbon extend page called Data Admin which may be able to help, it gives you additional importing options and some more control over the import. After installing the module, if you open Admin > Data Admin and look in the list there’s imports for Basic User Data and Full User Data, with an option to Update Only when you do the import. This should let you re-import the students to update their names without adding duplicates. In Data Admin there’s also a Snapshot option that can backup your database before making an import, and restore it if anything goes wring.

You can likely use the same spreadsheet from your first import, just add a header column if there isn’t already one with the names of each column at the top. This will help with importing and let you assign columns to user fields in the interface.

Hope this helps! Give a shout if you have any questions.

Ok, I added the Data Admin module and it is installed also (very usefull by the way). The only special characters we use in spanish language are: á, é, í, ó, ú, ñ, Ñ…question is if we have to avoid those special characters?, if so, I´m going to use the excel replament feature to replace them with a, e, i, o, u, n and N.

Gibbon is UTF-8 friendly so your á, é, í, ó, ú, ñ, Ñ characters shouldn’t cause a problem. Generally the characters that can mess up a CSV file are quotes and commas that aren’t escaped (eg: a ’ in someone’s name).

The Data Admin module will check & verify your data and do a dry run before importing, so it should help identify any issues and import things correctly.

Thanks, I used Data Admin to update records. few records were not updated due to lack of info (I´m going to fix them manually), but I have to report one problem, the special charaters were no accepted, look at the captures:

In the last image names were delete (for security reasons), just check the “?” symbol for some names, real names must have á, é, í, ó, ú, ñ, Ñ. What should I do?, replacing those characters with “normal characters” using the spreadsheet program? or, is there a way in gibbon to fix this problem?

@skuipers in your import are you doing any manipulations using non-multibyte functions? These special characters will consist of 4-bytes, not one, so, for example instead of doing substr() you need to do mb_substr(). I wonder if this is breaking the import somewhere?

Most places in Gibbon is the non-multibyte because that is traditional, and no errors have been reported. I wonder if at some point we need to switch the whole codebase over to multibyte?

Thanks Ross! Looks like I did indeed make this mistake, I’ll update the data admin module to fix it. It looks like the mb string functions can be dropped in as direct replacements for the original ones, it may certainly be a good idea to think about updating the whole codebase.

Sounds good. I wonder what other mb_ functions there are out there?


Hi @oflodac

I’ve updated the Data Admin module to better handle multibyte strings, which should fix the import issues you’re seeing. The updated version can be found here: To update simply delete the current Data Admin folder in your Modules directory and replace it with the updated one.

I’ve tested it on this end and it appears to be working well, let me know if the special characters still don’t imprt properly. When you open the file, if you see the � character in your imported text then it’s possible the original CSV file isn’t UTF-8 encoded. To fix this, open it in a text-editor that lets you save as a specific encoding, or try opening it in a program like Excel and saving as an xls, xlsx or re-saving as csv with UTF-8 enabled in the settings.

Hope this helps!

Success !! No there are no mistakes anymore, I would like to state 2 things very important:

  1. Be sure data in the username and password columns must not have spaces (that was part of my problem)
  2. In the “Mode” option, I needed to select “Update & Insert” after some attempts

Now I have all my users working. Thanks

Glad to hear it worked. Great feedback, I’ll add a warning message to the importer for fields that shouldn’t have spaces. Hopefully using Update & Insert won’t have created duplicate accounts, if so it’s probably safe to delete any duplicates from the original import.


Thanks, you were right, I re-cheked list of students and the ones with spaces in the username and passwords data were duplicated, I deleted them one by one, Many thanks