﻿_filename	ticket	Milestone	type	summary	workflow	component	version	severity	priority	modified	_description
testing-script.php	18738	Future	accepted enhancement	Improving cron spawning and other non-blocking HTTP requests	has-patch	HTTP		normal	high	2011-09-24T06:11:16Z	"The order of preference for transport methods in the HTTP API is cURL, streams, fsockopen. However cURL and streams cannot perform non-blocking requests, but fsockopen can. Therefore, fsockopen should be the highest priority transport method for non-blocking HTTP requests.

Here's an example. I have a script at `http://ctftw.com/sleep.php` which sleeps for 5 seconds.
{{{
$start = microtime( true );
wp_remote_get( 'http://ctftw.com/sleep.php', array(
	'blocking' => false
) );
$end = microtime( true );
var_dump( $end - $start );
}}}
When the cURL or streams transports are used, this request blocks the page for 5 seconds (the default request timeout is 5 seconds).

Let's disable the cURL and streams transports (leaving only fsockopen) and try again:
{{{
add_filter( 'use_curl_transport',    '__return_false' );
add_filter( 'use_streams_transport', '__return_false' );

$start = microtime( true );
wp_remote_get( 'http://ctftw.com/sleep.php', array(
	'blocking' => false
) );
$end = microtime( true );
var_dump( $end - $start );
}}}
This request does not block the page because fsockopen returns immediately after sending the request.

== Cron Spawning ==

This is a benefit to core because it improves the cron spawner (and can potentially fix #8923). The cron spawner uses a timeout of 0.01 seconds and a non-blocking request, but actually takes longer than 0.01 seconds.

Example:
{{{
$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron';
$start = microtime( true );
wp_remote_post( $cron_url, array(
	'timeout' => 0.01,
	'blocking' => false
) );
$end = microtime( true );
var_dump( $end - $start );
}}}
This request takes around 1.1 seconds on the three servers I've tested it on.

Let's disable cURL and streams again (leaving only fsockopen) and see what we get:
{{{
add_filter( 'use_curl_transport',    '__return_false' );
add_filter( 'use_streams_transport', '__return_false' );

$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron';
$start = microtime( true );
wp_remote_post( $cron_url, array(
	'timeout' => 0.01,
	'blocking' => false
) );
$end = microtime( true );
var_dump( $end - $start );
}}}
On each of my three servers I see a time of around 0.001 seconds.

We can therefore improve the cron spawner by setting fsockopen as the preferred transport method for non-blocking HTTP requests.

In an attempt to address #8923, we can change the cron request timeout to 1 second. If fsockopen is used, the request is lightning fast at ~0.001 seconds. If it's not available and the HTTP API falls back to cURL or streams then it takes ~1.1 second, which is the same time it takes currently. (Hopefully that makes sense.)

Patch coming up for those who want to test it."
15256.2.diff	15256	Future	reopened defect (bug)	?cat=## permalinks do not redirect when category is a parent	needs-testing	Canonical	3.0.1	normal	high	2011-09-19T07:19:37Z	"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?"
7395.2.diff	7395	Future	new enhancement	Plugins within a folder (in SVN) should be moved up a level in our plugin upgrader	needs-patch	Administration	2.6	normal	high	2008-11-05T02:16:18Z	The Paged Comments plugin exists in SVN under a 'paged-comments' directory.  Since the auto-upgrader puts plugins into a directory based on their slug, this results in the plugin being under two 'paged-comments' directories.  We should be able to identify when a plugin's trunk (or current branch) directory contains only another directory, and move the whole plugin up a level.
16889.diff	16889	3.6	reopened defect	Having a location header does not mean that there should be a redirection.	has-patch	HTTP	3.1	normal	normal	2013-03-04T06:34:16Z	"Having a location header does not mean that there should be a redirection.

Automatic redirection depends foremost on the response code, not not having a location header.

See the descrption of #16888 for related RFC links.

Related: #11305"
23472.diff	23472	3.6	new enhancement	Retrieve the first x bytes of a remote file	has-patch	HTTP		normal	normal	2013-02-14T01:31:29Z	"A commonly useful functionality in HTTP clients is to only request the first x bytes of a document, this can be useful for example, when you only need to fetch the first few KB of a image so as to determine it's dimensions from the initial metadata in the file.

At present, we have no way to offer this through WP_HTTP, The attached patch is a first-scratch effort at adding it. No proper unit tests so far, just casual testing which confirms it working. 

Patch
* Supports all 3 transports
* Handles streaming-to-file as well
* Doesn't include Headers in the byte count
* Works with Redirects

I'll add some Unit tests for this soon hopefully."
22952.2.diff	22952	3.6	new enhancement	WP_HTTP can cause PHP Warnings during attempted decompression	needs-testing	HTTP		normal	normal	2012-12-15T07:53:57Z	"{{{
WARNING: wp-includes/class-http.php:1656 - gzinflate(): data error
}}}

