We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1892
    • 82 Posts
    Using modx 1.03 I’ve just done something which messes up my site, fortunately it’s just my localhost test site but I still want to fathom it out. Basically whenever I save anything through the manager it’s reformatting all text by sticking a ’\’ in front of any single or double quotes. So I’m after a few pointers to understand what happens when I save a resource in the manager to hopefully track down the fault.

    Background - I’ve just upgraded my local machine to Ubuntu 10.4 which upgraded the system to php5.3.2, I have been using directResize 0.8.6 to generate photo slideshows, however with the latest version of php it started flagging up deprecated errors for eregi_replace functions in the code. So I tried to replace the code with the recommended preg_replace function some of which were searching for quotes in images links. Which seemed to work ok but I later realised that when I editted other snippets etc. they would get reformated
    ['editedon']
    would become
    [\'editedon\']
    which then led to all sorts of error messages about rendering.

    So any hints or avenues to explore on why my snippets get mangled would be appreciated.

    Adrian
      • 22303 MODX Staff
      • 10,725 Posts
      Disable magic_quotes_gpc (and all magic_quotes options for that matter) in your php.ini -- this feature is deprecated now in 5.3.x and the code to test for it and correct it was removed in MODx Evolution because it triggers E_DEPRECATED errors on some environments that causes problems.
        • 1892
        • 82 Posts
        Brilliant - it works fine now. I’d never have found it as I thought it was something I’d done rather than the Ubuntu upgrade.

        Many thanks for your help it is appreciated,

        Adrian