TopicEmbed.embed_url length limit 255 characters

Hi, i’ve got this error in sidekiq

Jobs::HandledExceptionWrapper: Wrapped ActiveRecord::StatementInvalid: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255) :    INSERT INTO "topic_embeds" ("content_sha1"...

It seems it happens because of length of url in ‘static site’ where embeded comments over 255 characters. And i have no way to change routes in legacy site. I read that urls may be much longer. May be we can increse embed_url length up to for example 1000-2000 characters?

Thanks.

5 Likes

@zogstrip I saw this in our logs as well, we should extend it as it is path + querystring.

3 Likes

Thanks @oganer for reporting that issue. I just pushed a fix :elephant:

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

3 Likes