«max topic title length» does not conform to the database field capacity because the database field is unable to store more than 255 characters anyway

So when an administrator set a «max topic title length» value which is great than 255 then it can lead to the database error

ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR: value too long for type character varying(255) : INSERT INTO "topics"
4 Likes

Good point can you add a max allowed int validation param to the yml for this site setting @techapj? We certainly set max int on other site settings.

4 Likes

Fixed via:

https://github.com/discourse/discourse/commit/ed331bc222f82cf932ac5bf60387df2374af3199

4 Likes