We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38733
    • 22 Posts
    Description of Problem:
    It happens rarely, but sometimes when I save a resource, element, et cetera, without WYSIWYG, the content/code is truncated at some random point.
    If I manually replace what was truncated (if I can remember what it was) and save it again, it saves OK.
    It's less an issue with just HTML but major when it's a PHP snippet called by all of your 100+ forms on submit.
    I do not use any unescaped special characters in my code.

    Steps to Reproduce: See above.

    Expected Outcome:
    It should always save without cutting off my stuff at some random point.
    What should I do other than always copy-paste my content/code elsewhere before saving, then confirm that it's all still there?

    • MODX Version: Evo 1.0.8
    • PHP Version: 5.3.10-1ubuntu3.4
    • Database (MySQL, SQL Server, etc) Version: MySQL 5.5.24
    • Additional Server Info: Linode
    • Installed MODX Add-ons: eForm 1.4.4.7, AjaxSearch 1.9.2, Breadcrumbs 1.0.3, Ditto 2.1, Doc Manager 1.1, EasyPoll .3.1, FirstChildRedirect 1, Forgot Manager Login 1.1.6, Jot 1.1.4, ListIndexer 1.0.1, ManagerManager .3.9, MemberCheck 1.1, MODxHost 1, Personalize 2.1, Reflect 2.1, Search Highlight 1.5, SiteMap 1.0.10, TinyMCE 3.3.9.2, TransAlias 1.0.1, UltimateParent 2, Wayfinder 2.0.1, WebChangePwd 1, WebLogin 1.1, WebSignup 1.1
    • Error Log Contents: N/A
    [ed. note: ssanders last edited this post 13 years, 8 months ago.]
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Is it always a 100% random point? Or is it at X characters? E.g. sometimes firewalls (e.g. ModSecurity) will truncate input to a certain number of bytes.

      Do special characters sometimes trigger this? i.e. could this be a database encoding issue where saving regular latin characters works, but saving a utf-8 character causes it to choke? Or possibly a null-byte terminates the string? Just thinking out -loud... this sounds like it's really tricky to troubleshoot.
        • 15625
        • 10 Posts
        I am having similar troubles. After LOTS of back and forth, my problem occurs when I have the following line in a Chunk:

        <li><a href="javascript:;">Some Link</a>


        The javascript:; is causing the problem. When I change javascript:; to something else (e.g. <li><a href="#">Some Link</a>) the issue resolves. I am continuing to do some testing. I don't know if the problem is with the browser, Apache, or MySQL. It doesn't seem like it would be MODx... You never know though.

        If I find anything, I'll report in this space.

        Here is some of my info:

        Browsing from

        * Google Chrome 27.0.1453.110 m (up-to-date)
        * Windows SBS 2011 Essentials, 64 bit
        * 4G RAM

        MODx Server

        * Ubuntu 12.04 LTS (up-to-date)
        * 2G RAM
        * MODx Revo 2.1.3-pl
        * MySQL 5.5.31-0ubuntu0.12.04.2-log
        * PHP 5.3.10-1ubuntu3.6
          -Ken
          God is good all the time!

          Cleary Baptist Church • http://cleary.org • http://missionsurge.com

          [=][=][=][=][=]
          | THE WALL |
          [=][=][=][=][=]
          • 27708 MODX Staff
          • 2,502 Posts
          This could be as @Everett says, mod_security or I've recently seen hosts doing filtering. The best way to determine this is first check for mod_security which will show up in your php_info report the next step is to find a resource on which this occurs and start removing words on at a time, saving between each removal. As above, I've seen filters for words like script in inputs.
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            If not mod_security, I would suspect some other application level firewall using pattern matching on your $_POST or $_GET arrays and leading to massive chaos. Talk to your host to see what they have installed.
              • 15625
              • 10 Posts
              I have figured out my issue. As a part of a large org, our IT is decentralized. The network folks that oversee the connection between internal and external networks are doing IDS/IPS. Once I got a hold of the right guys it took about 5 minutes to figure out the problem was not MODx, Ubuntu, MySQL, Apache.... It was US (IT).

              Sorry for kind of hijacking this thread. I thought I had issues similar to Mr. Sanders. 'Twere not the case. Thank you to all.

              MODx rocks!

                -Ken
                God is good all the time!

                Cleary Baptist Church • http://cleary.org • http://missionsurge.com

                [=][=][=][=][=]
                | THE WALL |
                [=][=][=][=][=]