WP_Http_Encoding can cause PHP Warnings when it attempts to decompress data using gzinflate() which has been encoded in any way.
We currently work around this this in a few ways, but we still take a ""try it and see"" method instead of detecting the compressed contents signature and handling it appropriately.

Attached is a first-run patch at detecting Huffman coding, which is what we currently use `@gzinflate( substr( $gzData, 2 ) )` for (and hey, who doesn't like making magic numbers clearer?)

I have been running a similar patch on !WordPress.com and gathering data on how the myriad of different Web Servers out there respond, and so far this causes it to correctly identify the vast majority of responses.

It appears that we may also be attempting to decompress compressed files retrieved through WP_HTTP on some poorly configured servers, but this is something I haven't yet traced properly."
8177.diff	8177	3.6	new defect (bug)	Comments disabled in post but not in media gallery	has-patch	Gallery	2.7	normal	normal	2009-01-09T09:49:53Z	"The options to ""allow comments on this post"" and ""allow trackbacks and pingbacks on this post"" have been deselected.  The post will then return the expected message ""Both comments and pings are currently closed"".  (ie. http://localhost/wordpress/?p=42)  However, when selecting an image from an embedded native Gallery of that post, the image redirects to an attachment_id (ie. http://localhost/wordpress/?attachment_id=38)and still has a comments field.  There is no decipherable means to disable comments on attachments through the native gallery.  

If this is the expected behavior, I would believe that if a post may disable comments, then all of its content should be disabled.

Related: #9839 Enable/Disable comments on a per item bases (some attachments don't have parents)"
22239.diff	22239	Awaiting Review	new defect (bug)	wp_ob_end_flush_all() tries to destroy non-destroyable output buffers	needs-patch	Warnings/Notices		normal	normal	2012-10-21T03:27:28Z	"`wp_ob_end_flush_all()` currently tries to flush & destroy every PHP Output buffer that is enabled on the current installation.
However, not every type of PHP Output buffer can be destroyed, which will cause a PHP Notice when attempts to do so are made.
An example of this is PHP extensions such as New Relic, or PHP output buffers created with the `$erase` flag set to false in `ob_start()`

An example is when New Relic is installed on a host, also [https://newrelic.com/docs/php/php-agent-faq#rum-obclean see New Relics FAQ entry] on the issue.
{{{
( ! ) Notice: ob_end_flush(): failed to send buffer of New Relic auto-RUM (1) in ../trunk/wp-includes/functions.php on line 2641
Call Stack
#	Time	Memory	Function	Location
1	0.8510	4328360	shutdown_action_hook( )	../load.php:0
2	0.8510	4328440	do_action( )	../load.php:556
3	0.8510	4329856	call_user_func_array ( )	../plugin.php:406
4	0.8510	4329888	wp_ob_end_flush_all( )	../plugin.php:406
5	0.8511	4330064	ob_end_flush ( )	../functions.php:2641
}}}

Somewhat similar to #18239
I'm not sure of what the ideal solution for this would be for !WordPress, but wanted to record the issue being known."
19028.diff	19028	Awaiting Review	reopened defect (bug)	make_clickable fails when <a ...> contains \r characters	dev-feedback	Formatting	3.2.1	minor	normal	2011-10-22T07:30:58Z	"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."
18385.patch	18385	Awaiting Review	new enhancement	"Canonical redirections not suited for Queries with multiple query vars and ""pretty permalinks"" in general"	dev-feedback	Canonical	3.2	normal	normal	2011-08-12T09:06:32Z	"When the Canonical code was originally written, it served it's purpose quite well. However, over the years the number of Query vars which can be used to access content via has increased, and so have the number of archive views. This has lead to increased complexity in the Taxonomy canonical code which has needlessly caused bugs.

What I'm proposing, is that it might be time to lay to rest the current `if.. elseif.. elseif..` style checks, It's not possible for 1 if branch to handle every single access point without duplicating another branch.

As a result, I've put a half-finished together alternate version of Canonical, It's based on tallying up which query vars have been used/accounted for and removing any duplicates.. It's certainly not the best, but it's fairing better with the unit tests so far.

{{{
Unit Testing: http://unit-tests.trac.wordpress.org/browser/wp-testcase/test_includes_canonical.php
Before: FF.......FFFF..FFF.....F......FFFFFF.F....F.....FF....FF...
 After: FF...........FFF..................FF..................F....
}}}

It's a work in progress, but it's worth considering IMO.

Attaching a diff, and the full file (since the diff is going to be rather unreadable in some sections)"
17065.diff	17065	Awaiting Review	new enhancement	Independent ASC/DESC in multiple ORDER BY statement.	needs-testing	Query	3.1	normal	normal	2011-04-24T06:34:31Z	"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."
16858.diff	16858	Awaiting Review	reopened defect (bug)	Usage of HTTP_HOST in the administration	reporter-feedback	Administration	3.1	normal	normal	2011-03-24T11:09:47Z	"In some files like wp-admin/includes/class-wp-list-table.php (there are more files I think), some links are created by using the HTTP_HOST variable.

It's better to use the defined wordpress URL to create those links.

In our case, we have a wordpress running behind a Squid cache. When you check for HTTP_HOST you get the *real* HOST and not the one with the Squid server.

To bypass the problem, I added in the main config.php a line like this :

{{{
$_SERVER['HTTP_HOST'] = 'www.my-visible-http-host.com';
}}}

Without this setting and in our case, some links in the admin (next, previous page, re-ordering...) where pointing to the wrong server.
"
14401.diff	14401	Awaiting Review	reopened defect (bug)	Unable to locate WordPress Content directory (wp-content).	reporter-feedback	Upgrade/Install	3.0	normal	normal	2011-03-22T00:37:52Z	"Hi, I encounter this message on one server during plugin install: ""Unable to locate WordPress Content directory (wp-content).""

PHP Version 5.2.0-8+etch1

Another info from Core Control plugin:

Direct Not Available

SSH2 Not Available

PHP FTP Extension Available

PHP FTP Sockets Available

ABSPATH: /home/www/domain.eu/subdomains/www/ 

WP_CONTENT_DIR /home/www/domain.eu/subdomains/www/wp-content
 
WP_PLUGIN_DIR /home/www/domain.eu/subdomains/www/wp-content/plugins

DOCUMENT_ROOT (from phpinfo)  /home/www/domain.eu/subdomains/www

I tried some hacks in wp-config.php, but I was not successfull.

When I tried ftpsockets, following error appears:

Warning: socket_last_error() expects parameter 1 to be resource, null given in /home/www/domain.eu/subdomains/www/wp-admin/includes/class-ftp-sockets.php on line 59

When I tried direct, following error appears:

Downloading install package from http://downloads.wordpress.org/plugin/wp-memory-usage.zip…

Unpacking the package

Could not create directory. /home/www/domain.eu/subdomains/www/wp-content/upgrade/wp-memory-usage.tmp"
23463.diff	23463	Future	new defect (bug)	WP_HTTP  HTTP/1.1 needs to send Connection Close + support Transfer-encoding better	has-patch	HTTP		normal	normal	2013-02-13T06:16:26Z	"WP_HTTP accepts a 'httpversion' argument, and supports some functions of it (such as Transfer-encoding).

However, there are 2 things which are rather broken
1. It doesn't send a `Connection: close` header, so the connection is held open and WP_HTTP never returns
1. Transfer-Encoding: chunked appears to be rather broken, causing it to returning the end of the document rather than the decoded document.

The attached patch goes some of the way towards making that work better, but is mostly untested, and could do with a unit test or two."
fs.php	20652	Future	reopened defect (bug)	Install plugins with FTP upload, virtual subdomain, bad base dir?	needs-patch	Upgrade/Install	3.3.2	normal	normal	2013-01-06T05:30:10Z	"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
"
lp.4.diff	18200	Future	accepted task (blessed)	Language Packs	has-patch	Upgrade/Install		normal	normal	2012-09-29T04:09:33Z	"Implement language packs for core, plugins, and themes.

Inspiration and code can hopefully be derived from the corresponding GSoC project.

This will require quite a bit of work in GlotPress, on api.wordpress.org, and in core. I will take point, but assistance will be needed. A number of decisions will need to be made. I will begin designing a document for what exactly needs to be done over the next week."
19781.diff	19781	Future	new defect (bug)	All update processes should be within an iframe	has-patch	Upgrade/Install		normal	normal	2012-03-18T06:23:50Z	"Currently some of the update processes run within iframes, others don't. 

We should standardise on all within an iframe.

Running inside the iframe has the advantage that the footer of the page is loaded, and therefor, the Toolbar will load, rather than the page appearing half-loaded for certain upgrade/install processes.

Currently, Processes which run inside iframes are Bulk updates, Singular updates load directly.

~~We should also investigate a iframe overlay that contains a ""Working.. please wait"" graphic that clears once the content of the iframe starts loading, This should help ease the pain of not being sure if the update process has started on servers that force gzip (and as a result, provide no user feedback until the process is complete) - See #18525 and #18239 for examlples of that~~ see #19783"
18289.6.diff	18289	Future	reviewing task (blessed)	Direct link to plugin installation should have admin chrome	needs-testing	Upgrade/Install		normal	normal	2011-10-05T13:52:30Z	"We should be able to provide a direct link to the page to install a plugin, based on the plugin's slug. This does it: wp-admin/plugin-install.php?tab=plugin-information&plugin=log-deprecated-notices. However, there's no admin chrome, no real indication which site you're on, and no name of the plugin.

If we're not loading that page inside an iframe request, it needs the admin around it, as well as a heading. Probably new styling too.

This would serve as a replacement for [http://coveredwebservices.com/wp-plugin-install/ Jaquith's bookmarklet], which broke in 3.2 (frame busting), as well as allow us to integrate a link on extend/plugins for plugin installation. Related, #16923, which is now closed."
WP_Request.php	18322	Future	new defect (bug)	The Road to Magic Quotes Sanity	needs-patch	General	3.2.1	normal	normal	2011-10-02T04:21:46Z	For back compat reasons, wp_magic_quotes() performs addslashes() on GPCS data.  This is a pain, especially given that some core API expects slashes and some doesn't.  In hopes of someday losing the automatic GPCS slashing, let's introduce a flag to turn off the slashing as well as slash and unslash functions that consult the flag.  If slashing is on, these functions add and strip slashes.  If slashing is off, they return data unchanged.  Plugin authors can start using these functions and testing their code with GPCS slashing turned off and on.  Eventually, GPCS slashing would default to off and all calls to the slash and unslash functions could be removed from core.
17552.patch	17552	Future	new defect (bug)	Plugin editor incorrectly calls some files inactive.	has-patch	Plugins	3.1	normal	normal	2011-08-12T14:13:07Z	"The plugin editor has a helpful bit of text at the top to specify if the current file is active on the site or not; This works fine in most cases, however, I've noticed that it only works for the ''plugin file itself''. 

Ie. Editing akismet/akismet.php will specify it's active, Editing akismet/admin.php will show as inactive.

This is due to the use of is_plugin_active() from memory. The solution to this would be to run is_plugin_active() on {{{$_GET['plugin']}}} instead of the file being edited.

{{{$_GET['plugin']}}} has it's own bug however, It's set to whichever file was edited before you loaded the current file (when you switch between files in a plugin that is), which in some cases will be correct, in many others when you're editing multiple files, It'll be incorrect."
18386.patch	18386	Future	new defect (bug)	"Bug in custom query when ""Front page displays"": ""A static page"""	dev-feedback	Query	3.2.1	normal	normal	2011-08-12T11:20:45Z	"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."
17646.2.diff	17646	Future	new defect (bug)	wp_get_object_terms should return arrays of integers for IDs and tt_IDs	has-patch	Taxonomy	3.2	normal	normal	2011-06-02T02:48:41Z	"Currently when you use ```wp_get_object_terms``` to request an array of IDs or tt_IDs, the array returned contains strings representing the IDs, not integers. This then creates issues if you send the values back into ```wp_set_object_terms``` as it creates terms named as per those strings, rather than associating the term_ids as expected.

Code to prove the issue:

{{{
$term_ids = wp_get_object_terms( get_the_ID(), 'category', array( 'fields' => 'tt_ids' ) );
var_dump( $term_ids );
}}}

Results in:

{{{
array
  0 => string '1' (length=1)
  1 => string '5' (length=1)
}}}

I believe that the array should have all values cast to integers before they are returned. The attached patch does this by mapping a created function to utilise ```(int)``` for the desired result."
warning.jpg	16216	Future	new enhancement	Hide core updater if running an svn checkout	has-patch	Upgrade/Install		normal	normal	2011-04-19T05:29:35Z	The logic with this patch is if you are running an svn checkout, do not display the core updater code and instead display a reminder.
16057.htttp.diff	16057	Future	new defect (bug)	download_url() error checking fails to notice that the file wasnt correctly witten to disk	needs-testing	Upgrade/Install	3.0	normal	normal	2011-04-19T05:06:38Z	"When upgrading/installing plugins, themes and WordPress download_url() is called to download the package to a temporary file.

At present, the return value of fwrite() is not checked, the result can be that the file is not written to disk correctly and subsequently, the Zip extraction fails.

This appears as if it can be caused by the user running out of disk space, as seen here: http://erisds.co.uk/wordpress/wordpress-automatic-upgrades-one-of-the-pitfalls

I'm attaching a patch which appears to fix it for me, however, As I do not have a setup where I can enforce a quota I cannot test the saving of the file without fudging the return value of fwrite() to something lower than expected."
16979.diff	16979	Future	new enhancement	Extra hooks needed in comment process	dev-feedback	Comments		normal	normal	2011-04-16T03:46:36Z	"I'm running into a few commenting issues whilst building a plugin with a custom post type..

 * Duplicate comment check's cannot be bypassed
 * Empty comments are not allowed (In this case, the comment body is empty whilst a set of custom fields acting as metadata are set, meaning, the plugin wants to accept that comment)
 * being able to override the wp_die() in the commenting process would be useful (Currently: Duplicate comments, User not logged in, and not all fields filled in will cause this)

One potential solution would be to move [http://core.trac.wordpress.org/browser/trunk/wp-comments-post.php#L55 lines 55-84] from `wp-comments-post.php` to functions hooked to `preprocess_comment`"
16156.diff	16156	Future	new defect (bug)	update-core is oblivious to api.wp.org being unreachable	dev-feedback	Upgrade/Install		normal	normal	2011-04-04T07:12:56Z	"A server running 3.0.4 had trouble reaching *.wordpress.org for some unknown reason. (This wasn't during the brief api.wp.org outage, and it worked otherwise.)

Problem is, update-core was completely oblivious to this. It's even worse when running 3.1, because the 'Check Again' button will refresh the page and tell you we last checked for updates *just now*.

Try Again or Check Again should reflect that the API is unreachable when this can be determined. Claiming that we checked for updates is also really lame, so we should see if the transient tells us how long it's been since the last one.

Side note, the plugin install et al. HTTP error messages are rather cryptic, and we should also make those more user friendly."
10884.diff	10884	Future	accepted defect (bug)	Available plugin update count disappears after updating plugin	dev-feedback	Upgrade/Install	2.8.4	normal	normal	2011-04-03T10:48:06Z	"When there are any available plugin updates, WP displays number of them next to ""Plugins"" item in menu. However when you have more than one update available and update one plugin, it disappears.

Steps to reproduce:[[BR]]
- make sure you have more than one plugin with update available (WP should count of them in menu);[[BR]]
- go to the Plugin page and click on Autoupdate link for plugin;[[BR]]
- when update page will load completely, click on provided link to return to plugin list.

Expected result: WP displays new number of available updates next to Plugins menu.[[BR]]
Actual result: nothing is displayed.

Note: I tested this for inactive plugins only."
16895.diff	16895	Future	new enhancement	wp_list_pluck cannot be used with arrays of references	has-patch	General	3.1	normal	normal	2011-03-19T11:49:26Z	"Example code:

{{{
$one = array('num' => 1);
$two = array('num' => 2);
$input = array( &$one, &$two );

$nums = wp_list_pluck($input, 'num');

var_dump($nums, $input);
}}}

Example output:
{{{
array
  0 => &int 1
  1 => &int 2
array
  0 => &int 1
  1 => &int 2
}}}
Expected output:
{{{
array
  0 => int 1
  1 => int 2
array
  0 => &
    array
      'num' => int 1
  1 => &
    array
      'num' => int 2
}}}

This is caused by wp_list_pluck using the same variable name for the input array, and then overwriting it for the return.

One such real life example, is $wp_query->comments

See patch"
Untitled.png	16683	Future	new defect (bug)	Nonce failure error message causes a warning, and also ugly error.	has-patch	Administration	3.1	normal	normal	2011-02-27T04:05:29Z	"{{{
( ! ) Notice: Undefined offset: 4 in C:\www\wordpress-commit\wp-includes\functions.php on line 2624
Call Stack
#	Time	Memory	Function	Location
1	0.1991	455408	{main}( )	..\options-permalink.php:0
2	15.8632	23506944	check_admin_referer( )	..\options-permalink.php:69
3	15.8637	23507168	wp_nonce_ays( )	..\pluggable.php:839
4	15.8638	23507240	wp_explain_nonce( )	..\functions.php:2657


Your attempt to change your permalink structure to: has failed.
}}}

I left the permalink page open for a few hours, and just went to update it. Upon clicking update, I was given the above error (see attached jpeg). It feels pretty clunky and average to have a simple text like that.

The warning looks to be caused by the nonce error not being set possibly.."
16282.diff	16282	Future	reopened defect (bug)	PHP catchable error with get_term_link and WP3.1RC2	has-patch	Multisite	3.1	major	normal	2011-01-24T21:37:22Z	"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"
15949.diff	15949	Future	new defect (bug)	WP 3.0.x comments popup on pages returning 404 [including posible solution]	has-patch	Query	3.0	normal	normal	2010-12-26T23:30:48Z	"comments-popup does not work on pages (but still working on blog entries) since the 3.0.x upgrade.

i confirm bug and sollution on both: my own theme and on default them after adding comments_popup_link and comments_popup_script functions.

after a long time looking for a solution i found that the new ""handle_404"" method in class WP (wp-includes/classes.php line 475) is the responsable, substituing this method with an older one from wp 2.x brunch solves the problem.

looks like the new method ""think"" that there is no content when the index file is called with comments_popup parameter on a page id, so it returns a 404 status, as said the old one solves the problem.

"
14873.diff	14873	Future	new defect (bug)	HTTPS related issue with ms-settings.php	dev-feedback	Multisite	2.9	normal	normal	2010-10-04T04:35:15Z	"ms-settings.php hard-codes ""http://"" in a few places.  This didn't impact me, but I can see that it might impact someone.  

Hopefully, a developer can take a look at the code and verify that, in fact, it has to change.  Seems like it does since hard-coding ""http:"" isn't a good practice, but I don't want to claim it since I haven't seen the need for it personally.

Here's the updated code that needs to replace the code in ms-settings.php starting at line 83 and ending at line 105:
{{{
        $protocol = is_ssl() ? 'https://' : 'http://';

        if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) {
                if ( defined( 'NOBLOGREDIRECT' ) ) {
                        $destination = NOBLOGREDIRECT;
                        if ( '%siteurl%' == $destination )
                                $destination = $protocol . $current_site->domain . $current_site->path;
                } else {
                        $destination = $protocol . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
                }
                header( 'Location: ' . $destination );
                die();
        }

        if ( ! defined( 'WP_INSTALLING' ) ) {
                if ( $current_site && ! $current_blog ) {
                        if ( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
                                header( 'Location: ' . $protocol . $current_site->domain . $current_site->path );
                                exit;
                        }
                        $current_blog = get_blog_details( array( 'domain' => $current_site->domain, 'path' => $current_site->path ), false );
                }
                if ( ! $current_blog || ! $current_site )
                        ms_not_installed();
        }
}}} "
13989.diff	13989	Future	new enhancement	Recent Comments widget optimization	needs-patch	Optimization	3.0	normal	normal	2010-06-19T06:31:45Z	"Currently when permalinks are enabled, the recent comments widget will call get_post() on each parent post to retrieve its permalink.

