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

    I am trying to use the Andreas01 template, but I’m having a problem with the ’DropMenuS’ snippet. I’ve got everything else installed, but when I try to save the ’DropMenuS’ snippet, I get the following:

    "Precondition Failed

    The precondition on the request for the URL /manager/index.php evaluated to false."

    Any ideas?

    I have tried this on two different hosts (Textdrive and 1and1). Each time, I get the same result.

    Thanks

    SF
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      This doesn’t have anything to do with the snippet itself. Have you saved any other snippets? Just make up a quick snippet, name it "hello":

      return "Hello, world";


      and save it. I think you have a more serious problem with your installation.
        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
        • 27855
        • 21 Posts
        Hi,

        Okay, I named a snippet "hello" and saved it.

        I didn’t have any problems with it.

        SF
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Odd, I just went into my copy of the template package and saved that snippet on three different hosts with no trouble, so I can’t begin to say what the problem could be. (later...downloaded the package from here, unzipped and installed the snippet on the same servers, again no problems huh )

          Here’s my working copy; maybe that snippet got corrupted in the zip/unzip process somehow.
            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
            • 27855
            • 21 Posts
            Thanks.

            I tried the copy you posted. I encountered the same problem.
            I’ll keep searching.

            Thanks for taking some time to help me!

            Sincerely,

            SF
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ok, try this: Open your existing DropMenu snippet and see if you can "Save" it without making any changes. If you can, then copy/paste your installation’s existing DropMenu snippet to a text editor and save it somewhere to back it up. Now replace its text with the text from the DropMenuS snippet file. Save.
                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
                • 27855
                • 21 Posts
                Hmmm...interesting. I can’t save it (the original).

                I tried it on both hosts (Textdrive and 1and1) and I couldn’ t save it on either one.

                SF
                  • 30546
                  • 46 Posts
                  that is strange. I use 1and1 and it works like a charm. Their servers have been really good. I got 3 staged modx installs running on it. laugh

                  Download your MODx again, unpack and then upload it again to the server. (forget install, since you already installed the engine) Then retry the add on of the snippet.
                    • 27855
                    • 21 Posts
                    It turns out this was something to do with mod_security at TextDrive. It had nothing to do with Modx.

                    http://help.textdrive.com/index.php?pg=kb.page&id=85

                    Thanks for the help!

                    Sincerely,
                    SF
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      It would be interesting to examine the logs and find out exactly what was triggering the blocking.
                        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