﻿__group__,ticket,summary,owner,component,_version,priority,severity,milestone,type,_status,workflow,_created,modified,_description,_reporter
Next Release,16567,Can't create categories with different names but similar slugs on Edit Post screen,,Administration,3.0.5,normal,normal,3.6,defect (bug),new,needs-unit-tests,2011-02-15T18:29:10Z,2013-01-09T23:38:54Z,"We run a blog that deals with programming languages. Today we were creating a post concerning the C programming language and attempted to create a new category for it, called ""C"" (just one character). This angered WordPress; it appeared to create a superfluous ""Uncategorized"" category, but it wound up not actually creating any categories for the post.

I've attached a screenie so you can see what this looks like after I attempt to create the category.

If it's for some reason forbidden to create categories comprised of a single character, maybe a validation error message of some kind would be in order?",jeffreymcmanus
Next Release,23930,Screen option for post formats UI,,Administration,trunk,normal,normal,3.6,feature request,new,needs-unit-tests,2013-04-03T18:28:10Z,2013-05-14T18:16:58Z,"As discussed in IRC, there should be a screen option for the post format UI on the post editing screen.

Nacin would like the UI to be hidden by default when the current theme does not support post formats and there are no non-standard format posts in the database. In this case, the UI would have to be enabled by the user. The UI would need to be automatically enabled when a theme that supports post formats is activated.

Willing patchers, make yourself known.

See also #23929

IRC logs:

https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2013-02-18&sort=asc#m558297

https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2013-04-03&sort=asc#m588002",johnbillion
Next Release,10381,post->ancestors isn't always set,ryan,Cache,2.8,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2009-07-10T20:38:10Z,2012-08-20T19:47:53Z,"when update_post_cache() gets called to cache the results of a query so as to avoid needless db calls to get permalinks, and then get_post() is used, posts can end up without the ancestor variable being set.",Denis-de-Bernardy
Next Release,13480,update_option + PHP5 Object references not storing correctly in cache,ryan,Cache,3.0,normal,normal,3.0,defect (bug),closed,needs-unit-tests,2010-05-21T14:15:26Z,2011-09-22T19:56:01Z,"This is related to the changes to caching of the options API.

At present, When objects are saved using the option API, the PHP5 object references are being stored in an array in the ""object cache"", The result is that if you attempt to update an object variable multiple times in 1 page load, you'll end up with only the first update_option succeeding.

This is because on subsequent calls, the object cache references the NEW value as existing within the database..

Whilst this ticket description might be hard to follow, This is the same as [9740]. 

The solution is to clone the variables if they're objects in the Options API.",dd32
Next Release,23167,Cache incrementors for get_pages,westi,Cache,3.5,normal,normal,3.6,task (blessed),closed,needs-unit-tests,2013-01-10T04:56:23Z,2013-02-11T18:25:54Z,Make use of a caching incrementor and get pages from their individual cache buckets to avoid memory exhaustion errors in php scripts,nprasath002
Next Release,23326,Cache incrementors for get_terms(),ryan,Cache,3.5.1,normal,normal,3.6,task (blessed),closed,needs-unit-tests,2013-01-30T18:15:34Z,2013-02-04T13:48:47Z,"With r9102, get_terms() was the first to switch to the new cache invalidation style. It still uses timestamps instead of incrementors, however.",ryan
Next Release,20143,"Array query args on a paginated archive page creates PHP Warning, breaks page.",nacin,Canonical,3.3,normal,normal,3.4,defect (bug),closed,needs-unit-tests,2012-02-29T17:48:23Z,2012-04-27T15:40:01Z,"Having query args that are elements of an array breaks in redirect_canonical.

To reproduce:
1. Create enough posts in an install to warrant pagination of posts
2. Go to second page and add an array element query arg eg. http://www.siteurl.com/page/2/?foo[bar]=true

I'm getting this PHP warning:


{{{
Warning: rawurlencode() expects parameter 1 to be string, array given in /Users/ericlewis/Sites/wp-trunk/wp-includes/canonical.php on line 283

Warning: Cannot modify header information - headers already sent by (output started at /Users/ericlewis/Sites/wp-trunk/wp-includes/canonical.php:283) in /Users/ericlewis/Sites/wp-trunk/wp-includes/pluggable.php on line 864
}}}

This stems from the fact that in redirect_canonical, the query args are parsed into an array via parse_str(), and then rawurlencode() is applied to each element of that array. In this case, that means rawurlencode is applied to an array (foo), which causes the issue.",ericlewis
Next Release,21700,Problem obtaining the Feed of an archive of tag “RSS”,,Canonical,3.4.1,normal,normal,3.6,defect (bug),new,needs-unit-tests,2012-08-27T10:40:33Z,2012-12-29T22:26:55Z,"I'm using RSS as a tag for some of my blog posts, and I was using them without any problem.

'''myblog.com/tag/rss/'''

But I've just realised that Google Webmaster Tools gives me some related errors.

The issue is this: when trying to retrieve the feed of this tag, from

'''myblog.com/tag/rss/feed/'''

it gets redirected to

'''myblog.com/tag/feed/'''

And this gives an error.",xavivars
Next Release,17653,Canonical Redirect when space(s) are used instead of hyphens when requesting a page,dd32*,Canonical,3.2,normal,normal,3.6,enhancement,accepted,needs-unit-tests,2011-06-02T01:25:08Z,2013-02-21T01:15:53Z,"Create a page with a slug that contains a hyphen (eg. /page-name/).

If you then visit /page name/ (ie. use a space instead of a hyphen), WordPress currently manages to locate and display the page-name page. This could cause duplicate content issues.

The same issue occurs if multiple spaces are used instead of a hyphen.

As an example, this is the original page: http://jamesc.id.au/test-page/

This page is accessible via:
* http://jamesc.id.au/test%20page/
* http://jamesc.id.au/test%20%20page/
* http://jamesc.id.au/test%20%20%20page/
* http://jamesc.id.au/test%20%20%20%20page/

and so on.

WordPress should either output a 404 error, or redirect to /page-name/.

Tested using the latest 3.2 trunk (r18110).",jamescollins
Next Release,11882,get_pending_comments_num has inconsistent behaviour,westi,Comments,3.0,normal,normal,3.0,defect (bug),closed,needs-unit-tests,2010-01-12T22:36:35Z,2011-08-16T17:31:46Z,"You sometimes get and array and sometime not even when you should.

It only return numbers for posts with pending comments.

It needs some tests",westi
Next Release,13715,dbDelta produces warnings,westi,Database,3.0,normal,normal,3.0,defect (bug),closed,needs-unit-tests,2010-06-03T19:26:56Z,2010-06-11T03:01:54Z,"I just followed the instructions [http://codex.wordpress.org/Creating_Tables_with_Plugins on the Codex] to use dbDelta to create and update tables, and I'm getting the following warning:

{{{
Warning: array_search() [function.array-search]: Wrong datatype for second argument in /Users/mitcho/wordpress/wp-admin/includes/upgrade.php  on line 1526
}}}

It looks like $indices is never being initialized as an array. The attached patch works, but I'm not familiar with the dbDelta logic so it'll need review from someone who does.",mitchoyoshitaka
Next Release,10332,Backdated pre-1st January 1970 post displayed as published on the current viewing day,nacin,Date/Time,2.8,high,major,3.2,defect (bug),closed,needs-unit-tests,2009-07-02T06:44:37Z,2011-06-02T03:29:43Z,"When posting a backdated post that is before 1 January 1970, the published on date will show the current viewing date.

The problems starts when posting.

example :

At the New Post interface, 

Published On : set to 31 December 1969.
Click published.

The Published On will change to current date.

However, click on Edit, the fields will show the set date (in this example 31 December 1969).

Example :
http://bibliotheca.limkitsiang.com/1969/12/
http://bibliotheca.limkitsiang.com/1970/01/




",carboncopy
Next Release,22585,wp_editor() gives fatal error on front-end,ryan,Editor,3.5,normal,major,3.5,defect (bug),closed,needs-unit-tests,2012-11-25T19:26:18Z,2012-11-27T03:42:03Z,"Adding wp_editor() to theme front-end gives fatal error when media_buttons are set to true.

Fatal error: Call to undefined function is_upload_space_available() in /home/vds/public_html/clients/client1/web6/web/wp-includes/media.php on line 1274

",itworx
Next Release,21990,SimplePie: DOMDocument can be disabled,rmccue,External Libraries,3.5,low,normal,3.5,defect (bug),closed,needs-unit-tests,2012-09-25T06:20:31Z,2012-12-02T16:43:50Z,"SimplePie uses DOMDocument in a few places. But, it can be disabled, either by a distro messing with PHP (see Redhat) or with `--disable-dom`. When we use DOMDocument in core, we always check class_exists(). SimplePie does not.

We'll need to get this fixed to avoid fatal errors when SimplePie is used.

SimplePie 1.2 did not use DOMDocument. I wonder what else was added/used in 1.3 that could potentially be disabled.",nacin
Next Release,22692,Quotes Are Messing Up,,Formatting,3.4.2,normal,normal,3.6,defect (bug),new,needs-unit-tests,2012-12-03T09:39:36Z,2013-04-21T18:57:27Z,"Paste this into the body of a new post:

{{{
A sentence.  ""A quote after 2 spaces.""
}}}

