We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44581
    • 6 Posts
    Version is Revolution 2.2.0-pl2.
    The only plugin is TinyMCE.

    The server is running Debian 6 with PHP 5.3.3-7, FastCGI and suExec,
    php.ini: suhosin.get.max_value_length = 4096
    session.save_handler = files
    MySQL 5.1.66

    I have moved a MODx site to a test server in preparation for change of web host.

    Everything seems to be working OK other than the header images and logo not displaying. When I check the HTML source, "assets/" is missing from the image URL.

    The page background image displays OK and page content images seem to be working OK. AFIK I have set all the paths correctly in /core/config/config.inc.php. Following the instructions here, other files requiring path changes also have the correct paths.

    Any suggestions as to what I am missing here would be appreciated.

    Cheers Noel

    This question has been answered by visionquest. See the first response.

      • 3749
      • 24,544 Posts
      Try these steps:


      1. Turn off the compress_js and compress_css System Settings (in System -> System Settings, or in the modx_system_settings table in the DB)
      2. Log out
      3. Delete all files in the core/cache directory
      4. Clear your browser cache and cookies.
      5. Log back in.

        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
        • 44581
        • 6 Posts
        Thanks Bob. Unfortunately this didn't help.

        I also tried different browsers and different machines. No luck. Any other suggestions?
          • 3749
          • 24,544 Posts
          That's a tough one. Double-check the assets_url setting in config.inc.php. Make sure it's a URL, not a path. I've sometimes hard-coded a full URL into that setting (http://mysite.com/assets/, so you might try that.

          If there is a Media Source involved, check its configuration.

          What is the code that produces the image tag?

          As a last resort, you should be able to hard-code the full path into the image tag.
            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
            • 36996
            • 211 Posts
            Can you show your template code?
              • 44581
              • 6 Posts
              BTW I am new to MODx and I didn't design this site. I am taking over the hosting and wanted to first confirm that everything works OK.

              @BobRay: Hard coding the full url hasn't helped and I also cleared the site cache and the browser cookies and cache again as well.

              I still need to check out your other suggestions. The designer has used a different header image for each page so a TV has been used for the header image.

              Still, it seems MODx should generate the correct url/path including "assets/".

              Would there be any advantage in starting from scratch and doing the move again?

              @nir-z: Thanks and here it is

              <html>
              <head>
              
              <title>[[++site_name]] - [[*pagetitle]]</title>
              <base href="[[++site_url]]" />
              
              <link rel="shortcut icon" href="http://www.encoconstructions.com/favicon.ico" type="image/x-icon" />
              <link rel="icon" href="http://www.encoconstructions.com/favicon.ico" type="image/x-icon" />
              
              [[$Stylesheets?]]
              </head>
              <body>
                 <div id="page">
                  	<div id="header">
                         [[$Company Logo?]]
                              <div id="headerimage" style="background-image:URL([[*HeaderImage?]])">
              <h2 class="blue">[[*Blue Header Text ?]]</h2>
              <h2 class="orange">[[*Orange Header Text ?]]</h2>
              <h2 class="white">[[*White Header Text ?]]</h2>                 
              
              </div>
              <div id="navigation">
              <ul><li class="first"><a title="ARCHITECTURAL" href="index.php?id=2">ARCHITECTURAL</a></li>
              <li><a title="ENGINEERING" href="index.php?id=3">ENGINEERING</a></li>
              <li><a title="MINING & MINERALS - COAL" href="index.php?id=4">MINING & MINERALS - COAL</a></li>
              <li><a title="MINING & MINERALS - GOLD" href="index.php?id=5">MINING & MINERALS - GOLD</a></li>
              <li><a title="INDUSTRIES" href="index.php?id=6">INDUSTRIES</a></li>
              <li><a title="TRADING" href="index.php?id=7">TRADING</a></li>
              <li><a title="ENVIRONMENT" href="index.php?id=8">ENVIRONMENT</a></li>
              <li><a title="SAFETY" href="index.php?id=9">SAFETY</a></li>
              <li><a title="QUALITY" href="index.php?id=10">QUALITY</a></li>
              <li><a title="PROJECT DELIVERY" href="index.php?id=14">HDPE Pipe Solutions</a></li>
              <li><a title="LOGISTICS" href="index.php?id=11">LOGISTICS</a></li>
              <li><a title="HEAVYLIFT" href="index.php?id=12">HEAVYLIFT</a></li>
              <li class="last"><a title="PROJECT DELIVERY" href="index.php?id=13">PROJECT DELIVERY</a></li>
              </ul>
              </div>
                      </div>
                      
                      <div id="content">
                          [[*ContentImage?]]
                      <h1>[[*pagetitle]]</h1>
                          [[*content]]
                   
               <div class="clear"></div>
                      </div>
                  
                  	<div id="footer">
                   
                         [[$Company Contact Details?]]
                      </div>
                   </div>
              <script type="text/javascript">
              
                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', 'UA-30726223-1']);
                _gaq.push(['_trackPageview']);
              
                (function() {
                  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();
              
              </script>
              .......
              </body>
              </html> 


              Cheers Noel
                • 44581
                • 6 Posts
                @BobRay the media source says "Filesystem". Is there anything that needs to be configured with that?

                This is the code for the logo and header image:

                <div id="header">
                [[$Company Logo?]]
                <div id="headerimage" style="background-image:URL([[*HeaderImage?]])">


                Cheers Noel
                  • 21078
                  • 77 Posts
                  Hi Noel!

                  1. You are using <base href="[[++site_url]]" /> ... so did you make sure that "site_url" is configured properly to match your test machine url?

                  2. The template code looks good, so it would be more of interest what img-urls are rendered in the front end view of the page.

                  Greets
                  Christian
                    L.net Web Solutions
                    Professional webdesign and development with MODX and WordPress.
                    • 44581
                    • 6 Posts
                    Hi Chris,

                    $site_url is configured properly but out of interest I tried hard coding the url; no difference.

                    This is the test site http://encoconstructions.lnkto.com and here is an example of the HTML output:

                    <div id="header">
                    <a href="#" class="MainLogo"><img src="css/img/logo.png" alt="" /></a>
                    <div id="headerimage" style="background-image:URL(images/banners/Enco_SAFETY_h.jpg)">


                    As you can see, "assets/" is missing from the img src and URL. And I have just noticed another error further down in the page content

                    <div id="content">
                    <img class="contentimage" src="images/pageimg/Enco_SAFETY_b.png" alt="" />


                    Cheers Noel
                      • 21078
                      • 77 Posts
                      Ok, I can load the images when I add "assets/" via firebug. So, yeah you're right, the problem is that "assets/" is missing in the output.

                      You should check the Template Variables that hold the img-src: have a look at the values from the pages and also the settings of the TVs itself. Furthermore make sure "$modx_assets_path" in /core/config/config.inc.php is set and ends with "/assets/".
                        L.net Web Solutions
                        Professional webdesign and development with MODX and WordPress.