We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51347
    • 82 Posts
    Hello MODx community,

    i try to edit the "description" resource field, because i need more than 255 characters. I dont want to create a custom tv, because a description-field already has content on many pages.


    My try: edit Database -> modx_site_content -> description -> The value of size "255" in "800".

    But MODx dont save the resource because the number of characters is more than 255.


    How is it possible to change the setting?
      • 17301
      • 932 Posts
      There is probably some javascript validation going on too.

      At a complete guess
      /manager/assets/modext/modx.jsgrps-min.js
      {xtype:"textfield",fieldLabel:_("resource_uri"),description:"<b>[[*uri]]</b><br />"+_("resource_uri_help"),name:"uri",id:"modx-"+id+"-uri",maxLength:255,anchor:"100%",value:va.uri
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 38783
        • 571 Posts
        I think you would have to edit the database table.

        In phpMyAdmin
        the site_content table has a row: description
        This is set as: varchar(255)

        I don't know if changing this could cause problems when MODX updates are applied in the future, or cause other problems.
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 51347
          • 82 Posts
          Quote from: lkfranklin at Jan 15, 2018, 08:08 AM
          There is probably some javascript validation going on too.

          At a complete guess
          /manager/assets/modext/modx.jsgrps-min.js
          {xtype:"textfield",fieldLabel:_("resource_uri"),description:"<b>[[*uri]]</b>
          "+_("resource_uri_help"),name:"uri",id:"modx-"+id+"-uri",maxLength:255,anchor:"100%",value:va.uri

          I changed 3 "255" Posts in modx.jsgrps-min.js but nothing happened.


          Quote from: andytough at Jan 15, 2018, 09:44 AM
          I think you would have to edit the database table.

          In phpMyAdmin
          the site_content table has a row: description
          This is set as: varchar(255)

          I don't know if changing this could cause problems when MODX updates are applied in the future, or cause other problems.

          I already did that without effect.
            • 52064
            • 120 Posts
            the best solution is to create a TV and copy the content with a script or use default value:
            [[*description_long:default=`[[*description]]`]] 
              FerX - Developer at Eracom s.r.l.
              • 38783
              • 571 Posts
              Looking at this again I think that as well as the database row length needing to be changed, which you have done, the length is affected by the file /core/model/schema/modx.sqlsrv.schema.xml which contains this text on line 828

              <field key="description" dbtype="nvarchar" precision="255" phptype="string" null="false" default="" index="fulltext" indexgrp="content_ft_idx" />


              Rather than modifying a core file, which will probably get over written during upgrades in the future it would be worth asking for this as a feature request on Github at is something that would be very useful to most users: https://github.com/modxcms/revolution

                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 51347
                • 82 Posts
                I dont want to change database or core. I try it with Github.

                Thank you all!