TopicEmbed.embed_url length limit 255 characters


(Руслан Корнев) #1

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.


(Sam Saffron) #2

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


(Régis Hanol) #3

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

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


(Régis Hanol) #4