Copied to clipboard

Flag this post as spam?

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


  • Mike Barker 3 posts 23 karma points
    Sep 23, 2009 @ 16:52
    Mike Barker
    0

    Editing CSS files directly dangerous?

    Hi all, basically I have been editing CSS files directly within the file structure. Then with apparently no-one touching anything, the CSS has reverted to an older version. This happened a few weeks ago when I had been editing the CSS directly and then someone made a change from within the Umbraco editor and the CSS reverted to the Umbraco version.

    There has been speculation that Umbraco periodically updates the CSS with the one stored in its database (or something to that effect). But that sounds silly to me.

    Would someone be able to give me a detailed description of how Umbraco deals with CSS files so we can avoid future problems as this revert of CSS happened on a live site!

    Many thanks

    Mike

  • dandrayne 1138 posts 2262 karma points
    Sep 23, 2009 @ 17:20
    dandrayne
    0

    Is this v4?

    I usually happily edit the files on the live site by copying the contents of the css from within the settings section into a notepad, making changes then pasting back and saving without issues.

    CSS files aren't (AFAIK) versioned, so it shouldnt even store older copies, much less revert back to them.  Also afaik there is sync between the files and the db, so changes made in the css will update the db and vice versa.

    I'd check out the "apparently" part a bit more!

    Dan

  • Chris McVittie 103 posts 75 karma points
    Sep 23, 2009 @ 20:38
    Chris McVittie
    0

    I logged this issue (with V4) a while ago

    http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24491

    It hasn't got any attention yet as far as I can see, but would well explain your issue.

    Chris

  • Mike Barker 3 posts 23 karma points
    Sep 24, 2009 @ 11:06
    Mike Barker
    0

    @danrayne - yeah it's version 4. Your way would definitely avoid problems but I want to be able to edit the file directly and see changes occur without having to copy>paste>save every tiny change.

    @Chris McVittie - That sounds like the problem! What would you consider to be best practice given this scenario?

    Thanks guys

  • Rich Green 2246 posts 4008 karma points
    Sep 24, 2009 @ 11:15
    Rich Green
    0

    I was wondering why the 'rollback' feature of the content cannot be applied to XSLT files/ stylesheets etc. in future releases?

  • dandrayne 1138 posts 2262 karma points
    Sep 24, 2009 @ 11:34
    dandrayne
    0

    There is a new code editor (http://marijn.haverbeke.nl/codemirror/) coming for css, js files etc coming in 4.1, perhaps that will help (if some work has been done on code editing in general)

    http://twitter.com/Shazwazza/status/4174189163

     

  • Chris McVittie 103 posts 75 karma points
    Sep 24, 2009 @ 18:25
    Chris McVittie
    0

    @Mike - i would disable access for all users and have a select few who could log in and have access to css - and make sure that those ones are well aware of the workaround of opening the css in the editor first.  You could also keep the entire file system for your site under source control to get roll back.

  • Mike Barker 3 posts 23 karma points
    Sep 28, 2009 @ 11:55
    Mike Barker
    0

    @dandrayne - this looks good but I still think I'll want to use my native editor if I can.

    @chrismcvittie - Thanks! It maybe because it's Monday morning but what is the "workaround of opening the css in the editor first" that you mentioned?

    Mike

  • Chris McVittie 103 posts 75 karma points
    Sep 28, 2009 @ 15:25
    Chris McVittie
    0

    if you need to add a style, click on the css file so that it loads in the editor window.  it is only when the editor window is bypassed and the node is right-clicked on that the issue exists.  viewing the css file in umbraco does a read from the filesystem as i understand it.

Please Sign in or register to post replies

Write your reply to:

Draft