Copied to clipboard

Flag this post as spam?

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


  • Rik Helsen 670 posts 873 karma points
    Dec 30, 2009 @ 11:28
    Rik Helsen
    0

    Editing CSS files on the filesystem

    Can anyone confirm that changes to css files on the filesystem aren't committed to the database?

    So after I make a change to a css file on the filesystem, if i load it in the editor in the umbraco backend I don't see the changes i made seconds/minutes ago?

    we seem to be loosing work this way...

  • Comment author was deleted

    Dec 30, 2009 @ 11:36

    Just tried this on a v4.0.3  and it works fine here, it loads the changes made on filesystem.

    Regards,
    Tim

  • Jukka-Pekka Keisala 90 posts 226 karma points
    Dec 30, 2009 @ 11:40
    Jukka-Pekka Keisala
    1

    When you modify on disk it will not save to the database. You need to go /settings/StyleSheets/ then open there and press Save. This will save to the database. 

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 30, 2009 @ 11:47
    Kim Andersen
    1

    Should work fine. I always edit my files in the filesystem, and almost never in the Umbraco backend (unless it's a small change). Are your file saved the right way.

    And not something like "Read only" or are your files in source safe and edited outside the source safe?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Dec 30, 2009 @ 12:23
    Douglas Robar
    1

    In umbraco v3 there was a one-way sync from umbraco to the filesystem. If you edited the file directly umbraco would not 'notice' it and the next time you opened the file in umbraco it would not reflect the changes on disk. When you saved the file from inside umbraco it would over-write the file on disk.

    But in umbraco v4 there is a two-way sync. You can edit the file in umbraco or on disk and the next time you open it any changes will be noticed automatically. The only time this wouldn't work is if, by editing the file on the filesystem directly, the file permissions or ownership changed and the website's application pool owner could no longer read/update it properly.

    In umbraco v4 you should be able to do the following:

    1. Create a CSS stylesheet file in umbraco
    2. Save it in umbraco
    3. Open the file in Visual Studio / Notepad++ / you-favorite-text-editor from the /css folder
    4. Edit the file and save it
    5. Click the Settings icon in umbraco, navigate to the Stylesheets section
    6. Re-open the css file in umbraco by clicking on its name
      YOUR CHANGES SHOULD APPEAR HERE
    7. Make more changes and save the css file in umbraco
    8. Return to your text editor... it should notify you that the file has been changed and ask you to reload it
      YOUR CHANGES SHOULD APPEAR HERE AS WELL

    That's how it should work for CSS, JS, XSLT, and MASTERPAGE TEMPLATES.

    cheers,
    doug.

  • Rik Helsen 670 posts 873 karma points
    Jul 22, 2010 @ 14:56
    Rik Helsen
    0

    maybe not really a bug but it can be nasty when you encounter it:

    if someone edits a css file in an external editor and adds css classes below the /* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */ comment, all this content gets deleted when you open this file in the umbraco css editor and save the file again.

    this can result in loss of the added css rules.

    I propose an alteration of the message warning users not to edit any part below this line, nor add additional css below it.

Please Sign in or register to post replies

Write your reply to:

Draft