Issue when accessing Badge and Preferences Tab

(Maxence Schoonians) #1

Hi there,

We have a community of manga lovers built around a Discourse discussion forum.

The Discourse instance is installed in a dedicated server from Scaleway ( running Ubuntu 16.04. We do not used the pre-made Discourse disk image provided by Scaleway but we installed and configured the instance from scratch thanks to your Digital Ocean tutorial.

The name is Mirage Team and the forum can be accessed at

Everything is working fine unless a very annoying bug that does not allow us to go to our badge and preferences tab of the profile page.

By clicking on one of those two links, Discourse show us a 500 error page :

The error showed above made me think it was related to the badge section so I went to the logs page to see if I could get another information about the error and saw this :

As far as I can understand, it seems that we want to get the “bio_raw” information of the user but we can’t because the var seem to be NULL and not an object as expected by the code ?

Just to be sure that it was related to badges, I have disabled every badge from the badge page in the administration panel (one by one because I didn’t know about the main “disable badge” option in the preferences :sweat_smile: ) and after that, the preferences pane became available and we are able to see the content of this page (the badge button pane disappeared as it should since we do not have any badge to show into)

I started to think this is something related to some wrong data in one of the table in the database so I installed the data explorer plugin and tried to search for something inconsistent in the data related to my personal user but can’t find anything that seems weird at first glance.

Like you can see, I have a few badges linked to my account but I don’t know if something is weird there or should not be there (maybe one of the dev will see directly if something is wrong ? ) :

Also, the instance is running the latest version updated yesterday :

I also have another instance in another Scaleway server and everything is working fine there, that’s why I thought that maybe I have something wrong somewhere in the database.

I can provide you any other information that you need to help me, thanks by advance for your time and help on this matter.


(Régis Hanol) #2

Any chances you could invite me as admin?

(Maxence Schoonians) #3

Thank you for coming here to help me ^^
Of course, I will invite you right away.

@zogstrip : this should be done, have you received the email ?

(Régis Hanol) #4

Seems like your system user is missing a user_profile. To fix it, run Discourse.system_user.create_user_profile in the rails console.

(Maxence Schoonians) #5

Thanks for the help @zogstrip, I will test this right away !

(Maxence Schoonians) #6

And it works !
Thank for your help again.

Just for my information, how is that even possible that the system user had no user_profile ?
We just moved from a server to another last week and this was working before the migration.

To do the migration, I followed the tutorial I found here which says to update both Discourse instances to the newer version (on both old and new server), make a backup from the old instance that I uploaded to the new one and made a restore from this backup.

Do you have any idea on what I have done wrong during the process ?

(Régis Hanol) #7

No idea unfortunately :frowning:

(Maxence Schoonians) #8

Thanks for the help though !