Article: the comment count above the title shows its markup, '<div class="number_of_comments">1 reactie</div>'
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #691 de @guidol-ive — fusionado
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start in peer_reviewed_article::defaultView() at the before() call that inserts the comment count above pagename; the issue names this as the only call of its kind. Read how the surrounding code creates and updates DOM elements, then reproduce with tests/site/maak-site.php and one public comment. Done means the count displays as text inside an element with the number_of_comments class, without showing markup.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
An article with public comments shows the count as text, markup included, above its title:
<div class="number_of_comments">1 reactie</div>
peer_reviewed_article::defaultView() passes an HTML string to before():
$this->html->getElementById('pagename')->before('<div class="number_of_comments">'.$commentCountText.'</div>');
With php-dom-wrapper, before() parsed the string as HTML. Since main uses Hypha's own DOM helpers (5dae13a), this is PHP's DOMChildNode::before(), which inserts a string as a text node. It is the only call of this kind in the code.
Seen on a test copy of a site with fictional and real articles; reproduced on a fictional site (tests/site/maak-site.php) with one public comment, PHP 8.2 and 8.5.
Fix: build the element with createElement, setAttribute('class', …) and setText.
🤖 Generated with Claude Code
- Lenguaje dominante
- JavaScript
- Estrellas
- 5
- Forks
- 9
- Merge medio
- 19 h 10 min
- PR fusionados (30 d)
- 12
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Impact: Medium Level: Easy Type: Bug Value: Users
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Impact: Low Level: Easy Type: Bug Value: Coders
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
PlanBCode/hypha#586 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de PlanBCode/hypha
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
danilogiles/enki-browser#113 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
evcc-io/evcc#35605 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
weavefox/awesome-opc#29 ·
Los mantenedores suelen responder en 1 día