Skip to main content

[CPANEL-26496] Changing theme style via CLI causes display caching issues

Comments

5 comments

  • Haym
    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
  • cPanelMichael
    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
  • bellwood
    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
  • cPanelMichael
    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
  • bellwood
    Thanks for the quick response and workaround option @cPanelMichael
    0

Please sign in to leave a comment.