Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#689 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@guidol-ive がすでに取り組んでいます。

2026年10月29日 から。

  • #691 @guidol-ive による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
php
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
JavaScript
スター
5
フォーク
9
平均マージ
18時間 7分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。