php / php/web-php

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

Offen
#1,906 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bug Status: Needs Triage
Vorherrschende Sprache
PHP
Sterne
1.1k
Forks
640
Ø Merge
22 Std. 36 Min.
Gemergte PRs (30 T.)
16

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Laden Sie https://www.php.net/distributions/manual/php_manual_en.tar.gz herunter und extrahieren Sie es, benennen Sie das Verzeichnis php-chunked-xhtml um und untersuchen Sie das mitgelieferte JavaScript, das vom Search-Steuerelement des Handbuchs verwendet wird. Reproduzieren Sie das Festhängen des Suchfelds, nachdem Sie das Verzeichnis umbenannt haben, und verifizieren Sie, dass Suche und Schließen von einem beliebigen Namen des Basisverzeichnisses aus funktionieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, php
Bereich
documentation, frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.