Where can I find the custom reason for flagging in non-English locales?


(ljpp) #1

Perhaps this is a stupid question, but in the flag management center I see a flag and the reason as “custom”, but I don’t find a way to see the content/message of the customized flag?


(Régis Hanol) #2

It’s when you click on the “Something Else” option when flagged (last option at the bottom of the modal).


(ljpp) #3

I know where to write the custom message when flagging, but where the moderators and admins can read the flag message content when managing the flags?

“Mukautettu” is the finnish translation indicating that the reason is customized, but how to actuallly see the reasoning?


(Régis Hanol) #4

Sorry, I misunderstood.

This is what a custom flag should look like (the message should be right beneath in yellow)

Is there anything in “/logs” that could relate to the flag generating an error?


(ljpp) #5

Hm…nothing I can immediately recognize. Of course, I don’t really know what to look out for. I don’t think I have ever seen that yellow banner below the flag. First we were on Stable and for the last few weeks on the Beta channel.


(Rafael dos Santos Silva) #6

Just adding that custom flag reasons are missing on my install too, but somehow the team can’t repro here.

One thing we have in common is not using the default EN locale, but this usually doesn’t break stuff…


(ljpp) #7

Ok, then we should call out for admins running a non-EN environments. Hey @probus, you run FI locale as well - can you repro?


(ljpp) #8

Just made a quick test by changing to EN locale and creating a new custom flag. Did not change anything - custom reasoning is not visible on the flag management UI.

This should go to the bug catecory, me thinks (or re-open @Falco’s earlier).


(ljpp) #9

This is still broken in 1.5b11. Major issue for non-english sites.

BTW @codinghorror, who is Discourse error/issue manager?


(Jeff Atwood) #10

I have no idea what you’re talking about. If you want to fix the translation, feel free to contribute to this open source project by editing the translations.

Unless you can give us a repro, there’s nothing to do.


(ljpp) #11

It’s right there on Jan 22nd and later confirmed by Falco, so this is not an isolated case with my site.

  1. Using a non-english default locale (my case: Finnish)
  2. Flag a post with custom reason

'3. The custom flag reasoning is the visible in the admin panel flag management. The flag does work, but the reason is not shown at all.

I don’t see how this could be a translation issue, but if it is we are happy to improve it - we have done a lot of work on the Finnish translation anyway, perfecting it.


(Jeff Atwood) #12

OK, as long as we can repro this we will fix it. @techapj can you take a look next week?


(Rafael dos Santos Silva) #13

Yeah this is still happening with me, and I’ve spent some time training people to custom flag to ask to move a topic to a correct category.


(Arpit Jalan) #14

Still not able to repro this issue with Finnish locale… :disappointed:

I tried redis flushall / deleting tmp folder / dropping and recreating fresh database, but cannot repro this issue.

@ljpp did you changed the locale of your instance after the installation, or did you specified it in app.yml file while bootstrap process here:

@Falco can you help me repro this issue?


(Rafael dos Santos Silva) #15

Yes, from my previous attempts looks like it doesn’t even get saved to the database.

I’ll capture the requests of the flag so we can compare.


(ljpp) #16

My app.yml has the default locale.

LANG: en_US.UTF-8

Thanks for looking into this.


(Rafael dos Santos Silva) #17

This request captured from a flagging:

curl 'https://example.com.br/forum/post_actions' -H 'origin: https://disap.bb.com.br' -H 'accept-encoding: gzip, deflate' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' -H 'accept: */*' -H 'cache-control: no-cache' -H 'referer: https://example.com.br/forum/t/reuniao-inaugural-15-07/45' --data 'id=53&post_action_type_id=7&message=S%C3%B3+testando+o+sistema+de+flags&flag_topic=false' --compressed

Results in this https://example.com.br/forum/admin/flags/active.json

{"posts":[{"id":53,"user_id":3,"topic_id":45,"post_number":1,"hidden":false,"deleted_at":null,"user_deleted":false,"last_revised_at":"2015-07-15T22:02:39.458Z","previous_flags_count":0,"excerpt":"Participantes: \n\n<a class=\"mention\" href=\"/forum/users/f8366545\">@F8366545</a>, <a class=\"mention\" href=\"/forum/users/f6875132\">@F6875132</a>, <a class=\"mention\" href=\"/forum/users/f6131281\">@F6131281</a>, <a class=\"mention\" href=\"/forum/users/f9063519\">@F9063519</a>, <a class=\"mention\" href=\"/forum/users/f3165356\">@F3165356</a>, F0743129, F9563267, <a class=\"mention\" href=\"/forum/users/f2168319\">@F2168319</a>, F4352730, F7595589, F6325067,  \n\nSejam todos muito bem-vindos!","post_actions":[{"id":14437,"post_id":53,"user_id":1,"post_action_type_id":7,"created_at":"2016-03-28T14:10:16.707Z","disposed_by_id":null,"disposed_at":null,"disposition":null,"related_post_id":null,"targets_topic":false,"staff_took_action":false,"name_key":"notify_moderators"}]}],"topics":[{"id":45,"title":"Reunião Inaugural - 15/07","fancy_title":"Reunião Inaugural - 15/07","slug":"reuniao-inaugural-15-07","archived":false,"closed":false,"visible":true,"archetype":"regular","relative_url":"/forum/t/reuniao-inaugural-15-07/45"}],"users":[{"id":1,"username":"F8366545","avatar_template":"https://example.com.br/avatar/F8366545","can_delete_all_posts":false,"can_be_deleted":false,"post_count":86,"topic_count":57,"email":"f8366545@example.com.br","ip_address":"127.0.0.1"},{"id":3,"username":"F6875132","avatar_template":"https://example.com.br/avatar/F6875132","can_delete_all_posts":false,"can_be_deleted":false,"post_count":10,"topic_count":3,"email":"f6875132@example.com.br","ip_address":"127.0.0.1"}]}

Notice the flag text (“Só testando o sistema de flags”) isn’t anywhere in the returning json.

Do you know where it is saved on the database so I can search there?


(Arpit Jalan) #18

The custom (Something Else) flag text is saved via this code:

The post_action_type for custom fag is notify_moderators.

Appreciate your help with this. :slight_smile:


(Rafael dos Santos Silva) #19

No I’m the one who appreciates the help, I’m currently handling the topics move via phone calls :sadpanda:.

So, if I’m reading the code right there must be a new post on the posts table with an archetype private_message ? And a new topic with the post right?

EDIT:

There isn’t a single private_message topic created today. I flagged one hour ago, so I think the problem is that the topic isn’t created. But no errors are show on /logs.


(Arpit Jalan) #20

Do you have a local Discourse dev environment set up? Can you repro this on your local system?

Once we have repro steps for this issue, fixing this would be easy, as we need to verify the fix locally.