[2.x] Tags: one way for extensions to tell primary from secondary tags
Los mantenedores suelen responder en 1 día
@Saksham-chourasia ya está trabajando en esto.
Desde el 13/11/2026.
- #5504 de @Saksham-chourasia — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with the backend and frontend Tag models, then trace the position checks named in the tags extension: GlobalPolicy, DiscussionResourceFields, Content\Tags, the admin and forum Tags pages, addTagList, addTagComposer, TagSelectionModal, and sortTags. Compare their existing checks with is_primary and the stated counting rules; the issue lists the required helpers, query scopes, compatibility behavior, and documentation updates. Done when these checks use the helpers, secondary tag positions remain null in 2.x, and the deprecation is documented.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Extensions, and the tags extension itself, decide whether a tag is primary by checking position: a secondary tag has none. That ties the tag's kind to its order, which stops secondary tags from ever being ordered (#5236), and the check is repeated in about ten places, with small differences.
Tags already store the kind in is_primary, exposed as isPrimary in the API and Tag.isPrimary() in JS. A child of a primary tag is a primary tag: is_primary is true for it, as it is for its parent.
Proposal
On the backend Tag model and the frontend Tag model:
isPrimary(): a primary tag or a child of one, read fromis_primary.isChild(): a child of a primary tag.isPrimaryParent(): a primary tag without a parent (frontend already has it).isSecondary():!isPrimary().- Backend query scopes
Tag::query()->primary()and->secondary().
Then:
- Move every check in the tags extension from
positionto these:GlobalPolicy,DiscussionResourceFields,Content\Tags, the admin and forum Tags pages,addTagList,addTagComposer,TagSelectionModalandsortTags. - Keep
positionnull for secondary tags in 2.x, so extensions that check it keep working, and mark that check deprecated in the changelog and the extension docs. - The required tag counts keep their behaviour: top-level primary tags count as primary, every other tag (children included) towards the secondary limits. Name it that way in code and docs rather than calling children secondary.
This depends on repairing is_primary: the admin edit modal currently clears it when saving an existing tag. That repair is included in the work on #5236.
The permission mismatch and child-tag counting discussion already have #4065 and #3640; this proposal supplies consistent helpers without deciding a new counting policy.
- Lenguaje dominante
- PHP
- Estrellas
- 6.8k
- Forks
- 891
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 209
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flarum/framework
-
type/accessibility type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Default language is ignored for anyone who chose a language, when the language selector is hiddenPosiblemente ocupada @1AbdullahButt la tomó hace 15 días. Abiertotype/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPMPosiblemente ocupada @lazerg la tomó hace 15 días. Abiertotype/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[2.x] A filter on a resource without a searcher returns a 500Posiblemente ocupada @imorland la tomó hoy. Abiertotype/bug
flarum/framework#5578 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de flarum/framework
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
Sylius/Sylius#19359 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add php 8.6Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
mailersend/mailersend-php#199 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Tool: somcp_delete_currencyAbiertoConfiguration new tool
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 10 días