We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3349
    • 126 Posts
    Hi

    Im currently adding lots of javascript (multiple choice questions) to modx by pasting the code into "textarea" tv’s. However it seems to have a character limit and after saving the page I notice it chops off some code.

    The character limit seems to stop just over 65000 characters...

    Any ideas how I can overcome this?

    Thanks

    bS
      • 16610
      • 634 Posts
      TVs are stored in database table "site_tmplvar_contentvalues". TV values are stored as TEXT column. Column type TEXT can contain 65,535 characters.

      This is the explanation but unfortunately I don’t have an easy solution how to fix your problem. Maybe if it’s just one or two TVs that has so much content you could manually change database column type for just those TVs. For example changing column type to LONGTEXT would allow you to save 4,294,967,295 characters in that TV.
        Mikko Lammi, Owner at Maagit
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Why not use a @FILE type TV and include the javascript from a file?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org