We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49515
    • 184 Posts
    Ok, thank you.
    I figured out a few things, but the website with the new MODX version is not the same as with the old MODX version.
    I am having trouble finding basic files like index.html as I've pulled the entire MODX website to my local git repository to get serious with numerous edits that seem needed to fix the website.

    So, stuck finding where the index.html file is that I guess MODX automatically made somewhere.
    Search results didn't really show a specific path to index.html.
    • The index.html does not exist. MODX creates it upon request. Well, it does cache at least parts of it, but it doesn't exist as a file "index.html" ready to view. The content of the index.html page comes from the content field of the site_start resource, usually resource #1.

      That resource has several fields, which can be used in forming the actual page. The main page heading is usually made from the page title, and in a template or chunk will be [[*pagetitle]], or as the result of snippet processing as [[+pagetitle]].

      As a general rule, for each page viewable on your site, you'll have a corresponding resource. That resource uses a template, which determines the HTML structure of the final page. Usually that template contains some or most of the HTML elements, along with chunk and snippet tags. I've seen templates that were nothing but chunk and snippet tags. I don't care for those because you can't see the page structure from that. You have to wade through those chunks and snippet tpl chunks to figure out exactly what fields from the resource are being used where.

        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
        • 3749
        • 24,544 Posts
        The file that launches MODX is index.php, not index.html. In fact, if you put an index.html file in the MODX root, MODX may never launch. The index.php file starts the process that Susan describes above. The actual content of your site is stored in the MySQL database and retrieved by MODX to create the pages as the user visits them.
          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
          • 49515
          • 184 Posts
          Ok, thank you for that clarification.
          So, can I export MODX somehow to my local Lamp server, so I can edit and view changes, rather than live on the MODX website?
            • 3749
            • 24,544 Posts
            Yes, but you have to transfer all the files and the entire MODX database. Then, you need run setup locally, and you often have to modify the MODX configuration files for the local setup as well.

              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
              • 49515
              • 184 Posts
              Thanks.
              Wow, that sounds complicated.
              So basically MODX is for live editing?
              This means each time I need to edit the live website, I'll need to work that process above?
              Is this right?
              There must be some kind of plugin like WordPress has to export easily for safe local editing?
                • 49515
                • 184 Posts
                Well, pulled the entire website to my local server.
                Now the only error before I can fix the website to the level before the MODX upgrade is the flash banner and scroll, which doesn't show on the localhost/website.
                I imported the database, but not sure what to do to make the localhost/website the same as the live website, to then edit and fix.
                • When moving the site you need to upgrade the paths. The simplest way to do that is to grab the setup directory from the same version of MODX from the website and to run setup in upgrade mode, making sure you update the paths there. If you have hard coded paths to your flash banner you'll need to update those by hands. Here's the instructions for a site move. Scroll down to the section on "Re-run Setup"
                    Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
                  • eiger3970, I'd be interested to learn about this WordPress plugin for offline editing you're talking about. I've never heard of it and would love to know how it works. Do you have a link?
                      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
                      • 49515
                      • 184 Posts
                      Thank you for the reply.
                      Well, I seem to have made the live MODX website run locally (luck helped), so yes, now the 5 year old deprecated flash code is the problem.
                      It's using some old sIFR thing I need to figure out and fix, but I don't think that's MODX related?

                      Re WordPress, the plugin I was suggested to be the best is Duplicator https://wordpress.org/plugins/duplicator/.
                      This did make backup very easy, however it became convoluted when adding to a local server for editing and I lost interest and went for an easier CLI controlled transfer.