Olá,
Sou novo no uso de modelos de formulário, então espero que seja apenas eu deixando passar algo.
Criei um modelo de formulário que preenche um menu suspenso a partir de um grupo de tags, o qual aparece corretamente, mas não me permite selecionar nada.
A categoria tem 3 grupos de tags restritos a ela, com a opção “permitir também outras tags” desmarcada
Não há categorias especificadas no “grupo de tags obrigatório”, embora idealmente eu gostaria de ter os mesmos 3 grupos de tags especificados aqui
O YAML do meu formulário é:
- type: tag-chooser
id: issue-type
tag_group: "Issue Type"
attributes:
none_label: "Select a type"
label: "Type"
multiple: false
validations:
required: true
- type: tag-chooser
id: issue-priority
tag_group: "Issue Priority"
attributes:
none_label: "Select a priority"
label: "Priority"
multiple: false
validations:
required: true
A pré-visualização carrega corretamente:
Mas o próprio formulário na criação do tópico não me permite selecionar nenhuma tag:
Todos os grupos de tags têm configuração semelhante —
Qualquer ajuda será apreciada. Como disse, espero que seja algo simples
chapoi
Maio 28, 2026, 4:24pm
2
E isso inclui os grupos de tags que você está usando aqui (“Tipo de Issue” e “Prioridade da Issue”)?
Obrigado pela resposta!
Sim, esses dois estão incluídos
Estou com dificuldades para reproduzir o problema localmente. @Parker1090 , qual versão do Discourse você está usando?
2026.6.0-latest (c61074ebf8)
Fico feliz em fornecer quaisquer outros detalhes, se necessário.
Obrigado, consegui reproduzir o problema localmente ao usar nomes de tags com maiúsculas e minúsculas misturadas.
main ← fix-form-template-tag-chooser-uppercase
opened 09:40PM - 28 May 26 UTC
When a form template `tag-chooser` field is populated from a tag group, each
`<o… ption>` is rendered with its display value (the tag name upper-cased, or its
description). Selecting an option then has to translate that display value back
to the underlying tag name before storing it on the composer.
`handleSelectedValues` did this translation by lower-casing the option value
(`"HIGH"` -> `"high"`) and `handleInput` matched the result case-sensitively
against the real tag names. On sites with `force_lowercase_tags` disabled, tag
names keep their casing (e.g. `"High"`), so the reconstructed `"high"` never
matched, the selection was silently dropped, and the dropdown reset to its
placeholder. Lower-case tag names round-tripped fine, which is why this only
affected sites allowing mixed-case tags.
This regressed in ed8a62e2729, which switched the option value from the tag
name to the upper-cased display and reintroduced the lower-casing round-trip to
reverse it.
Instead of guessing the casing, build a map of each choice's display value back
to its exact tag name and look the selected option up in it. Selections are now
preserved regardless of tag name casing. Adds a system spec covering tag names
with uppercase characters and `force_lowercase_tags` disabled.
Incrível, obrigado pela sua ajuda!