php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49830 Multiple 'Report a Bug' links
Submitted: 2009-10-10 03:04 UTC Modified: 2009-10-13 02:47 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: joshua dot brickner at mac dot com Assigned: aharvey (profile)
Status: Closed Package: Website problem
PHP Version: 5.3.0 OS: Mac OS X
Private report: No CVE-ID: None
 [2009-10-10 03:04 UTC] joshua dot brickner at mac dot com
Description:
------------
This bug is best described with this screenshot: 
http://imgur.com/BmzIx.png

Reproduce code:
---------------
go to this page http://us3.php.net/manual/en/function.money-format.php

Expected result:
----------------
One 'Report a Bug' link

Actual result:
--------------
Several 'Report a Bug' links

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-12 03:18 UTC] aharvey@php.net
Confirmed. I won't assign this to myself, since I don't have commit rights for the web tree, but I'll cook up a patch shortly for this, since I touched that bit of Javascript last.
 [2009-10-12 03:41 UTC] aharvey@php.net
(Flipping the category to "Website problem", since it is.)

OK, the links are being generated because we have h5.title elements within the format parameter description. The report a bug links are attached to the parent, which results in the mess that we see at the top of the parameter description and a bunch of togglers on the h5s that don't really do what you expect for much the same reason.

There are two ways to fix this, both of which basically involve tweaking the selector we use to attach the bug report and toggler elements, which is currently .refsect1 .title:

1. Change it to only match .title elements that are immediate children of a .refsect; ie .refsect1 > .title

2. Change it to only match h3.title elements; ie .refsect1 h3.title

I've gone for the latter approach for now. It would be possible to support collapsing and reporting bugs on the h5.title elements as well, but it would require another code path, and frankly, I think it's uncommon enough in the PHP manual that it's unnecessary -- after all, users can still collapse the parameter block as a whole.

Patch against current web/php trunk: http://www.adamharvey.name/patches/bug-49830-report-bug.patch
 [2009-10-12 10:16 UTC] bjori@php.net
Adam: You have karma for web/php now, feel free to commit
 [2009-10-13 02:46 UTC] svn@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=289602
Log: Fix for bug #49830 (Multiple 'Report a Bug' links): make the selector that generates these links and togglers more restrictive.
 [2009-10-13 02:47 UTC] aharvey@php.net
This bug has been fixed in SVN. Since the websites are not directly
updated from the SVN server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.

Thank you for the report, and for helping us make PHP.net better.

Applied the previously linked patch. Thanks for the karma, Hannes.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 21:00:01 2026 UTC