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

    I’ve been asked by a friend to help with a website he has had created. The initial developers only did half a job and as such there are a few things that need sorting to finish the site off.

    I’ve kind of had a crash course in learning modx and have solved all the problems except for 1.

    The site sells alcoholic products so has a splash page which requires the visitor to enter their date of birth before access to the site is granted. This is index.php at the root of the site.

    Unfortunately the logo doesn’t display so I just wanted to edit index.php to have the right image address however when I amend and upload index.php the splash page oesn’t change as if the page is cached by modx.

    I’ve looked through the site and it seems like the splash page is nowhere wthin modx as the pages within modx are home, about etc and their is no obvious link to the initial splash page.

    I know this is a little vague and the fact that I’ve only learned the very basics to modx thus far won’t but my interpetation of the issue is that the splash page is external to modx but still being cached in some way.......

    Has anyone come across anything like this before or could point me in a direction to help me solve what I think may be a very simple issue!

    Thanks

      • 33997
      • 150 Posts
      Hey, welcome to MODX. First of all, it is a bad idea to edit the index.php page, as that is the page that hooks into the entire application, and if something goes wrong on there, the whole site will break.

      Log in to your MODX manager. In Revo, go to System > System Settings > Area:Site > Site Start // In Evo, go to Tools > Configuration > Site > Site Start. See what Doc ID is your site’s start page. Go in the tree to that document and see what code is in there. Also, note which template the document uses.

      Now, if the code to edit is in there, you’re done. If not, then it is time to look at the templates. In Revo, in the site tree on the left go to Elements > Templates and view the template you want. In Evo in the top menu go to Elements > Manage Elements > Templates (in the right frame) (In Evo versions pre - 1.05 or so, it would be Resources > Manage Resources > Templates). and view the template you want.

      If you don’t see the code, but see chunks, Template Variables or snippets, (Written in Revo as: [[$chunk]], [[*templatevariable]], [[!snippet]] - my syntax may be slightly off I’m an Evo user....and written in Evo as {{chunkname}}, [*templatevariable*], [[snippet]] or [!snippet!]), go through each chunk, template variable or snippet you come across until you find it. It may also be in Plugins (under elements).
        "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
        • 34486
        • 10 Posts
        Hi Goonz

        Thanks for taking the time to answer my query.

        I’ve checked the site start doc id and this points to 1. 1 is the home page of the site and this points to the actual home page of the site, not the splash page. There is no code in here for the splash page.

        The site only uses 1 template file so I have checked the template file and again the code is not there. The template file is linked to home, about, shop, contact etc. and if you view the source of these pages you can see the same header information however the splash page has different header information within it so I would suggest the splash page is not calling the template file.

        I have checked through the one template file, all the chunks, snippets and plugins and there is nothing in there which relates to the code on the splash page.

        It is almost like the index.php file is set to be on top of the modx site but is still being cached in someway...........
          • 34486
          • 10 Posts
          Just to add.

          I’ve checked the splash page against the other pages and it calls an entirely separate stylesheet and also has a hardcoded footer so it definitely doesn’t use the one template.

          As far as I can tell index.php in this instance has been hand coded and is separate to the rest of the site.

          My issue now is that I want to edit index.php (only a very small edit to the address of an image) however when I have made the change and uploaded the file via ftp, the page is not renewing.

          Does anyone know why this is? Or any ideas on how to fix this?

          Thanks
            • 33968
            • 863 Posts
            Are friendly urls switched on for your site? If so, it’s unlikely you would be seeing ’index.php’. Even if they were off, a modx page would be of the format ’index.php?id=1’.

            If you don’t have that, then I think your page is hard coded outside modx.

            The file you updated - is it actually inside the folder containing your modx installation? Does it actually resemble an html template, in that it contains html tags and content?

            Have you cleared your browser cache or tried to open it inside another browser?
              • 34486
              • 10 Posts
              Sorry I think my rushed explanations aren’t helping so I’ll try to be as thorough as possible.

              I’ve downloaded the site in dreamweaver so within dreamweaver the site consists of:

              /assets
              /cgi-bin
              /manager
              index.html
              index.php
              index-ajax.php
              sample-robots.txt

              index.html and index.php are exactly the same except for extension. Both contain some php for modx (I’m new to modx but I would suggest the standard initial modx script) and then some php scripting for age verification.

              If view the source of this page then this is the same except the php from the header has been stripped out.

              This splash page shows regardless of any address you enter on the site as an initial age verification, after that entering /index.php into the address bar or even index.php?id=1 brings up the 404 page.

              Any help is greatly appreciated............
                • 33968
                • 863 Posts
                I think you’ll find that most servers will give precedence to index.html over index.php when you try to access www.yoursite.com.

                So I think your splash page is index.html - that’s the one you need to edit.
                  • 34486
                  • 10 Posts
                  I have updated both index.html and index.php to have the image point to the right location and the footer copyright date to update to 2011 but it still doesn’t show when I upload it.

                  As I said initially it’s like it’s being cached by modx somehow.

                  Also just to rule out any browser cache issues, I’ve tried it in 4 different browsers and have cleared the browser cache in each.......
                    • 33968
                    • 863 Posts
                    Have you tried clearing the modx cache from the manager?

                    Site -> Clear Cache
                      • 34486
                      • 10 Posts
                      Yes, I have tried it a couple of times, just tried it again and I got the following:

                      Cache: Found 5 files in cache directory and deleted 1 cache files.

                      New cache files will be created when pages are requested.

                      The following files were deleted:

                      docid_7.pageCache.php

                      docid_7 seems to refer to the 404 page, and this hasn’t solved the problem.


                      Thanks for all your help by the way, I think it’ll be something fairly simple that I’m just missing.