mbauman
(Matt Bauman)
Septembre 23, 2026, 4:44
1
Suite à la discussion dans Les drapeaux ne peuvent pas être modifiés après avoir été utilisés :
Il semble vraiment que nous devrions pouvoir modifier un drapeau qui n’a jamais été utilisé. S’agit-il d’un bug ?
SELECT *
FROM post_actions as p
WHERE p.post_action_type_id = 1001
=> 0 résultat
Oui, je le vois aussi, il y a une collision d’identifiants… vous pouvez modifier les drapeaux personnalisés qui ne sont pas utilisés, mais pas les premiers que vous créez
Cela sera réglé une fois la fusion effectuée
main ← fix/custom-flags-not-editable
approved 05:17AM - 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). 😵💫