We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21414
    • 41 Posts
    I had an issue today where I lost all my data for a site I’ve been working on for about 2 weeks while upgrading to 2.0.8.

    I now have a new modx install up and going, and was able to salvage some of my template and css information, however now that I have a new template set up, for some reason the site does not seem to be processing my CSS, no matter whether I put the css in a linked document, or if it is put directly into the head of the template.

    Help!

    This is the head of my template:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
    <head>
    <title>[[++site_name]] - [[*pagetitle]]</title>
    <base href="[[++site_url]]" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="author" content="NickClark" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="[[~4~]]" rel="stylesheet" type="text/css" media="screen" title="screen" />
    <link href="[[~3~]]" rel="stylesheet" type="text/css" media="screen" title="screen" />
    
    <!--[if IE 7]>
    <link href="css/custom/ie7.css" rel="stylesheet" type="text/css" media="screen" />
    <![endif]-->
    <!--[if IE 6]>
    <link href="css/custom/ie6.css" rel="stylesheet" type="text/css" media="screen" />
    <![endif]-->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"> </script>
    
    </head>

      • 21414
      • 41 Posts
      Seems that modx did not like that I copied/pasted from textedit, it was processing some characters in front of each style, and thus not seeing the styles.

      Seems to be fixed now that I’ve corrected this.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        MODx has nothing at all to do with that; the .css file is uploaded directly by the user’s browser without involving MODx. If the .css file is corrupted for whatever reason, the browser can’t deal with it. You can always run the page through the CSS validator to see if there’s anything wrong with the CSS associated with it. You can also give the validator CSS code, or a link to a .css file.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org