Custom flags not possible on very long topic titles


(Anton) #1

Tried 2 times and the error repeated.
Here is the trace from the /logs page:

http://pastie.org/pastes/9749169/text?key=unhk19c0sjwgzuiu26rypw


(Jeff Atwood) #2

I just tested on try.discourse.org and no repro.

  • flag “private message @user” no error, confirmed PM arrives
  • flag “something else” no error, confirmed flag arrives

Maybe it is specific to your translation or your installation in some way?


(Anton) #3

Some more info: the version is 1.2.0.beta3.

Tried to log out and log in again, cleared browse cache - and can still reproduce the error.


(Jeff Atwood) #4

Can you give me the specific steps, exactly, describing everything in detail?


(Anton) #5

Yes, here is the topic: Кальцій та фосфор — одні з найважливіших біогенних елементів необхідних для нормального функціонування та проходження ж - Содержание и кормление - Козоводство в Украине, России, СНГ: форум, хозяйства, рынок

  1. Open the topic.
  2. Click “Flag”
  3. Choose “send author a private message” option.
  4. Enter this text:

Здравствуйте.
Не могли бы вы укоротить название темы? Сейчас название обрезано и потеряна суть.
На данный момент ограничение в 100 символов. (было 120)

Большое спасибо,
Антон

5 Click the blue button in the dialog to send the message.

6 An error is shown (in Russian) - it just says sorry there was an error:


(Jeff Atwood) #6

Sorry, I have no repro. Can you repro on try.discourse.org ?


(Anton) #7

Nope, unfortunately, the same message on TRY goes through.

But on my setup it continues to fail consistently.
What could I try more?


(Anton) #8

Could it be the problem?

ActiveRecord::StatementInvalid (PG::Error: ERROR:  value too long for type character varying(255)
: INSERT INTO "topics" ("archetype", "bumped_at", "created_at", "last_post_user_id", "slug", "subtype", "title", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id")

(Anton) #9

@codinghorror gotcha - can now reproduce with TRY:

Just try to flag this topic http://try.discourse.org/t/this-is-a-topic-with-a-very-long-name-it-should-have-almost-250-symbols-another-sentence-second-sentence-sentence-3-senten/329

…with a private message to the author, use this text:

Здравствуйте.
Не могли бы вы укоротить название темы? Сейчас название обрезано и потеряна суть.
На данный момент ограничение в 100 символов. (было 120)

Большое спасибо,
Антон

I suspect the problem is with the topic title oversize of the private message that is being created.


(Régis Hanol) #10

Thanks for reporting this issue, this is now fixed :blowfish:

https://github.com/discourse/discourse/commit/135355757545463ed979bddc15b13d73a1eab367


(Régis Hanol) #11