Open mikeblum opened 9 years ago
I thought that with the new user prefs model auto-save code, this shouldn't really be an issue after a user is in the system for more than 1 minute.
Is that correct @aviking ?
@gsteimer That's how it was when it was first created but I think there have been updates since then that may have changed this. I'm not sure exactly what those were.
@gsteimer @aviking The user preferences no longer get saved every minute, they get saved on a throttle so that they get updated when needed, but don't get spammed (the solution ever minute tried to solve). However, this change did create this problem, because since the save does not automatically happen now. When the user logs in, this line is used and it won't exist until the user has done something to create userPreferences. I'm assuming this error also used to show when a new user first logged in, since it wouldn't have a user preferences folder (yet) in the old saving strategy either. I'm guessing a findOrCreateByPath method can be used to fix this. Or just throw an info statement that the folder doesn't exist, as Mike suggested.
This is an issue with how it is being fetched upon login. It uses this line : OpenContentObject oco = CoreContext.getContent().getObjectByPath(ticket, userPreferencesPath+name);
Seeing this now:
[2015-12-08 09:46:08,311|ERROR|RESTConfigService|saveUserPreference|228] Error creating JSON object with the request and grabbing name of user preferences: A JSONObject text must begin with '{' at character 0
org.json.JSONException: A JSONObject text must begin with '{' at character 0
we're spamming client logs right now.
A client noticed in their logs a bunch of traces regarding user preferences:
Could we swallow this exception and just put in a logger.info saaying that a user preferences file doesn't exist?