mbauman
(Matt Bauman)
23. September 2026 um 16:44
1
Fortsetzung der Diskussion aus Flags can't be edited after they have been used :
Es scheint wirklich, als sollten wir in der Lage sein, eine Flagge zu bearbeiten, die noch nie verwendet wurde. Ist das ein Bug?
SELECT *
FROM post_actions as p
WHERE p.post_action_type_id = 1001
=> 0 Ergebnisse
Ja, das sehe ich auch, es gibt eine ID-Kollision… Du kannst ungenutzte benutzerdefinierte Flags bearbeiten, nur die ersten paar, die du erstellst, nicht
Sobald der Pull Request gemerged wurde, wird das Ganze wieder in Ordnung sein.
main ← fix/custom-flags-not-editable
merged 12:46PM - 24 Sep 26 UTC
Reported here: https://meta.discourse.org/t/flags-cant-be-edited-even-if-theyve-… never-been-used/413137
`SYSTEM_FLAG_IDS` was generated from `PostActionType.types`, which returns every flag row including custom ones... so some custom flag ids were baked in, and any site's custom flags with those same ids (1001–1003, 1010–1012) showed up as non-editable and non-deletable. Generally any site that has created 1 custom flag will see this (because they start at 1001)
This switches away from generated IDs to a `system` attribute, and scopes the generated constant to system ids so custom flags won't leak again.
Now that the generator can be fixed the task can be fully run... so this also includes the regenerated `admin/lib/constants.js`, plus two files generated from earlier changes that didn't run it: `notification-types.js` (#43044) and the emoji data (#39496). 😵💫
mbauman
(Matt Bauman)
24. September 2026 um 15:17
3
Das ist super, danke für die schnelle Lösung!