php / php/web-php

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

Aperta
#1,906 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Bug Status: Needs Triage
Lingua principale
PHP
Stelle
1.1k
Fork
640
Merge medio
22h 36m
PR unite (30g)
16

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Scarica ed estrai https://www.php.net/distributions/manual/php_manual_en.tar.gz, rinomina la directory php-chunked-xhtml e ispeziona il JavaScript incluso utilizzato dal controllo Search del manuale. Riproduci il blocco del campo di ricerca dopo aver rinominato la directory, quindi verifica che la ricerca e la chiusura funzionino da un nome arbitrario della directory di base.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, php
Ambito
documentation, frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.