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!
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.
@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?
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)
@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.
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.
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
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
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
@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
I was wondering why the 'rollback' feature of the content cannot be applied to XSLT files/ stylesheets etc. in future releases?
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
@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.
@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
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.
is working on a reply...