[CPANEL-26496] Changing theme style via CLI causes display caching issues
Hello,
If a user changes their style via the cPanel interface, the cache is busted and the new style takes effect immediately.
However if we change a user's style using the modify_accounts script, a hard refresh is required to clear the cache. This script should also trigger a cache bust in whatever way the change style UI does, e.g. query string number increment.
Currently we cannot use the modify_accounts script because it's ineffective when users are seeing cached files which are set to expire after 2 months.
Thanks
-
Note that the UAPI function Styles::update does not have this problem, the cache is cleared properly using this method. However this of course requires the user to have the Styles feature enabled. So I would definitely consider this to be a bug in the modify_accounts script. 0 -
Hello, I've opened internal case CPANEL-15499 to report this behavior. I'll monitor this case and update this thread with more information as it becomes available. Thank you. 0 -
When updating a systems users style via the CLI: /usr/local/cpanel/scripts/modify_accounts --theme=paper_lantern --all-users --style=basic Users that had been using a different style, e.g retro, are seeing a broken interface. The fix is to hard reload the page - varies by browser - and isn't intuitive for all end users. Not sure if this would be considered a bug - but - at the caching level, resetting the style should perhaps modify the cache control headers or send assets with an updated version string? This is on v78.0.18. 0 -
Hello @bellwood, I've reproduced this behavior internally and opened case CPANEL-26496 to report the issue. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, one workaround you may find easier is to update the account's style with the following UAPI function via the command line: uapi --user=username Styles update type=default name=basic
The UAPI command will instantly update the style, though you'd have to create a loop bash command if you wanted to run it for all accounts. Thank you. Note: I also merged an older thread on this topic to this one and internally noted the previous case number in the new one.0 -
Thanks for the quick response and workaround option @cPanelMichael 0
Please sign in to leave a comment.
Comments
5 comments