We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26482
    • 138 Posts
    Quote from: BobRay at Sep 15, 2008, 04:19 PM

    What rewrite rules are in the section that follows that?

    There is nothing more. It ends with the CSS screenflicker solution.
      • 26482
      • 138 Posts
      Would it hurt/help if I upgraded my site to 0.9.6.2?
        • 25663 MODX Staff
        • 12,272 Posts
        Certainly shouldn’t hurt and is definitely recommended.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 3749
          • 24,544 Posts
          Quote from: sderuiter at Sep 16, 2008, 02:43 AM

          Quote from: BobRay at Sep 15, 2008, 04:19 PM

          What rewrite rules are in the section that follows that?

          There is nothing more. It ends with the CSS screenflicker solution.


          My mistake, I didn’t scroll down to see the rest (doh).
            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
            • 26482
            • 138 Posts
            Quote from: rthrash at Sep 16, 2008, 11:36 AM

            Certainly shouldn’t hurt and is definitely recommended.

            I’ve upgraded to 0.9.6.2.
            I had issues with eForm 1.4.4, AjaxSearch 1.5 and FileDownload 2.6.

            With eForm, I had to initiate the form with (note the slash):
            [tt]<form method="post" action="/[~[*id*]~]">[/tt]

            Without the slash, pressing submit on a form on
            [tt]myurl.nl/contact/inschrijven/[/tt] would lead to Modx trying to open the page
            [tt]myurl.nl/contact/contact/inschrijven/[/tt]

            With AjaxSearch 1.5, in the plugin code I had to change this:
            [tt]// establish results page
            if (isset($AS_landing)) { // set in snippet
            $searchAction = "[~".$AS_landing."~]";
            } elseif ($resultsPage > 0) { // locally set
            $searchAction = "[~".$resultsPage."~]";
            } else { //otherwise
            $searchAction = "[~".$modx->documentIdentifier."~]";
            }
            //My Modification
            $searchAction = "/" . $searchAction;[/tt]

            Again, without this, Modx would duplicate the alias in the resulting url.
            0.9.6.2 upgraded AjaxSearch to 1.7.1, which doesn’t have the same code in the snippet and also works out-of-the-box, hurray!


            With FileDownload, I haven’t found a hack that solves my problem.
            I’m calling the snippet as:
            [tt][!FileDownload? &tplList=`FileDownload-tpl` &getFolder=`assets/files/nieuwsbrieven`!][/tt]

            The resulting urls on the files as reported by FileDownload are:
            [tt]http://myurl.nl/login/assets/files/nieuwsbrieven/nieuwsbriefAPRILnr%206%202008%20nr%201.pdf[/tt]
            Whereby login is the alias of the parent of the Modx document containing the call to FileDownload.

            In short: it looks like there’s something still wrong that hasn’t been fixed by upgrading to 0.9.6.2. I’m getting to the point where I think it’s a simple setting that I haven’t found yet, but I’m at a complete loss here.

            Help appreciated. BTW: Thanks very much for 0.9.6.2, and even more the smooth upgrade. I wish more software packages make upgrading as easy as Modx!

              • 26482
              • 138 Posts
              To follow up on my own post...

              Edit: complete rewrite...

              I’ve officially lost it. I now have 3 sites:

              http://www.speelzaalblaricum.nl/, updated to 0.9.6.2
              http://modxtest.textdriven.com/, a fresh install with 0.9.6.2 (same server)
              http://modxtest2.textdriven.com/, a fresh install with 0.9.6.2 (same server)

              Now remember, I’m trying to get the Filedownload snippet to show of list of files from the directory. I’m calling the snippet on a Modx document (named test) inside a container (named contact), f.e. http://www.speelzaalblaricum.nl/contact/test/.

              Snippet call:
              [tt][!FileDownload? &getFolder=`assets/snippets/ajaxSearch`!][/tt]

              This doesn’t seem to be working. The url for the first .txt document is:
              http://www.speelzaalblaricum.nl/contact/assets/snippets/ajaxSearch/ajaxSearch_readme.txt

              Steps I’ve taken from here:

              • Created modxtest site as above
              • Installed FileDownload snippet
              • Copied database only from www.speelzaalblaricum.nl to modxtest.textdriven.com
              • Created modxtest2 site as above
              • Installed FileDownload snippet
              • Made testpage on the modxtest2 domain containing the same snippet call

              Pages to compare:


              Results:
              On modxtest it doesn’t work (url contains the container name)
              On modxtest2 it does work (url doesn’t contain the container name and points directly to the assets folder).

              My conclusion:
              The error is not in a files but is located in the database. Therefore, it seems to be a setting issue.

              Any hint, no matter how small grin, is more than welcome!








                • 26482
                • 138 Posts
                Bump....
                  • 22303 MODX Staff
                  • 10,725 Posts
                  You are simply missing the following at the top of your head section in your templates:
                  <base href="[(site_url)]"></base>
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    We got that sorted on PM wink
                      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
                      • 26482
                      • 138 Posts
                      Quote from: OpenGeek at Sep 23, 2008, 10:35 AM

                      You are simply missing the following at the top of your head section in your templates:
                      <base href="[(site_url)]"></base>


                      Thank you OpenGeek. Sottwell mentioned this to me as well this afternoon, hadn’t had time to post to the forum (at home sick, with 3 children < 4y).

                      Anyway, I’m very, very happy that’s solved, but for some odd reason I never would have thought that a html tag in a template would have the effect that snippets don’t know what the base url is.

                      Maybe this is just my lack of knowledge on the inner working of Modx.

                      Thanks again all for you persistence in listening...This is a great community.