Custom Fields show up as empty in user pref and admin/users

(eriko) #1

I am migrating over data that was being stashed in the PluginStore to a User custom fields so that it can be seen by the admins (student unique ids). While I can do stuff like:

 user = User.where(username: 'XXXXXX').first

I can access the data programmatically but the fields show up as empty in the users preferences and in the /admin/users display. The data are strings and nothing complex. In the /admin/users display they just show as - .

This stays the same no matter what settings I apply to the custom field. My dev instances code was updated about 6 hours ago.

Any thoughts?

(eriko) #2

Ok so the deal is that while you can set them by name with SSO you have to set then by user_field_1…4 inside the application. In this case from the rails console. Ok I can deal with that.

(Marcus Baw) #3

Hi @eriko,

I’m having a similar problem with Discourse user data which is disappearing. We’re not sure when this behaviour started but at some point all entered data seems to just disappear. We are not using SSO, users sign up to Discourse and at the point of sign up are prompted for user fields, as set up below:

They can enter details and create their account, but in the user’s profile the fields they entered are null. And also null when queried via the Rails console.

Can anyone help with where to start with debugging this issue please?


(Régis Hanol) #4

Looks similar to

(eriko) #5

My issue was that I was foolish and misunderstood the naming conventions of the custom fields. So I can not help.