Stats: Tags and Categories details crashes when two expanded groups share a tag
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza por StatsDataHelper.swift, especialmente por childRowsForItems y expandableDataRowsFor, y luego inspecciona la igualdad de DetailExpandableChildRow y la corrección del issue #26415. Reproduce el problema con dos grupos de etiquetas que compartan una etiqueta y al menos siete entradas; después, expande ambos grupos en la tarjeta clásica Tags and Categories. El trabajo estará terminado cuando ambos grupos se expandan sin provocar un cierre inesperado y las secciones expandibles relacionadas sigan funcionando correctamente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The app crashes when you expand two groups in the classic Insights → Tags and Categories → View more screen that share a tag. We reproduced it on an iOS 27.2 simulator using stats data served from a local proxy. None of the crash reports Sentry still keeps for this crash signature (JETPACK-IOS-1ASW) come from this screen, so we don't know how many users hit it.
Who hits it
Anyone whose top tags include two groups with a tag in common. The Stats API groups tags that appear together on a post, so a site with posts tagged "news, tech" and "news, sport" shows two groups that both contain "news". Expanding both crashes the app.
Why
The expanded tag rows only hold the tag's name, an empty count and its URL. Nothing ties a row to the group it's in, so the two "news" rows are equal, and the diffable table rejects them as duplicate items (NSInternalInconsistencyException: "supplied item identifiers are not unique"). The rows are built by childRowsForItems:
#26415 fixes the same crash for Post Stats month rows, which is the case behind all retained Sentry reports, but it does not cover tags.
Fix
- Make each expanded child row include its parent row's identity (for example the parent's
nameandstatSection) inDetailExpandableChildRowequality, set inexpandableDataRowsFor. - That one change covers every expandable section built there: tags, months, and possibly Authors (a co-authored post under two authors) and repeated Clicks or Referrers entries. Those last cases have not been reproduced.
How to reproduce
- Use a site whose stats return two tag groups sharing a tag (for example "news, tech" and "news, sport") and at least seven entries, so the card shows View more.
- With New Stats turned off, open Insights, add the Tags and Categories card if needed, and tap View more.
- Expand "news, tech", then "news, sport". The app crashes.
Crash log from the simulator (Jetpack Debug, built from #26415)
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal: supplied item identifiers are not unique. Duplicate identifiers: {(
WordPress.AnyHashableImmuTableRow(immuTableRow: WordPress.DetailExpandableChildRow(rowData: WordPress.StatsTotalRowData(id: nil, name: "news", data: "", ..., showDisclosure: true, disclosureURL: Optional(https://jkmassel.wordpress.com/tag/news/), multiline: true, childRows: Optional([]), statSection: nil, isReferrerSpam: false, month: nil), ..., hideIndentedSeparator: true, hideFullSeparator: true, ...))
)}'
The tags response the proxy served:
{"tags": [
{"views": 20, "tags": [{"name": "news", "type": "tag"}, {"name": "tech", "type": "tag"}]},
{"views": 10, "tags": [{"name": "news", "type": "tag"}, {"name": "sport", "type": "tag"}]},
{"views": 9, "tags": [{"name": "filler0", "type": "tag"}]},
"... five more single-tag entries"
]}
- Lenguaje dominante
- Swift
- Estrellas
- 3.9k
- Forks
- 1.2k
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 126
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 wordpress-mobile/WordPress-iOS
-
Bug iOS Reader
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
wordpress-mobile/WordPress-iOS#26423 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Status] Ready for Dev [Type] Bug Reader
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de wordpress-mobile/WordPress-iOS
Issues similares
-
Dead space between sidebar iconsAbiertobug mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
VictorKildahl/cra#818 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Feature] 自定义动作输入效果较差Posiblemente ocupada @zo-no la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 74/100
-
chore
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
lugassawan/swe-workbench#841 ·
-
IINA quits at launch when `input_conf` is a symlink, and loads no plugins when `plugins` is onePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día