[wp-trac] [WordPress Trac] #17197: Attach media - search results not populating
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 20 20:45:09 UTC 2011
#17197: Attach media - search results not populating
--------------------------+-----------------------------
Reporter: tomauger | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: minor | Keywords:
--------------------------+-----------------------------
Issue: Page / Post search not populating when using the Attach feature
from the Media Library.
Details: upon closer inspection this occurs as a result of extra
whitespace in functions.php (ie: outside the <?php ?> tags
To reproduce using TwentyTen:
1. edit functions.php
2. close the php code block with ?> at the very end of functions.php (why
is it even left open??)
3. add some blank lines (CR/LF) to the end of functions.php after the ?>
Reload Media Library and attempt to use the Search feature: results are
blank.
Alternative steps:
1. edit functions.php
2. add whitespace before the <?php opening tag
Why I think this is a bug:
While it's not necessarily a good practice to add whitespace outside of
the <?php ?> tags, it happens. More likely it will happen inside any child
theme's functions.php, particularly if users are glibly copying-and-
pasting code blocks from various sources on the interwebs. It seems
strange that whatever code is displaying the search results even cares
about whitespace in functions.php, but it would seem to me that it should
not be displaying the contents of functions.php in any case, so the
whitespace ought not to make a difference.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17197>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list