We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32982
    • 674 Posts
    sometimes when edit a snippet it doesnt show the foul source and if save,
    lost a lot of work.
    any one whith the same problem?
      Jabiertxof (formerly XYZVISUAL)
      My bussines: http://marker.es
      https://www.youtube.com/user/jabiertxof/videos
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: xyzvisual at Jun 23, 2006, 04:00 PM

      sometimes when edit a snippet it doesnt show the foul source and if save,
      lost a lot of work.
      any one whith the same problem?

      Well, generally, the maximum size of mediumtext field in MySQL is somewhere around 16Mb. However, there are other considerations, as described in the MySQL documentation at http://dev.mysql.com/doc/refman/5.0/en/blob.html:

      The maximum size of a BLOB or TEXT object is determined by its type, but the largest value you actually can transmit between the client and server is determined by the amount of available memory and the size of the communications buffers. You can change the message buffer size by changing the value of the max_allowed_packet variable, but you must do so for both the server and your client program. For example, both mysql and mysqldump allow you to change the client-side max_allowed_packet value. See Section 7.5.2, “Tuning Server Parameters”, Section 8.6, “mysql — The MySQL Command-Line Tool”, and Section 8.11, “mysqldump — A Database Backup Program”.

      That in mind, if you have a large amount of code for a snippet, I find it much more efficient (both in front-end performance and in publishing changes to the snippet) to put the code in an external include and simply include the file via the snippet code anyway. So if you are losing content when cutting and pasting, it’s most likely due to client or server platform restrictions, I suggest avoiding the process altogether by trying the include technique.

      Hope that helps...
        • 25663 MODX Staff
        • 12,272 Posts
        Jason, can you share an example of that, please, for everyone’s benefit?

        Thanks!
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: rthrash at Jun 24, 2006, 03:11 PM

          Jason, can you share an example of that, please, for everyone’s benefit?

          Thanks!

          Here you go -- http://modxcms.com/forums/index.php/topic,5369.msg38226.html#msg38226
            • 32982
            • 674 Posts
            thanks but the problem is in a little snippet i have later bigest snippets and whithout problems but in the upgrade to php5.1 (i think) give this errors and only loads a half+- of the snippet and if save lost my changes. is a good solution the external file y use for develop but sometimes you go into a snippet and change a little and do into the modx manager and here are when you lost.
            thanks again
              Jabiertxof (formerly XYZVISUAL)
              My bussines: http://marker.es
              https://www.youtube.com/user/jabiertxof/videos