Open ajburls opened 6 years ago
Agreed, it’s odd he would have arrived at this page!
@iteles He appears to have done everything correctly and is using a unique email address for his client admin emails. He helpfully sent the attached files. In the video the URL loses the slug when he goes to messages but the app itself still says it is the Hospital Pediatra Sinoa version.
The MP4 video file he made won't attach here so I have sent it to you by email
@ajburls. Thanks for sending over the video. That is very helpful.
With regards to the point about the URL losing the slug. This is the correct behaviour of the site. Once a user has logged in, the branding information is taken from the user data, not the url.
Still looking into what is causing the internal server error.
@RobStallion Sounds like we could also do with a little update in the docs for branded apps and how they work for future reference 😊
I have created a new user for the hps
account...
If I log in I get the hps
branded version of the app as expected...
When I go to the messages page however I do not get an error. The site works as expected...
This leads me to believe that the error is to do with the particular user.
Next step is to look into what could cause an individual user to have an error.
Still not sure what is causing this user to error but after looking into this a little more is doesn't appear that this user is an admin.
When an admin clicks on the messages button in the nav-bar they should be taken to the /list-users
endpoint...
I am going to make a clone of the database and work with it locally to see if I can spot anything relating to this particular user that could be causing them to have an error.
I have just managed to recreate the error locally
Looking into what is causing the issue now
The error is being caused because the struct
being passed in is nil
this users case.
Looking into where this is being called to see why the value is nil
.
Found the cause of the bug. This particular user did not have a field in the user_messages_read
table that related to them.
Looked into how this may have happened with @Danwhy but cannot see any reason for how this could have happened other than a database error.
Next steps
user_messages_read
table for users if they do not have already have one
I created a client administrator and badged app for a hospital in Mexico www.BestEvidence.Info/HPS
He wrote to me to say
"When I click Messages there's an error: internal server error".
I have asked him for more details of what he was doing as the screenshot he sent (attached) didn't have the slug in it
I await to hear back from him, but whatever it was it shouldn't have happened.