We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40649
    • 40 Posts
    Hi all- I'm moving an existing modx website to a new server/new modx installation (Rev 2.2.4). I have the modx up and running, the database installed, files up and going, and have changed the homepage to the new index page. I have migrated all the html in. I have also added two css templates to my assets folder- one modified for ie and one that's just the layout (the location specified in my old html file, though I did not build it). I am not sure what to put in the template html section to get it to show up. I tried to use the old "head" tag from the html pages, but it's just pulling random css on the homepage.

    Prior to adding in the html of my head tag, all the content was in my site using the default base template, however, none of the images or template were showing-- it was just basic words/links, and images were referring to the alt tags.

    Please give me some steps that will allow my old template to show up. I am very new to modx (today, actually), so please speak slowly. smiley

    Thanks for your help!
      • 36782
      • 109 Posts
      If I knew exactly what was in your Base Template, I might be able to help a bit.
      It's tough without seeing the header though.
        • 40649
        • 40 Posts
        Sorry here it is-- thanks for the reply! smiley


        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Ammonia Pressure Gauges - Refrigeration, Agricultural, Industrial & OEM - De-Mar & Associates</title>
        <link rel="stylesheet" type="text/css" media="screen,projection" title="Default" href="/assets/templates/layout/layout.css" />
        <!--[if lt IE 7]>
        <link rel="stylesheet" type="text/css" href="//assets/templates/layout/ie.css" />
        <![endif]-->
        <script type="text/javascript" src="/assets/js/omniture.js"> </script>
        <script type="text/javascript" src="/assets/js/jquery.js"> </script>
        <script type="text/javascript" src="/assets/js/custom.js"> </script>
        <link rel="alternate" type="application/rss+xml" title="ROR" href="ror.xml" />
        
        </head>
        <body id="webxitesparkerandfoster">
        
        
          • 3749
          • 24,544 Posts
          You need to add this to the head section of all templates you use:

          <base href="[[++site_url]]" />



          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 40649
            • 40 Posts
            Hi Bob- Thanks... I added that before the end of the head with no luck. I've attached a pdf with the image of my templates screen so you can see what I've done. Let me know... and I really, really appreciate your help!
              • 40649
              • 40 Posts
              Oh and here is what it looks like in my browser:
              http://biz41.inmotionhosting.com/~demarc6/ammoniagauge/modx/

              Thanks again!
                • 3749
                • 24,544 Posts
                Looks right. Did you run Setup on the new site after moving everything? That will usually straighten out the paths.

                Make sure you *don't* have an index.html page in the root of the site. MODX uses the index.php file.

                You may need to clear the site cache (Site -> Clear Cache) and clear your browser cache and cookies before it takes effect. If you've run Setup and cleared things and it still doesn't work, try deleting all the files in the core/.cache/ directory (MODX will recreate them).

                Your comment about the HTML files makes me wonder. MODX stores all resources (pages) in the database, so there really shouldn't be any .html files on a MODX site.

                MODX has an "import HTML" feature to bring them in.



                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html




                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 40649
                  • 40 Posts
                  Sorry for this question, but how do I run setup? I'm so new to this, but have just enough html/css knowledge to be dangerous.

                  The reason I have html pages is because I was given all the files from the old host. I just imported them using the html importer. The template wasn't working, but at least the html was showing for each of the pages before I entered the head tag I have now into the template and when I was just using the default base template. I almost wish I could get the default back and start from scratch there. Besides running setup- what would you do if you were me?

                  Thanks again!
                  a
                    • 3749
                    • 24,544 Posts
                    I'd try running Setup first.

                    Just put this in you browser's address bar (replace 'yoursite.com' with the URL of your site):

                    yoursite.com/setup


                    It won't touch any of your content, so you won't lose any work.


                    ------------------------------------------------------------------------------------------
                    PLEASE, PLEASE specify the version of MODX you are using.
                    MODX info for everyone: http://bobsguides.com/modx.html
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 40649
                      • 40 Posts
                      I'm on a temporary url, so the setup didn't work quite right-- I got an ip address. I cleared my site's cache with the site->clear cache feature, that didn't work. I went in to my browser and cleared the cache/cookies-- that didn't work. I then looked for the core/cache/directory in my files and the directory file isn't there. Is that the issue?