Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig Cronin 304 posts 503 karma points
    Jan 15, 2012 @ 11:37
    Craig Cronin
    0

    Richeditor CSS styling caching issue

    I have attached my richeditor to a css file for styling in the editor but whenever I make a change it doesnt update in the editor.  It seems like it is being cached.

     

    Any help would be appreciated.

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jan 15, 2012 @ 15:20
    Jamie Howarth
    0

    Hi Craig,

    The backoffice uses the ClientDependency caching library for loading stylesheets and scripts - this could be the root of the problem.

    If I remember rightly, there's a ClientDependency.config file which contains configuration switches - through this, you should be able to disable path-specific CSS caching (using <location path="/umbraco">...</location>, for example) for anything under the /umbraco directory. This way, you can force the control set not to cache the backoffice CSS (which is what the TinyMCE editor loads up - a subset of your original CSS file).
    Either that, or it's manually deleting everything in ~/App_Data/Temp/ClientDependency every so often.

    HTH,

    Benjamin

  • Craig Cronin 304 posts 503 karma points
    Jan 15, 2012 @ 17:10
    Craig Cronin
    0

    Hi thanks Benjamin,

    I will try that.  I have been trying to force a browser refresh but it didnt work.  Then found if i placed cursor inside the rich text editor and forced a refresh then it updates.

    Thanks

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Jan 15, 2012 @ 21:37
    Markus Johansson
    0

    If you open the config-file from /config/ClientDependency.conifg and increase the version by one, that should reset tha cache. Maybe that would do the trick?

  • Craig Cronin 304 posts 503 karma points
    Jan 16, 2012 @ 13:52
    Craig Cronin
    0

    Thanks Markus and Benjamin,

    Will give this a try.

    Craig

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jan 16, 2012 @ 14:03
    Tom Fulton
    1

    Hi Craig,

    I'm not sure the RTE uses ClientDependency to load your custom CSS, I think it just loads it normally.  But I also have this issue sometimes and it's usually my browser caching the file.  After making a CSS change to a stylesheet used by the RTE, I always do the following which works for me:

    - After making the CSS change, click the link below the CSS filename to open it in your browser
    - Hold shift and click refresh
    - You should now see the changes and the RTE should as well

    -Tom

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 16, 2012 @ 20:43
    Jan Skovgaard
    0

    Hi Craig

    I'm also chiming in. If the steps written by Tom above does not help I sometimes find it neccesary to simply recycle the app pool for the changes to take effect. It's usually the last resort but afterwards it's been working for me without further problems.

    /Jan

  • David Armitage 508 posts 2078 karma points
    Oct 04, 2016 @ 17:09
    David Armitage
    0

    Just confirming I has the same problem and Toms solution worked fine for me.

    1. Add my custom css to the rte.css file.

    2. Open up that exact same file in the browser /css/rte.css

    3. Force refresh (usually Ctrl+F5) - You will know it has fixed because you should now see your custom css within the file when previously it probably wasn't there due to the caching of the old version.

    4. Open up Umbraco back-end content editor and you should see that the css changes have pulled through into the rich text editor. Sometimes I also force refresh the umbraco back-end for safe measure but I think that is nu-nessesary.

    5. Its always worth checking the html within the rich text editor using firebug or chromes inspector. You should quickly see if your custom css is present.

  • Craig Cronin 304 posts 503 karma points
    Oct 04, 2016 @ 17:17
    Craig Cronin
    0

    Hi David....

    Thanks for the reply luckily my query was from nearly 5 years ago and we've moved to version 7 :)

    Loving the enthusiasm though, thanks for the feedback, it might help new users :)

Please Sign in or register to post replies

Write your reply to:

Draft