We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8609
    • 607 Posts
    hmm, looks like magic quotes are enabled in your MAMP install, which is why you have all those extra back slashes / which are messing up your links. First turn off magic quotes then go into your template code again and make sure you have none of those extra backslashes. You can also look at this thread for more info: http://php.net/manual/en/security.magicquotes.disabling.php
      • 8214
      • 28 Posts
      Yeah your code is screwy, your editor is messing with them, I guess its the ’magic quotes’. The text editors do this sometimes too, its a pain.

      For example, here is my template call to the css:

      <link href="assets/templates/new/css/New_Style_CSS.css" rel="stylesheet" type="text/css"/>

      No backslashes.
        • 36969
        • 54 Posts
        Well, when I hit save, then go to preview and see that no css formatting is in place, I go back to the template and click on edit. When I look down at the html coding it now has the back slashes in there. If I hit save, go back out, then come back in to the template to edit, it will add another back slash, and keep doing that...

        I went in to the php.ini file and changed the magic quotes to Off, and I am still having the same problem...

        Now what? undecided

        I guess the upside is, I am getting a learning lesson, and really learning more about modx! Downside is, this is frustrating and delaying me really getting to work on the project I want to do and actually using modx to create it.
          • 8609
          • 607 Posts
          once you’ve turned magic quotes off, any new code should not be affected by the slashes, but you still need to go into your template code and delete those backslashes
          see http://modxcms.com/forums/index.php?topic=50408.0
            • 36969
            • 54 Posts
            I had gone back deleted and re-pasted the index.html code back in the template from the text editor. Still running in to the same problem. Would have have to close and re-start MAMP and the modx manager?

            To change the php.ini I opened the 5.2 PHP file in the text editor and only found the one instance where the magic quotes were set to "On". I changed that to "Off", saved and closed. Now, I know nothing about coding or ini files, so I’m not even sure if that was the correct way to do that. I looked thru the 5.3 php.ini file and the only instance of magic quotes was already set to "Off".
              • 36969
              • 54 Posts
              Decided to close MAMP and modx manager. Even restarted my computer because it had an iTunes update. When closing MAMP it asked for my macbook password to accept "changes" made. Also asked the same thing when I started MAMP back up again. Re-pasted the html in the template, makes changes to the variables, make sure css file was in proper place. Still outputting with no css styling. If I view source in Safari it shows the back slashes again.

              Could any of this have to do with Firefox since I am using that browser to do all of this. I have the Firebug add-on installed as well as the "It’s All Text!" add-on installed. I wouldn’t think those would make a difference...
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Check the system (phpinfo) and see what it says for magic_quotes.

                There should also be a "master php.ini" file listed somewhere in there, and that is the one you’ll need to update. There’s often multiple files around the system, and you may be working on the wrong one.. been there too. tongue
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 8214
                  • 28 Posts
                  Yes I would disable all related firefox add-ins or plugins for now, until you figure out what is adding these backslashes or just until they stop showing up.

                  You can always turn them back on or re-install them again later.
                    • 36969
                    • 54 Posts
                    Well, I tried doing it in Safari with no luck either. Where might the master_php.ini file located by chance? I’m on MAMP on a macbook...

                    **quick note... I just searched my mac for any php.ini file. There are only two, within MAMP. I used Text Wrangler, searched for "magic_quote" and it found 3 instances in one file and 1 in the other. I had already used Text Wrangler to change the On to Off, so all 4 instances are off. File was saved and MAMP restarted. Still not having any luck.
                      • 8609
                      • 607 Posts
                      are you using evo 1.0.4 or 1.0.5?
                      what version of php are you running on your mamp?
                      are you using mamp or mamp pro?