We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    Greetings -- I’m trying to create a new template using code assembled in the Komodo text editor. I have tried several times to copy and paste the code into the ’new template’ field, but each time, after saving and opening the newly created template I find backslashes inserted into the code all over the place.

    Here’s an example: <link type=\"text/css\" rel=\"stylesheet\" href=\"test-index.css\" />

    I have tried pasting the code from textedit, and have tried this operation in both Firefox and Flock. I’m using an iMac, and developing in an instance of MODx 1.0.4. I have used this setup (modx v1.0.4, Firefox and/or Flock, Komodo) on my PC with no issues.

    This is super-frustrating so any help that you can provide is sincerely appreciated!

    Oh, and, apologies in advance if this isn’t the right place for this post. This doesn’t seem like a bug, per se, and I didn’t see any other location more suitable...
      • 3749
      • 24,544 Posts
        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
        • 32678
        • 290 Posts
        Thanks for the reply.

        I altered php.ini as well as ht.access, per the instructions at http://www.php.net/manual/en/security.magicquotes.disabling.php, with no change in behavior. Any other ideas?
          • 3749
          • 24,544 Posts
          You’ll have to rename ht.access to .htaccess.

          Check PhpInfo to see if magic_quotes_gpc is really off. Reports->System Info->PhpInfo View.

            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            there are a number of php.ini files on a Mac, especially if you’re using MAMP. Using that same phpinfo link, make sure you’re editing the right file!
              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
              • 32678
              • 290 Posts
              Thank you both for the guidance!

              I had both php.ini files edited properly but didn’t understand that ht.access needed renaming. On OS X versions 10.4+ this is a slightly convoluted process, as it isn’t written into the API to create system files by simply renaming them (earlier versions allowed you to override the error OS X provides when you try). To accomplish this, I edited ht.access appropriately and saved it into the htdocs folder as a text file. I then used the MV command in Terminal to rename the file. That solved the issue.

              One more question about this: PhpInfo indicates the local value for magic_quotes_gpc as ’off’ but the Master Value as ’on’. Can you please explain the implication here, and how that value can be manipulated?

              I’m obviously climbing the MODx learning curve but have used other CMSs (mostly as a business user but also from under the hood) and so far, I’m really impressed with MODx’s flexibility and community. Thank you and awesome work!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                The "master value" comes from the php.ini file, while the "local" value is the one being used by the script being run (the phpinfo() script) either from a setting in the script itself or from the .htaccess file.
                  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