Skip to content

fix(theming): make cache buster depend on the app version - #47095

Merged
st3iny merged 1 commit into
masterfrom
fix/theming/cache-buster-on-upgrade
Aug 7, 2024
Merged

fix(theming): make cache buster depend on the app version#47095
st3iny merged 1 commit into
masterfrom
fix/theming/cache-buster-on-upgrade

Conversation

@st3iny

@st3inyst3iny commented Aug 7, 2024

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Due to the new design, many css variables changed. However, the cache buster value does not increase on Theming/Nextcloud upgrades which causes old theming stylesheets to remain cached. Thus, some apps on the Nextcloud instance look broken after an upgrade (to 30) until the cache is cleared.

How to reproduce?

  1. Clear browser data, open dev tools and make sure to enable caching.
  2. Install Nextcloud stable29 and Calendar stable4.7.
  3. Disable debug mode in config.php!
  4. Navigate to Calendar.
  5. Upgrade Nextcloud to master and Calendar to main.
  6. Upgrade your Nextcloud instance using occ.
  7. Navigate to Calendar in a new tab.
  8. Observe broken styling.
  9. Clear cache and reload Calendar.
  10. Observe working styling.

Between steps 7 and 9 you can also observe that the content of theming stylesheets changes but not their cache buster hash (?v=[...]).

Checklist

@st3inyst3iny added this to the Nextcloud 30 milestone Aug 7, 2024
@st3inyst3iny self-assigned this Aug 7, 2024

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

Comment threadapps/theming/lib/Util.php

@AndyScherzingerAndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@AndyScherzingerAndyScherzinger added high feature: caching Related to our caching system: scssCacher, jsCombiner... labels Aug 7, 2024
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny
st3inyforce-pushed the fix/theming/cache-buster-on-upgrade branch from 8596b91 to 087f748CompareAugust 7, 2024 07:48
@st3iny
st3iny enabled auto-merge August 7, 2024 07:49
@st3inyst3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 7, 2024
@st3iny

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

@st3iny

Copy link
Copy Markdown
MemberAuthor

/backport to stable29

@st3iny
st3iny merged commit 5d577be into masterAug 7, 2024
@st3iny
st3iny deleted the fix/theming/cache-buster-on-upgrade branch August 7, 2024 08:24
@AltahrimAltahrim mentioned this pull request Aug 7, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: cachingRelated to our caching system: scssCacher, jsCombiner...feature: theminghigh

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@st3iny@AndyScherzinger@ChristophWurst@juliusknorr@szaimen