In the event that the posts the recent comments are on are not in the current query (for example, posts on old posts, or if we're currently on a singular view), then get_post() will perform a SQL query to load the postdata.

The attached patch introduces a {{{cache_posts($post_ids, $term_cache, $postmeta_cache);}}} function to mass load/cache a set of posts through the usage of WP_Query

The function is smart enough not to query for posts which are already in the Object cache (ie. If the comments are on the current page, it'll skip, or if its in a memory cache)

An example of the SQL query generated by this query:
{{{
SELECT wp_posts . * 
FROM wp_posts
WHERE 1 =1
AND wp_posts.ID IN ( 95, 98, 106 ) 
AND wp_posts.post_type IN ('post', 'page', 'attachment', 'wiki', 'note', 'odd')
AND (wp_posts.post_status <> 'trash' AND wp_posts.post_status <> 'auto-draft')
}}}

Explain'd:
{{{
id 	select_type 	table 	 type 	possible_keys 			key 	key_len 	ref 	rows 	Extra 
1	SIMPLE		wp_posts range	PRIMARY,type_status_date	PRIMARY	8		NULL	3	Using where
}}}"
12601.2.diff	13041	Future	new defect (bug)	Canonical redirection will redirect a non-exitant page to a post.	needs-testing	Canonical	3.0	normal	normal	2010-04-18T06:15:14Z	"Following on from #12601

Canonical redirection will kick in for http://localhost/wordpress-commit/apage/something and redirect it to http://localhost/wordpress-commit/2010/02/13/something-else/

#12601 limited redirect_guess_404_permalink() to only searching in the same post_type if one was provided, for posts and pages however, which are builtin, these vars are not set. 

I'm attaching a patch which will prevent a Page -> Post redirection, but not the other way around. - this patch was originally added to the other ticket."
11694.diff	11694	Future	accepted defect (bug)	WP should do sanity checks for paginated posts, pages and comments	has-patch	Template	2.9	major	normal	2010-04-02T08:22:39Z	"Create a post with two pages using the <!--nextpage--> tag. Publish, and browse the post's *third* page.

WP should return a 404 here, rather than the last page of the post.

Along the same lines, it should return the correct canonical urls for paginated posts. Currently, rel=canonical will only ever return the post's first page."
12456.diff	12456	Future	accepted enhancement	Canonical URL redirect issue with post_id/postname permalink structure	tested	Canonical	2.9.2	normal	normal	2010-03-05T12:01:27Z	"The issue:

Using /%post_id%/%postname%/ as permalink structure,
Most canonical redirects work fine, except: 

domain.com/post_id/ brings you to the post but does not redirect to the canonical domain.com/post_id/postname/

Additional info:

The above permalink structure conforms to best practice as described in the codex:
http://codex.wordpress.org/Using_Permalinks#Structure_Tags

Therefore I figured this was a bug, given the attention given to redirecting to the canonical url ""So to avoid confusing search engines and to consolidate your rankings for your content, there should only be one URL for a resource."" 
http://markjaquith.wordpress.com/2007/09/25/wordpress-23-canonical-urls/
"
wp-ajax.php	12400	Future	reopened feature request	Add a wp_loaded hook, an ob_start hook, and an front end ajax hook	dev-feedback	General	3.0	normal	normal	2010-02-28T03:51:59Z	"Requests for some kind of wp_loaded hook have crept up here and there in trac over the years.

Typically, the requester is looking into doing front-end ajax requests and the like. There are other use cases, such as wanting to catch specific URIs -- e.g. a trailing /print/ to the url, which the permalink API is incapable of catching.

They all got rejected on grounds that there is the init hook that can be used just as well for ajax. Or the template_redirect hook in place of an ob_start hook. The list goes on.

When you want WP and plugins to be loaded '''and''' fully initialized, instantiated and ready to go, setting a priority to obscene levels on the init hook works (I typically use 1000000)... but it always feels like you're working around a crippled API.

Starting output buffers on template_redirect with a priority -1000000 feels equally clunky.

Then, there is the front-end ajax. Yes, admin-ajax.php can be used unauthenticated... But the fact of the matter is, you can end up with SSL turned on when it's not useful, and the lack of an wp-ajax.php file makes many a plugin dev wonder where in the bloody hell he should catch his own requests.

It would be sweet if this all got fixed in WP 3.0.

The argument that goes ""a hook already exists"" seems extremely invalid to me. There are many places in WP where two hooks (and oftentimes many more) can be used to achieve the same result. Think wp_headers and send_headers, for instance. What they have in common is some kind of before/after flow, which init and template_redirect are currently lacking.

One could argue that parse_request is nearby init, and that wp is nearby template_redirect, so they'd be good enough. But the first of these parses expensive regular expressions before firing, and both are only known to WP junkies.

Suggested hooks for WP 3.0:

 - a wp-ajax.php file built similarly to admin-ajax.php.
 - an wp_loaded hook at the very end of wp-settings.php, with a commentary that tells plugin authors that init should be used to instantiate, wp_loaded should be used to act once everything is instantiated, and that wp-ajax.php has hooks that are specific to ajax requests.
 - an ob_start (or pre_load_template, or whatever...) hook at the very beginning of template-loader.php, with a commentary that tells plugin authors that the new hook should be used to instantiate such as output buffering once WP is fully loaded, while the second is traditionally used to pick an arbitrary template."
10424.diff	10424	Future	new defect (bug)	change get_filesystem_method()'s code for direct to reflect actual purpose	needs-testing	Filesystem	2.9	normal	normal	2010-02-27T04:38:10Z	"due to tickets such as #10205 and #10423 I propose we add some documentation, or change the code a bit to reflect to others the intended purpose of the code.

Eg, something such as this could potentially work:
{{{
if ( file_owner($temp_file) !== false && file_owner(__FILE__) === file_owner($temp_file) ) {
//use direct
}
}}}

Too many people assume its a typo, and just a complex is_writable() call.."
11060.diff	11060	Future	new defect (bug)	Content-Type of XML feeds is misstated as 'text/html'	needs-testing	Feeds	2.8.6	normal	normal	2010-02-05T13:23:41Z	"I access blog XML feeds via a caching proxy (squid).  The Content-Type in the HTTP response headers is initially reported correctly as 'text/xml', but when a subsequent request is made and the object is stale, wordpress sometimes returns a '304 Not Modified', but also incorrectly re-characterizes the Content-Type as 'text/html'.  Example:

{{{
HTTP/1.0 304 Not Modified
X-Pingback: http://wordpress.org/development/xmlrpc.php
Last-Modified: Sat, 31 Oct 2009 21:28:00 GMT
ETag: ""a4aa82a49dbe294617210eb367fa0997""
Content-type: text/html
Date: Mon, 02 Nov 2009 01:25:17 GMT
Server: LiteSpeed
Connection: close
}}}
I've seen this on 'wordpress.org/development/feed' (LiteSpeed), on a wordpress.com hosted blog (nginx), and on an independent site running wordpress (Apache).
"
11888-streams-test.diff	11888	Future	new defect (bug)	The streams & fopen HTTP transport arn't sending headers that are passed to it	needs-testing	HTTP	2.9.1	normal	normal	2010-01-17T09:22:45Z	"In particular, cookie headers. Related php bugs:

http://bugs.php.net/bug.php?id=41051

http://bugs.php.net/bug.php?id=45092

Based on the second PHP ticket, this would affect systems up to PHP 5.2.9.

I tried to replace $strHeaders with an $arrHeaders array based on the discussions in the second ticket, but it didn't make the slightest difference.

I'm running out of ideas, too..."
10831.diff	10831	Future	reviewing defect (bug)	Autoupgrade: Synchronous FTP client fails while plugin upgrade/installation (on some systems)	needs-testing	Filesystem	2.8.4	normal	normal	2010-01-17T03:08:02Z	"Decription here
http://wordpress.org/support/topic/288093

Apache/2.2.13 (Unix) DAV/2 mod_ssl/2.2.13 OpenSSL/0.9.8k configured

PHP 5.2.10 with Suhosin-Patch 0.9.7 (cli) (built: Jul 14 2009 11:56:54)

pure-ftpd-1.0.22-1

I solved by changing some lines of code in class-ftp-sockets.php 
(_exec and _readmsg)

Below the patch:
http://darkman.it/x/class-ftp-sockets.patch
"
11623.diff	11623	Future	accepted defect (bug)	review options list and update sanitize_option()	needs-patch	Security	2.9	normal	normal	2009-12-26T01:24:37Z	"A lot of options have been added since 2.0.5, and as a result, not all of them have been added to {{{sanitize_option()}}}

Ideally, Options which are to be (int) or absint() should have a filter applied to them here.

Attached patch is for the first option thats brought this up, 'start_of_week' which is tested to be int in some function uses, ignored elsewhere.

I've set this to security as its preventive security.."
11003.diff	11003	Future	new defect (bug)	wp_get_object_terms Returns Duplicate Terms	dev-feedback	Taxonomy	2.9	normal	normal	2009-12-22T11:32:29Z	"wp_get_object_terms() accepts multiple objects in its first parameter.  If the multiple objects have terms in common, then wp_get_object_terms() returns those terms more than once in the returned array of term data.

Patch makes the array of terms unique."
10786.diff	10786	Future	new defect (bug)	Implementation of %my_taxonomy% in permastructs is incomplete	dev-feedback	Permalinks	2.9	minor	normal	2009-09-18T01:57:39Z	"The `register_taxonomy()` function includes a call to `add_rewrite_tag()` which should allow for a site's permastruct to include a %my_taxonomy% tag just like you can include a %category% tag or a %tag% tag, however this implementation is incomplete and doesn't work.

Example:

`register_taxonomy('genre','post');`

should allow you to create a permastruct (from the Settings->Permalinks screen) which includes %genre% in it.

The problem is that `get_permalink()` doesn't check for custom taxonomies and the replacement of %genre% with your post's genre in the permalink doesn't happen.

Patch upcoming."
test.php	6778	Future	reopened enhancement	Detect when the config will cause infinite loop	2nd-opinion	Permalinks	2.5	normal	normal	2009-08-16T12:00:19Z	"Behavior:

If you put in http://www.domain.com in the ""Wordpress Address"" setting, then Wordpress will automatically do a redirect from http://domain.com to http://www.domain.com.  Many hosting packages allow the user to deal with www and non-www versions of their domain.  This will cause an infinite redirect loop if, for example, the ""Wordpress Address"" is set to http://www.domain.com and the hosting setting is set remove the www from the domain address-- to redirect http://www.domain.com to http://domain.com.

Expected behavior:

When setting the ""Wordpress Address"" setting, it should detect if the canocical code will cause an infinite redirect loop and warn/correct the mistake"
10535.2.diff	10535	Future	reopened defect (bug)	_wp_filter_build_unique_id issues with the first time a filter is hooked by a class	has-patch	Plugins	2.9	normal	normal	2009-08-02T13:26:09Z	"Ref #8723

The first time _wp_filter_build_unique_id is used to generate an ID the ID returned is different to the second time it is called. This presents a problem if the first ID is used when adding a filter which then needs to be removed later in the app flow... as the IDs don't match the filter is unremovable.

One workaround proposed is to set a wp_filter_id property before add the filter, and this will cause _wp_filter_build_unique_id to bypass the problem code and effectively forces the ""unique"" ID which is generated... this workaround feels unpoetic. ;)"
7795.diff	7795	Future	assigned enhancement	Activate and Deactivate Theme hooks	needs-patch	Themes	2.7	normal	normal	2008-12-18T12:50:03Z	Currently, there is no standard way of checking whether of theme is activated, deactivated and uninstalled. Plugins have this capability and themes should also have the same to ensure that both share similar functionality.
6969.diff	6969	Future	new enhancement	Don't apply wptexturize() to the insides of shortcode tags	needs-patch	Formatting	2.5.1	normal	normal	2008-10-25T04:47:14Z	"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."
12694.diff	12694	Future	new enhancement	Orphan themes are listed as broken, but can't be deleted from wp-admin	needs-testing	Administration	2.9.2	minor	low	2010-05-27T10:26:47Z	"I had been giving a set of ""mobile"" themes a tryout on my WordPress blog.  There's a parent theme and three child themes.  Didn't really like them.  

Not realizing they were parent/children(I thought they were 4 independent themes that were identical except for color schemes), I deleted the parent theme first through the WP-Admin's theme screen (/wp-admin/themes).

Now, the parent theme is gone.  But WordPress still lists the child themes as broken themes with the disclaimer: ""The following themes are installed but incomplete. Themes must have a stylesheet and a template.""

However, there's no option to delete them from the WP-Admin.  Being a longtime WordPress user, I know I can FTP into my server and manually remove those directories.  But I'll admit, I love how the newer versions of WordPress have made it possible to install/upgrade/delete themes and plugins right from the Admin system, without the need to open up the ol' FTP client and do it all manually.  I'm sure there are also newer users of WordPress who may or may not be aware they'd need to go through FTP to delete a broken theme.

Just saying it would be nice if we could delete broken themes right from the Admin system... but it's not a major/urgent request.

"
5770.diff	5770	Future	reopened enhancement	Add extra options for default tag-cloud widget	needs-testing	Widgets	2.5	minor	low	2008-06-24T13:13:45Z	"The default tag cloud widget only allows changing the title that appears above the tag cloud in the sidebar.

This patch allows use of more configurable options in wp_tag_cloud(), ie smallest, largest, unit, number, format, orderby, order."
combine.php	3372	Future	reopened feature request	Consolidated JavaScript/CSS Plugin API	dev-feedback	JavaScript	2.1	normal	lowest	2008-09-20T00:47:43Z	"WordPress plugins are great, they really are.  One problem with them is they often include their own styles and scripts.  The problem here is that several plugins with useful features mean a browser needs to download 10+ javascripts and stylesheets.  This isn't good for page load.  It's awful.  See:
http://www.die.net/musings/page_load_time/

My suggestion would be an API that allows all plugin/css to be included in 1 PHP generated CSS and Javascript.  This would drastically consolidate requests.  For performance reasons it should ideally be cached so that it's only regenerated when a plugin is loaded/reloaded.

This is becoming a bigger issue as plugins become more common and useful.  I hope a solution is found that gives plugin authors the freedom they need, and blog owners the performance they want, without having to sacrifice features.  I think channeling all the requests into 1 JS and 1 CSS file would achieve that.  They could use a numerical ranking system to calculate position in the file (to avoid conflicts) similar to how (iirc) filter work."
