We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39899
    • 8 Posts
    Ho ModX people. I have used ModX Evu for many sites so far and never did experience this problem before. When I add a New template and insert my html code - and saves - the manager rewrites a lot of the code by inserting \ in the code.

    Example:
    I write the folllowing:

    <meta name="keywords" content="[*longtitle*]" />

    Adter saving, and clicking to edit again the template writes the following:

    <meta name=\"keywords\" content=\"[*longtitle*]\" />

    The same thing happen for Class calls as:

    <div class="sidebar fltleft"> which ends up like: <div class=\"logo fltleft\"> Whuch obviously makes the whole site not work.

    Has any one any idea of how I fix this? Is it webhost related? Is it something in the settings I have by fault sat wrong? Any help are mostly appreciated.

    Brgds,
    Maja
      • 39899
      • 8 Posts
      Ups I can see I can´t write the right code... since it is probably being interpretated by thus field... but I write...

      meta name="keywords" content="[*longtitle*]" / which ends up like <meta name="keywords" content="[*longtitle*]" />
        • 39899
        • 8 Posts
        And still - I have attached an image to explain the difference..
          • 19369
          • 1,098 Posts
          Hi, the code is being "eaten" by the forum because you haven't wrapped it with the "code" button.

          The problem you're experiencing is due to the fact that the server has Magic Quotes enabled. Try to disable Magic Quotes from the .htaccess file that you should have in the root by adding this row.
          php_flag magic_quotes_gpc Off


          If this doesn't work, you can try others solutions here: http://php.net/manual/en/security.magicquotes.disabling.php

          If this doesn't work as well, then try to contact your hosting provider and ask them to disable Magic Quotes.

          Note: after that you disable Magic Quotes, you need to remove the back slashes manually from the template. After that, you can try to save and see if it is still adding the slashes.
            • 39899
            • 8 Posts
            Microcipcip - Thank you so much for a quick reply! Inserting in .htaccess file worked perfect! Appreciate it more than you will ever know!
              • 19369
              • 1,098 Posts
              Good smiley