Since we’ve upgraded from 21.10 to 22.04 version, we have issue with every custom views that aren’t displayed, there is an error message instead :
Unknown user theme :
We just need to switch light/dark theme or edit our profile to fix the issue. Maybe there’s some lack of theme initialization on login phase :/
Best answer by SnkView original
Can you try to clean browser cache?
Unfortunately, cleaning web browser cache doesn’t help.
We do use SSO authentication through OpenID. Would that be the root cause ?
Ok it is a known issue and we made a fix here.
Should be available in next minor version (22.04.5)
@Snk , Do you have logs into /var/log/php-fpm/centreon-error.log when you try to display your custom views ?
Also when you say
When you logout and login again, did the bug occurs again ? (If yes indeed it could be a bug related to login, but if the bug doesn’t occurs after you have switch I think it’s more a problem during the upgrade).
I’ll investigate further
After investigation I’ve found the root cause. Indeed on the login there is a little error.
If you want to patch it before we release this officialy, you can edit the following file:
on ~l.246 you should see
add the following line
So the user theme will correctly be instanciate on login.
Thanks for this but it doesn’t fix the issue for us, even after restarting both httpd & php-fpm. I’ve event tried to clean browser cache.
I’ve checked in the contact table of the centreon database, every user has “light” theme configured.
For testing purpose I’ve tried :
But it doesn’t work either :/
I guess the fix mentionned by
@Laurent will fix it for good, I’ll wait for next release (22.04.6 ?)
Ok I’ve fixed the issue by adding the fix in this file aswell :
Yes thought it was login using apache SSO, my bad.
A PR has been done and will be release ASAP (I guess in 22.04.6 indeed)
Thanks for your feedback, good to know it’ll be fixed in next version (I keep my local change ^^).