php / php/web-php

(Documentation) PHP download of Many Html .tar.gz has JS hardcoded to php-chunked-xhtml dir

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

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

Bug Status: Needs Triage
主要言語
PHP
スター
1.1k
フォーク
640
平均マージ
22時間 36分
マージ済み PR(30日)
16

説明

Affected Page URL

https://www.php.net/distributions/manual/php_manual_en.tar.gz

Describe the bug

This is an oddity. I always download the many html tar-gzipped archive and host locally under phpdoc. When installing the current documentation the archive extracts to ./php-chunked-xhtml/. If you rename that directory, then choosing "Search" leaves a non-function search-box stuck at the bottom of the screen that cannot be closed with the [x] button displayed or Esc as displayed below text-search box.

Restoring the original extraction directory name to ./php-chunked-xhtml/ restores the javascript functionality.

This was surprising as all functionality should be relative to the siteroot, not hardcoded based on the base directory in the archive.

Steps to reproduce
  1. download https://www.php.net/distributions/manual/php_manual_en.tar.gz
  2. extract to a directory accessible on your web server
  3. rename the directory to something convenient to remember, e.g. mv php-chunked-xhtml somedir
  4. access the manual through somedir
  5. click search
  6. now try and use search or try and get rid of the search box and notation at the bottom of the page
Expected behavior

The documentation and javascript shipped with it should work regardless of the name used for the base directory. A functionality should be relative to that base directory regardless of what it is called.

Screenshots

Not Relevant

Additional context

This is a minor documentation issue, but surprising in documentation shipped by PHP. If you need more information, just ask and I'm happy to provide it, but this is pretty simple.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

https://www.php.net/distributions/manual/php_manual_en.tar.gz をダウンロードして展開し、php-chunked-xhtml ディレクトリの名前を変更して、マニュアルの Search コントロールで使用されている同梱の JavaScript を調べます。ディレクトリの名前を変更した後に検索ボックスが固まる状態を再現し、任意のベースディレクトリ名から検索と閉じる操作が機能することを確認します。

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

評価

技術スタック
javascript, php
領域
documentation, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

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

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