php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55711 Report a bug with #sections are reported as %23section
Submitted: 2011-09-16 14:20 UTC Modified: 2011-09-19 11:29 UTC
From: RQuadling at GMail dot com Assigned: rquadling (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS: n/a
Private report: No CVE-ID: None
 [2011-09-16 14:20 UTC] RQuadling at GMail dot com
Description:
------------
In the non beta documentation, there is an option to "Report a bug", linked to 
each major section (.refsect1 h3.title).

The bug https://bugs.php.net/bug.php?id=55698 reports the page with the problem 
is http://www.php.net/function.ftp-fget%23Exemples and not 
http://www.php.net/function.ftp-fget#refsect1-function.ftp-fget-examples


This is, I think, 2 bugs. 


1 - http://svn.php.net/viewvc/web/php/trunk/include/shared-manual.inc?
view=markup#l133 is using ...

$(this).text()

rather than the id of the parent node.

$(this).parent().attr('id')


So, in the case of a foreign language bug, the link, as in the example above, 
refers to a translated text (Exemples) rather than the non translated id 
(refsect1-function.ftp-fget-examples)



2 - The same line uses %23 rather than #.



Patches

ReportABug.patch (last revision 2011-09-16 14:20 UTC by RQuadling at GMail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-16 14:31 UTC] bjori@php.net
It doesn't necessarily have an ID, the idea of the text after the hash was 
simply to specify the precise section.
When browsing the translated manual, that text will be in the translated 
language - but I think that is fine as the bug report would probably be against 
that language anyway.

As for the %23 vs #, I've no idea why it is %23 but I'm pretty sure it used to 
work. Seems like a bug though.

Don't you have webkarma already?
 [2011-09-16 14:49 UTC] rquadling@php.net
As "Report a bug" is added to all .refsect1 h3.title, I'd be surprised if there 
were any instances where the section didn't have an ID.

I've just done a check, looking for all uses of a refsect1 where there is no id 
on the same line in the rendered HTML (en only).

Of the 11,272 files created, only 1 has a line with refsect1 and no id=.

The CSS file.

So, it looks like the JS code should be OK.

And I do have karma - just checked.
 [2011-09-16 14:53 UTC] rquadling@php.net
Automatic comment from SVN on behalf of rquadling
Revision: http://svn.php.net/viewvc/?view=revision&revision=316855
Log: Fix bug#55711
Use the id of the "Report a bug" section rather than the translated text.
Use # rather than %23 in the link.
 [2011-09-16 17:11 UTC] bjori@php.net
Ahh. you are right.
According to the PhD release notes[1], as of PhD 1.1.0, refsect1 gets a generated 
ID if it doesn't contain one :)

[1] http://doc.php.net/phd/
 [2011-09-16 21:44 UTC] rquadling@php.net
Damn. And Doh!

The # is now turning the id into a URL fragment and doesn't transmit that to the 
server.

So, %23 is going to have to be OK, but it needs to be decoded within 
bugs.php.net to allow (for example) https://bugs.php.net/report.php?
bug_type=Documentation+problem&manpage=function.bcompiler-load-exe#refsect1-
function.bcompiler-load-exe-parameters to pass the issue being linked to (in 
this example) the parameters.

But, at the moment, the links that get supplied to bugs.php.net are valid, just 
without the #fragment.

Bug is 50% fixed.
 [2011-09-19 10:08 UTC] rquadling@php.net
Automatic comment from SVN on behalf of rquadling
Revision: http://svn.php.net/viewvc/?view=revision&revision=316972
Log: %23 was actually OK. It seems the change is in bugs.php.net going from http to https and the redirector re-encoding %23 to %2523 which bugs.php.net decodes back to %23.
Manually calling https://bugs.php.net/ and using %23 should be OK now. Or will be when this commit is rolled out to the mirrors.
Should really fix bug#55711
 [2011-09-19 11:29 UTC] rquadling@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: rquadling
 [2011-09-19 11:29 UTC] rquadling@php.net
Refresh of documentation on docs.php.net shows non beta "Report a bug" links correctly.

Start with http://docs.php.net/manual/en/function.filepro-rowcount.php?beta=0.
Choose "Report a bug" in the "See also" section.
Bugs.php.net URL is non-redirected and is https://bugs.php.net/report.php?bug_type=Documentation+problem&manpage=function.filepro-rowcount%23refsect1-function.filepro-rowcount-seealso
Bug shows 

From manual page: http://www.php.net/function.filepro-rowcount#refsect1-function.filepro-rowcount-seealso

All links are now correct.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 10:00:02 2026 UTC