Problem/Motivation
All configurations from theme's .info file are getting read and saved in a persistent variable. After that any change to the .info have no effect.
Proposed resolution
Do not store theme's styleswitcher info anywhere.
Data model changes
Persistent variable styleswitcher_styles has been removed.
Instead styleswitcher_custom_styles variable will hold properties of only custom styles (added from admin config form).
API changes
Function styleswitcher_styles_properties() has been removed.
Instead styleswitcher_custom_styles() function has been added to get properties of custom styles.
Function _styleswitcher_get_styles() has been renamed to styleswitcher_theme_styles() and now returns only theme's styles.
Remaining tasks
Add caching of result of styleswitcher_theme_styles() function to not parse theme.info on every page request.
Refresh the cache together with theme's info.
Original issue
by @b3nji:
I created a default style called 'light.css'. Subsequently, I made changes to this style, renamed it 'light2.css' and edited the theme.info file where appropriate (styleswitcher[css][light] = css/light2.css). All caches were flushed. However, when I navigate the site, the browser is still showing the original light.css file...
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | styleswitcher-changes_in_theme_info-2449195-5.patch | 6.29 KB | pingwin4eg |
Comments
Comment #1
pingwin4egMoved a cause to issue summary.
To workaround this issue delete the
styleswitcher_stylespersistent variable from database and flush Drupal caches. It is almost the same as to uninstall the module and install it again.Comment #2
pingwin4egComment #3
pingwin4egComment #4
pingwin4egNo caching for now.
The patch applies after #2536504-1: Default style weight.
P.S.: it is anyway needed to clear theme registry cache for changes of theme.info to take effect.
Comment #5
pingwin4egSlightly changed names of vars and funcs.
Changed issue category as it is actually a bug.
Comment #7
pingwin4eg