php / web-php

The www.php.net site
http://www.php.net
Other
842 stars 536 forks source link

View Source link broken in manual pages #437

Open ta1yaki13 opened 3 years ago

ta1yaki13 commented 3 years ago

First time submitting an issues to this project. ViewSource links are broken in Japanese php manual page. This issues is happening in pt_BR, zh, fr, de, ja, ro, ru, es and tr.

#Procedure 1, open php Documentation page. 2, choose「 Japanese」 from View Online. 3, open Japanese php manual page. 4, push 「ViewSource」 from Japanese php manual page footer. 5, 「404 This is not web page you are looking for.」is displayed.

From ja manual page : https://github.com/php/web-php/blob/master/manual%2Fja%2Findex.php

Regards.

peterdd commented 3 years ago

Not only ja pages, all other languages except en and deeper nested pages.

heiglandreas commented 3 years ago

The same happened to me for english pages.

I assume that the "show source" does not work here as the pages are not submitted to github when the docs are rendered but provided via a different means.

Instead to see the source of the page one should use the "Create PullRequest" link at the top of the page near the language select-field.

How can we deactivate or point the "View source" to the correct source in the documentation footer?

salathe commented 3 years ago

What is the "source" of a manual page on www.php.net?

cmb69 commented 3 years ago

I don't think that the latter makes sense (the browser already offers this "feature"); the former might, if we change the "Submit a Pull Request" link to go to the editor directly (e.g. https://github.com/php/doc-en/edit/master/reference/strings/functions/strlen.xml instead of https://github.com/php/doc-en/blob/master/reference/strings/functions/strlen.xml). Or just drop that "View Source" from the footer.

salathe commented 3 years ago

I don't think that the latter makes sense (the browser already offers this "feature")

If your browser can see the PHP code of manual pages... we've broken our web server.

change the "Submit a Pull Request" link to go to the editor directly (e.g. https://github.com/php/doc-en/edit/master/reference/strings/functions/strlen.xml instead of https://github.com/php/doc-en/blob/master/reference/strings/functions/strlen.xml).

The "edit" link is unfriendly for visitors who are not logged in to GitHub, and was deliberately not used when implementing these links to individual XML files. The current (non-edit) link is better for viewing the source, and the user can choose how they want to edit (clone, edit via the UI if they can, edit via codespaces (press . on the GitHub page), etc.).

Or just drop that "View Source" from the footer.

I'd be 👍 on this for manual pages.

cmb69 commented 3 years ago

If your browser can see the PHP code of manual pages... we've broken our web server.

Good point!

The "edit" link is unfriendly for visitors who are not logged in to GitHub, and was deliberately not used when implementing these links to individual XML files.

Ah, that makes sense.

OlaIola commented 2 years ago

I've also stumbled on this while wanting to offer an improvement. It's difficult to contribute this way (

jimwins commented 2 months ago

This was "fixed" by #702 (the 'View Source' link was removed from manual pages), but I think incorporating a change like #448 would probably be even better to restore that for consistency with the rest of the site, and because 'Submit a Pull Request' doesn't really convey the same thing even if it's the same URL.