[wp-trac] Re: [WordPress Trac] #7210: Gallery image with file-name
that is_numeric() displays 'attachment' in URL
WordPress Trac
wp-trac at lists.automattic.com
Sat Jul 5 09:54:13 GMT 2008
#7210: Gallery image with file-name that is_numeric() displays 'attachment' in URL
-----------------------------------------------------+----------------------
Reporter: na3s | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: Administration | Version: 2.5.1
Severity: normal | Resolution:
Keywords: gallery, image, attachment, url, upload |
-----------------------------------------------------+----------------------
Comment (by na3s):
I believe this is caused by core template logic. The template was just the
indicator. First there was the realization that only *some* of the photos
had a comment form, then came the realization that the ones with the
comment form had a different URL structure, and shortly after it was
realized that uploading a photo with a filename which is only numeric will
result in the following instance:
when numeric:
filename = $x.jpg
url = /attachment/$x
when !numeric
filename = %y.jpg
url = /%y.jpg
The template does not determine a URL structure, and therefor this error
is more than likely a core bug.
I can't say for sure, but it looks as if the wp_get_attachment_link()
function (or one of it's dependencies) is possibly the culprit.
--
Ticket URL: <http://trac.wordpress.org/ticket/7210#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list