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

Logged-in article view still crashes on an empty discussions container or a title with markup (rest of #406)

オープン 初心者向け
#649 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

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

調査の方向性

2つのクラッシュが特定されている peer_reviewed_article.php の338~341行目と2015~2018行目を読んでください。まず、XMLノードの検索とタイトルテキストがどのように処理されているかを確認し、次に tests/bekend/test_paginas.py で指定された2つの回帰テストを実行してください。ディスカッションに public 子要素がない場合と、タイトルにマークアップが含まれる場合の両方で、ログイン済みのメンバーに対して2つのテストが通れば完了です。

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

説明

Impact: Medium Level: Easy Type: Bug Value: Users

Problem

#406 is closed by PR #519, merged into main on 2026-10-28 (41482e9). Three of the five crashes of #406 are solved on main:

  • an article without featured_image;
  • a page of a datatype that no longer exists;
  • the comment moderation view.

Two still give a 500 for a logged-in member on main:

  1. An empty <discussions/> container. peer_reviewed_article.php:338-341: findOneXPath('discussions/public') returns null, and $discussions->findXPath(...) then fails with Call to a member function findXPath() on null. This affects older articles whose discussions container has no public child.
  2. A title with markup, for example <title><p>…</p></title>, which older articles have. getTitle() (peer_reviewed_article.php:2015-2018) calls getText(), and that throws TypeError: getText called on node with non-text children.

To reproduce

The known-bug tests in the branch of #520 (tests/bekend/test_paginas.py) cover both:

  • an_older_article_without_public_discussions_opens_for_members
  • an_older_article_with_markup_in_its_title_opens_for_members

Both still answer 500 on main 41482e9 (PHP 8.2).

Suggested fix

The same as in the patch of #406:

  • treat a missing public container as no comments;
  • read the title with textContent instead of getText().

🤖 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 を短くまとめたダイジェスト。