Opened 11 years ago
Closed 11 years ago
#159 closed defect (bug) (fixed)
Clicking left or right sides of the Download WordPress button does nothing, or results in 404
Reported by: | rosshanney | Owned by: | coffee2code |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | General | Keywords: | has-patch |
Cc: |
Description
This refers to the big blue button on the top right of WordPress.org pages.
On the wordpress.org homepage, clicking the areas of the button to the left or right of the "Download WordPress" text result in the browser navigating to wordpress.org/undefined, which 404s.
On other pages / areas (codex, forums, themes, plugins etc.), doing the same doesn't result in a 404, but nothing else happens either (it doesn't take you to wordpress.org/download, as it should).
The attached screenshot shows that the <a>
element is not as wide as the styled button area.
Attachments (2)
Change History (8)
#2
@
11 years ago
- Keywords has-patch added
Changing .download-button
to a.download-button
should fix it:
$('#download a, a.download-button').click(function() { recordOutboundLink(this, 'Download Links', $(this).hasClass('download-button') ? 'button' : 'nav' ); return false; });
Additionally, meta-159.patch makes the link as wide as the <li>
element.
#3
follow-up:
↓ 5
@
11 years ago
- Owner set to coffee2code
- Status changed from new to accepted
The 'download-button' class is assigned to the li
, so the JS fix will have to be:
$('#download a, .download-button a').click(function() { recordOutboundLink(this, 'Download Links', $(this).hasClass('download-button') ? 'button' : 'nav' ); return false; });
#5
in reply to:
↑ 3
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to coffee2code:
The 'download-button' class is assigned to the
li
, so the JS fix will have to be:
Yes, but the second selector was for the button next to "Ready to get started?", not for the one in header (which is handled by the first selector).
The current selectors are redundant and only catch the button in header.
Confirmed.
"undefined" comes from
recordOutboundLink()
It's called when clicking on both the
<a>
and<li>
tags:However, it doesn't take into account that
<li>
doesn't have anhref
attribute.