# La casella di modifica Badge Query SQL è disabilitata fino al ricaricamento della pagina

**URL:** https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457
**Category:** Support
**Tags:** sql-triggered-badge
**Created:** [22 Maggio 2019, 10:50pm UTC](https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457 "2019-05-22T22:50:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Schmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_schmucker/32/124810_2.png) [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)
#### Post date: [22 Maggio 2019, 10:50pm UTC](https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457/1 "2019-05-22T22:50:17Z")

</div>

Ho abilitato le query per i badge seguendo questa procedura:

> [@Enable Badge SQL](https://meta.discourse.org/t/badge-sql-can-no-longer-be-edited-by-default/47894):
>
> bookmark This guide explains how to enable Badge SQL in Discourse and discusses the associated security and performance risks. person_raising_hand Required user level: Administrator warning Enabling Badge SQL can pose security and performance risks. To maintain security and performance integrity, as of Discourse 1.6, the ability for administrators to edit badge SQL directly is disabled by default. The two primary concerns around enabling Badge SQL are: Security: Allowing direct SQL …

Ora vedo la casella di modifica “Query per i badge (SQL)”, ma è in sola lettura. Non riesco a copiare/incollare o modificare, né per i badge esistenti né per quelli nuovi. Cosa sto trascurando?

Potrebbe essere un duplicato di [Locked query field for system badges](https://meta.discourse.org/t/copy-paste-locked-badge-query-sql-for-more-than-champion-or-invitation/83415), che è stato chiuso come risolto, ma non credo che sia stata davvero una soluzione.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [22 Maggio 2019, 11:31pm UTC](https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457/2 "2019-05-22T23:31:24Z")

</div>

For the default badge queries, the badge SQL edit form is displayed, but disabled, when `enable_badge_sql` is set to true.

If you have been browsing your Admin / Badges page, and then click the ‘New’ button to create a new badge, the badge SQL edit form will be disabled until you refresh the page. Possibly this is a minor bug, but the issue can be solved with a full refresh of the page.

---

<div class="post-metadata">

### Author: ![Mark\_Schmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_schmucker/32/124810_2.png) [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)
#### Post date: [22 Maggio 2019, 11:41pm UTC](https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457/3 "2019-05-22T23:41:02Z")

</div>

Thanks, refreshing the page did the trick.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [21 Giugno 2019, 11:41pm UTC](https://meta.discourse.org/t/badge-query-sql-edit-box-is-disabled-until-page-is-refreshed/118457/4 "2019-06-21T23:41:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
