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?
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
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.
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.
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
I dont want to change database or core. I try it with Github.
Thank you all!