We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I just updated my server to the a newer php version using all of the same apache/php build options that I have previously used.


    PHP 5.3.3
    Apache 2.2
    CENTOS 5.5 x86_64

    Now when I edit content, the output is modified

    Original code in RTE:
    <a href="path/to/file.pdf">file</a>


    After the item is saved it turns to:
    <a href="\"path/to/file">file</a>


    anyone know what would cause this?

    I am also noticing a bunch of the following lines in the error log

    [22-Feb-2011 17:29:48] PHP Warning:  Module 'SQLite' already loaded in Unknown on line 0
    [22-Feb-2011 17:29:48] PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
      • 21257 MODX Staff
      • 730 Posts
      The latter warnings are due to the php.ini file, by the looks of it. Are those modules specified twice?
      The first part, the content modification, looks truely bizarre to me. It’s dropping the ".pdf" from the end of the filename, and adding "\&quote;"!!? You absolutely sure you copied that correctly? I can’t imagine any php setting or any MODX feature or bug causing that.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 3232
        • 380 Posts
        Quote from: netProphET at Feb 22, 2011, 08:57 PM

        The first part, the content modification, looks truely bizarre to me. It’s dropping the ".pdf" from the end of the filename, and adding "\&quote;"!!? You absolutely sure you copied that correctly? I can’t imagine any php setting or any MODX feature or bug causing that.

        I agree, it totally has me baffled. Looking at it again, the file extension isn’t being removed. the example I was looking at had spaces in the file name and was cutting everything off after the first space.

        so a better example would be

        <a href="assets/files/fitness_incentive_program.pdf">

        turns into
        <a href="\"assets/files/fitness_incentive_program.pdf\""


        It looks like something is happening when it is trying to escape the characters. Not really sure what though.

        Quote from: netProphET at Feb 22, 2011, 08:57 PM

        The latter warnings are due to the php.ini file, by the looks of it. Are those modules specified twice?

        This was very helpful, I did see multiple references to these modules in the php.ini file and once I removed them, the errors went away, thank you!
          • 3749
          • 24,544 Posts
          Is TinyMCE turned on? If so, try turning it off and seeing if it still happens. You’ll have to save the resource twice after unchecking the rich text checkbox.
            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
            • 3232
            • 380 Posts
            Yes, it still happens with tiny turned off. Although I am not getting the html entities anymore (&quot;) now each " is just escaped \"
              • 21257 MODX Staff
              • 730 Posts
              I have a feeling that you have magic_quotes enabled.
              http://php.net/manual/en/security.magicquotes.disabling.php
                Mike Schell
                Lead Developer, MODX Cloud
                Email: [email protected]
                GitHub: https://github.com/netProphET/
                Twitter: @mkschell
                • 3232
                • 380 Posts
                Quote from: netProphET at Feb 23, 2011, 07:55 AM

                I have a feeling that you have magic_quotes enabled.
                http://php.net/manual/en/security.magicquotes.disabling.php

                Thank you, that appears to have been the problem, now that I have that off (it was commented out in the php.ini file) it is saving properly when tinymce is displayable. When I re-enable it, on document editor load I get the following:

                TinyMCE Rich Text Editor - OnRichTextEditorRegister
                An error occurred while loading. Please see the event log for more information.
                
                
                Parse error: syntax error, unexpected '"', expecting T_STRING in /home/user/public_html/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 2


                Just can’t win.
                  • 3232
                  • 380 Posts
                  Fixed the issue, when I disabled the plugin, magic quotes messed up the plugin code (escaping ’ and ") I fixed that and everything is working good.

                  Thank you all for your help.