Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Article: the comment count above the title shows its markup, '<div class="number_of_comments">1 reactie</div>'

Cerrado
#689 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
php
Área
frontend

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

Component: User interface Impact: Medium Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PlanBCode/hypha

Todos los issues de PlanBCode/hypha

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.