We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51928
    • 4 Posts
    Hi,

    I'm new to modx and would like to get some help from you guys if possible. The header.php is located on template/src/chunks/header.php. However, whenever I click save and check the website, nothing happens. I already cleared the cache on my browser and it's still the same. Does caching have something to do with this? If yes, how many minutes do I have to wait for it updates automatically?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What exactly are you trying to edit? That path is not part of anything MODX that I'm familiar with.
        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
        • 13226
        • 953 Posts
        If you are updating a static / hard coded file (not DB based) you will probably have to clear the manager cache after every update - not just the browser cache
          • 51928
          • 4 Posts
          Quote from: iusemodx at Mar 09, 2016, 07:39 AM
          If you are updating a static / hard coded file (not DB based) you will probably have to clear the manager cache after every update - not just the browser cache

          Thanks for the reply.

          Yes, I'm trying to update a hard coded file (php). I just have one concern, the site that I am working on have carts in it, if I clear the manager cache, will this affect the cart or any part of the website?
            • 51928
            • 4 Posts
            Quote from: sottwell at Mar 09, 2016, 07:24 AM
            What exactly are you trying to edit? That path is not part of anything MODX that I'm familiar with.

            Sorry, it's a hard coded file located on the template folder.
              • 3749
              • 24,544 Posts
              I'm not positive about this, but the carts are probably using $_SESSION variables to store the information. Clearing the MODX cache shouldn't affect those or any pages, though it will slow down page loads the first time each page is visited (which will restore its cache).

              If that file is not part of MODX, though, it probably isn't cached. Some browsers don't always clear their caches when you tell them to. Using Ctrl-F5 will usually force a reload, though.

              It's always possible that you are editing the wrong file, or the wrong part of the right file. wink
                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
                • 51928
                • 4 Posts
                Okay, thank you for your reply BobRay. I guess I should try that manager cache clearing.

                Regarding the file, I double checked the codes and they are very similar when I use view source from the browser. Although there is a weird thing that I noticed on the template.

                For the template part of the website, the header is included as [[$asHeader]] on the file. So I checked the chunk asHeader file and the code is very different from the live site. That's weird right?

                Actually, I just checked the live site now and the header.php file that I edited yesterday has now changed. So after 1 day, the file changes? This must be cache.

                - Robert