Preview that, and be amazed.  The first quote is backwards.  :(

Due to font differences, this is easiest to see on the Twenty Ten theme.",miqrogroove
Next Release,10077,clean_url improperly scrapes %20,ryan,Formatting,2.8,high,major,2.9,defect (bug),closed,needs-unit-tests,2009-06-09T02:48:25Z,2009-11-14T05:17:55Z,"clean_url will currently turn a url like http://jcksn.com/Noel%20Jackson into http://jcksn.com/NoelJackson

This patch fixes that problem, adding \\x20 to the regex.",noel
Next Release,21018,get_the_password_form() inserting two </p> before the </form> causing W3C validation error,nacin,Formatting,3.4,normal,normal,3.4.1,defect (bug),closed,needs-unit-tests,2012-06-19T05:18:07Z,2012-06-26T03:22:36Z,"In the get_the Password_form()code at the end of the function :


{{{
esc_attr__(""Submit"") . '"" /></p>
</form>
';
}}}

should be 

{{{
esc_attr__(""Submit"") . '"" /></p></form>';
}}}


  ",kevinhaig
Next Release,15600,shortcode_unautop returns emtpy string,westi,Formatting,3.0.1,high,major,3.3,defect (bug),closed,needs-unit-tests,2010-11-28T13:36:00Z,2011-10-12T16:50:31Z,"In some cases when a website uses plugins with ShortCode the {{{shortcode_autop}}} method will return an empty string.

Below is  sample content that gets an empty string returned when passed through {{{shortcode_autop}}}.

----

{{{
<p>Writers are a diverse bunch. Quirky. Independent. Opinionated. In other words, hard to buy for. If you are trapped in a relationship with a writer,<em> get out</em>. If you can&#8217;t, attempt to tame your writer with the liberal application of gifts they will appreciate. Here I have gathered a few ideas that range from classic to new-fangled. Each is sure to melt almost any writer&#8217;s dark, cold heart.</p>
<p>[amazon_link id=""0547055323"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/417-fWjfIYL._SL160_.jpg"" alt=""The Best American Short Stories 2010 (The Best American Series (R))"" />[/amazon_link] What writer doesn&#8217;t want to have their work end up in a &#8220;best&#8221; collection? Yes, even the ones who scoff at commercialism and popular opinion do. The Best American Short Stories series has been running for a good long time but the collections are kept fresh with yearly guest editors. My favorite feature of these books are the writer&#8217;s notes &#8212; insightful comments from the writers themselves about their stories. Though the notes<br />

were more essential in the days before the Internet provided instantaneous transmission of a writer&#8217;s every 140-character-long thought, they still provide a worthwhile virtual mini-panel on the state of the art in short fiction. If your writer leans more toward genre fiction, check out other collections such as the venerable [amazon_link id=""0312608977"" target=""_blank"" ] Year&#8217;s Best Science Fiction[/amazon_link] .</p>
<p>[amazon_link id=""B002FQJT3Q"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/417XQ0XwQuL._SL160_.jpg"" alt=""Kindle 3G Wireless Reading Device, Free 3G + Wi-Fi, 6&quot; Display, Graphite, 3G Works Globally - Latest Generation"" />[/amazon_link] Digital publishing is an unstoppable freight train charging towards us. Get on board or get squashed to jelly beneath the steel wheels of progress. The Kindle is probably the cheapest and most hassle-free way to hop on board and see what all the fuss is about. The screen is a pleasure to read in bright light, and the smaller size Kindle adds nothing to the weight or bulk of your messenger bag. There are a few quirks. You can&#8217;t read in bad light (just like a book) &#8212; the screen does not produce any light on it&#8217;s own. The smaller Kindle is really too small to effectively display PDFs. If your writer spends a majority of their time squinting at screenplay PDFs on their laptop, then go for the [amazon_link id=""B002GYWHSQ"" target=""_blank"" ]Kindle DX[/amazon_link] .</p>
<p>[amazon_link id=""B00138CX30"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/51lwiSZcWcL._SL160_.jpg"" alt=""Time Out Of Mind"" />[/amazon_link] Music to write by. Normally, writing music should be instrumental only &#8212; can&#8217;t have too many words competing for brainspace. But there is something very atmospheric about the tracks on Bob Dylan&#8217;s [amazon_link id=""B00138CX30"" target=""_blank"" ] Time Out of Mind[/amazon_link] and the vocals are subdued if plaintive. The track &#8220;Not Dark Yet&#8221; was featured in the ultimate writer movie, [amazon_link id=""B001ZS5CD6"" target=""_blank"" ]Wonder Boys[/amazon_link] If your writer&#8217;s work is filled with angst and wounded characters, this is the record to spin. For a more cinematic, epic, sweeping soundtrack, try [amazon_link id=""B003DUA56S"" target=""_blank"" ]Clash of the Titans[/amazon_link] . Terrible movie, good generic action-movie score.</p>

<p>[amazon_link id=""8883701127"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/41nEt%2BZMYsL._SL160_.jpg"" alt=""Moleskine Ruled Notebook Large"" />[/amazon_link] Unassuming and built to last &#8212; we may live in the digital age, but when paper is called for the Moleskine notebook provides hundreds of durably bound, creamy off-white pages just asking to be filled with Great Ideas. The spine can be bent clear back on itself without breaking the binding or loosening a single page. The covers are stiff but flexible cardboard and covered with water-resistant oilcloth. Not flashy, but definitely classy. There&#8217;s a reason these things are almost a writer&#8217;s cliche.</p>
<p>[amazon_link id=""B000GTR2F6"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/41GSZCYWKYL._SL160_.jpg"" alt=""Keurig B-70 B70 Platinum Single-Cup Home Brewing System"" />[/amazon_link] Most writers juggle multiple hats. Writing often has to wait to the very end of the day. That, or it has to come first thing in the morning, long before any reasonable person would think of getting out of bed. It&#8217;s no wonder many writers, especially those first starting out, require a constant energy boost. I keep the [amazon_link id=""B000GTR2F6"" target=""_blank"" ]Keurig Platinum [/amazon_link] on my desk. It&#8217;s an essential piece of equipment, right alongside my printer and external hard drive. Making a fresh cup of coffee takes about one minute. Thanks to the self-contained filter cups, there is no mess to clean up. At all. Also good for tea, iced coffee, and provides instant hot water for hot cocoa or soup mix.</p>
<p>[amazon_link id=""B001TIJWKQ"" target=""_blank"" ]<img src=""http://ecx.images-amazon.com/images/I/41nsx4792FL._SL160_.jpg"" alt=""Crumpler The Considerable Embarrassment Laptop Bag, Brown/Red"" />[/amazon_link] And where is your writer supposed to put all the new awesome stuff you buy them? A briefcase is far too corporate and a backpack is far too Kindergarten. A writer has one foot in both these worlds and so does Crumpler. Witness the honestly named [amazon_link id=""B001TIJWKQ"" target=""_blank"" ]Considerable Embarrassment Laptop Bag[/amazon_link] . This bag holds a 15&#8243; laptop with room left over for books, magazines, moleskins and other writerly essentials. Or step up to the even roomier [amazon_link id=""B001TN6S8K"" target=""_blank"" ]Dreadful Embarassment[/amazon_link] , meant<br />

for 17&#8243; laptops (always buy one size larger bag than you think you need). I&#8217;ve had a Crumpler camera bag for a couple of years and it&#8217;s proven to be tough, well-built and rock-solid.</p>
<p>Of course, if you really love your writer you might consider gifting them with a Crumpler bag stuffed with <em>all</em> the items mentioned here. Your writer may be confused by this strange new emotion called <em>joy</em>, but it would only be a matter of time before the Great American Novel/Screenplay/Haiku is produced.</p>
<p>Of course, if you really love your writer you might consider gifting them with a Crumpler bag stuffed with <em>all</em> the items mentioned here. Your writer may be confused by this strange new emotion called <em>joy</em>, but it would only be a matter of time before the Great American Novel/Screenplay/Haiku is produced.</p>
}}}
",mdbitz
Next Release,12118,wp_texturize converting x to &#215; is too greedy,,Formatting,3.0,normal,normal,3.0,defect (bug),closed,needs-unit-tests,2010-02-03T00:39:49Z,2010-04-27T20:22:33Z,Converting x to &#215; in wp_texturize() converts too much. Strings like 4x4 and 4x20=80 should be converted but there are a lot of times when x is in a model number such as rt2x00 where the character should not be converted to a multiplication symbol.,mtdewvirus
Next Release,7988,wpautop p (paragraph) bug with div,,Formatting,2.7,normal,normal,,defect (bug),closed,needs-unit-tests,2008-10-28T13:25:17Z,2011-09-22T19:58:29Z,"As [http://comox.textdrive.com/pipermail/wp-hackers/2008-October/022307.html Jan Erik Moström pointed out on wp-hackers], wpautop mis-parses the following line:

{{{<div><a href=""xx""> <img src=""yy"" /> </a> <p>text</p> </div>}}}

The problem is this line in wpautop:

{{{$pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', ""<p>$1</p>$2"", $pee);}}}

This says that if a line has a {{{<p>}}} tag, some non-markup stuff, perhaps some space, followed by a closing tag of {{{</div>}}}, {{{</address>}}}, or {{{</form>}}}, then the {{{<p>}}} is orphaned and should add a closing tag ({{{</p>}}}) on the right of the non-markup stuff.

The mistake that it makes is allowing it to enclose empty space in {{{<p></p>}}}.  It makes this mistake by allowing space characters to be considered as the non-markup stuff.  My patch tells it not to do so by changing the above line to the following: 

{{{$pee = preg_replace('!<p>([^<\s]+)\s*?(</(?:div|address|form)[^>]*>)!', ""<p>$1</p>$2"", $pee);}}}

",filosofo
Next Release,21767,Remove stripslashes from API functions,,Formatting,3.4,normal,normal,3.6,task (blessed),closed,needs-unit-tests,2012-09-02T03:14:56Z,2013-04-16T17:05:06Z,"This ticket attempts to bring consistency to the way slashes are handled throughout the WordPress API functions that persist data.

Currently these API functions expect slashed data and strip slashes within their code. Most of the code that invokes these functions understands this and generally passes slashed data to them (sometimes calling `add_magic_quotes()` when necessary). Most of the code understands this, but not all. While auditing the code for the purposes of creating this patch I found a variety of places that do not slash data before passing it to the model functions as it currently should be done. Further, most developers do not think to manually add slashes to the data they programatically create and pass to these functions. Finally, it is not documented in the Codex that all data passed to these functions should be slashed before being passed in.

As such, we can generally consider such behavior a bug. There are a few potential caveats, which I will cover shortly. 

Some of the functions that are being affected here:

* wp_insert_post()
* wp_update_post()
* add_post_meta() [and other meta functions that call add_metadata()]
* update_post_meta() [and other meta functions that call update_metadata()]
* wp_insert_attachment()
* wp_insert_term()
* wp_update_term()
* up_insert_user()
* wp_update_user()
* wp_new_comment()
* etc...

Point being, while it's cool that this stuff can work:

{{{
update_post_meta($post->ID, 'key', $_POST['key']);
}}}

It's not worth the cost of losing data when someone quite reasonably does something like this:

{{{
$post_data = array(
	'post_status' => 'publish',
	'post_type' => 'post',
	'post_title' => 'This is my title',
	'post_content' => 'Crazy with the backslashes \\\\\\',
);
wp_insert_post($post_data);
}}}

With the current code they would instead need to do this (to not lose data):

{{{
wp_insert_post( add_magic_quotes($post_data) );
}}}

Developers just don't think to do this, and they shouldn't have to.

Here's the real life example that got me diving into this:

{{{
$my_api_data = get_twitter_data();
update_post_meta($post->ID, '_my_meta_key', $my_api_data);
}}}

The data I was saving was in JSON format. I was putting it in like this:

{{{
{""profile_image_url"":""http:\/\/a0.twimg.com\/profile_images\/17084282\/alex_king_normal.jpg""}
}}}

and getting it back liks this:

{{{
{""profile_image_url"":""http://a0.twimg.com/profile_images/17084282/alex_king_normal.jpg""}
}}}

As you can imagine, `json_decode()` fails on this data.

The functions that do have examples around of passing $_POST data directly to it are the post meta functions. I think changing them might break a fair bit of custom code that is passing in slashed data. I've created `wp_update_post_meta()` and `wp_add_post_meta()` accordingly that do not expect slashed data and replaced all instances of `update_post_meta()` and `add_post_meta()` with these calls accordingly.

It's possible that we may need to do a similar treatment of the other meta functions (user, comment, etc.). I haven't put anything in place for this in the current patch.

One additional change that was needed was to the default kses filters on a few properties. wp-includes/default-filters.php

{{{
// Strip, trim, kses, special chars for string saves
foreach ( array( 'pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 'pre_user_nickname' ) as $filter ) {
	add_filter( $filter, 'sanitize_text_field' );
	add_filter( $filter, 'wp_filter_kses' );
	add_filter( $filter, '_wp_specialchars', 30 );
}
}}}

The `wp_filter_kses` filter has been replaced with `wp_kses_data` - thanks to @markjaquith for this tip here. I also applied this change to the filters initialized in wp-includes/kses.php:

{{{
function kses_init_filters() {
	// Normal filtering
	add_filter('title_save_pre', 'wp_kses_data');

	// Comment filtering
	if ( current_user_can( 'unfiltered_html' ) )
		add_filter( 'pre_comment_content', 'wp_kses_data' );
	else
		add_filter( 'pre_comment_content', 'wp_kses_data' );

	// Post filtering
	add_filter('content_save_pre', 'wp_kses_data');
	add_filter('excerpt_save_pre', 'wp_kses_data');
	add_filter('content_filtered_save_pre', 'wp_kses_data');
}
}}}

As this has security implications, it could use extra review and testing.

I changed `wp_rel_nofollow()` to no longer strip slashes then add them again (and it was adding them wrong, via a call to `esc_sql()`). Now you can pass unslashed strings to `wp_rel_nofollow()` without losing data as well.

I have not thoroughly tested XMLRPC calls yet, that is definitely a needed next step. The `escape()` method within the XMLRPC code looks hinky to me, likely some changes (as well as thorough testing )are needed there.

Obviously, this is a big change. I've done my best to test appropriately. I've tested via the admin UI and with simple code examples (attached) and so far things look good. Unit tests that exercise various slash conditions across all objects would be another smart addition to the mix.

Related: #18322, #20569

Whew! I think that's it for now - when you find something that breaks, please comment accordingly so it can be fixed/discussed. I expect there are likely a few edge cases I missed, but it's definitely time to get more eyeballs on this (as well as help testing).",alexkingorg
Next Release,3362,Missing <p> tag from <blockquote> (as well as extra <br /> sometimes) invalidates xhtml,,General,2.0.5,normal,normal,,defect (bug),closed,needs-unit-tests,2006-11-16T20:46:58Z,2011-09-22T19:59:57Z,"Wordpress 2.0.5 always seems to miss off the opening <p> tag inside a <blockquote> (and if it is embedded in text adds a <br /> tag before the <blockquote>) which invalidates XHTML 

The following text (with a break before the blockquote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br />  <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote> Text after block quote that doesn't go on and on.<br />

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <br />
<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>
<p> Text after block quote that doesn&#8217;t go on and on. </p>

With a blockquote at the beginning (and no break character before):

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote> Text after block quote that doesn't go on and on. <br />  <br /> Just separated by some break characters

becomes:

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>
<p> Text after block quote that doesn&#8217;t go on and on. </p>
<p> Just separated by some break characters
</p>

Text before blockquote (with a break before the quote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br />  <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <br /> <br />
<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>

Blockquote at the end (without a break before the quote):

Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on: <blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes:

<p> Text before blockquote that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on:<br />
<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>

Blockquote on its own:

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </blockquote>

becomes

<blockquote> &quot;Text withing blockquote that also goes on and on and on and on and on and on and on and on and on.&quot; </p></blockquote>",upekshapriya
Next Release,22473,Post-formats radiogroup on custom post types and pages will not update in 3.5 Beta 3,ryan,General,3.5,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2012-11-16T08:14:55Z,2012-11-20T18:31:06Z,"The post-formats are being saved, but the radiogroup will not show selected format after publishing, but stays checked at Standard post-format.

Works only on posts.",itworx
Next Release,9246,Wordpress cannot update '.htaccess' even though it is writable,westi,General,2.7.1,normal,normal,2.8,defect (bug),closed,needs-unit-tests,2009-02-28T01:15:25Z,2009-08-17T07:52:17Z,"I have attached a patch which fixes the problem. Here are some details: The culprit function was {{{get_home_path()}}} in file {{{wordpress/wp-admin/includes/file.php}}}. The path to {{{.htaccess}}} was turning out to be:
{{{
/u/akshay/public_html/wordpress/wp-admin/options-permalink.php/~akshay/.htaccess
}}}
when it actually should be:
{{{
/u/akshay/public_html/.htaccess
}}}
The reason was that this call was not returning the correct result:
{{{
$root = str_replace( $_SERVER[""PHP_SELF""], '', $_SERVER[""SCRIPT_FILENAME""] );
}}}
because {{{$_SERVER[""PHP_SELF""]}}} had the value
{{{
/~akshay/wordpress/wp-admin/options-permalink.php
}}}
and {{{$_SERVER[""SCRIPT_FILENAME""]}}} had the value
{{{
/u/akshay/public_html/wordpress/wp-admin/options-permalink.php
}}}
The main problem was that the path manipulation functions did not consider the presence of {{{/~username}}}. My blog URL is {{{http://web.cecs.pdx.edu/~akshay}}}, which is why the path in {{{PHP_SELF}}} was formed the way it was. I have attached a fix which I hope is generic enough to work. Let me know if it is not (in which case, I would need some hints on how to fix it). The patch is attached.

",akd907
Next Release,20412,add_query_arg() doesn't work with already exisitng CGI vars,,General,3.3.1,normal,normal,,defect (bug),closed,needs-unit-tests,2012-04-10T18:06:18Z,2012-04-10T18:24:05Z,"add_query_arg('filter', '125', '/project/?lang=en') returns /project/?lang=en&filter=125?lang=en (with two lang=en).",porton
Next Release,7688,get_children not working,,General,2.6,normal,normal,,defect (bug),closed,needs-unit-tests,2008-09-04T17:48:31Z,2011-09-22T20:00:25Z,"in version 2.6 get children is not acting the same as 2.5.1

<?php
$mykids = get_children(""orderby=menu_order&post_parent=19"");
if($mykids):
foreach($mykids as $post) :  ?>

$mykids is totally empty and page 19 has children that are showing up as such in the raw $post array",security_man
Next Release,7326,get_posts not working properly,pyadav,General,2.6,high,blocker,2.6.2,defect (bug),closed,needs-unit-tests,2008-07-16T21:47:40Z,2011-09-22T19:57:05Z,"Here's an example of a get_posts code block that doesn't work. I don't think any get_posts queries are working.

<?php $lastposts = get_posts('numberposts=1&category=7&orderby=post_date&order=DESC');
foreach($lastposts as $post) :
setup_postdata($post);
?>",wpcandy
Next Release,20434,cURL fails to follow redirects sometimes,ryan,HTTP,3.4,high,critical,3.4,defect (bug),closed,needs-unit-tests,2012-04-13T08:24:35Z,2012-05-10T21:33:17Z,"r20208 changed the way WP_HTTP (specifically cURL) handles redirects, and as a result broke the way it handles some redirects (both 301 and 302) that were previously working.  It doesn't fail on all 301/302 redirects.  

At first I thought it failed only for requests with more than 1 redirect, but in testing with the Quantcast top 100 lists (assuming these sites should have no problems loading usually) I found an exception to that rule in http://facebook.com, which works and has 2 redirects.  Then I thought it only failed for requests with more than 1 301 redirect, but I found an exception to that in http://dailymotion.com, which fails and only has 1 301 redirect (and a 302).

Here are a couple examples that fail using wp_remote_get(): http://skype.com, http://microsoft.com, http://dailymotion.com, 

Here are a couple from the same list that work (and go through redirects): http://google.com, http://facebook.com, http://yahoo.com

As of r20208 wp_remote_get() returns empty arrays and strings for headers, body, response, etc.  As of r20370 the same failed requests return a WP_Error object with an error code of 'http_request_failed' and an error message of ' malformed' (including the leading space).  As of r20460 the same WP_Error objects are still returned.",evansolomon
Next Release,19033,"Problem with Hebrew letter ""Nun"" hiding search results",shir.gans@…,I18N,3.2.1,normal,critical,3.4,defect (bug),closed,needs-unit-tests,2011-10-24T08:48:57Z,2012-02-08T15:35:23Z,"In the hebrew installation, when trying to search to website for words with the letter Nun ( נ ), no results found.

There was a related problem on an earlier version of wordpress with the same letter, please see ticket here:
[http://core.trac.wordpress.org/ticket/11669]

Please try to search on this site, the words (נתן, קושניר, אנטולי) which all has the letter נ . no results found, while all names are appears in the site.
[http://www.pat.co.il/shirg/comm-it.co.il/he/]

We need fix/patch ASAP. Thank you.",shirgans
Next Release,10619,Importing WXR breaks serialized postmeta value,westi,Import,2.8.4,normal,normal,3.0,defect (bug),closed,needs-unit-tests,2009-08-14T18:51:07Z,2009-12-22T17:05:53Z,"Because custom field values are passed through the poorly named maybe_serialize() when importing, any values that already contain serialized strings are serialized again, making them useless. Although it would make more sense to me to eliminate the bizarre behavior of maybe_serialize() that may break something else, so I fixed this problem by turning off maybe_serialize() for WXR import.",JonathanRogers
Next Release,11354,WordPress Importer duplicates categories,,Import,,normal,normal,3.1,defect (bug),closed,needs-unit-tests,2009-12-07T22:24:50Z,2010-10-25T21:31:38Z,"The WordPress importer duplicates categories.
This only seems to affect child categories.
To reproduce, get an export file that has parent and children categories. Run the importer multiple times with the same file.
View the category screen under Posts->Categories, you should see duplicated child categories.

I've included a patch for the process_categories() method that fixes this by explicitly checking if each category_exists().
I've included the same patch for process_tags() method. Tags do not duplicate, but wp_insert_term() is called without checking if the tag exists.",briancolinger
Next Release,9870,Fix for WP_Dependencies::dequeue,azaozz,JavaScript,2.8,normal,normal,2.9,defect (bug),closed,needs-unit-tests,2009-05-19T03:56:02Z,2009-10-18T05:51:34Z,"The WP_Dependencies::dequeue method has three major flaws that prevent it from working: does not split handle around '?' to divide handle from arg (see the WP_Dependencies::enqueue method), tries to remove the handle from the queue array by using the handle as an index of the array when the handle is a value of the array, and does not remove a relevant entry from the args array if the handle has an arg.

The provided patch (wp-dependencies-patch.txt) was tested with 2.8-beta1-11389 and corrected all three issues.",chrisbliss18
Next Release,23706,Image metadata encoding problem,,Media,3.0,normal,normal,3.6,defect (bug),new,needs-unit-tests,2013-03-06T17:05:43Z,2013-03-07T19:09:32Z,"I uploaded picture DSCF4480.jpg (attached for testing).

Metadata for title and caption should be the same: ""Bystřice u Benešova"". But after upload title is right, but caption is damaged:

{{{
'caption' => 'Bystøice u Beneova',
'title' => 'Bystřice u Benešova'
}}}

Using latest trunk.",pavelevap
Next Release,22181,image_make_intermediate_size in wp-includes/media.php always returns FALSE,markoheijnen,Media,3.5,normal,major,3.5,defect (bug),closed,needs-unit-tests,2012-10-13T05:45:42Z,2012-10-15T20:55:47Z,"Found this when one of my theme user running 3.5 reported problem with thumbnails.
http://swiftthemes.com/forums/showthread.php?1958-here-we-go-again-thumbnail-featured-pics-dont-work-in-latest-build-of-wordpress&goto=newpost#post7055

In the following function, if statement is followed by a ;, so this always returns false.

{{{
function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
	if ( $width || $height ) {
		$editor = WP_Image_Editor::get_instance( $file );

		if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) );
			return false;

		$resized_file = $editor-&gt;save();

		if ( ! is_wp_error( $resized_file ) && $resized_file ) {
			unset( $resized_file['path'] );
			return $resized_file;
		}
	}
	return false;
}
}}}
",gandham
Next Release,18034,Incorrect URL for second page of search results,nacin,Multisite,3.2,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2011-07-08T08:28:09Z,2012-06-28T20:54:21Z,"I enter the Search Term (uptime) into search box in Adminbar

First page of results shows up fine at :-[[BR]]
https://domain.tld/blogname?s=uptime

Link to second page of search results shows blogname '''repeated''' :-[[BR]]
https://domain.tld/blogname/blogname/page/2/?s=uptime

If I edit the URL manually and visit :-[[BR]]
https://domain.tld/blogname/page/2/?s=uptime
it works fine.

Link to the third page of search results shows fine too :-[[BR]]
https://domain.tld/blogname/page/3/?s=uptime

Also fourth and fifth pages are OK.

Regular page links are fine :-[[BR]]
https://domain.tld/blogname/page/2/

I have tested on three different blogs hosted on this multisite.[[BR]]
Changed themes (P2 and Twenty Eleven), same results.[[BR]]
Tested with Firefox and Chrome browsers.",mark.waters
Next Release,16200,Multisite can't find site /foo at /FOO (gives 404),markjaquith,Multisite,3.1,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2011-01-12T13:36:32Z,2012-12-05T17:52:17Z,"Wordpress 3.0.4 and 3.1RC2 - multisite with subfolder installs.
Create a site at mysite.com/foo and a page on it at mysite.com/foo/about

Works as expected:
mysite.com/FOO/about goes to mysite.com/foo/about
mysite.com/foo loads foo's home page

Doesn't work as expected:
mysite.com/FOO loads foo's theme and gives a 404

So, it's only for the home page of a site on a multisite network that is addressed with a different capitalization scheme than the original.  going to any subpages works fine.",Madtownlems
Next Release,23073,Wrong RewriteRule in a local Multisite installation,markjaquith,Multisite,3.5,normal,normal,3.5.1,defect (bug),closed,needs-unit-tests,2012-12-28T21:59:47Z,2013-01-17T04:01:42Z,"- WampServer on Windows 8 
- Install Wordpress in a subdirectory of the document root(here a directory ""multitest"")
- Setup multisite in subfolder mode.

Rules displayed for .htaccess in the wordpress textarea of the network page are:

{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) c:\wamp\www\multitest/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ c:\wamp\www\multitest/$2 [L]
}}}
Result in the browser window of a subsite admin board is an error:
 Forbidden You don't have permission to access /multitest/C:wampwwwmultitest/wp-admin/ on this server. 

For the subsite itself, at least paths for css are broken.


RewriteRules should be:

{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /multitest/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /multitest/$2 [L]
}}}

Looking at code source in network.php, I fixed it for my personal use by adding: $rewrite_base = $base; before the htaccess code is displayed to users.

This could be done with local multisite installation only.
",Guy_fr
Next Release,18592,add trailingslashit to BLOGUPLOADDIR in ms-files.php,nacin,Multisite,3.3,normal,normal,3.3,defect (bug),closed,needs-unit-tests,2011-09-05T09:02:40Z,2011-09-06T15:41:57Z,"BLOGUPLOADDIR is trailingslashit'd inconsistently - since this value can be set by the user, adding trailingslashit to the constant value in ms-files.php will prevent broken images in sub-blogs when in Multisite mode
{{{
// WRONG
define( 'BLOGUPLOADDIR', $_SERVER['DOCUMENT_ROOT'] . ""/blogs.dir/{$the_id}/files"" );

// RIGHT
define( 'BLOGUPLOADDIR', $_SERVER['DOCUMENT_ROOT'] . ""/blogs.dir/{$the_id}/files/"" );

// CURRENT 
$file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );

// PROPOSED
$file = trailingslashit( BLOGUPLOADDIR ) . str_replace( '..', '', $_GET[ 'file' ] );
}}}
It's subtle, and hard to debug",wonderboymusic
Next Release,23192,Use get_user_by() in is_user_spammy(),SergeyBiryukov,Multisite,,normal,normal,3.6,enhancement,closed,needs-unit-tests,2013-01-13T19:25:18Z,2013-02-15T18:13:19Z,"Comes up after reading #23190.

Since `is_user_spammy` expects a user name, we should replace `get_user_id_from_string( $username )` with `get_user_by( 'login', $username )`. Same for the id.",ocean90
Next Release,21181,simplify and add filter to is_upload_space_available,westi,Multisite,3.4.1,normal,normal,3.5,enhancement,closed,needs-unit-tests,2012-07-06T21:06:52Z,2012-10-18T13:00:09Z,add a filter to the return value of is_upload_space_available in instances (such as on WordPress.com) when upload_space_check_disabled is set to true but an upload quota still exists.,jkudish
Next Release,21600,Reduce calls to sanitize_title_with_dashes in register_(post_type|taxonomy),ryan,Performance,,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2012-08-15T19:24:20Z,2012-08-20T17:25:07Z,"Follow-up: #21593

If #21593 goes in, the post type/taxonomy name is already sanitized with `sanitize_key()` and shouldn't go through `sanitize_title_with_dashes()` again.",ocean90
Next Release,14348,"If it's a HEAD request, stop after the head!",markjaquith,Performance,3.0,normal,normal,3.5,enhancement,closed,needs-unit-tests,2010-07-19T02:31:27Z,2012-10-31T23:01:14Z,"Right now, as far as I can tell, when a HTTP HEAD request is made against WordPress, we go ahead and produce the entire page content, only to have it ignored. Attached is a patch to repair this.

While not a huge issue, if you happen to receive lots of HEAD requests, this can make a large difference, as each HEAD request will be much faster and not waste precious resources.

I have tried to ensure that this patch, by being in send_headers, will produce a HEAD response functionally identical to the response header of GET/POST requests, as it should be.",mitchoyoshitaka
Next Release,15458,Lazy-load usermeta into the user object,nacin,Performance,,normal,normal,3.3,enhancement,closed,needs-unit-tests,2010-11-17T22:47:30Z,2011-12-18T16:28:20Z,"Currently we load all usermeta keys into the user object. This is not ideal, and it doesn't scale when you wish to store a lot of data in usermeta. (Example, BuddyPress profiles.)

We can leverage a magic `__get()` method for WP_User and fetch data on demand, instead of our current situation.",nacin
Next Release,10853,improve get_page_hierarchy,,Performance,2.8.4,normal,normal,3.0,enhancement,closed,needs-unit-tests,2009-09-25T23:34:12Z,2013-02-18T19:12:31Z,"current get_page_hierarchy has O(N*N) complexity. 
It is super slow when N is a few thousands.

We should improve this to O(N) using techniques similar to #10852. 
",hailin
Next Release,21970,404 error when a post has the same slug as with a deleted (trash) page.,,Permalinks,3.4.2,normal,normal,3.6,defect (bug),new,needs-unit-tests,2012-09-22T20:25:04Z,2013-04-23T20:14:25Z,"I don't know if this is a bug/issue but I'll share this anyway.

A user creates a new '''Page''', for example, with a title ""New Garden"". But decides to delete it/""Move to Trash"" without deleting it permanently. Then creates a new '''Post''' with the same title ""New Garden"". Viewing that post will result to a ""404"" page not found.",janintia
Next Release,13459,Conflict between post and page slugs/permalinks when permalink setting is set to /%postname%/,ryan,Permalinks,2.9.2,normal,normal,3.6,defect (bug),new,needs-unit-tests,2010-05-20T04:56:27Z,2013-03-03T03:01:45Z,"If Dashboard -> Settings -> Permalinks is set to /%postname%/, it is possible to create both a page and a post with the same slug. When viewing via the frontend, the page is always displayed.

I would have thought that WordPress should prevent a post and a page from having the same permalink.

Steps to reproduce:
1. Create and publish a page with any slug. eg. http://domain.com/test/.
2. Create and publish a blog post with the same slug. Wordpress says the permalink for the blog post is http://domain.com/test/, but when you visit that URL it displays the page instead.

I can reproduce this on my 2.9.2 install, as well as 3.0 trunk. I'm guessing the bug is present in earlier versions of WordPress as well.


Possibly related: #11863",jamescollins
Next Release,9064,URLs with commas are not pinged,,Pings/Trackbacks,2.7,high,major,3.6,defect (bug),new,needs-unit-tests,2009-02-07T11:07:20Z,2013-02-17T02:29:45Z,"I use following permalink format on my blog:[[BR]]
/%category%/%postname%,%post_id%[[BR]]
Unfortunately Wordpress doesn't ping them correctly - URLs extracted from post content don't have suffix with comma and post id.[[BR]]
[[BR]]
Fix: in file wp-includes/comment.php change line 1400 from:[[BR]]
$punc = '.:?\-';
[[BR]]
to:[[BR]]
$punc = '.:?\-,';
",sirzooro
Next Release,17817,do_action/apply_filters/etc. recursion on same filter kills underlying call,,Plugins,3.4.1,normal,normal,3.6,defect (bug),reopened,needs-unit-tests,2011-06-16T18:04:04Z,2013-05-17T10:24:15Z,"Affects @wp-includes/plugin.php: do_action, do_action_ref_array, apply_filters, apply_filters_ref_array, _wp_call_all_hook

When calling a specific hook from a function that was called through that same hook, the remaining hooked functions from the first iteration will be discarded.[[BR]]
This is due to the handling of the array of registered functions using internal array pointers instead of a more robust approach.

In my example, this problem arose when I tried to programmatically delete a menu in reaction to the removal of a category. I hooked into the delete_term action to do so, upon which another function hooked into delete_term would no longer fire.[[BR]]
The obvious workaround is to adjust the priorities accordingly, but it shouldn't be necessary.


The current implementation as in apply_filters is:
{{{
reset( $wp_filter[ $tag ] );

if ( empty($args) )
	$args = func_get_args();

do {
	foreach( (array) current($wp_filter[$tag]) as $the_ )
		if ( !is_null($the_['function']) ){
			$args[1] = $value;
			$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
		}

} while ( next($wp_filter[$tag]) !== false );
}}}

Using the following method instead, both iterations would develop properly:
{{{
if ( empty($args) )
	$args = func_get_args();

foreach ( $wp_filter[$tag] as $filters )
	foreach( (array) $filters as $the_ )
		if ( !is_null($the_['function']) ){
			$args[1] = $value;
			$value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
		}
}}}",kernfel
Next Release,24159,Chats with spaces in the 'speaker' not parsing correctly,,Post Formats,trunk,normal,major,3.6,defect (bug),new,needs-unit-tests,2013-04-22T17:37:04Z,2013-05-17T22:53:29Z,"Since #23625 is closed and we were asked to make a new ticket, the issue I mentioned still remains.

Related to #23947 - currently this is broken in instances where chat names have spaces.

​http://test.ipstenu.org/testing-1.2013/

That has the post content as follows:


{{{
Nigel Tufnel: The numbers all go to eleven. Look, right across the board, eleven, eleven, eleven and…

Marti DiBergi: Oh, I see. And most amps go up to ten?

Nigel Tufnel: Exactly.

Marti DiBergi: Does that mean it’s louder? Is it any louder?

Nigel Tufnel: Well, it’s one louder, isn’t it? It’s not ten. You see, most blokes, you know, will be playing at ten. You’re on ten here, all the way up, all the way up, all the way up, you’re on ten on your guitar. Where can you go from there? Where?

Marti DiBergi: I don’t know.

Nigel Tufnel: Nowhere. Exactly. What we do is, if we need that extra push over the cliff, you know what we do?

Marti DiBergi: Put it up to eleven.

Nigel Tufnel: Eleven. Exactly. One louder.

Marti DiBergi: Why don’t you just make ten louder and make ten be the top number and make that a little louder?

Nigel Tufnel: These go to eleven.
}}}

But nothing shows.

You can see the exact same issue here: http://twentythirteendemo.wordpress.com/2013/02/10/never-say-never-say-never/

James Bond's lines are never shown.",Ipstenu
Next Release,23572,Add functions to parse Audio / Video data out of arbitrary content or a post,markjaquith,Post Formats,,normal,normal,3.6,enhancement,closed,needs-unit-tests,2013-02-21T06:34:57Z,2013-04-12T18:02:53Z,"= Scenarios

== Audio

After realizing that a post has a format of audio but no metadata for audio:
- Theme does not support Audio, but the content contains an <audio>, <object>, <embed>, or <iframe>
- Theme does not support Audio, but the content is a URL
- Theme does not support Audio, but the first line of content is a URL followed by a new line(s) and some commentary
- Theme does not support Audio, but the post has attached audio, and core or a plugin has an [audio] shortcode
- Theme does not support Audio, but the post has attached audio, and core or a plugin does not have an [audio] shortcode

Introduce `the_audio()`, `get_the_audio( $id = 0 )`, `get_post_audio( $post_id = 0 )`, `get_content_audio( &$content, $remove = false )`

== Video

After realizing that a post has a format of video but no metadata for video:
- Theme does not support Video, but the content contains an <video>, <object>, <embed>, or <iframe>
- Theme does not support Video, but the content is a URL
- Theme does not support Video, but the first line of content is a URL followed by a new line(s) and some commentary
- Theme does not support Video, but the post has attached video, and core or a plugin has an [video] shortcode
- Theme does not support Video, but the post has attached video, and core or a plugin does not have an [video] shortcode

Introduce `the_video()`, `get_the_video( $id = 0 )`, `get_post_video( $post_id = 0 )`, `get_content_video( &$content, $remove = false )`

== Helper functions

Introduce `get_tag_regex()` and `shortcode_exists( $tag )`
",wonderboymusic
Next Release,18855,get_attached_file( $post_id ) wrongly(?) returns the uploads directory when $post_id is not a valid attachment,nacin,Post Thumbnails,3.2.1,normal,normal,3.4,defect (bug),closed,needs-unit-tests,2011-10-04T05:46:41Z,2012-04-27T16:09:10Z,"The function `get_attached_file( $post_id )` wrongly(?) returns the uploads directory when `$post_id` is not a valid attachment. For example, if I run the following code:

{{{
$attached_file = get_attached_file(0);
}}}

It might return the following on my machine:
{{{
/Users/mikeschinkel/Sites/mysite/public_html/wp-content/uploads/
}}}

I would instead expect it to simply return `false` indicating that no attached file was found:
{{{
false
}}}

Here is the code I wrote that caused me to recognize the problem:

{{{
function has_valid_file_attached( $attachment_id ) {
  return file_exists( get_attached_file( $attachment_id, true ) ) );
}
}}}

Here's the hack I had to write instead:

{{{

function has_valid_file_attached( $attachment_id ) {
  $attached_file = get_attached_file( $attachment_id, true );
  if ( '/' == substr( $attached_file, -1, 1 ) )
    return false;

  if ( ! file_exists( $attached_file ) )
    return false;

  return true;
}
}}}

I have attached a patch that simply returns `false` when the value returned by the internal call to `get_post_meta( $attachment_id, '_wp_attached_file', true )` is an empty string.  I would be surprised to find it many people (anyone?) used this function for it's side-effect to return the root upload path so I doubt using this path would break anything. 

It's not a critical patch because there is an easy workaround, but it cost me extra time to figure out why my `has_valid_file_attached()` function wasn't reporting `false` when the attachment was missing, so it would be nice to keep someone else from having to waste the same time in the future.",mikeschinkel
Next Release,22882,get_post_ancestors() now returns false in addition to array(),nacin,Post Types,3.5,normal,normal,3.5.1,defect (bug),closed,needs-unit-tests,2012-12-12T11:43:49Z,2013-01-15T19:14:08Z,"Under [http://core.trac.wordpress.org/browser/branches/3.4/wp-includes/post.php#L428 3.4, get_post_ancestors()] would always return an array, in error conditions, it would return an empty array.[[BR]]
Under [http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L675 3.5, get_post_ancestors()] returns an array of ancestors, as in 3.4, except, in the case where the $post passed in is NULL/FALSE/0/empty, then it now returns false.

This results in warning such as this: `Warning: Invalid argument supplied for foreach() ` when the result of get_post_ancestors() was used directly in a loop,

Admitably, it's bad code which triggers this, calling get_post_ancestors() with the global `$post` object before it's set up in this case, but it's still a chance in behaviour which I felt needs documenting on trac. This is either a instant 'We should just return an array()' or 'wontfix: Plugins are doing it wrong and should fix their code' ticket.

This was found by debugging http://wordpress.org/support/topic/does-wordpress-35-still-support-is_tree?",dd32
Next Release,21779,"Querying Taxonomies (Tag) containing the sequence ""-נ-"" *still* fails.",nacin,Query,,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2012-09-03T15:10:37Z,2012-09-23T17:50:38Z,"The issue described in #13413

Still exists on IIS at least and seems to have only ever been fixed for a brief period of time between 3.1 and 3.1.1

Same steps, latest trunk:
1. Created a Tag ""test -נ- end""
2. Added the Tag to a Post
3. Pressed that Tag in my Tag Cloud
4. Get the not Found Message.

System:
* Windows/IIS 7
* PHP 5.4.6

Changing the preg_*() calls in parse_tax_query() to include the /u modifier or changing \s to \r\n\t do seem to fix this issue.

Tested WordPress 3.1, 3.1.1, 3.1.4, 3.2, 3.4.1 and latest trunk.

I've tried to track down the history of this bug. It is ""fixed"" in 3.1, but after 3.1.1 tag queries with the letter nun returned all posts:
* http://core.trac.wordpress.org/changeset/17500/trunk/wp-includes/query.php

The new preg_split() with the problematic \s is in effect, which splits the tag into two (non-existing) terms. Due to a (different) bug fixed in 3.2 all posts are returned.

After 3.2 no posts are returned.
* http://core.trac.wordpress.org/changeset/17686/trunk/wp-includes/taxonomy.php

The underlying cause of the bug, unfortunately, has not been fixed.

",rstern
Next Release,16373,Wrong page loaded requesting custom registered query_vars when correcting is_* for page_on_front requests,markjaquith,Query,3.0,high,normal,,defect (bug),closed,needs-unit-tests,2011-01-25T21:51:12Z,2012-11-07T17:01:47Z,"* Install vanilla WP 3.0.4.
* Register a new 'qv_test' query var in the default theme's function.php file.

{{{
	function custom_query_vars_test ($vars) {
		$vars[] = 'qv_test';
		return $vars;
	}
	add_filter('query_vars','custom_query_vars_test');
}}}

* Create a 'Home' page.
* Under Settings &rarr; Reading set the 'Front page displays' setting to 'A static page (select below' and set the 'Front page:' setting to the 'Home' page.
* Load the front end page.
* Add the 'qv_test' query var to the request (e.g. http://blogurl.com/?qv_test=test)

The wrong page is loaded.

Adding an invalid query_var (one that is not registered) continues to correctly load the page.

The issue occurs regardless of permalink configuration.

This issue appears related to #12047 and is either a regression from the fixes applied to that issue, or is simply case not covered by the fixes. Changes in revision [14445] also relate to #12047.

This issue still exists as of at least 3.0.4 up to 3.1-RC3.

",jondavis
Next Release,18158,Meta Query for posts with a meta key not set (IS NULL).,georgestephanis,Query,3.2.1,normal,normal,3.5,enhancement,closed,needs-unit-tests,2011-07-18T15:43:12Z,2013-04-26T21:30:19Z,"In the meta_query, we should be able to query for posts that don't have a certain meta key at all. I suggest a syntax something like this:

{{{
... 
meta_query => array(
        array(
            'key' => '_my_special_meta',
            'compare' => 'NOT EXISTS'
        )
    )
...
}}}

Alternately this could be handled invisibly along the lines of:
{{{
... 
meta_query => array(
        array(
            'key' => '_my_special_meta',
            'value' => 'a_value_this_might_have',
            'compare' => '!='
        )
    )
...
}}}

This could be done using a left join, and not some sort of special case like above.  Since it's a left join we may have to be careful that we don't end up with a bunch of junk rows in the query, however.",johnnyb
Next Release,19729,"WP_Meta_Query is inefficient when only specifying keys in ""OR"" query",ryan,Query,3.3,normal,normal,3.5,enhancement,closed,needs-unit-tests,2012-01-03T21:46:54Z,2013-04-15T22:48:26Z,"Suppose I have a WP_Query like so:


{{{
$query = new WP_Query( array( 'meta_query' => array( 
	array( 'key' => 'foo' ),
	array( 'key' => 'bar', 'value' => 'val2' ),
	array( 'key' => 'baz' ),
	array( 'key' => 'froo' ) 'relation' => 'OR' ) ) );
}}}

Currently, `WP_Meta_Query` will JOIN 4 copies of postmeta and use one JOIN per key - however, when using a relation of OR, it's not necessary to use more than one meta JOIN for the key-only queries.

The attached patch will pull out all the ""key only"" queries and use a single JOIN for them, leaving the remaining quires in-tact as they were before.

This can only be done with an OR query, of course.

Below is the SQL query before the patch:

{{{
SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
INNER JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id)
INNER JOIN wp_postmeta AS mt3 ON (wp_posts.ID = mt3.post_id) WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND (wp_postmeta.meta_key = 'foo'
OR  (mt1.meta_key = 'bar' AND CAST(mt1.meta_value AS CHAR) = 'val2')
OR mt2.meta_key = 'baz'
OR mt3.meta_key = 'froo' ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
}}}

The same after the patch:

{{{
SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id
INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND (wp_postmeta.meta_key = 'foo'
OR wp_postmeta.meta_key = 'baz'
OR wp_postmeta.meta_key = 'froo'
OR  (mt1.meta_key = 'bar' AND CAST(mt1.meta_value AS CHAR) = 'val2') ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
}}}

I ran this on a large site (>100k posts), so not sure if the performance gains will be so drastic for smaller sites. Before the patch, with 3 JOINS took around 43seconds. After the patch with 1 Join, 5.2ms. Not sure why the hug difference, presumably multiple JOINS was killing it somehow.",joehoyle
Next Release,21786,remove_cap can't unset a negative capability,ryan,Role/Capability,,normal,minor,3.5,defect (bug),closed,needs-unit-tests,2012-09-04T09:17:13Z,2012-09-21T13:42:29Z,"WP_User::add_cap() accepts two parameters -- the second decides if a user does or does not have the capability. I.E.:
{{{
$user->add_cap( 'foo', false );
}}}
means a user will not have a capability that any role otherwise allows.

WP_User::remove_cap( 'foo' ) incorrectly does an empty() check rather than ! isset(), preventing negative capabilities from being unset from a users individual capabilities array.

This makes it impossible to revert negative capabilities without first making them positive, and then removing them.

See: #9128",johnjamesjacoby
Next Release,9264,Self closing shortcodes,westi,Shortcodes,2.7.1,normal,normal,3.3,defect (bug),closed,needs-unit-tests,2009-03-02T23:06:19Z,2012-11-01T00:15:05Z,"First bug report, be gentle.

I've noticed that the shortcode regex doesn't take note of the self closing ""/"" properly, and continues to search for a closing tag within the content passed to it.

I think it should stop looking for a closing tag if the tag is self closing. See the following example:

{{{
[test id=""1""/] first self closed, now [test id=""2""]with content[/test]
}}}

This gets sent to the shortcode callback function as:

'''Attributes:''' id=""1""
'''Content:'''  first self closed, now [test id=""2""]with content

I've posted some further tests at http://blograndom.com/tests/shortcode/ , to prove the bug exists and my proposed fix (see attached diff file). The fix also offers slight speed enhancements for self closing divs because it stops looking.

It looks like the trunk version of shortcodes.php is slightly different to 2.7.1, but I've applied the patch from the trunk version which still seems to have the same problem.",rb-cohen
Next Release,10082,Shortcodes need a character separating them to work,,Shortcodes,2.8,high,major,3.3,defect (bug),closed,needs-unit-tests,2009-06-09T20:21:27Z,2012-11-01T00:15:08Z,"the following works:

{{{
[media id=""448""]test[/media]
[media id=""448""]test[/media]
}}}

the following doesn't:

{{{
[media id=""448""]test[/media][media id=""448""]test[/media]
}}}
",Denis-de-Bernardy
Next Release,17689,Terms should not be sanitized inside term_exists(),,Taxonomy,3.2,normal,normal,3.6,defect (bug),new,needs-unit-tests,2011-06-05T03:49:48Z,2013-05-05T04:05:44Z,"When adding a term to a post, the title of the term is sent through term_exists(). If term_exists finds and returns the ID of an existing term for the passed taxonomy, that ID is added to the post object. If no term is found, it returns false and a new term is created for that taxonomy with the same title that was passed to term_exists().

The problem is that term_exists() uses sanitize_title($term) on line 1457 of wp-includes/taxonomy.php while wp_insert_term uses stripslashes($name) on line 1985 of the same file.

This doesn't cause a problem in many circumstances, but if the term title happens to be something like $$$, that means it will always be added correctly in wp_insert_term() but never found as existing in term_exists(). The result is that every time you add $$$$ to another post it gets added as a new term with a unique slug so that you have  several terms with the title $$$$ for the same taxonomy but different IDs. 

The attached patch corrects that by passing the term title through stripslashes in term_exists() rather than through sanitize_title().

I haven't found any undesired side effects in testing.",blepoxp
Next Release,20590,is_tax() with term parameter returns true for any taxonomy with that term,,Taxonomy,,normal,minor,3.5,defect (bug),closed,needs-unit-tests,2012-05-01T16:51:45Z,2012-10-18T12:59:26Z,"I have two custom taxonomies, 'body' and 'operations', assigned to different custom post types.

Both taxonomies contain the term 'shoulder'

is_tax('operations','shoulder') returns true both when viewing the 'shoulder' archive for the taxonomy 'operations' and when viewing the archive page for the term 'shoulder' in the taxonomy 'Body-Parts'

Therefore, is_tax() is returning true for the term, and ignoring which taxonomy it is in.

The only way I can get it to return true only when viewing the 'shoulder' archive for 'operations' is by  is_tax( 'operations', 'shoulder') && is_tax('operations')

Version is 3.3.2
",petercarlill
Next Release,11099,Additonal unit tests for quotes formatting.,westi,Unit Tests,2.9,normal,normal,2.9,defect (bug),closed,,2009-11-07T23:28:13Z,2009-12-07T19:06:52Z,"As per #10606, a patch for the file http://svn.automattic.com/wordpress-tests/wp-testcase/test_includes_formatting.php",xibe
Next Release,19456,Globalize $wp_rewrite in wp-settings.php,,Unit Tests,1.5,normal,normal,3.4,defect (bug),closed,,2011-12-06T10:54:23Z,2011-12-20T21:14:20Z,"See #17749, [attachment:globalise_wp_rewrite.diff:ticket:17749] from mtorrent.",nacin
Next Release,21115,Remove ancient wp-settings.php global unsetting code,nacin,Unit Tests,,normal,normal,3.5,defect (bug),closed,,2012-06-29T20:56:09Z,2012-06-29T20:57:10Z,"We have this:

{{{
// Ensure these global variables do not exist so they do not interfere with WordPress.
unset( $wp_filter, $cache_lastcommentmodified );
}}}

It used to include more variables, but they were removed when a few of us took an axe to wp-settings.php back in 3.0.

I suggest we remove both. $cache_lastcommentmodified can easily become a static variable within that function (I mean, we're dealing with pre-1.5 code here) and a lot of things would be broken if people overrode WordPress globals prior to startup, not just $wp_filter.",nacin
Next Release,13407,Test-Suite: Allow wp-test multiple classes and exclusion of,westi,Unit Tests,3.0,normal,normal,,defect (bug),closed,,2010-05-16T01:43:09Z,2010-05-29T17:21:26Z,"Improvement to the -t commandline switch.

Examples:

Run all tests but TestLargeThemeDir, TestImportWP, TestWPQueryPosts, WPTestGalleryPost
{{{
$ wp-test -t ""! TestLargeThemeDir, TestImportWP, TestWPQueryPosts, WPTestGalleryPost""
}}}

Only run Test_Clean_Pre and Test_Seems_UTF8
{{{
$ wp-test -t Test_Clean_Pre,Test_Seems_UTF8
}}}

Additionally a .cmd file helps to start right away on windows.


Related: #12277, #11867",hakre
Next Release,12277,Test-Suite: Cross-Plattform portability: No Color Codes in Windows Shell,westi,Unit Tests,,normal,normal,,defect (bug),closed,,2010-02-18T19:04:08Z,2012-11-25T08:56:05Z,"The Windows Shell does not provide any colors. Well to be more precise it does support colors but not the way {{{PHPUnit_TextUI_ResultPrinter}}} handles them.

A fix is to not output color-codes on windows.",hakre
Next Release,11892,Test-Suite: make wp_die() a pluggable function,westi,Unit Tests,3.0,normal,blocker,3.0,defect (bug),closed,,2010-01-14T00:51:10Z,2010-05-18T10:27:17Z,"There are multiple occurences of the die() (and perhaps exit()) statement within the code. 

Those can be a blocker in running the testsuite. I suggest to replace those with a call to a new function called wp_exit(); which is plugable so that the testsuite can replace it.

Otherwise it's not possible to test code containing those statements. At least I'm not aware of a method to do so.",hakre
Next Release,24207,Unit tests for widgets.php,maxcutler,Unit Tests,3.5.1,normal,normal,3.6,defect (bug),closed,,2013-04-27T23:52:42Z,2013-04-28T00:10:58Z,Beginning a unit test file for widgets.php,jupiterwise
Next Release,23928,Update ajax autosave unit tests for 3.6,,Unit Tests,trunk,normal,normal,3.6,defect (bug),closed,,2013-04-03T18:19:22Z,2013-05-16T15:25:50Z,"The ajax autosave unit test is failing with trunk.

Update it to be compatible with the following core changes:

* Move nopriv_autosave to nopriv_heartbeat [23692]
* Remove use of `$login_grace_period` [23699]
* Send post_type with autosave [16657] (this was incorrect in the original unit test, I'm not sure why it's just now breaking)
* Change `$_POST['post_ID']` to `$_POST['post_id']` [23683]",kurtpayne
Next Release,23066,WordPress 3.5 Duplicate Entry,,Unit Tests,3.5,normal,normal,,defect (bug),closed,,2012-12-28T14:16:15Z,2013-05-15T08:43:37Z,"WordPress 3.5 MU when running PHP 5.2.17/5.3.x/5.4.x seems to have some duplicate install code. 
Detected by Travis-CI. 

Example build where error is present:
https://travis-ci.org/chriscct7/Easy-Digital-Downloads/jobs/3855494
3/4 of the way down you'll find the following:

{{{
Installing network…
Installing sites…
WordPress database error Duplicate entry '1' for key 'PRIMARY' for query INSERT INTO `wp_terms` (`term_id`,`name`,`slug`,`term_group`) VALUES (1,'Uncategorized','uncategorized',0) made by wp_install, wp_install_defaults
WordPress database error Duplicate entry '1-category' for key 'term_id_taxonomy' for query INSERT INTO `wp_term_taxonomy` (`term_id`,`taxonomy`,`description`,`parent`,`count`) VALUES (1,'category','',0,1) made by wp_install, wp_install_defaults
}}}

",chriscct7
Next Release,14057,Wordpress MU 2.91 Test Suite Errors,,Unit Tests,2.9.1,normal,normal,,defect (bug),closed,,2010-06-23T05:25:51Z,2010-06-23T06:17:59Z,"I'm trying to run the latest version of the test suite (http://svn.automattic.com/wordpress-tests/) against wordpress MU by passing ""-v mu"" on the command line, and I get a whole slew of errors related to database tables being missing:

{{{
WordPress database error Table 'wordpress_test.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'wpmu_sitewide_plugins' AND site_id = 1 made by require_once, get_site_option
...
WordPress database error Table 'wordpress_test.wp_users' doesn't exist for query SELECT * FROM wp_users WHERE user_login = 'd87193701cb6b55a91a34b0f049d22e4' made by wp_install, username_exists, get_userdatabylogin, get_user_by
...
WordPress database error Table 'wordpress_test.wp_users' doesn't exist for query INSERT INTO wp_users (user_pass,user_email,user_url,user_nicename,display_name,user_registered,user_login) VALUES ('$P$BGRXqTL2Nqv3AGONWtsOSf9cPRfngW.','205a27b062b5876ffd9a5301166b9710@example.com','','d87193701cb6b55a91a34b0f049d22e4','d87193701cb6b55a91a34b0f049d22e4','2010-06-21 16:19:18','d87193701cb6b55a91a34b0f049d22e4') made by wp_install, wp_create_user, wp_insert_user
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query SELECT * FROM wp_usermeta WHERE user_id = 96 AND meta_key = 'first_name' made by wp_install, wp_create_user, wp_insert_user, update_usermeta, delete_usermeta
...
...
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query DELETE FROM wp_usermeta WHERE user_id = 96 AND meta_key = 'last_name' made by wp_install, wp_create_user, wp_insert_user, update_usermeta, delete_usermeta
...
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query SELECT * FROM wp_usermeta WHERE user_id = 96 AND meta_key = 'admin_color' made by wp_install, wp_create_user, wp_insert_user, update_usermeta
...
WordPress database error Table 'wordpress_test.wp_users' doesn't exist for query SELECT * FROM wp_users WHERE ID = 96 LIMIT 1 made by wp_install, wp_create_user, wp_insert_user, WP_User->WP_User, get_userdata
...
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query SELECT * FROM wp_usermeta WHERE user_idTest Suite
Test_Clean_Pre
.FF.
}}}

Then some of the tests start to run, and when it gets to WPTestActions, I get these errors:


{{{
WPTestActions
..........Action Time: 0.06314039 (0.00012628 each)
...
Fatal error: Cannot use object of type Closure as array in C:\wordpress\wordpress-mu\wp-includes\plugin.php on line 680
= 96 AND meta_key = 'default_password_nag' made by wp_install, update_usermeta
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ('96','default_password_nag','1') made by wp_install, update_usermeta
WordPress database error Table 'wordpress_test.wp_users' doesn't exist for query SELECT * FROM wp_users WHERE ID = 96 LIMIT 1 made by wp_install, WP_User->WP_User, get_userdata
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query SELECT * FROM wp_usermeta WHERE user_id = 0 AND meta_key = '' made by wp_install, WP_User->set_role, update_usermeta
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ('0','','a:1:{s:13:\""administrator\"";b:1;}') made by wp_install, WP_User->set_role, update_usermeta
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query SELECT * FROM wp_usermeta WHERE user_id = 0 AND meta_key = 'wp_1_user_level' made by wp_install, WP_User->set_role, WP_User->update_user_level_from_caps, update_usermeta
WordPress database error Table 'wordpress_test.wp_usermeta' doesn't exist for query INSERT INTO wp_usermeta (user_id,meta_key,meta_value) VALUES ('0','wp_1_user_level','10') made by wp_install, WP_User->set_role, WP_User->update_user_level_from_caps, update_usermeta
WordPress database error Table 'wordpress_test.wp_users' doesn't exist for query SELECT * FROM wp_users WHERE ID = 96 LIMIT 1 made by wp_install, wp_new_blog_notification, WP_User->WP_User, get_userdata
WordPress database error Table 'wordpress_test.wp_blogs' doesn't exist for query SELECT * from wp_blogs where blog_id=1
PHP Fatal error: Cannot use object of type Closure as array in C:\wordpress\wordpress-mu\wp-includes\plugin.php on line 680
}}}

",dvmorris
Next Release,21993,"Add WP_DOING_TESTS constant, check for it in WP_Ajax_Response",,Unit Tests,3.5,normal,normal,,enhancement,closed,,2012-09-25T21:04:51Z,2012-09-26T12:24:32Z,"I'm writing unit tests for #21767 that need to call functions such as `wp_ajax_add_tag()`. These functions instantiate a `WP_Ajax_Response` object and `send()`, which sends HTTP headers and causes the unit tests to fail.

So far I can't find a way to keep the headers from being sent (anyone know how to do this?) so I'm opening this ticket as an alternate solution: introduce a WP_DOING_TESTS constant (defined in the bootstrap.php of the unit testing framework) and return out of the send() function if that constant is set to true.

Again, happy to be told there is a better way to do this, but definitely want to be able to get testing coverage of these ""controller"" functions.",alexkingorg
Next Release,24208,Add more wp-includes/cache.php test coverage,maxcutler,Unit Tests,3.5.1,normal,normal,3.6,enhancement,closed,,2013-04-28T00:16:12Z,2013-04-28T00:20:57Z,Added tests for wp_cache_init() and wp_cache_replace().,tollmanz
Next Release,21742,Allow unit tests to override is_*_admin(),ryan,Unit Tests,3.4.1,normal,normal,3.5,enhancement,closed,,2012-08-30T18:01:36Z,2012-09-01T11:20:33Z,"Unit tests sometimes need to fake being in the user, network, or blog admin or on the front page. This is currently impossible due to the use of constants. A possible solution is to consult the current screen if it is setup and fallback to the constants otherwise. Alternatively, add filters in the is_*_admin() functions.",ryan
Next Release,23499,Rename phpunit.xml to phpunit.xml.dist,nacin,Unit Tests,trunk,normal,normal,3.6,enhancement,closed,,2013-02-18T09:53:30Z,2013-03-03T20:26:35Z,"PHPUnit supports both `phpunit.xml` and `phpunit.xml.dist` where `phpunit.xml` has higher priority. 

This is ideal for cases like ours when we distribute the testing suite. By using `phpunit.xml.dist` we will allow users to add their own `phpunit.xml`, instead of editing ours.",nbachiyski
Next Release,17749,Faster and phpunit runner-compatible unit tests,nbachiyski,Unit Tests,,normal,normal,3.3,feature request,closed,,2011-06-10T13:25:47Z,2013-02-28T14:18:35Z,"Currently the WordPress unit-tests use a custom test runner and most of the test cases replace all the data in the database tables before they run.

Since we are using PHPUnit, we should use the phpunit test runner. This gives us: in-editor test running, CI, easier creation of more fine-grained suites. All these will make running the testt easier, which is a good step towards more people running them.

Replacing the data before each testcase run is often slow. The data isn't replaced after each test withing the case, though, which is highly error-prone, because we need to account for any changes of the data made during the tests.

Here is my take on solving these problems:

 * Create a very simple PHPUnit test suite, which loads all test classes from the tests directory.
 * Install WordPress once, before running any tests.
 * Make all the tables InnoDB.
 * In the default WordPress test case class start a transaction on {{{setUp}}}.
 * {{{ROLLBACK}}} all the changes on {{{tearDown}}}.
 * Reinitalize some global variables and clean cache on {{{setUp}}}.

This way we install WordPress only once (fast) and at the same time we don't need to care about the changes we make during each test (not error prone).

This approach, however, doesn't favor having prepared datasets in advance (shared fixtures). Which isn't bad. I strongly believe that shared fixtures more harm than good. They create unneeded dependencies between data, make test unclear, because the data lives far away, and are very sensitive to change, because many tests use the same data. If the tests are small enough (they should) fresh fixtures won't slow the test, the data will be in the test itself and no external data change would break them.

In order to implement the test class and suite, a couple of changes to core were needed:
 * WordPress is loaded in a function call (that's how {{{phpunit}}} loads tests), so some variables need to be explictly initialized as globals (I guess there are more, which will be revaled after more test coverage).
 * Some filters were needed in order to be able to make the tables InnoDB (easier to implement than changing the enging after creation).

The patch is attached.

The test case class and runner code is at https://github.com/nb/wordpress-tests (the current repo doesn't have branch structure, otherwise I would have put it there).",nbachiyski
Next Release,20652,"Install plugins with FTP upload, virtual subdomain, bad base dir?",dd32,Upgrade/Install,3.3.2,normal,normal,3.6,defect (bug),reopened,needs-unit-tests,2012-05-10T12:02:48Z,2013-01-06T05:29:47Z,"Hi anybody!
I have problem with install plugins with FTP module in WP.

Everything show as OK, but plugin directory is bad. I have subdomain

sub.something.com - this is virtual subdomain from mod_rewrite

dirs are

/www/something.com/something.com[[BR]]
/www/something.com/sub.something.com - here is WP installation, subdomain is virtual from rewrite in httpd.conf

After install - WP say everything OK - but one thing is bad.[[BR]]
Upload is in bad directory - plugin I can found in[[BR]]
/www/something.com/something.com/plugins[[BR]]
no in /www/something.com/sub.something.com/plugins[[BR]]

Is here some way to fix it automatticaly or I can must edit config and basedir of ftp? Why is here this bug?

Thank you !

Pavel
",rajcz
Next Release,21533,Error suppression in wp-db is lame: Part 2,,Warnings/Notices,3.4.1,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2012-08-10T00:01:42Z,2012-08-14T20:34:12Z,"Previously: #15402

This was fixed in [16321] however that was built upon [16320] and both were reverted in [16336] because it ""Breaks things"". What things it breaks I have no idea though (bad westi for not using a better commit message ;)). However I assume it was [16320] that broke things and not [16321].

[16321] seems perfectly valid to me and we should re-apply it along with a fix to `__get()` that throws a warning when `$result` isn't set yet.",Viper007Bond
Next Release,17670,Errors in get_page_by_path(),,Warnings/Notices,3.1,highest omg bbq,blocker,3.3,defect (bug),closed,needs-unit-tests,2011-06-03T03:48:30Z,2011-11-08T16:00:18Z,"Example of accessing an Image through it's not post url:

{{{
Expected url: /2008/06/10/post-format-test-gallery/canola2/
Accessed url: /canola2/
}}}

get_page_by_path() will result in these 2 warnings:
{{{
NOTICE: wp-includes\post.php:3167 - Trying to get property of non-object
NOTICE: wp-includes\post.php:3162 - Trying to get property of non-object
}}}

Similar warnings are now emmited by trunk when accessing child pages as well",dd32
Next Release,23219,Duplicate enclosure metadata created because of disagreement on meta field formatting,,XML-RPC,2.8,normal,normal,3.6,defect (bug),new,needs-unit-tests,2013-01-16T21:48:42Z,2013-04-29T03:10:09Z,"Years ago I reported an issue in Ticket #7773 that the enclosures would be duplicated each time the post was edited and resubmitted through the XMLRPC API. That bug was fixed in [10383] but a nuance was overlooked that causes this kind of duplication to occur with every edit if the ORIGINAL custom field meta for the enclosure was generated by the automatic content-scraper in WordPress.

If a post with links to ""enclosure"" type files is submitted either through the web interface or through the XMLRPC API, it will automatically generate the insertion of enclosure metadata as a custom field with fragile-structured content of the format:

{{{add_post_meta( $post_ID, 'enclosure', ""$url\n$len\n$mime\n"" );}}}

But the XMLRPC implementation, where the attempt is made to avoid generating duplicates, uses a slightly different fragile template, with no trailing newline:

{{{$encstring = $enclosure['url'] . ""\n"" . $enclosure['length'] . ""\n"" . $enclosure['type'];}}}

To make a long story short: the attempt to detect an existing enclosure on the post always fails because the existing enclosure string has a newline, and the XMLRPC-based one does not.

I propose that this be fixed by at enacting 1 and probably also 2:

1. Make sure duplicate detection method insensitive to trailing whitespace. This will fix the bug in a way that doesn't require retroactively ""fixing"" the existing stored metadata with trailing newline.

2. Change the format of the ""scraped"" enclosure generation to match the format used by XMLRPC. Either with or without the newline would probably be fine, but it seems cleaner to stick with the one that doesn't require a trailing newline, just three blobs of text separated by newlines. It also seems lucky that the last blob is a MIME type and thus would never have a meaningful newline at the trailing end.

I'm attaching a patch that achieves both of these goals. I report this to the XML-RPC component because that's the impact is, even if some of the issue is in the default scraping code from functions.php.

I'm a little less certain about how to tackle a unit test for these cases, but if somebody wants to point me in the right direction I can take a hack at that too.
",redsweater
Next Release,19733,XML-RPC returns invalid dates if the date is zero,westi,XML-RPC,3.3,normal,normal,3.4,defect (bug),closed,needs-unit-tests,2012-01-04T14:04:38Z,2012-04-04T21:32:29Z,"When a post has a 'pending' status, {{{post_date_gmt}}} is set to {{{0000-00-00 00:00:00}}} as a marker to update {{{post_date}}} when it's saved (see #5698). 

mysql2date then proceeds to turn that date into a negative one, and IXR_Date destroys the thing a bit more, so {{{0000-00-00 00:00:00}}} turns into {{{-0001113TT0::0::00}}}, which is an invalid ISO8601 date",koke
Next Release,20665,wp.getUsersBlogs method runs out of memory when there are too many blogs,nacin,XML-RPC,3.0,normal,normal,3.5,defect (bug),closed,needs-unit-tests,2012-05-13T14:05:31Z,2012-06-30T11:49:03Z,wp.getUsersBlogs method runs out of memory when there are too many blogs. But with the proposed changes (by avoiding switch_to_blog and restore_current_blog) you can list more blogs with same amount of memory.,mohanjith
Next Release,11150,[wp-xmlrpc] need wp.editCategory,josephscott,XML-RPC,,normal,normal,,feature request,closed,needs-unit-tests,2009-11-16T12:00:50Z,2012-07-14T15:01:29Z,"In XML-RPC is anything like wp.editCategory
Joseph Scott wrote:
""
Hmmm, seems like we managed to miss that one.
Want to add a ticket for that: trac.wordpress.org
""
here: http://lists.automattic.com/pipermail/wp-xmlrpc/2008-September/000271.html

So I add a ticket :]",marcinpl87
Future Releases,11531,Some taxonomy names should be disallowed,ryan,Cache,2.9,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2009-12-20T14:30:46Z,2013-05-16T15:05:44Z,"I haven't tested, but can't we can get all sorts of weird bugs (some of which could have potential side effects in the security department) if a term taxonomy is called users, userlogins, posts, etc.?

the reason are lines such as:

{{{
wp_cache_add($term->term_id, $term, $term->taxonomy);
}}}
",Denis-de-Bernardy
Future Releases,14485,Taxonomy hierarchy cache isn't properly refreshed,,Cache,3.0,high,normal,Future Release,defect (bug),new,needs-unit-tests,2010-07-31T03:11:13Z,2013-04-30T20:46:25Z,"I've developed a plugin that can create parent and children categories at the same time. It works well at 2.8.6 but it doesn't work as what I expect at 3.0.

When I create new parent and children categories at the same time, it only shows parent category in the Categories dashboard, but the children category is actually created. If I create another category or delete one category, the children category shows up. I think it should be a problem of wordpress cache, but I have no idea where to start tracing.

I use wp_create_category at wp-admin/includes/taxonomy.php to create categories. Besides, I have tried clean_term_cache but it didn't help. And I didn't activate other plugins when I tested this plugin.

It happened exactly when creating NEW parent and children categories.",thealien
Future Releases,15256,?cat=## permalinks do not redirect when category is a parent,,Canonical,3.0.1,high,normal,Future Release,defect (bug),reopened,needs-unit-tests,2010-10-30T05:44:18Z,2013-02-25T13:08:53Z,"One of my plugin users reported this while using dropdowns to display his categories: http://wordpress.org/support/topic/plugin-my-category-order-multiple-widget-support-broken

I was able to duplicate it on my own site in 3.0.1. Any category that has children displayed in the dropdown will redirect to /?cat=## instead of the the friendly /category-name permalink when selected. Select any other category or one of the children and they redirect correctly.

Any thoughts?",froman118
Future Releases,18734,Subcategory archive does work with any name as parent category in URL,,Canonical,3.0.1,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2011-09-21T15:10:46Z,2012-10-22T23:10:00Z,"Parent category is ''parentcategory'' and his sub category is ''subcategory''.

The URL will be ''domain.com/category/parentcategory/subcategory''.

The problem is, that you will get the same page if you use any words as ''parentcategory''.

Examples:
- ''domain.com/category/xxx/subcategory''
- ''domain.com/category/subcategory''
- ''domain.com/category/foo/bar/subcategory''

IMO {{{redirect_canonical}}} should do his work here (and sometimes it does).

In 3.1 it does redirect.
In 3.1.4 it doesn't redirect; after r17549.
In 3.2.1 it doesn't redirect.
Duck_ found that it does redirect before r18079.
In current trunk it doesn't redirect.


",ocean90
Future Releases,21602,redirect_canonical can lead to infinite loop on index navigation if site url is not all lower case,,Canonical,,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2012-08-15T21:31:17Z,2013-04-23T07:53:55Z,"The function redirect_canonical in wp-includes/canonical.php (WordPress 3.4.1) on line 406 and 422 makes the following check:


{{{
if ( !$redirect_url || $redirect_url == $requested_url )
		return false;
}}}


This ensures that it does not attempt to redirect you to the page you requested in the first place. However this function is not case sensitive so if the redirect URL is in a different case than the requested URL then the user can enter an infinite redirect loop. (For example if the Site Address (URL) of the site is set to be in all upper case.) 

This function should do a case-insensitive string comparison since domain names are case-insensitive.


The issue only appears to happen with certain plugins installed (ShareThis and PilotPress both led to this issue,) I haven't figured out yet why it's only an issue with certain plugins but it should still be fixed in WordPress to make the proper string comparison. ",sreedoap
Future Releases,10543,Incorrect (non-UTF-8) character handling in tag's name and slug,westi*,Charset,2.8.2,normal,normal,Future Release,defect (bug),accepted,needs-unit-tests,2009-08-04T05:26:11Z,2010-11-13T01:15:40Z,"Incorrect (non-UTF-8) character tag's name and slug are handled in different way: name is truncated on 1st such character, and in slug they are just removed (no truncation). WP should handle both in the same way - drop invalid characters, instead of truncation.

I found this issue recently. One of the Polish programs for adding posts to the Wordpresses does not encode tags in UTF-8 - it left them in ISO-8859-2. I notified author of this bug. Unfortunately there are many copies around, so it may take a long time before everyone upgrade.",sirzooro
Future Releases,11175,wp_check_invalid_utf8() should drop invalid utf-8 chars only instead of truncating string,hakre,Charset,2.9,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2009-11-18T19:18:43Z,2011-07-13T09:46:51Z,"When you call wp_check_invalid_utf8() with 2nd param set to true, it tries to strip invalid utf-8. Now it removes 1st invalid utf-8 char and all chars after it, no matter if they are correct or not. Additionally it can print following notice:

Notice: iconv() [function.iconv]: Detected an illegal character in input string in .../wp-includes/formatting.php on line 437

Attached patch changes this, so function removes invalid chars only. Additionally it is less configuration-dependent, because it can use either mb_convert_encoding() or iconv().",sirzooro
Future Releases,18997,Adding wp_unschedule_hook function,arena,Cron,3.3,normal,normal,Future Release,feature request,reopened,needs-unit-tests,2011-10-19T07:45:11Z,2012-04-20T00:02:54Z,"
Unschedule all previously scheduled cron job for a hook.

Can be usefull for plugins when deactivating to clean up the cron queue

The $hook parameter is required, so that the events can be identified.

@param string $hook Action hook, the execution of which will be unscheduled.
",arena
Future Releases,9993,Rss and atom feeds are dropping some characters,,Feeds,2.7.1,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2009-05-31T23:54:40Z,2012-10-17T19:40:12Z,"Blog post with title:

{{{
& > test <
}}}

has the less than ( < ) is stripped from the atom and rss feed.

",pm24601
Future Releases,19543,Broken formatting when using HTML5 <section> element,,Formatting,3.3,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2011-12-14T10:32:07Z,2012-10-12T18:25:51Z,"When using <section> HTML5 element, the resulting markup is invalid because some paragraphs isn't closed properly. 

Reproduced with WP 3.3, TwentyEleven theme and no plugins. 

Example markup attached to this ticket. Paste into html view of the WYSIWYG editor and publish. Resulting markup also attached. ",exz
Future Releases,3833,Extra </p> inside blockquote,Archibald Leaurees,Formatting,2.7,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2007-02-21T19:01:26Z,2012-09-10T22:08:20Z,"When using blockquote </p> is inserted directly in front of </blockquote>, making the code invalid XHTML.

Example:
{{{
<blockquote>This is a blockquote</blockquote>
}}}

Gives the following result:
{{{
<blockquote>This is a blockquote</p></blockquote>
}}}

Seems like [http://wordpress.org/support/topic/106474 this forum thread] adresses the same issue in the support forum.",audwan
Future Releases,4857,More issues with wpautop(),mdawaffe*,Formatting,2.3,low,normal,Future Release,defect (bug),accepted,needs-unit-tests,2007-08-29T06:47:01Z,2009-11-28T06:33:01Z,"''Not sure if this should slide into 2.3 or if it can wait for 2.4. Change as need be.''

`wpautop()` has issues with closing `</p>`'s when it comes to HTML.

For example:

{{{
Foo<div>Bar</div>
}}}

Results in:

{{{
<p>Foo
<div>Bar</div>
}}}",Viper007Bond
Future Releases,8775,Numbers in quotation marks get wrong smart quotes,,Formatting,2.8,normal,normal,Future Release,defect (bug),reopened,needs-unit-tests,2009-01-01T18:05:14Z,2013-05-01T15:41:31Z,"Have a number in quotation marks, such as {{{""12345""}}} or {{{'12345'}}} and {{{wptexturize}}} converts the right quotation mark to double-prime and prime marks, respectively.

Patch fixes.",filosofo
Future Releases,20943,Paragraphs get removed in table cells when Visual editor is refreshed,,Formatting,3.2,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2012-06-13T19:06:04Z,2013-04-18T16:14:03Z,"As far as I know, this issue has been around since 3.1.  It's not a bug in 3.0.4.  I even stopped upgrading at 3.0.4 for any sites where I knew the client would need to edit tabular data.  For security reasons, it's time to upgrade these and I'd REALLY like this issue to be fixed.

The problem happens when using paragraphs in a table cell.  When I hit enter to create a new paragraph within a table cell, it looks fine.  If I then hit Update/Publish, when the page refreshes, WordPress converts that paragraph break into a single line break.  If I then click Update again, WordPress removes that linebreak entirely and the paragraphs are essentially merged.

I can also reproduce this behaviour without even clicking Update.  If you just switch to HTML mode and then back to Visual mode, the same issue occurs.",JboyJW
Future Releases,20304,Strikethrough does not work for multiple paragraphs in the post editor,,Formatting,3.4,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2012-03-25T20:13:00Z,2012-05-24T07:32:15Z,"'''Overview'''

If you have multiple paragraphs of text in the text editor and select all of them and push the strikethrough button, the text appears to be striked through; however, upon publishing/updating, only the first paragraph of text retains the strikethrough.

'''Steps to Reproduce'''

1) In a new post write screen add two paragraphs of text.

2) Select all of the text

3) Click the strikethrough button

4) Viewing the HTML of the rich text editor through web inspector (note that I am not toggling the visual/html tabs) shows:


{{{
<del>
	<p>text</p>
	<p>text</p>
</del>
}}}


5) Save post 

6) The text in the textarea only has strikeout for the first paragraph.

7) When viewing the source of the content on the front end, you get the following HTML:


{{{
<p>
	<del>text
</p>
<p>text</p>
<p>
	</del>
</p>
}}}


'''Other Information'''

I have tried these same steps on a clean install of 3.3.1. The strikethrough works as expected, and produces in all scenarios:


{{{
<p>
	<del>text</del>
</p>
<p>
	<del>text</del>
</p>
}}}

		
I first had this issue crop up for a .com client approximately 3-4 weeks ago, so this issue may have been introduced with a more recent patch.",tollmanz
Future Releases,19028,make_clickable fails when <a ...> contains \r characters,,Formatting,3.2.1,normal,minor,Awaiting Review,defect (bug),reopened,needs-unit-tests,2011-10-22T07:00:35Z,2011-11-02T00:34:43Z,"Hi.

I'm using the make_clickable php function in my project SaltOS to add the links feature to the email client and feeds reader.

I detect that when try to make clickable the urls that has the link tag and this tag contains \r characters it fails.

I fixed the problem removing all \r of the <a ...> tag but understand that can be a possible bug.

Thanks in advance.",josepsanzcamp
Future Releases,23922,make_clickable() breaks when colon in hash,,Formatting,,lowest,minor,Awaiting Review,defect (bug),new,needs-unit-tests,2013-04-03T00:41:39Z,2013-04-03T19:31:00Z,"`make_clickable()` doesn't like this string:

{{{
<a href=""http://en.wikipedia.org/wiki/URI_scheme#tel:"">http://en.wikipedia.org/wiki/URI_scheme#tel:</a>
}}}

It results in this HTML:

{{{
<a href=""http://en.wikipedia.org/wiki/URI_scheme#tel:""><a href=""http://en.wikipedia.org/wiki/URI_scheme#tel"" rel=""nofollow"">http://en.wikipedia.org/wiki/URI_scheme#tel</a>:</a>
}}}

Specifically it's the colon that is causing the issue. It can be a part of the URL too, it doesn't have to be a part of an anchor.",Viper007Bond
Future Releases,15657,wp_strip_all_tags causes paragraphs to run together,,Formatting,2.9,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2010-12-03T06:05:40Z,2011-12-27T20:49:30Z,"If a post contains HTML like ""foo<p>bar"", the RSS feed ends up with the text ""foobar"" instead of the more appropriate ""foo bar"" or even ""foo\n\nbar"".

Here is a simple patch to wp-includes/formatting.php that fixes this: basically, convert <p>, <br> and certain similar tags to newlines before calling the PHP-builtin strip_tags() function.
",jwz
Future Releases,4116,wp_texturize to defect certain links in comments and on page,Nazgul,Formatting,2.2.1,normal,normal,Future Release,defect (bug),reopened,needs-unit-tests,2007-04-09T13:29:33Z,2010-11-23T04:53:07Z,"the wp_texturize() function in formatting.php (includes) of wordpress breaks links of the domain format (number)x(number). 

For example, a comment left by a domain such as www.h4x3d.com, which includes the (4)x(3) in the domain name, renders to www.xn--h43d-rma.com. This breaks the link.

It does occur on the page, but also with in the page comments. 
It does also occur when the text with the special combination is not a link, but plain text.",h4x3d
Future Releases,2833,wpautop breaks style and script tags,,Formatting,2.0.3,low,normal,Future Release,defect (bug),reopened,needs-unit-tests,2006-06-17T20:36:00Z,2012-09-09T21:01:21Z,"When I create a post in which I want to include Javascript or some styles, WordPress 'breaks'when showing those posts, because all newlines in the SCRIPT and STYLE tag are converted into BR tags.

Example:
{{{
<style type=""text/css>
.matt { color: #FFFFFF; }
</style>
}}}
Becomes:
{{{
<style type=""text/css><br />
.matt { color: #FFFFFF; }<br />
</style><br />
}}}

And:
{{{
<script type=""text/javascript""><!--
google_ad_client = ""xxxxxxxx"";
google_ad_width = 120;
google_ad_height = 60;
google_ad_format = ""120x60_as_rimg"";
google_cpa_choice = ""CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M"";
//--></script>
}}}
Becomes
{{{
<script type=""text/javascript""><!--<br />
google_ad_client = ""xxxxxxxx"";<br />
google_ad_width = 120;<br />
google_ad_height = 60;<br />
google_ad_format = ""120x60_as_rimg"";<br />
google_cpa_choice = ""CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M"";<br />
//--></script><br />
}}}

This happens because wpautop adds those BR tags to the post. (As it should, just not within STYLE or SCRIPT tags.)

I've made a (temporary?) workaround for this by creating a pre and post event for wpautop, which substitute the necessary newlines by a temporary value in the pre event and placing them back in the post event. Although I think this should be incorporated in wpautop itself.

See also: http://wordpress.org/support/topic/76433 and http://wordpress.org/support/topic/76297

While searching trac I also found ticket #2346, which is about the same problem, but which was for 2.0 and self-closed by the submitter?

P.S. I have TinyMCE turned of.",Nazgul
Future Releases,8912,wptexturize malforms HTML comments that contain HTML tags,,Formatting,2.7,normal,normal,Future Release,defect (bug),reopened,needs-unit-tests,2009-01-21T20:16:08Z,2013-03-18T15:01:17Z,"Because it's replacing -- with #8211, a comment like <!-- whatever --> put into the HTML part of a post gets broken.

This makes it difficult for people writing special HTML in posts (like people putting in object tags, or javascript, or whatever) to do that sort of thing.

What is needed is to recognize --> as different from -- and not replace it with the en dash in that case.
",Otto42
Future Releases,19308,"C-style hexadecimal is incorrectly ""fixed"" to change the 'x' into a mathematical '×'",,Formatting,2.1,normal,normal,Awaiting Review,enhancement,new,needs-unit-tests,2011-11-21T00:39:00Z,2011-11-30T16:49:55Z,"Pretty much what the title says. I'm running trunk. ""0x07"" gets converted to ""0×07"".

I've attached a patch which fixes this issue by not performing the conversion if the first number starts with a zero -- this is not perfect, and I might have a go at something better when it's not 0030, if you guys decide this should be changed.

My $0.02 - since it's a bit odd to multiply zero by something, I don't think that very many people will expect/want this conversion to happen -- and the lack of conversion is unlikely to confuse those that do. 

On the other hand, this conversion is confusing for any blog post using this hex notation, and does make those posts actually wrong.

",harrym
Future Releases,6969,Don't apply wptexturize() to the insides of shortcode tags,tellyworth,Formatting,2.5.1,normal,normal,Future Release,enhancement,new,needs-unit-tests,2008-05-14T11:47:58Z,2011-05-31T08:45:13Z,"I have this for my post contents:

{{{
[code lang=""php""]$foo = 'bar';[/code]
}}}

The problem is my shortcode function gets this passed to it for the content string:

{{{
$foo = &#8216;bar&#8217;;
}}}

`wptexturize()` should be smart enough to not format the contents of registered shortcodes. If plugins want their contents formatted, they can pass the contents to the `wptexturize()` function itself.",Viper007Bond
Future Releases,20522,the sanitize_file_name_chars filter and ch(0),,Formatting,,normal,minor,Awaiting Review,enhancement,new,needs-unit-tests,2012-04-23T08:26:28Z,2012-04-24T00:41:12Z,"the sanitize_file_name_chars filter is tricky to use due to the chr(0) ending the array :

both 
{{{
special_chars[] = $my_char; 
}}}
and 
{{{
array_push($special_chars, $mychar);
}}}
have no effect.

so the only way to add some char to the array is to use array_unshift :
{{{
array_unshift($special_chars, $mychar);
}}}

adding 

this is mostly a php issue, but it could be useful to add some notice to the WordPress documentation.

",olivM
Future Releases,13340,wpautop breaks inline MathMl,,Formatting,2.9.2,normal,normal,Future Release,enhancement,new,needs-unit-tests,2010-05-11T14:04:58Z,2012-04-07T01:41:16Z,"wpautop treats inline &lt;math&gt; tags as block; they in fact may be placed block or inline, with their flow model dependent on the mode or CSS display property.

Trivial to fix; just needs someone to commit the change. Remove ""|math"" from $allblocks in file wp-includes/formatting.php. math tags on their own will be wrapped in a paragraph, which is fine.

As a very convenient enhancement, please replace on line 210:

{{{
     if ($br) {
-        $pee = preg_replace_callback('/<(script|style). ....
+        $pee = preg_replace_callback('/<(script|style|math) ...
}}}

to prevent MathML being polluted with breaks (current required workaround people are using is to have the whole block on one line, which is very messy to edit).",nicholaswilson
Future Releases,14754,add_query_arg() refactoring,,General,,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2010-09-01T16:32:20Z,2011-03-23T19:34:24Z,"The function add_query_arg() looks like that it could benefit from a refactoring. Especially the handling of optional parameters (did introduce PHP 4 that language feature?) can benefit by a sligh touch-up.

Attached patch reflects only the first few lines of the function.",hakre
Future Releases,23881,get_transient() could delete transient timeout options in an unexpected way,,General,2.8,normal,minor,Future Release,defect (bug),new,needs-unit-tests,2013-03-28T11:02:07Z,2013-04-22T21:17:24Z,"get_transient() could delete transient timeout options if a given transient name has the ""timeout_"" prefix.

To reproduce:
{{{
set_transient( 'test', 'test', 60*60 );
get_transient( 'timeout_test' ); // will delete the _transient_timeout_test option
}}}

Solution:

Check if get_option( $transient_timeout ) is not returning false.
{{{
if ( false !== get_option( $transient_timeout ) && get_option( $transient_timeout ) < time() ) {
}}}
",tenpura
Future Releases,16943,Code Cleanup add_query_arg() + friends,,General,3.1,normal,normal,Awaiting Review,enhancement,new,needs-unit-tests,2011-03-23T05:41:22Z,2011-03-23T07:11:27Z,"This should reduce the complexity of add_query_arg() a bit.

This is partially related to PHP 5 stuff (#16918,#16920) we can make use of now.

Originated in #16932 

Related: #16942",hakre
Future Releases,16330,"media_sideload_image() broken with filenames containing strange characters (e.g., +, %)",,Media,3.1,normal,major,Future Release,defect (bug),reopened,needs-unit-tests,2011-01-21T13:56:19Z,2013-03-17T10:31:55Z,"I'm using the {{{media_sideload_image()}}} method in the upcoming version of my [http://wordpress.org/extend/plugins/e107-importer/ e107 Importer script] (see: http://github.com/kdeldycke/e107-importer/blob/b7925fdac6aa43db4be5b7925265a83d95fc62ad/e107-importer.php#L277 ) to upload remote images into WordPress.

This method work as expected with lots of images from a lot of different sources, but fail on URLs containing spaces.

Let me illustrate this bug with an example.

When trying to upload the image located at
{{{
http://home.nordnet.fr/francois.jankowski/pochette avant thumb.jpg
}}}
the result looks like this on the file system: http://twitpic.com/3s0dk7 . As you can see, image file names are clean. But in the Media Manager, here is what you have: http://twitpic.com/3s0e5d . No thumbnails seems to have been created.

Now, trying to fix this, I modified the original URL before calling {{{media_sideload_image()}}} with the following code:
{{{
  $img_url = str_replace(' ', '%20', html_entity_decode($img_url));
  $new_tag = media_sideload_image($img_url, $post_id);
}}}
With this patch, here is the result on the filesystem: http://twitpic.com/3s0ets . I was surprised by WordPress not sanitizing URLs. Is that normal ?

But the most surprising stuff is in the Media Manager: http://twitpic.com/3s0hup . It looks like thanks to this hack, WordPress somehow succeeded downloading the remote file but messed with filesystem naming. What let me think this ? The Media Manager, get the right image thumbnail dimensions but not the binary payload of the thumbnail (contrary to the case above were no binary nor dimensions are available about the thumbnail).

All of this was tested in WordPress 3.1-RC2.

As for the idea of the patch above, it come from a very old version of my plugin (v0.9) that was based on WordPress 2.3.2. There, I somehow found the root cause of the problem, [http://github.com/kdeldycke/e107-importer/blob/e107-importer-0.9/e107.php#L410 according the comment I wrote 3 years ago]:
{{{
 // The fopen() function in wp_remote_fopen() don't like URLs with space chars not translated to html entities
}}}

I should have posted this bug report sooner, as now I've forgotten everything about this issue... :(",Coolkevman
Future Releases,16282,PHP catchable error with get_term_link and WP3.1RC2,,Multisite,3.1,normal,major,Future Release,defect (bug),reopened,needs-unit-tests,2011-01-18T12:23:37Z,2011-03-08T23:10:45Z,"I recently updated my WP Network to 3.1RC2, and suddenly the get_term_link() I was using in the footer gave me this error:

  PHP Catchable fatal error: Object of class WP_Error could not be converted to string

It was working fine in 3.0.4",illutic
Future Releases,23865,Trailing slash is not enforced when editing the path for a subdirectory site in multisite,,Multisite,3.0,normal,normal,Awaiting Review,defect (bug),new,needs-unit-tests,2013-03-26T19:53:23Z,2013-04-01T09:38:28Z,"It is possible to edit an existing subdirectory site so that the path does not end in a trailing slash, this causes the subdirectory site in question to have an inaccessible home URL.

To reproduce:

 * Create a multisite network in subdirectory mode
 * Create a new subdirectory site
 * Visit the subdirectory site successfully
 * Edit the site to change the path so there is no trailing slash
 * You should be unable to visit the subdirectory site now",simonwheatley
Future Releases,22192,update_metadata() and update_option() strict checks can cause false negatives,,Performance,,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2012-10-15T03:19:23Z,2012-10-15T10:22:31Z,"Given this:

{{{
add_post_meta( $post_id, 'key', 1 );
update_post_meta( $post_id, 'key', 1 );
}}}

The update should not work, because they are the same. However, the meta cache will have ""1"" as a string, and then it will strict compare it to 1 as an integer. Thus, an unnecessary update will run.

Best I can tell, this could also affect update_option().

It is quite common to use integers and booleans directly into these functions. They should be smart enough to recognize that ""1"" == 1 == true and ""0"" == 0 == false, and that any numeric string is also equal to a properly cast integer.

Unit tests needed.

Ticket from which this was spun: #22189, saving navigation menus is slow.",nacin
Future Releases,22074,Very Large Query that Crashes the whole My SQL and site,,Performance,3.4.1,normal,normal,Future Release,enhancement,new,needs-unit-tests,2012-10-02T03:13:14Z,2013-05-16T11:59:00Z,"Hi David,

The problem is being caused by an extremely large mysql query. This is just a snippet of it. The full query is in /home/profithunters/query. You should have your dev look at it.

What user/pass are you using for mysql? You can login as the root mysql user by logging into https://profithunters.nmsrv.com/gadmin/ and then going to MySQL -> Launch phpmyadmin.
{{{
       | 370           | 371       |
| 1697 | profithu_wrdp2 | localhost | profithu_wrdp2 | Query   | 78   | statistics           | SELECT * FROM wp_posts  WHERE (post_type = 'page' AND post_status = 'publish')  AND ( ID <> 3778  AND ID <> 49911  AND ID <> 0  AND ID <> 20531  AND ID <> 3776  AND ID <> 3792  AND ID <> 3794  AND ID <> 3797  AND ID <> 3799  AND ID <> 3801  AND ID <> 3803  AND ID <> 3805  AND ID <> 3807  AND ID <> 3811  AND ID <> 5540  AND ID <> 6500  AND ID <> 8965  AND ID <> 9363  AND ID <> 10974  AND ID <> 11516  AND ID <> 11822  AND ID <> 12903  AND ID <> 12907  AND ID <> 12911  AND ID <> 13928  AND ID <> 13930  AND ID <> 14188  AND ID <> 14192  AND ID <> 14935  AND ID <> 14937  AND ID <> 14939  AND ID <> 14941  AND ID <> 15023  AND ID <> 15376  AND ID <> 19768  AND ID <> 20980  AND ID <> 20984  AND ID <> 21353  AND ID <> 21550  AND ID <> 21554  AND ID <> 21559  AND ID <> 21562  AND ID <> 21618  AND ID <> 21623  AND ID <> 21629  AND ID <> 21674  AND ID <> 21677  AND ID <> 21682  AND ID <> 21689  AND ID <> 21694  AND ID <> 21703  AND ID <> 21706  AND ID <> 21707  AND ID <> 21714  AND ID <> 21717  AND ID <> 21744  AND ID <> 21834  AND ID <> 21859  AND ID <> 21862  AND ID <> 21865  AND ID <> 21873  AND ID <> 21876  AND ID <> 21880  AND ID <> 21884  AND ID <> 21897  AND ID <> 21900  AND ID <> 21902  AND ID <> 21905  AND ID <> 21936  AND ID <> 21938  AND ID <> 21940  AND ID <> 21949  AND ID <> 21951  AND ID <> 21958  AND ID <> 21966  AND ID <> 21983  AND ID <> 21986  AND ID <> 21989  AND ID <> 21995  AND ID <> 22000  AND ID <> 22004  AND ID <> 22006  AND ID <> 22010  AND ID <> 22014  AND ID <> 22016  AND ID <> 22020  AND ID <> 22024  AND ID <> 22026  AND ID <> 22028  AND ID <> 22030  AND ID <> 22037  AND ID <> 22040  AND ID <> 22043  AND ID <> 22046  AND ID <> 22049  AND ID <> 22058  AND ID <> 22060  AND ID <> 22062  AND ID <> 22065  AND ID <> 22068  AND ID <> 22071  AND ID <> 22073  AND ID <> 22075  AND ID <> 22078  AND ID <> 22085  AND ID <> 22087  AND ID <> 22089  AND ID <> 22094  AND ID <> 22125  AND ID <> 22128  AND ID <> 22133  AND ID <> 22137  AND ID <> 22141  AND ID <> 22144  AND ID <> 22151  AND ID <> 22153  AND ID <> 22155  AND ID <> 22157  AND ID <> 22160  AND ID <> 22162  AND ID <> 22165  AND ID <> 22168  AND ID <> 22170  AND ID <> 22172  AND ID <> 22174  AND ID <> 22176  AND ID <> 22178  AND ID <> 22180  AND ID <> 22184  AND ID <> 22186  AND ID
}}}",adest
Future Releases,17450,Almost pretty permalinks with non-ASCII characters do not work in Apache,westi,Permalinks,3.1,normal,major,Future Release,defect (bug),reopened,needs-unit-tests,2011-05-16T05:53:14Z,2012-04-27T19:03:50Z,Almost pretty permalinks (using PATH_INFO) with non-ASCII characters do not work in Apache; a not found error is returned. The same permalink works in IIS when UTF-8 is used for server variables. It also works when mod_rewrite is used.,peaceablewhale
Future Releases,10249,Page slug in cyrillic = Error 404 - Not Found!,westi*,Permalinks,2.7,normal,major,Future Release,defect (bug),accepted,needs-unit-tests,2009-06-23T19:44:34Z,2012-04-27T19:04:18Z,"When I create a page with page slug for example ""киро""
then when I try to open domain/киро - Error 404 - Not Found

The permalinks are %postname%

Post slug with this slug is working just fine, the same BUG exists in 2.7, 2.7.1 and 2.8",kalifi
Future Releases,24248,'guid' not properly escaped,,Post Types,2.5,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2013-05-02T14:03:35Z,2013-05-10T20:37:34Z,"Probably related issues: #18274 #19248

'guid' being saved in database not properly escaped, example:
{{{http://www.wordpress.dev/?post_type=changeset&#038;p=57}}} , see the ampersand encode {{{&#038;}}}
It supposed to be {{{&}}} or at least {{{&amp;}}}

Once 'auto-draft' saved, 'guid' is correct: {{{http://www.wordpress.dev/?post_type=changeset&p=57}}}

Once post is saved as 'draft' or published (triggered 'update post' on auto-draft), 'guid' gets malformed.

Source of issue: inappropriate usage of {{{get_post_field()}}} function in the {{{wp_insert_post()}}}

{{{get_post_field()}}} defaults to 'display' context, we not specify context while obtaining field, and in the {{{wp_insert_post()}}} we are not going to display it anywhere, just get, check, and save again, correct?

Attached patch adds the 'raw' context to usage of {{{get_post_field()}}} with 'guid'

",meloniq
Future Releases,21963,Consolidate post insertion APIs,,Post Types,,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2012-09-22T03:46:24Z,2012-12-27T15:14:44Z,"In wp-includes, we have:
 * wp_insert_post()
 * wp_insert_attachment()
 * wp_update_post()
 * wp_publish_post()

For saving from the admin, we have:
 * edit_post()
 * wp_write_post()
 * write_post()

'''wp_publish_post()''' is, as of [21942], now wraps wp_insert_post().

'''wp_update_post()''' is a fairly mundane wrapper of wp_insert_post(), but we really should eliminate the differences between the two functions and make it a straight-up wrapper.

'''wp_insert_attachment()''' was a fork of wp_insert_post(), and wp_insert_post() has gotten a lot of improvements that haven't reached wp_insert_attachment(). It doesn't take much to merge these two, though, and make wp_insert_attachment() a wrapper.

'''wp_write_post()''' calls edit_post() if it has a post ID. And since we have had a post ID since the days of auto-drafts, this function is dead code. It's wrapper, '''write_post()''', can also be deprecated.

I'm attaching a patch that takes care of wp_insert_post(), wp_write_post(), and write_post(). wp_update_post() will require a bit more concentration.

Needs testing and unit tests.",nacin
Future Releases,12706,Custom post status bugs in the admin,ptahdunbar,Post Types,3.0,normal,normal,Future Release,task (blessed),new,needs-unit-tests,2010-03-25T14:41:39Z,2013-05-10T12:47:01Z,"A developer should be able to register a custom post status using `register_post_status()`. The admin UI (including post submit box and quick edit) should reflect this new custom post status. Furthermore, there are many hard-coded references to 'draft' and 'pending' statuses in core that should properly use the post status API.

All existing arguments to `register_post_status()` should be fully implemented, should also support per-post-type arguments. As things get implemented across core, there will likely be a need for supporting capabilities and bits of API.

Related: #23169 (register_post_status_for_object_type), #23168 (unregister_post_status).",ptahdunbar
Future Releases,18386,"Bug in custom query when ""Front page displays"": ""A static page""",,Query,3.2.1,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2011-08-12T10:34:16Z,2012-05-09T10:13:53Z,"Here is the bug I have found:
When Front page displays is set to: A static page
and Blog posts are displayed on other page a bug accours...

Lets prepare test enviroment, with clear wp installation and two posts, where one of them is set to default category, and other is set to newly created category (which defautly has ID = 3).
Now, prepare two pages, and in Setting -> Reading set Front page to one of those pages, and Posts page to second one.

If You would like to exclude posts from category no 3 from main blog index, normaly You would use:
<?php query_posts($query_string . '&cat=-3'); ?> in index.php (or specified loop file linked there).
This would work if blog index is set as home page, but fails to work when above test enviroment is used.",CyberSpy
Future Releases,21803,Add filter to make extending searching easier,,Query,3.4,normal,normal,Future Release,enhancement,new,needs-unit-tests,2012-09-05T13:50:13Z,2012-11-07T07:14:55Z,"I'm using custom post types, and want to extend the search function so more than post_title and post_content are searched. It is currently possible to filter `posts_search` but that returns a string such as ` AND (((wp_posts.post_title LIKE '%test%') OR (wp_posts.post_content LIKE '%test%'))) `. This string then has to be rather messily manipulated via `preg_replace` or `str_replace`.

It would be more useful if we could filter a list of fields to be added to the search criteria, so that we could add a function to extend or change the criteria:

{{{
add_filter ('search_fields', 'my_custom_search_fields');

function my_custom_search_fields ($fields) {
    global $wpdb;
    $fields[] = ""{$wpdb->prefix}posts.post_excerpt"";
    return $fields;
}
}}}

The attached patch implements that filter.",mark8barnes
Future Releases,17065,Independent ASC/DESC in multiple ORDER BY statement.,ericmann,Query,3.1,normal,normal,Awaiting Review,enhancement,new,needs-unit-tests,2011-04-06T17:11:01Z,2013-05-09T14:55:14Z,"WP_Query supports ordering results by multiple columns, but does not currently support independent ASC/DESC declarations on those columns.  Instead, it concatenates the ORDER and ORDER BY statements together.

In some cases, it would be beneficial to independently set the order for these columns.  An example offered on WP-Hackers:

> I have a situation where I want to order a list of post both by author and date using WP_Query which isn't a problem since 'orderby' lets me do that. But I want the author part sorted ascending and date part sorted descending.

A normal MySql statement would end with `ORDER BY author ASC, date DESC`.

We should extend WP_Query to allow users to set their ordering parameters independently.  This should be done in such a way as to not break backwards compatibility.",ericmann
Future Releases,19907,Updating an unpublished draft post in quick-edit mode sets the post's publish date,,Quick/Bulk Edit,2.7,normal,major,Future Release,defect (bug),new,needs-unit-tests,2012-01-27T14:51:32Z,2013-01-14T11:35:22Z,"'''Problem:'''

 • If you update an unpublished draft post in quick-edit mode, the post's ''publish date'' is saved. [[BR]]
 • Then, later on, when you actually publish the post, its publish date is incorrect.

'''Suggested fix:''' 

 • If the post is a draft, do not automatically set the post's publish date in quick-edit mode.

'''Steps to reproduce:''' 

(1) Go to WP-Admin -> Posts.

(2) Create and save a new post. Make sure you click ""Save Draft"" — not ""Publish"".

(3) Note that the post is marked as ""Publish immediately""; that is, it has no publish date.

(4) Go back to WP-Admin -> Posts.

(5) Hover your pointer over the post you just created. Click ""Quick Edit"". 
 — Note that in the panel that appears, the ""Date"" field is automatically set to [the current date and time].

(6) Click ""Update"" in quick-edit mode.

(7) Hover your pointer over the post you just updated. Click ""Edit"". 
 — Note that in the Edit Post page that appears, the post is now marked as ""Publish on: [the date and time from step (5)]""
",uxtremist
Future Releases,18962,Allow duplicate slugs for different content,,Rewrite Rules,,normal,normal,Future Release,enhancement,new,needs-unit-tests,2011-10-16T16:23:34Z,2012-11-29T18:12:01Z,"Currently, the slug of a post (or any other CPT) must be unique. 
If a content is being created and an already existing slug is being assigned to it - WP will add a number for identification (i.e. about-2 etc).

That means, that if one has content from different content types, or in different categories (taxonomies), it still cannot have same slug.

The issue might be very disturbing when working in a multi lingual site (i.e using WPML or any other plugin for that).
Suppose there is an about page - www.mysite.com/about.
This is in the main language of the site.
Than a translation to that content page is being added,  let's say it is translation to English.
You would expect url something like www.mysite.com/en/about, but the slug is being changed to about-2, so the url of the about page in English becomes www.mysite.com/en/about-2.
For a site with 10 languages, let's say, it will end with urls like site.com/lang/about-10 etc.. and this is not looking good and may confuse.

As a cms, WP should let the admin/developer/operator - to have same slugs for different content types, or even in the same content type. The $post->ID is the unique identifier of a content, why should be also the slug?

",maorb
Future Releases,13701,Full support for middle and little endian permalink structures,,Rewrite Rules,2.9.2,normal,normal,Future Release,enhancement,reopened,needs-unit-tests,2010-06-02T14:34:08Z,2013-05-14T13:32:31Z,"This only happened after I switched over to the WordPress 3.0 development version, so I'm inclined to think it's a bug.  When I use the traditional wp_get_archives or the dropdown version it shows that posts exist.  However, when I click to go to any of those past posts, I only get a 404 Error.  This problem is very consistent, happening 100% of the time.  Disabling all plugins has no affect on the problem.

The only other information that might be helpful is that I've integrated WordPress into a website that I built and I am using a custom theme that I built.  It only has the index.php, single.php, and style.css files.

Again, the wp_get_archives function worked just fine with the exact same setup that I have now prior to switching to the 3.0 version, so I'm not sure what changed.",RevelationTravis
Future Releases,14481,Shortcode Enhancements,,Shortcodes,3.0,normal,normal,Future Release,enhancement,new,needs-unit-tests,2010-07-30T22:37:23Z,2010-10-31T13:34:44Z,"Somewhat of a copy of a post to wp-hackers: I wrote my own implementation of shortcodes. It does things a bit differently, has nested evaluation, and allows self-nesting. Since there are some significant differences to the existing implementation,

A lot of the changes are borrowed from definitions in the HTML specification (particularly name and attribute matching). The following are the comments at the top of my shortcode file. I tried to keep track of all the differences (and questions) there.

== From Test Cases ==

(http://svn.automattic.com/wordpress-tests/wp-testcase/test_shortcode.php)
{{{
Shortcode Statuses (to implement, or not to implement?)
        enabled = the shortcode works as normal (default)
        strip = the shortcode will be parsed and removed.  e.g.
'[shortcode foo=""bar""]' produces ''.  '[shortcode]foo[/shortcode]'
produces 'foo'.
        faux = the shortcode will be abbreviated.  e.g. '[shortcode
foo=""bar""]' products '[shortcode]'.  '[shortocde]foo[/shortcode]'
produces '[shortcode]'
        disabled = the shortcode is not parsed at all.  e.g.
'[shortcode foo=""bar""]' products '[shortcode foo=""bar""]'
}}}

== Major Differences/Improvements ==

I. Addressing http://codex.wordpress.org/Shortcode_API#Limitations

 1. You can nest any tag at any depth regardless of ancestors (#10702)

 2. Tag and attribute names may match: `/[A-Za-z][-A-Za-z0-9_:.]*//*` (trialing /* because that comment ends), with case-insensitive interpretation

 3. Interpretation doesn't get tripped up by things like hyphens

== II. Addressing Ticket #12760, ==

 1. Changed from fix in #6518. Reasoning: balancing double-square-brackets can have misleading results with nesting

 2. Shortcodes escapable by using `[[`, `]]`

 3. `]]` is escaped ""right to left"", so `[shortcode]]]` would evaluate to `result]`

 4. '[[' is escaped left to right `[[[shortcode]]]` => `[result]`

== III. Enhancements ==

 1. Only matches valid shortcode for registered hooks, everything else will appear as text

 2. Can register multiple hooks to single shortcode, uses priority (default: 10)

== IV. Conflicting Design Changes ==

 1. Quoted literals are escaped by entities rather than cslashes

 2. Inline (self-closing) shortcodes get passed content to accomodate multiple callbacks

 3. No equivalent to shortcode_parse_atts function (Not marked private in function reference, but not documented in shortcode API page)

 4. Boolean attributes take the place of positional attributes `[foo bar]` gets attributes `array('bar' => 'bar')` instead of `array('0' => 'bar')`

 5. Disallows attribute and tag names that don't match `/[A-Za-z][-A-Za-z0-9_:.]*/`

 6. Disallows unquoted attribute values (also boolean attributes), unless they match `/[-A-Za-z0-9_:.]+/`

== Basic Interpretation Method ==

 1. If an open tag is encountered, it is added to the stack

 2. If a close tag is encountered and there is no matching open tag on the stack the close tag is ignored

 3. If a close tag is encountered and there is a matching open tag on the stack all opened tags on the stack before the matched tag will be implicitly self-closed

 4. If text or an inline tag is encountered, it will be evaluated to its parent's content immediately

 5. If tags are not closed by the end of the interpretation, they will be implicitly self-closed

== Issues ==

 1. Haven't written new unit tests to reflect new functionality added, functionality differences

 2. Documentation is not as good (though I hope most of the code is self-explanatory)

 3. Not 100% backwards compatible",deadowl
Future Releases,12982,Shortcodes don't allow shortcodes in attributes,,Shortcodes,3.0,normal,normal,Future Release,feature request,new,needs-unit-tests,2010-04-12T22:31:17Z,2010-04-15T22:16:02Z,"I think that shortcodes should work when used inside attributes of other shortcodes, just like they can work inside the ""$content"" of a shortcode.

Some people says that that isn't supposed to work, but theoretically it is supposed to work when using the ""do_shortcode"" function. It don't work because:

1) ""do_shortcode"" is context free, which it's actually fine by its fastness, although it don't allow stuff like inserting a shortcode inside the content of itself

2) The shortcode regex stops with the first occurrence of a ] in a shortcode, so in this:

{{{[foo bar=""[baz /]""]content[/foo]}}}


it ""outputs"":


{{{[foo bar=""[baz /]}}}


and {{{""]content[/foo]}}} is ignored.

I'm not programmer but I tried to fix it by changing the shortcode regex so it allow anything between quotes or brackets inside the first group of brackets. It sort of works, but also mess the handling of quotes in the rest of the shortcode, so I think something more advanced have to be done to make it work. 

This is somewhat related to another shortcode tickets, but none of them addresses nor solves this specifically.",Atoon
Future Releases,14691,Allow commas in tag names,,Taxonomy,3.0.1,normal,normal,Future Release,enhancement,new,needs-unit-tests,2010-08-25T09:51:09Z,2012-06-07T03:56:55Z,"Adding tags to posts via the web interface involves a lot of what boils down to
{{{
explode( ',', join( ',', array( $tag_name, ... ) ) );
}}}
both in PHP and JS.

We settled on commas so we could have tags with spaces in them (see #10320, for example).

It'd be nice if tags (and other taxonomies) could have commas in them, though.  Example use case: normalized locations (""Portland, OR"").  Admittedly, commas in tag names is an edge case.

The attached treats tag inputs as ""real"" CSV strings instead of just exploding by commas.

That way, you can enter:
{{{
hello, ""hello, world""
}}}
in the tags input field and the following tags would be added to the post.
 * hello
 * hello, world

This addresses commas in tag names but makes entering double quotes in tag names more annoying.  If you wanted a tag named {{{double""quote}}}, you'd have to enter the following.
{{{
""double""""quote""
}}}

This may also help with #7897.",mdawaffe
Future Releases,21760,get_term_by() calls are not cached,,Taxonomy,2.3,normal,normal,Future Release,enhancement,new,needs-unit-tests,2012-08-31T21:26:22Z,2013-05-03T16:00:39Z,"{{{get_term()}}} is the simplest way to retrieve one term, but it requires {{{term_id}}} and {{{taxonomy}}}. Because of this, terms are cached with {{{term_id}}} as key and {{{$taxonomy}}} as bucket. As a result, you can't easily grab a term by slug, unless you use {{{get_term_by( 'slug' )}}}. {{{get_term_by( 'slug' )}}} and {{{get_term_by( 'name' )}}} don't even have a query cache, so they go to the database every time. Because you can't get a term by {{{slug}}} without hitting the db, every place you want to get a term by {{{slug}}}: you first have to transform it into a {{{term_id}}} where it will then be cached. This is inefficient because the user may query by {{{slug}}} constantly and never by {{{term_id}}}.",wonderboymusic
Future Releases,9547,Taxonomy - interesting 'unused' term_order column in table term_relationships.,ryan,Taxonomy,2.8,high,normal,Future Release,feature request,reopened,needs-unit-tests,2009-04-16T15:19:42Z,2013-05-14T14:06:03Z,"During development of plugin [http://wordpress.org/extend/plugins/xili-language/ xili-language], and to sort term by term list of languages in a taxonomy, I discover unused column '''term_order''' in ''term_relationships'' table and lack of functions in core about this column. Like medias in post, here the user can define languages list with first, second, third,... languages for his website (and xml header). Taxonomy tools are here very powerful without adding tables or annoying coding.

([http://plugins.trac.wordpress.org/browser/xili-language/tags/0.9.8.2/xili-language.php  see code here line 1309-1370]). 

Before to complete these very basic functions,…

Is it forecast to have more basic / generic functions using '''term_order''' in taxonomy.php ?

[http://core.trac.wordpress.org/ticket/9546 Related ticket]",michelwppi
Future Releases,18302,Improve child theme file inheritance by introducing `theme_url()` to locate a file URI,westi,Template,,normal,normal,Future Release,enhancement,reviewing,needs-unit-tests,2011-07-31T01:19:02Z,2013-04-22T19:02:43Z,"Child theme file inheritance isn't quite as slick as it could be. A child theme should be able to selectively override any of its parent theme's files (ie. CSS & JS), not just template files.

For example, there's no easy way for a parent theme to enqueue a JavaScript file that can be easily overridden by a child theme. This is because there's no URI version of `locate_template()` for themes to use.

Example: A parent theme includes a JavaScript file like so:

{{{
wp_enqueue_script( 'foo', get_template_directory_uri() . '/foo.js' );
}}}

A child theme couldn't simply include a `foo.js` file to override its parent's as the file is always loaded from the template directory, not the stylesheet directory. If the parent theme used `get_stylesheet_directory_uri()` instead, then the child theme could override it '''but''' it would '''have''' to override it, otherwise we'd end up with a file not found.

The answer is to introduce a function that does the same as `locate_template()` but returns a URI instead of a path.

Example usage:

{{{
wp_enqueue_script( 'foo', locate_theme_file( 'foo.js' ) );
}}}

This would load `foo.js` from the child theme if it existed, and the parent theme if not.

The function could also be used for CSS files:

{{{
wp_enqueue_style( 'bar', locate_theme_file( 'bar.css' ) );
}}}

And for images too:

{{{
<img src=""<?php echo locate_theme_file( 'icon.png' ); ?>"" />
}}}

Stand by for a patch.",johnbillion
Future Releases,15086,get_template_part() should let you specify a directory,westi*,Themes,3.0,normal,normal,Future Release,enhancement,accepted,needs-unit-tests,2010-10-10T21:36:45Z,2013-02-07T21:51:35Z,"IT would be nice for `get_template_part()` to allow you to specify a directory to look for a file in.  Right now you actually *can* do this, but it requires passing a 'slug' to the function like `directory/slug`.  Since everywhere else in the code slugs are sanitized, this seems like an unexpected way to allow this functionality (I didn't realize this worked until @nacin pointed it out).  Since this slug isn't actually sanitized at all, you can currently do `get_template_part( '../../../test' );` which seems rather unsafe (`get_template_part` should be able to include from outside the themes directory).

I suggest sanitizing $slug and adding a third [optional] parameter that allows you to specify the directory to look in.  The directory parameter should be sanitized enough to not allow it to start with a . or a / (although this more likely belongs in `locate_template()` as something done to $template_name inside the foreach).

What does everyone think about this approach?

How many themes do we think are currently using the $slug parameter to specify a directory?

Right now the optional $name parameter is set up as a fall through, so if $slug-$name.php doesn't exist $slug.php is used.  Should $directory be set up similarly ($directory/$slug-$name.php -> $directory/$slug.php -> $slug-$name.php -> $slug.php)?",aaroncampbell
Future Releases,23685,Explicitly globalize version variables,,Unit Tests,trunk,normal,normal,Awaiting Review,defect (bug),new,,2013-03-04T11:00:09Z,2013-03-04T17:24:03Z,"When WordPress is loaded in a function (e.g. unit tests) the variables initialized at the top level aren't globals, but we expect them to be.

For example, if in a unit test there is no way to access `$wp_version`. Neither via `$wp_version` (it's not in the same scope), not via `$GLOBALS['wp_version']` (it's not a global).

To fix that we need to explicitly make the version variables global.

See #17749.",nbachiyski
Future Releases,11867,Increase Cross-Plattform portability of the Testsuite,westi,Unit Tests,,normal,normal,WordPress.org,defect (bug),closed,,2010-01-11T19:26:32Z,2010-02-18T19:07:51Z,"The attached patch increases cross plattform compability for the testsuite. It does two things:

 1. Getopt compability for non PHP 5.3 systems (especially Windows but also certain *NIX Systems).
 2. Usage of the PATH_SEPARATOR constant for the include path to allow it to be used on windows as well.

With these changes I was able to get the suite to run under windows.

The 1. deficency [http://codex.wordpress.org/Automated_Testing#Running_The_Tests is documented in codex] (see ''Note for Windows Users'' remark), the 2. is not. After the patch is provided that notice can be removed in codex.

Additionally I've extended the README.txt for the commandline parameters and wordwrapped it.",hakre
Future Releases,24079,Inline Docs for unit-tests,SergeyBiryukov,Unit Tests,,normal,normal,WordPress.org,defect (bug),closed,,2013-04-13T20:56:19Z,2013-04-14T03:47:23Z,Added doc blocks for unit testing framework,bobbravo2
Future Releases,22989,Translation units tests loading test data from non-dynamic path,,Unit Tests,3.5,normal,normal,WordPress.org,defect (bug),closed,,2012-12-18T09:07:44Z,2012-12-19T09:22:44Z,"Many of the current translation (pomo) unit tests load test files from paths not prefixed with DIR_TESTDATA.

The problems happen when the bootstrap.php file is located in a different folder from the default. In that case the mentioned tests fail with errors like {{{fopen(data/pomo/{filename}): failed to open stream: No such file or directory}}}.

'''Reproducing this error'''

Default bootstrap location, tests succeed:

`www/test_svn/bootstrap.php`[[BR]]
`www/test_svn/tests/`[[BR]]
`www/test_svn/data/pomo/test_mo.php`

Tests fail when bootstrap is moved &/or executed by other files:

`www/visualphpunit/bootstrap.php`[[BR]]
`www/test_svn/tests/`[[BR]]
`www/test_svn/data/pomo/test_mo.php`

The attached patch prefixes all the offending tests with DIR_TESTDATA so they can correctly locate the testdata even when the bootstrap is relocated.",mbijon
Future Releases,24173,Unit tests: Support subdirectory multisite installs,,Unit Tests,,normal,normal,Awaiting Review,defect (bug),new,,2013-04-24T05:57:49Z,2013-04-24T09:06:15Z,"I have unit tests set up at:
localhost/wordpress-tests/

And have set:
`define( 'WP_TESTS_MULTISITE', true );`

However, currently, unit testing doesn't support subdirectory multisite installs.  It fails when installing multisite.

Attached patch addresses this and introduces a new constant called `'WP_TESTS_PATH'`.

If this is set in `wp-tests-config.php`, this will make sure that PHPUnit can install WP for subdirectory multisite installs.",r-a-y
Future Releases,23690,Allow plugin test bootstraps access to tests_add_filter() earlier,scribu,Unit Tests,,normal,normal,WordPress.org,enhancement,closed,,2013-03-04T18:15:06Z,2013-03-04T18:27:53Z,"Currently, plugins that have their own unit tests have a bootstrap.php file that looks like this:

{{{
<?php

$GLOBALS['wp_tests_options'] = array(
    'active_plugins' => array( basename( dirname( dirname( __FILE__ ) ) ) . '/my-plugin.php' ),
);

require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
}}}

The problem is that the plugin folder needs to be inside `WP_CONTENT_DIR . '/plugins/'`, which is an artificial requirement.

The bootstrap file could just `require()` the plugin file themselves and everything will work, *except* for one thing: hooks such as 'plugins_loaded' or 'init'.

With the attached patch, the file could look like this:

{{{
<?php

require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';

tests_add_filter( 'muplugins_loaded', function() {
	require __DIR__ . '/../my-plugin.php';
} );

require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
}}}",scribu
Future Releases,23699,Better `wp_unique_filename` tests,joehoyle,Unit Tests,,normal,normal,WordPress.org,enhancement,closed,,2013-03-05T20:56:40Z,2013-03-07T04:21:29Z,"I refactored the wp_unique_filename test case, as it was rather old and too complicated. The new tests are a lot more linear with no looping, no requirement to write to filesystem. Also, the old one didn't work if you had wp installed in a path with spaces",joehoyle
Future Releases,23531,Separate tests into unit / integration / ... directories,,Unit Tests,trunk,normal,normal,Awaiting Review,enhancement,new,,2013-02-19T15:51:16Z,2013-02-19T15:51:16Z,"To improve the speed how tests can be run - especially the unit-tests - I suggest to divide tests into sub-directories, for example:

''unit'' - for unit tests[[BR]]
''integration'' - for integration tests[[BR]]
''functional'' - for functional tests  

Right now all tests are roughly labeled as ""Unit-Tests"" even they are not unit-tests per-se, e.g. some of them interacting with the database or the file-system.

Background: [http://stackoverflow.com/q/4904096/367456 What's the difference between unit, functional, acceptance, and integration tests?]",hakre
Future Releases,23532,Sync Tests Repository on Github,,Unit Tests,,normal,normal,WordPress.org,enhancement,new,,2013-02-19T15:56:53Z,2013-04-18T13:31:26Z,"Like with Wordpress, the tests should be synched as well with a git repository under

    https://github.com/WordPress/

Especially after taking in 

    https://github.com/nb/wordpress-tests",hakre
Future Releases,22212,WP_User_Query( array('role' => $role) ) should accept array or not return anything if array,,Users,,normal,normal,Awaiting Review,enhancement,reopened,needs-unit-tests,2012-10-17T12:37:43Z,2013-03-26T22:52:38Z,"I got a small problem with WP_User_Query - i wanted to find users from more then one roles to send them e-mail, so i did


{{{
$role = array('role-1','role-2);
$wp_user_search = WP_User_Query( array('role' => $role) );
$users = $wp_user_search->get_results()
foreach ($user) ... send wp_mail
}}}


problem is, that role param accepts only string. It would not be a problem if it would return nothing, problem was, that it actually returns ALL users, so i have send my author-only emails to all thousands users in database :-(

I know that it is my fault, that i have to read documentation, but i thought, that it works as other wp queries, so if the parame do not fit, it throws error, but it does not.",thomask
Future Releases,15058,Validate option and transient name lengths,,Validation,3.1,normal,normal,Future Release,enhancement,new,needs-unit-tests,2010-10-07T15:37:46Z,2013-05-17T15:52:23Z,"The option_name column in the options table holds up to 64 characters yet there aren't any length checks to ensure that the length isn't exceeded. This leads to all sorts of odd behavior as the name will be truncated to fit, saving the option but not allowing it to be retrieved with the same name.

This issue affects all uses of the options system. A particular annoyance is transients. A transient that doesn't expire has a max name length of 53 characters yet a transient that does expire has a max name length of 45 characters. When attempting to save an expiring transient of name length between 46 and 53 characters, the transient will store but will be deleted before being used when get_transient is called due to the missing _transient_timeout_ option (since it was too long).

The core issues are that the functions don't return any type of failure condition on names that are too long and no warning is created. So, I've created a patch that addresses both of these issues.

The patch shows an example of how option and transient name length validation can be added. In order to allow users to modify the option_name column length, a new constant, WP_OPTION_LENGTH, is created with a default value of 64. This constant is checked for all length validation.

This is simply an example of how I'd like the validation to function. I'm not attached to the wording of the warnings or the name of the constant.",chrisbliss18
Future Releases,11160,Inconsistancies in Naming and Using Sidebar Names and IDs.,azaozz,Widgets,2.9,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2009-11-17T12:58:55Z,2012-11-22T03:18:21Z,"register_sidebar() allows more sidebar names and IDs to be registered than dynamic_sidebar() recognizes as valid names and IDs.

For example, register_sidebar() allows me to name a side bar ""1"" with a id of ""first"". I don't know why anyone would choose those values, but register_sidebar() allows it [1].

{{{ register_sidebar( array('name' => 1, id => 'first') ); }}}


dynamic_sidebar() will not be able to find the sidebar given its name (1).
{{{
    if ( is_int($index) ) {
        $index = ""sidebar-$index""; /// 1 becomes 'sidebar-1'
        ...
}}}
The main problem is that dynamic_sidebar() is trying to process both IDs and names through the same variable ($index) while register_sidebar() separates the two with an array ( array('name' => 'Top', 'id' => 'sidebar-1' ).

According to the in-line docs for dynamic_sidebar():

    It is confusing for the $index parameter, but just know that it should just work. When you register the sidebar in the theme, you will use the same name for this function or ""Pay no heed to the man behind the curtain."" Just accept it as an oddity of WordPress sidebar register and display.


It does ""just work"" if you never use your own sidebar IDs.


I started looking at this because I wanted to use is_active_sidebar() which tests to see if a dynamic_sidebar() has anything in it. There is no get_dynamic_sidebar(). dynamic_sidebar() sends everything to the browser or returns false.
{{{
    register_sidebar( array('name' => 'Top') ); // id defaults to ""sidebar-1""
    ...

    if ( is_active_sidebar('Top') )
        dynamic_sidebar('Top');
}}}
Which fails because is_active_sidebar() just completely skips over searching for an id to go with a name. To get it to work you need to know when it was registered. Not something theme authors and designers are going to follow easily. There's a ticket to fix this: [http://core.trac.wordpress.org/ticket/10440 #10440]
{{{
    if ( is_active_sidebar(1) )
        dynamic_sidebar('Top');
}}}
Like dynamic_sidebar(), is_active_sidebar() converts 1 to ""sidebar-1"". Unlike dynamic_sidebar() it assumes everything is entered as an id.


unregister_sidebar() assumes its parameter (incorrectly named $name, not $id) is an id. But it wants a literal id, like ""sidebar-1"". unregister_sidebar(1) unregisters a sidebar with an id of 1, while dynamic_sidebar(1) tries to display a sidebar with an id of ""sidebar-1"".


=== Widgets (Admin Page) ===

The dynamic_sidebar() function is used by the Widgets management page. So, it is possible to create a sidebar with register_sidebar() that dynamic_sidebar() cannot find. You can populate it with drag and drop [2] and not have it appear on the web site.


== After Patch ==

If committed, this patch would remove the need for tickets [http://core.trac.wordpress.org/ticket/10440 #10440] and [http://core.trac.wordpress.org/ticket/10956 #10956]. It changes the current argument behavior of unregister_sidebar(), but doesn't break backward compatibility. It allows is_active_sidebar(), unregister_sidebar() and dynamic_sidebar() all point to the same sidebar.

=== Before ===

These all refer to the same sidebar:
{{{
	is_active_sidebar(1);
	unregister_sidebar('sidebar-1');
	dynamic_sidebar('Sidebar Top');
}}}

In an admittedly contrived case, dynamic_sidebar() would silently fail to allow this sidebar to show:
{{{ register_sidebar( array('name'=>'Sidebar Top', 'id' => 1) ); }}}



=== After ===
These all refer to the same sidebar (the first two would have broken before the patch):
{{{
	is_active_sidebar('Sidebar Top');
	unregister_sidebar('Sidebar Top');
	dynamic_sidebar('Sidebar Top');
}}}

After the patch this shows fine:

{{{ register_sidebar( array('name'=>'Sidebar Top', 'id' => 1) ); }}}

After the patch it is possible to force an argument to be only a name or only an id:
{{{
	is_active_sidebar(array( 'name' => 'Sidebar Top' ));
	unregister_sidebar(array( 'name' => 'Sidebar Top' ));
	dynamic_sidebar(array( 'id' => 1 ));
}}}



=== Notes ===

[1] register_sidebar() allows the user to override the default setting of: 'id' => ""sidebar-$i"",

[2] When you refresh the Widgets management page the widgets will disappear from the sidebar. They are still attached to a sidebar, but dynamic_sidebar() cannot see the sidebar.",CharlesClarkson
Future Releases,16985,XML-RPC endpoint set the datetime when saving a Draft,,XML-RPC,3.1,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2011-03-28T13:33:46Z,2012-06-24T00:15:12Z,"When uploading a draft post from one of the WordPress mobile apps the post date is set to the current time/date, even if the datetime field is not specified on the client request.
This could cause issues, because when you change the post status to ""publish"" it will be published using the date set during the first upload.

On the web dashboard if you do not set the post datetime explicitly, it is not set and hitting publish will then populate the datetime field with the current time.

The same happens if you start a draft on the web and then you publish it using any mobile apps.

details here: http://ios.trac.wordpress.org/ticket/826",daniloercoli
Future Releases,20026,Adding a post_type filter in wp.getComments,westi,XML-RPC,,normal,normal,Future Release,enhancement,reviewing,needs-unit-tests,2012-02-12T15:48:53Z,2012-08-05T19:45:16Z,This will be usefull when with the new custom post type support in XMLRPC,nprasath002
Future Releases,23099,Add JSON-RPC support using existing XML-RPC methods,,XML-RPC,3.5,normal,normal,Future Release,feature request,new,needs-unit-tests,2013-01-02T01:22:37Z,2013-04-22T21:18:54Z,"Many people have expressed interest in a JSON API for WordPress core. Until a full REST API can be implemented, the existing XML-RPC method implementations can be re-used by wrapping them in JSON-RPC serialization/de-serialization logic.",maxcutler
