__group__ ticket summary owner component _version priority severity milestone type _status workflow _created modified _description _reporter Future Releases 33940 Double spaces in term names can cause problems XML-RPC normal normal Awaiting Review defect (bug) assigned 2015-09-20T22:56:04Z 2019-08-15T06:46:02Z "Create a tag called 'test term'. Use XML-RPC to create a post with a tag of: {{{ test term }}} (two spaces). You'll get an error thrown, with the post not created: {{{ A term with the name already exists in this taxonomy }}} This appears to be due to the `_insert_post` function in XML-RPC using `get_term_by( 'name', $term_name, $taxonomy );`, which is returning false - thus it tries to create the term as new, and fails. Most other aspects of WP seem to filter the term name to strip double spaces first - is that what is necessary here? Or could the issue affect more than just XML-RPC?" smerriman Future Releases 16980 Empty Values are ignored by class-ixr.php XML-RPC 3.1 normal normal Future Release defect (bug) assigned needs-unit-tests 2011-03-27T12:34:47Z 2020-09-30T18:41:01Z "I tried to fix the following bug #10599 Found out when you send and empty value via xmlrpc it converts it to null value. Say you send and array of arguments for mw_editpost, set {{{ $content_struct[mt_keywords] = ''; }}} IXR client passes a null value instead of an empty value. In mw_post method consider this statement {{{ $tags_input = isset( $content_struct[mt_keywords] ) ? $content_struct[mt_keywords] : null; }}} Even if you send an empty value this statement fails because {{{ $content_struct[mt_keywords] }}} is set to null by IXR client." nprasath002 Future Releases 38300 Got a PHP warning: class-wp-xmlrpc-server.php L596: array_unshift() ... XML-RPC 4.6.1 normal normal Awaiting Review defect (bug) reopened 2016-10-13T06:46:16Z 2017-02-06T03:13:45Z "Sometimes the php_error.log file got a warning: {{{ PHP Warning: array_unshift() expects parameter 1 to be array, null given in /wp-includes/class-wp-xmlrpc-server.php on line 596 }}} {{{#!php blogger_getUsersBlogs( $args ); } ... } }}} The $args is NULL, it doesn't matter?" kmvan Future Releases 51891 Multiple xmlrpc attacks after last update XML-RPC 5.5.3 normal major Awaiting Review defect (bug) new 2020-11-28T14:23:16Z 2021-01-07T18:17:13Z "Hello, After the latest WP update, I have began noticing an increasing amount of xmlrpc attacks for exploits that reached new peaks some 20 hours ago and without signs of slowing down. With each attack I am getting the following entry in the error.log : PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in /home/.../public_html/wp-includes/class-wp-hook.php on line 289 I have de-activated the majority of the plugins and specifically those updated during the last week but that didn't change the scenery. I am not a developer, I am a power WP user operating a multisite for a couple of years now and this is the first time I am noticing this aggressive hacking activity (hundreds of different IPs per hour just as to avoid immediate blacklisting). Also this is the first time I am opening a ticket in WP.org Thank you for your attention. " attunist Future Releases 40863 WP 4.7.5 XMLRPC new method for parsing arguments omits menu_order XML-RPC 4.7.5 normal normal Awaiting Review defect (bug) reopened 2017-05-25T15:35:22Z 2017-08-04T16:43:29Z "In WP 4.7.5, in wp-includes/class-wp-xmlrpc-server.php, on line 1327, this line: {{{ $post_data = wp_parse_args( $content_struct, $defaults ); }}} was changed to: {{{ $post_data = wp_parse_args( array_intersect_key( $content_struct, $defaults ), $defaults ); }}} Unfortunately, the new intersection strips out any arguments from $content_struct that don't exist in $defaults. So you can no longer edit a post and change the ""menu_order"" field, because it doesn't exist in the $defaults declared just before this line. Please provide either an updated list of acceptable defaults (e.g. including menu fields), or allow for additional fields to pass through to wp_parse_args. Tested with latest version of WP, and confirmed that swapping the changed line above enables/disables the ability to change menu_order in posts. " bjminihan Future Releases 42995 WordPress XML-RPC editComment return error 500 changing date_created_gmt XML-RPC 4.9.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2017-12-28T19:01:25Z 2019-06-20T14:10:09Z "Grettings, This: // Do some timestamp voodoo if (!empty($content_struct['date_created_gmt'])) { // We know this is supposed to be GMT, so we're going to slap that Z on there by force $dateCreated = rtrim($content_struct['date_created_gmt']->getIso(), 'Z') . 'Z'; $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); } [Thu Dec 28 15:52:34.123148 2017] [php7:notice] [pid 5507] [client 127.0.0.1:39464] PHP Fatal error: Uncaught Error: Call to a member function getIso() on string in wp-includes/class-wp-xmlrpc-server.php:3533 " fpilee Future Releases 33425 XML-RPC missing options on wp.getOptions XML-RPC 4.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2015-08-19T08:35:27Z 2017-04-14T13:41:05Z "Why the list of options available here https://github.com/WordPress/WordPress/blob/ce557062f4123d8513378cf415b4e8b612c33ccc/wp-includes/class-wp-xmlrpc-server.php#L383 doesn’t match this https://codex.wordpress.org/Option_Reference For example default_category or blog_public fields are not available on XML-RPC." SergioEstevao Future Releases 20070 Deprecate Blogger XML-RPC Methods XML-RPC 3.3 normal normal Future Release enhancement new dev-feedback 2012-02-18T18:32:26Z 2020-09-21T19:41:58Z "The XML-RPC API supports the legacy Blogger API methods, but these methods have apparently not been very well tested or maintained. Given that the `wp.*` XML-RPC namespace now covers everything that the Blogger API does, I suggest the blogger methods be officially deprecated with an eye towards removing them in a future version. At the very least, the MetaWeblog API should be used by clients instead, as it was explicitly designed to enhance and supersede the Blogger API." maxcutler Future Releases 59414 XML-RPC - add updateMedia endpoint XML-RPC normal normal Future Release enhancement new 2023-09-20T19:33:26Z 2024-03-05T15:53:56Z "In #58582, @thomashorta reported on alt attributes missing from the XML RPC endpoints. Fetching that data was fixed in [56637], but adding an endpoint to update media that specifically handles media data like alt attributes requires a more substantial enhancement. From #58582: Updating MediaItems through the XML-RPC API is also done directly by the Posts API, more specifically through wp.editPost (codex), which also doesn't support an alt field. This makes sense, as this API is more generic, but at the same time, there are no specific updateMedia methods in the Media API. Suggestion for updating I'm not sure about this one, but I think a new method in the Media API would be needed (e.g.: wp.updateMediaItem) to properly manipulate a specific input struct and call the Post update functions internally." joedolson Future Releases 25037 XML-RPC : Can't remove all the categories from a post by using metaWeblog.editPost XML-RPC 3.6 normal normal defect (bug) assigned 2013-08-14T17:41:00Z 2019-06-05T06:39:22Z "Seems that you can't remove all the categories from a post by calling mw_editPost. I tried both passing an empty array, or skipping the entry 'categories', in the content struct, but none of them worked. The post still has the previous categories attached to it." daniloercoli Future Releases 25016 "XMLRPC method ""wp.getUsers"" not working correctly in Multisite" XML-RPC 3.5 normal normal defect (bug) assigned 2013-08-12T18:53:13Z 2019-06-05T06:39:20Z "Hi, I have been testing some functionality in our app which uses XMLRPC, and it appears that I've found a bug with how the ""wp.getUsers"" method works on WordPress.com blogs. Basically, the blog I'm testing this on has 3 administrators. Regardless of which one of those administrators' credentials I use, whenever we call the ""wp.getUsers"" method we ONLY get details for the SAME user back. So, if we have 3 admins ('admin1', 'admin2', 'admin2'), whenever 'admin1' queries for all users, they only get back 'admin1'. I also tried adding a different type of user, specifically an author, and then used any of the above-mentioned administrator credentials to try and retrieve info on that author, but nothing is returned. It should be noted that all the above functionality works as it should on self-hosted blog, just NOT on WordPress.com blogs. " dinomic Future Releases 26318 XMLRPC wp.uploadFile fails to place media in sub blogs XML-RPC 3.7.1 normal normal defect (bug) new 2013-11-29T12:02:39Z 2019-06-05T06:39:38Z "Using an XMLRPC call to mw_newMediaObject, uploaded files do not land in the media library of the target blog, for example blog_id 2. The uploaded files always land in the wp-content/uploads/yyyy/mm folder. And they also appear in the media library for that blog too, via the UI. If you trace the blog_ID to class-wp-xmlrpc-server.php you can see the method is receiving the correct value (eg. 2) at that point. This affects (at least) a subdomain-type of installation. The htaccess is standard from the WP codex. Occurs when blog_ID is passed to the rpc thus: {{{ require_once 'IXR_Library.php'; $client = new IXR_Client('http://my-site.com/xmlrpc.php'); $params = array('name' => 'imgfile.png', 'type' => 'image/png', 'bits' => new IXR_Base64($bits), 'overwrite' => false); $client->query('wp.uploadFile',2, 'admin', 'password', $params); }}} The xmlrpc returns a packet containing this data: {{{ array ( 'id' => '30', 'file' => 'test2_889047515_2.png', 'url' => 'http://my-site.com/wp-content/uploads/2013/11/imgfile.png', 'type' => 'image/png', ) }}} " daki-san Future Releases 17382 XMLRPC wp_getUsersBlogs Scalability XML-RPC 3.0 normal normal defect (bug) new 2011-05-11T20:32:15Z 2019-06-05T06:38:07Z "If there is a root blog with many sub blogs on it and a user that is an admin on each sub blog, then when the when the XML RPC method wp_getUsersBlogs() is called it does not scale very well. My PHP memory_limit setting was 128MB, and the XML RPC request died when a user was a member of 230+ blogs. I noticed that the number of queries made to the database for a single user that has many blogs that they are an admin is very high. Affected line: http://core.trac.wordpress.org/browser/tags/3.0.1/xmlrpc.php#L443 I don't know exactly how the code would have to change so I am not providing a patch." bmorneau Future Releases 23866 WordPress xmlrpc wp_getPosts filter for slug XML-RPC 3.4 normal normal enhancement new dev-feedback 2013-03-26T20:09:31Z 2019-06-05T06:39:12Z "When using the Wordpress xmlrpc, it is sometimes very useful to get posts based off of slugs rather than post id. A use case for this would be synchronizing or migrating two Wordpress sites with the same posts, but with different databases and post ID's. " SunWaves Future Releases 21386 XML-RPC needs a user permission method XML-RPC normal normal enhancement new 2012-07-25T18:33:24Z 2019-06-05T06:38:43Z "At this moment when calling a XML-RPC method you will receive a error when the user can't do that method. What would be better if there is a way an app can retrieve the user permissions and act on that without the need to call the method." markoheijnen Future Releases 60104 Missing Plugin WordPress.org Site normal normal Awaiting Review defect (bug) new has-patch 2023-12-19T12:47:20Z 2023-12-19T12:47:20Z "https://events.wordpress.org/ahmedabad/2024/wordcast/ The Jetpack plugin is unavailable on this page, so its shortcode is visible instead of the form. For reference: https://prnt.sc/zGfUDXDW1dPo" parin96 Future Releases 41876 Add inline help to Custom HTML widget Widgets normal normal Future Release defect (bug) new 2017-09-13T20:40:05Z 2021-11-09T15:07:24Z "There is no inline help in the Custom HTML widget for how to interact with the code editor. While the widget will add this to the help text on the widgets admin screen, this is not easily discoverable. Additionally, this help tab text is not displayed in the Customizer at all. Just like the Additional CSS section description in the Customizer, there could be a (?) icon in the widget, and once expanded it could reveal the same help text to guide usage of the widget. I suggest the icon could be placed in the top-right corner of the widget with the help text then appearing at the top when expanded, similar to the Customizer section description. See also: * #41872 * https://github.com/WordPress/better-code-editing/issues/36 * https://github.com/WordPress/better-code-editing/issues/64 * https://wordpress.slack.com/archives/C02RP4X03/p1503940071000037 * https://wordpress.slack.com/archives/C0381N237/p1505323129000204 Builds off of [41376] for #12423." westonruter Future Releases 54230 "Block based widgeteditor can't update ""Not a valid JSON response""" Widgets 5.8.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-10-07T06:38:49Z 2022-02-27T21:16:19Z "When editing widgets with the new blockbased widgeteditor I can not update. I get the error ""Not a valid JSON response"". I **can** publish and update posts and pages. I **can** edit and update widgets from the customizer. I have tried chaging permalink settings. Even with permalinks set to plain I still get the same error when I use the widgeteditor. Site is running on an ISS server. " davidlarssonback Future Releases 53693 Block icons too big on 5.8 widgets page Widgets 5.8 normal normal Future Release defect (bug) new 2021-07-19T17:23:22Z 2021-11-01T21:51:21Z "[https://en-ca.wordpress.org/plugins/yet-another-related-posts-plugin/ Our plugin] adds a block using an SVG image which still looks fine on the blocks page. But on the widgets page introduced in WP 5.8, our block's icon is way too big and spills into the surrounding areas. See [[Image(https://i.imgur.com/ut0vOSv.png)]] On the post editing page, where the icon still looks fine, I see this critical CSS: {{{ .block-editor__container img { max-width: 100%; height: auto; } }}} It seems on the widgets page there is no `block-editor__container` so the styles don't apply, and icons like ours are unstyled. " mnelson4 Future Releases 53983 Bugs with Widgets with Blocks Widgets 5.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-08-23T20:18:05Z 2021-10-02T19:46:13Z Ever since the new update(5.8) I am having major bugs with Widgets with Blocks. I am trying to remove all of my inactive widgets as many of them are throwing errors but I am getting a There was an error, invalid parameter(s) when I remove them and click save. I've tried using default theme and deactivated all plug ins as well as all of my chrome extensions. stephscheersandjeers Future Releases 39952 Category Dropdown Widget: required spacing issue on attachments template Widgets 4.7.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2017-02-23T17:50:13Z 2020-12-19T21:05:54Z "This issue only happens on the attachments.php template, all other primary templates don't appear to have the issue. When using the category widget as a dropdown, the select statement looks like: \n""; }}} Removing $required corrects the issue. Setting required to true also corrects the issue. {{{#!php }}} While this does correct the issue, the required="""" isn't correct either, it should be: required without the ="""" https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select It should also have aria-required=""true"" for Safari." tribalNerd Future Releases 42822 CodeMirror: HTML attributes values hints not fully operable with a keyboard Widgets 4.9 normal normal Future Release defect (bug) new 2017-12-07T09:38:16Z 2018-09-26T14:43:42Z "To reproduce, add an HTML widget either in the Widgets screen or in the Customizer: - start typing a HTML tag, for example ""

Custom HTML

Custom HTML Content
}}} Text Widget - The widget-wrap div has only that class. {{{

Text Widget

Text Widget Content

}}} As a result, any theme that has styled widget_text may have unintended styling issues. " dreamwhisper Future Releases 42224 Custom HTML widget is flagging errors on non-HTML Widgets 4.9 normal normal Awaiting Review defect (bug) new close 2017-10-14T18:08:38Z 2021-06-07T09:58:48Z "Because I had trouble putting a `
` tag into the Text Widget (See #42222), I tried to put it into a Custom HTML widget. But the Code Editor is flagging errors on my text, and won't let me Save the widget.

Additionally, it says there are 6 errors, when it shows 2 errors and 4 warnings. Do warnings have to be fixed to Save?"	joyously
Future Releases	42351	Customizer: Text widget loses Visual tab data when moved from one widget area to another		Widgets	4.8	normal	normal	Future Release	defect (bug)	new		2017-10-27T01:07:42Z	2018-10-03T15:16:36Z	"I moved my text widget to a different widget area, and now the content in the visual tab is empty, and I can’t click into the text area. If I switch to text, I see the content. Throughout this, I can also still see my content in the preview pane. 

If I save, my content remains. Then, if I close and reopen the Customizer, it shows back up. There are no related console errors.

This only appears when I move the Text widget from one widget area to another. If I move it around within the same widget area, it's fine.

@westonruter says: 
> The problem is when the control gets moved in the DOM the editor iframe needs to be re-initialized. I think we are accounting for a widget being reordered in a sidebar but not when moved between sidebars.

See attached screenshot and  https://wordpress.slack.com/archives/C0381N237/p1509058118000165."	melchoyce
Future Releases	49398	Deactivating a widget can fail causing data loss		Widgets	5.3.2	normal	normal	Awaiting Review	defect (bug)	new	close	2020-02-11T00:33:47Z	2020-02-17T00:39:28Z	You cannot hide/toggle visibility of widgets. To stop one from showing on your site, you have to delete it which loses the widgets' content and settings. Surely this has been brought up before but I couldn't find a ticket. You can change posts' visibility without permanent deletion, why not widgets'? It seems like a large oversight.	lev0
Future Releases	42743	Disable wp_options autoload for inactive widgets		Widgets		normal	normal	Awaiting Review	defect (bug)	new		2017-11-29T04:25:59Z	2023-09-07T11:58:23Z	"Options/settings for all widgets are saved in wp_options with autoload=yes, but autoload is enabled for the wp_options even for deactivated widgets.

On sites with many widgets installed (but not even activated), the size of data transferred from the DB to the PHP host on each and every page request can add significant overhead and introduce noticeable slowdowns.

I can't see a reason why autoload can't be disabled on deactivation of a widget, preloaded on navigation to the widget settings page, and then re-enabled when said widget is activated."	ComputerGuru
Future Releases	40793	Events widget on back button loses location		Widgets		normal	normal	Awaiting Review	defect (bug)	new		2017-05-17T21:21:01Z	2017-05-17T21:22:38Z	"I noticed that if you save a location, visit a meetup, then click back button in browser, you will lose your location. It returns on refreshing your browser.

Here is video:

[[Image(https://cldup.com/pyYG5Z4gtz.gif, 50%)]]
"	karmatosed
Future Releases	59588	False returned instead of default value on get_option with failure of unserializing data.		Widgets	6.3.2	normal	normal	Awaiting Review	defect (bug)	new		2023-10-10T20:20:12Z	2023-10-10T20:20:12Z	"Hello, I noticed a bug with the ability to load the customize screen of any theme if there is a malformed option value set.

I noticed from wp-includes/class-wp-customize-widgets.php

{{{#!php
 Img > Anchor)		Widgets	5.8	normal	normal	Awaiting Review	defect (bug)	new		2021-07-22T09:07:09Z	2021-07-22T09:07:09Z	"If you add a link with a rel attribute to an image in the new widgets editor, the rel input saves the value but it doesn't display the value in the input box.

To get to this issue, I added an image into a widget sidebar, clicked the link to add a link (this works fine). I then selected ""Open in new tab"", which worked fine, however on adding a ""noopener"" attribute to the rel it got to 'noopene' then on pressing 'r' the value vanishes. It seems to store the data as it appears fine in the front-end."	seanvarnham
Future Releases	49044	Links in the text widget now require quotes	audrasjb	Widgets	5.3.1	normal	normal	Awaiting Review	defect (bug)	reviewing		2019-12-19T15:12:09Z	2020-01-07T19:37:52Z	"Up until this release, if I had a link a text widget like this it would work.

New Patient Packet

the recent updated made the same link format like this when you click on it:
https://www.aspirefamilydental.com/%22/wp-content/uploads/NT-transfer-records-to-sister-office-form.pdf/%22

I had to go in and change the text to this in order to make it work.

New Patient Packet

I manage over 200 sites.  I have easy way of finding every link in every widget on all the sites I manage.  Please fix the text widget to accept links without quotes like it used to.
"	spherman
Future Releases	53920	"Missing ""Title"" Field for Category / Latest Posts / Custom HTML Block Widgets"		Widgets	5.8	normal	normal	Future Release	defect (bug)	new		2021-08-12T18:11:53Z	2021-11-02T15:21:03Z	"The ""Title"" field is missing in block widget area for ""Category"" widgets (both products & pages), missing from ""Latest Post"" widget, AND missing from ""Custom HTML"" widget. Other widgets still have the ""Title"" field. Not sure if this was intentional or got overlooked... : ("	lynaeash
Future Releases	52730	Mixed content error with RSS widget		Widgets	5.6.2	normal	normal	Awaiting Review	defect (bug)	new	reporter-feedback	2021-03-07T20:06:37Z	2021-03-12T19:27:36Z	To avoid SSL Mixed content warning, it is needed to force the RSS icon to load with https	gregmagn1
Future Releases	45218	On Custom Widget Page: Title and Content missing when Text Widget is added to Widget area		Widgets	4.9.8	normal	normal	Awaiting Review	defect (bug)	new	reporter-feedback	2018-10-29T05:13:05Z	2019-01-04T15:54:16Z	"Situation:
I have a theme that has multiple dynamic layouts ( 'front-page', 'single', 'archive' ). 
These layouts are widgetized as below.
front-page -> widget area 1, widget area 2
single -> widget area 3
archive -> widget area 4, widget area 5

The layouts have different page slug and depending upon the page slug, only the related widget areas are shown so that it will be easier for users to customize layouts. The layouts simply uses the wordpress 'includes/widgets.php' and customizes the layouts for better user experience.

Now, the problem is when I try to add text-widget to these areas, text-widget is added but I cannot see the title and content field. 

If I access the widgets from '/widgets.php' then everything works, but its of no use to me as I want nice widgetized custom layout pages.

I thought this might be my theme issue but i copied '/admin/widgets.php' to '/admin/widgets-test.php' and accessed the page but the same issue occurred.

This issue is appearing on wordpress >= 4.8 where visual editor is added to text-widget.

I looked at the core and found out that on versions >= 4.8, text-widgets.js is required but this hook:
do_action( ""admin_print_scripts-{$hook_suffix}"" );
which is responsible for enqueuing the script, is only enqueuing the script for page ($hook_suffix) 'widgets.php' only. 

I manually enqueued the text-widgets.js script but got js error. 

Also, this issue appears on other widgets like video, image etc.

Steps to replicate the issue:
-> just copy 'admin/widgets.php' to 'admin/widgets-test.php' or any other page-slug and access it directly. Then try to add text-widget."	limvus
Future Releases	52881	"Recent posts widget: ""Number of posts to show"" option is ignored when on category pages"		Widgets	5.7	normal	normal	Awaiting Review	defect (bug)	new	reporter-feedback	2021-03-22T11:11:57Z	2021-03-22T12:54:38Z	"WP 5.7. Using the widget ""Recent Posts."" I have not altered the widget. On most pages it works, but when on category pages (archive pages for category), it ignores the ""number of posts to show"" option, and shows a long long list of posts."	benjaminantoni
Future Releases	43039	Resize capability missing from Custom HTML widget		Widgets	4.9.1	normal	normal	Future Release	defect (bug)	new	reporter-feedback	2018-01-08T00:02:45Z	2018-01-08T18:19:03Z	"I'm using WordPress 4.9.1 with the theme Prolio 2.6.1

I had fallen behind in updating and just updated to current versions.

I'm using Text widgets on my homepage, and the text widget editor used to allow both vertical and horizontal resizing by dragging the resize icon in the lower-right corner.

Now I can only resize Text widgets vertically!   

I also started using the Custom HTML widget, as recommended.   

But the Custom HTML widget is not showing a corner resize icon at all so I cannot resize it, and it is a small rectangular editing pane with a larger font than before, and very awkward to use (although it would be wonderful if I could enlarge it).

I used Firefox's Tools > Web Developer > Inspector to find the CSS for the editing window:

 
...
...
...
...

...

I find that I can change that last line to:
and that enables the bidirectional resize corner that I need! But of course that only affects the running instance. I have no idea how to tweak the code so that change becomes the default. Before I look into creating my own customized version of the Custom HTML editor, I'm wondering whether this very minor change could be incorporated into the next release of these tools, so I don't have to do that work myself, and so other people can benefit from it. I don't actually know whether this is a request for the WP team or the Prolio team, so I'm starting with the WP team. Thanks for your consideration, -- Paul Tukey paul.tukey@gmail.com " paultukey Future Releases 53831 Stray

tags added to shortcode block within widgets (5.8) Widgets 5.8 normal normal Awaiting Review defect (bug) new 2021-07-29T17:38:24Z 2021-09-27T11:15:51Z "When adding a shortcode block via the new widgets area in WordPress 5.8, stray `

` tags are being added at the end. Adding the shortcode via an HTML block works as quick workaround." Oxocube Future Releases 52877 The Widget's Callback Array Stores Wrong Values Widgets 5.7 normal major Awaiting Review defect (bug) new 2021-03-21T12:45:09Z 2022-12-05T07:12:37Z "While trying to get Widget's saved settings I stuck a very weird issue, The objects [number] and [id] in the Widget's Object [callback][0] always refer to the last widget created. Create **Two or more of the same Widget**, Then print out the settings, You will notice that the [number] and [id] inside the [callback] array different than the main [id] and [number] inside the [params] array, So when use the [number] from the callback array it refers to a wrong index which is the last created widget's index not the current. {{{ add_action( 'wp', 'test_widgets' ); function test_widgets() { global $wp_registered_widgets; $widgets_ids = retrieve_widgets( FALSE ); foreach( $widgets_ids as $sb_id => $widgets ) { if( 'wp_inactive_widgets' === (string) $sb_id ) { continue; } foreach( $widgets as $active_widget_id ) { if( ! isset( $wp_registered_widgets[ $active_widget_id ] ) ) { continue; } echo print_r( $wp_registered_widgets[ $active_widget_id ] ); /** * Widget Object * @var \WP_Widget * */ $obj_widget = $wp_registered_widgets[ $active_widget_id ]['callback'][0]; /* If you use the callback object to get the Widget's index it'll refer to a wrong index */ /* TRY: echo $obj_widget->number; */ } } } }}} **Output:** {{{ Array ( [name] => Meta [id] => meta-4 [callback] => Array ( [0] => WP_Widget_Meta Object ( [id_base] => meta [name] => Meta [option_name] => widget_meta [alt_option_name] => [widget_options] => Array ( [classname] => widget_meta [customize_selective_refresh] => 1 [description] => Login, RSS, & WordPress.org links. ) [control_options] => Array ( [id_base] => meta ) [number] => 4 [id] => meta-4 [updated] => ) [1] => display_callback ) [params] => Array ( [0] => Array ( [number] => 4 ) ) [classname] => widget_meta [customize_selective_refresh] => 1 [description] => Login, RSS, & WordPress.org links. ) 1Array ( [name] => Meta [id] => meta-3 [callback] => Array ( [0] => WP_Widget_Meta Object ( [id_base] => meta [name] => Meta [option_name] => widget_meta [alt_option_name] => [widget_options] => Array ( [classname] => widget_meta [customize_selective_refresh] => 1 [description] => Login, RSS, & WordPress.org links. ) [control_options] => Array ( [id_base] => meta ) [number] => 4 [id] => meta-4 [updated] => ) [1] => display_callback ) [params] => Array ( [0] => Array ( [number] => 3 ) ) [classname] => widget_meta [customize_selective_refresh] => 1 [description] => Login, RSS, & WordPress.org links. ) }}} " oxibug Future Releases 47268 Vimeo videos not working on Chrome audrasjb Widgets normal normal Awaiting Review defect (bug) reviewing reporter-feedback 2019-05-14T18:19:54Z 2019-09-06T19:27:03Z "I noticed that if you use the Video widget to add a video from Vimeo, it will not work in Chrome browsers (at least on Mac). It works fine in other browsers. Visually, a second set of video controls appear on top Vimeo's video controls. Confirmed this on different servers, with different sites, and with different themes. Steps: 1. Go to Appearance > Widgets or Appearance > Customize, 2. Add Video widget 3. Click ""Add Video,"" then ""Insert from URL,"" then enter a Vimeo URL. 4. Visit a page on Chrome which has that widget. 5. Observe that pressing play has no effect." luciantucker Future Releases 53783 Visiting Widgets Is Blocking Access To My Server Widgets 5.8 normal blocker Awaiting Review defect (bug) new reporter-feedback 2021-07-26T11:46:00Z 2021-08-04T07:42:19Z "Any time I visit widgets with my current host I get blocked from visiting all of my websites on the server. Here are the details: triggering a mod security rule as below: {{{ 941160 Warning. Pattern match \""(?i:(?:<\\w[\\s\\S]*[\\s\\/]|\'\\"" ?)(?:on(?:d(?:e(?:vice(?:(?:orienta|mo)tion|proximity|found|light)|livery(?:success|error)|activate)|r(?:ag(?:e(?:n(?:ter|d)|xit)|(?:gestur|leav)e|start|drop|over)|op)|i(?:s(?:c(?:hargingtimechange ...\"" at REQUEST_HEADERS:Referer. [file \""/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-941-APPLICATION-ATTACK-XSS.conf\""] [line \""199\""] [id \""941160\""] [msg \""NoScript XSS InjectionChecker: HTML Injection\""] [data \""Matched Data: \x0d\x0a 2021-07-24 18:22:36 }}}" inkwellcd Future Releases 32183 Widget ID auto-increments conflict for concurrent users westonruter* Widgets 2.8 normal normal Future Release defect (bug) accepted 2015-04-29T09:20:46Z 2017-06-07T00:20:40Z "Each WP_Widget 2.0 “multi-widget” gets an index number associated with each instance of a give type. When you add a widget, this number gets incremented (`widget.set( 'multi_number', widget.get( 'multi_number' ) + 1 );`). The initial multi-number is calculated from the `next_widget_id_number()` function which takes the max number currently used, and increments it by one. The same approach is used in the widgets admin page and the Widget Customizer. For frequently-used widgets, the above problem will happen frequently where two users will try to add the same widget at the same time, and thus they will start out with the same initial `multi_number`, resulting in the same widget ID. When they both save their changes, one user's widget will override the other user's widget: whoever saves last. Likewise, it is possible for multiple widgets to be deleted in one session (from the widgets admin page, since Customizer only removes widgets by moving them to the Inactive Widgets sidebar) then new ones added back in other sessions and the initial `multi_number` will not be consistent. In other words, the `multi_number` for each widget type needs to be synced across each Customizer session along with the actual setting values. For concurrent editing of widgets, see: #31436: Handle conflicts in concurrent Customizer sessions #12722: Concurrent editing of widgets (on admin page)" westonruter Future Releases 54603 Widgets are not showing Widgets normal normal Awaiting Review defect (bug) new reporter-feedback 2021-12-09T08:10:36Z 2021-12-13T11:33:11Z when i open the widgets page it is showing a blank page asma2022 Future Releases 36851 Widgets don't remove hooks after being unregistered Widgets 2.8 normal normal Future Release defect (bug) new 2016-05-16T15:28:57Z 2017-06-28T16:29:44Z "In `WP_Widget_Recent_Comments::__construct()`, there is this bit of code: {{{#!php id_base ) || is_customize_preview() ) { add_action( 'wp_head', array( $this, 'recent_comments_style' ) ); } }}} If `unregister_widget( 'WP_Widget_Recent_Comments' )` is called, this added `wp_head` action is still going to persist unexpectedly. At the moment, I believe the only way to remedy this inside such widgets themselves would be to check to see if the widget is still among `$wp_widget_factory->widgets` when the action callback is called (here the `recent_comments_style` method). From outside the widget, the alternative is would be to do: {{{#!php widgets['WP_Widget_Recent_Comments']; unregister_widget( get_class( $widget ) ); remove_action( 'wp_head', array( $widget, 'recent_comments_style' ) ); }}} Neither of these options are great. Perhaps there should be new `widget_registered` and `widget_unregistered` actions that widgets could listen to to do this cleanup? Or there could be a new `unregister` method on `WP_Widget` that a subclass could have this logic inside of. (We wouldn't be able to use the PHP destructor since it would never be called since the reference to the class would be still captured among the registered hooks.) Likewise, instead of adding the hooks inside of the constructor, perhaps there should also be a `WP_Widget::register()` method that gets called inside of the faux-private `WP_Widget::_register()` (and `_register` should be `final`, no?)" westonruter Future Releases 54312 Widgets editor blocks Widgets 5.8.1 normal major Awaiting Review defect (bug) new reporter-feedback 2021-10-23T13:38:21Z 2022-02-16T08:32:44Z "Hi there, we have noticed a bug in widgets block. When editing Widgets in Blocks will repeat with errors and the console shows it is a JSON error stating 'The response is not a valid JSON response' and also says 503 error with it. Troubleshooting I have done: - Have tried downgrading versions, errors will be removed but unable to move widgets around. Now I have the current version. - Deactivating all plugins, one reactivated they come back and it is not related to a plugin. - did permalinks, - re did htaccess file - classic widgets plugin also takes away errors but you cant move widgets. none of these steps worked. Some guidance on what is happening would be greatly appreciated. Thank you " donno1 Future Releases 42965 Widgets not restored to previous widget area after switching back to previous theme Widgets 4.9 normal normal Future Release defect (bug) reopened 2017-12-22T15:06:13Z 2020-11-04T01:59:08Z There's a bug in widgets when switching themes. Before, on version 4.8.4, if you switch themes and return it back to previous, widget will retain on its widget column. In the latest version 4.9.1, every time you switch themes and return it back to previous one, all widgets will automatically placed to Inactive widgets. probewise Future Releases 53732 Widgets option shows blank Widgets 5.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-07-22T08:53:02Z 2021-07-23T11:06:23Z After updating WordPress to 5.8 , Widgets option shows blank when clicking, can't access to widgets pirfirdouse Future Releases 52848 Widgets z-index issue hides the widget's update button when other widgets remain open Widgets 5.7 normal minor Awaiting Review defect (bug) new has-patch 2021-03-18T12:59:43Z 2021-03-18T12:59:43Z "Hi, I found an issue that should be fixed on widget part. Steps to reproduce the issue: 1. Enable a theme that has multiple widgets areas like Sydney 2. Put some widgets on each widget area from Appearance > Widgets screen 4. Keep all widgets remain open 5. Try saving one widget Here is my screen recording when getting the issue: https://drive.google.com/file/d/1ZqcM8IYIbCGfwYaHw7SOLnTBTurKwmGD/view?usp=sharing My screen resolution is 1280x800. Best, Kharis " kharisblank Future Releases 53279 Widgets.php returning 500 when using php 8.0.3 Widgets 5.7.2 normal normal Awaiting Review defect (bug) assigned reporter-feedback 2021-05-26T09:45:22Z 2021-06-02T14:31:42Z "I am not a developer. I switched from php 7.4 to php 8.0.3. The widgets do load at the front end but I cannot make any edits in appearance - widgets. /widgets.php is returning 500 error when using php 8.0.3. I reverted back to php 7.4 for testing and widgets.php functioned as normal. I hope I contributed something." Dan14 Future Releases 53789 all kinds of error messages using WordPress 5.8 Widgets block editor Widgets 5.8 normal major Awaiting Review defect (bug) new reporter-feedback 2021-07-26T22:35:24Z 2021-10-13T23:48:14Z "After the Upgrade to WordPress 5.8, in the backend when I choose Appearance / Widgets (to edit widgets), I get error messages like these: The ""blog_subscription"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""google_translate_widget"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""recent-posts"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""nav_menu"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""bbpmmymessages"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""text"" block was affected by errors and may not function properly. Check the developer tools for more details. The ""search"" block was affected by errors and may not function properly. Check the developer tools for more details. I installed and activated the Classic Widget Editor plugin so I could function. Later (after an update from one of the Widget providers), I deactivated the CWE plugin so I could see if this provider's widgets were now working with the 5.8 Widget block editor. (Some were fixed, some weren't). Unbelievably, though, I got more errors than before showing that widget blocks which seemed to be working before now were not working! I got a lot of Internal Error messages, whereas before I only saw one or two of these. Did switching to the Classic Widget Editor and then deactivating cause more problems? Now every time I try to access the 5.8 Widgets block editing, I get new or different errors. Very confusing and upsetting. " janecarole Future Releases 58583 edit widget gutenberg blocks > can't see or add reusable blocks Widgets 6.2.2 normal major Awaiting Review defect (bug) new close 2023-06-20T22:05:31Z 2023-11-01T21:26:28Z No longer can + see or add reusable blocks when trying to edit widget areas using gutenberg block editor wordmax Future Releases 42987 is_active_sidebar returns true on after plugin deactivation Widgets 2.8 normal normal Future Release defect (bug) new 2017-12-27T12:44:45Z 2018-01-26T21:12:12Z "Hi, Steps to reproduce: code: {{{#!php Sidebar is active, and it contains widget(s). Sidebar doesn't contain any widget. }}} 1. Add a widget plugin to the `custom-sidebar` 2. Disable the widget plugin 3. Reload the page The page is still showing sidebar is active. and `wp_get_sidebars_widgets()` still contains the disabled plugin's widget info. Is this something intended? Or is it a bug? " tpaksu Future Releases 54145 new widget feature broke database Widgets 5.8.1 normal critical Awaiting Review defect (bug) new reporter-feedback 2021-09-19T02:47:16Z 2021-09-28T00:59:22Z "https://prnt.sc/1srrhlp == **Error establishing a database connection **when i install new themes or develop websites uses astra or paid themes this new widget module creates critical bugs and broke database also after going to this page it makes my website says ""Error establishing a database connection"" but host is worked well and wp-config is correct; so in two condition i test sometimes create php errors and make database corrupt so my suggestion is make a site owner to decide what he want to use new module or not and suggest to put old widget plugin in main plugin page side classic editor and i hope to fix it soon in coming updates thanks for making wordpress open for everyone" starmido213 Future Releases 41070 register_sidebar and dynamic_sidebar inconsistency Widgets 4.8 normal normal Awaiting Review defect (bug) new 2017-06-15T13:30:11Z 2017-06-23T07:15:20Z "Let's register a sidebar in functions.php and use digits for the value of the id key. {{{#!php 'test123', // or 'id' => '123', // or 'id' => 123, 'name' => 'test - Mega Menu', ) ); }}} After that, the Widget is showing up at ''Appearance > Widgets''. But when we'd like to retrieve this widget using the dynamic_sidebar function, it won't work: {{{#!php }}} or {{{

}}} automatically generates the closing {{{

}}} or {{{

}}} tag after the cursor, respectively. This behavior mimics the automations of many popular IDEs, and it is a big time-saver if implemented well. However, the current implementation in the Custom HTML widget takes the automation a step too far with block-level tags, also adding carriage returns and indentation to my code where I don't want either. I understand that many coding best-practices prescribe this format to make code easier to read and maintain, which is true for coding in an adjustable-width IDE window or frame. But for the widget editor that's limited to a width of around 340 pixels (without accounting for padding), I prefer to organize my code into segments broken into logical blocks with whitespace between them and everything flush-left. Currently, the contents of a typical Custom HTML widget in my environment look like this (line breaks added to approximate editor width): {{{

This is my content.

[tabby title=""First Tab""]

First Tab Header

Click an image below to enlarge for viewing details.

[su_row] [su_column] [su_lightbox type=""image"" src=""/wp-content/uploads/sites/44/2018 /01/image01.jpg""][/su_lightbox]

Image 1 Title

Image 1 Caption

[/su_column] [su_column] [su_lightbox type=""image"" src=""/wp-content/uploads/sites/44/2018 /01/image02.jpg""][/su_lightbox]

Image 2 Title

Image 2 Caption

[/su_column] [/su_row] [tabby title=""Second Tab""]

Second Tab Header

Click an image below to enlarge for viewing details.

[su_row] [su_column] [su_lightbox type=""image"" src=""/wp-content/uploads/sites/44/2018 /01/image03.jpg""][/su_lightbox]

Image 3 Title

Image 3 Caption

[/su_column] [su_column] [su_lightbox type=""image"" src=""/wp-content/uploads/sites/44/2018 /01/image04.jpg""][/su_lightbox]

Image 4 Title

Image 4 Caption

[/su_column] [/su_row] [tabbyending]
}}} Because I am using the Custom HTML widgets to build out large sections of pages within my sites, I end up having to scroll through lots of code within any single widget instance. Having a bunch of opening and closing tags on individual lines sprinkled with indents forcing extra text wraps is a pointless gesture that impairs quick-scanning and readability rather than improving it. This is especially true for sections involving deeply nested divs containing lengthy paragraph text and shortcodes. Within the constraints of the editor, I would prefer the above code to appear in the below format (again, line breaks reflect real text-wrapping in the editor): {{{

This is my content.

[tabby title=""First Tab""]

First Tab Header

Click an image below to enlarge for viewing details.

[su_row] [su_column] [su_lightbox type=""image"" src=""/wp- content/uploads/sites/44/2018 /01/image01.jpg""][/su_lightbox]

Image 1 Title

Image 1 Caption

[/su_column] [su_column] [su_lightbox type=""image"" src=""/wp- content/uploads/sites/44/2018 /01/image02.jpg""][/su_lightbox]

Image 2 Title

Image 2 Caption

[/su_column] [/su_row] [tabby title=""Second Tab""]

Second Tab Header

Click an image below to enlarge for viewing details.

[su_row] [su_column] [su_lightbox type=""image"" src=""/wp- content/uploads/sites/44/2018 /01/image03.jpg""][/su_lightbox]

Image 3 Title

Image 3 Caption

[/su_column] [su_column] [su_lightbox type=""image"" src=""/wp- content/uploads/sites/44/2018 /01/image04.jpg""][/su_lightbox]

Image 4 Title

Image 4 Caption

[/su_column] [/su_row] [tabbyending]
}}} Because I prefer to keep my code flush left, the editor's auto-indentation for nested block-level tags keeps offsetting my closing tags and requires backspacing/deletion of both the indents and the carriage returns. While I realize that many developers may prefer strict adherance to best-practices, I also expect those same developers ultimately prefer the ability to decide upon their own standards without having someone else assume what's best and impose those assumptions into their development environments. I believe the best implementation of IDE features into the Custom HTML widget should involve the ability to adjust such formatting presets as they are introduced. This would allow end-users to apply such enhancements according to their individual preferences and prevent distractions from the introduction of unwelcomed ""improvements"". Perhaps IDE preferences could be enabled through checkboxes below the editor pane for applying individual features: - Syntax Highlighting - Tag Completion - Quotes Completion - Auto-Indentation and maybe even - Line Numbers (to regain space in a constrained-width pane) The editor would still perform analysis on each keystroke, but ""If Tag-Completion = false"" it could skip the tag completion subroutine, for instance. My apologies for the verbosity of this ticket, but I wanted to fully illustrate my particular use-case. As a frequent user of Custom HTML widgets, I am excited by the prospects of current and forthcoming enhancements, and I can't wait to see what improvements future updates bring." JosefNT Future Releases 31020 Introduce discrete capability for managing widgets johnbillion Widgets normal normal Future Release enhancement assigned needs-unit-tests 2015-01-15T07:11:15Z 2022-01-30T16:44:08Z "As with management of nav menus (#29213), managing widgets currently requires `edit_theme_options` capability, a capability associated with administrators which grants the power to make many wide sweeping changes. There should be a discrete capability `manage_widgets` just for managing widgets, one that is inherited for anyone who has `edit_theme_options` by default. This was done for Customizer access in #28605 with the introduction of a `customize` capability. Originally brought up in #14386. The same is proposed for menus in #29213." westonruter Future Releases 39908 Make the page and category widget exclusions use a drop down not ID Widgets normal normal Future Release enhancement new 2017-02-17T19:14:40Z 2017-09-20T08:33:06Z "Currently excluding in this widget involves you getting and ID and then adding it. This could be made more user friendly by using a drop down. [[Image(https://cldup.com/YVbvUK5pLK.png, 50%)]]" karmatosed Future Releases 39909 Make title behaviours consistent across all widgets on first load westonruter Widgets 2.8 normal normal Future Release enhancement reopened dev-feedback 2017-02-17T19:17:20Z 2021-06-25T15:47:08Z "On first load the word 'Archives' outputs as the Widget title but it doesn't appear in the input field. If there is a default text, perhaps it should show. This could also assist by users making the connection with the words and where they can edit. For example: [[Image(https://cldup.com/EK1v0wxGX1.png, 50%)]] Another example, the Calendar widget has no title and compared to the examples above this feels weird. What I think should happen is that the same title behaviour occurs for all widgets when you first load them." karmatosed Future Releases 30556 Modern widgets default wrapper joedolson* Widgets 2.2 normal normal Future Release enhancement accepted 2014-11-30T19:14:31Z 2021-03-26T15:55:57Z "Since 2.2.0, widgets are wrapped in `
  • ` by default. In my opinion, they should be wrapped in `
    ` even if, during the sidebar registration, theme developers should declare how to wrap the widgets in the sidebar. Twentyten theme is the only default theme using this structure and it's declared in functions.php. The patch contains this change. " LeoPeo Future Releases 40098 Prevent same sidebar from outputting twice Widgets 4.8 normal normal Awaiting Review enhancement new 2017-03-10T17:25:25Z 2017-03-10T21:38:33Z "I ran across #23934 recently, and it occurred to me that if such a ticket was closed because you're not supposed to call the same sidebar for output twice, why don't we just prevent the same sidebar from outputting twice? Seems like an easy win, using code to effectively prevent officially discouraged theme behavior. Anyone have thoughts?" nathanrice Future Releases 52399 Remove widget accessibility mode joedolson* Widgets normal normal Future Release enhancement accepted 2021-01-29T16:44:29Z 2021-10-30T19:51:07Z "With the introduction of the new block editing experience for widgets management, WordPress will have four separate interfaces for managing widgets: block editing, customizer, classic widgets, and accessbility mode. The accessibility team would like to explore merging the characteristics that accessibility mode uses for better accessibility into the classic widget screen, to cut down to only three modes of operation for widgets. This will require identifying the characteristics of accessibility mode and finding ways to reproduce those characteristics within the existing widget UI. The key differences that are obvious are: 1) Use of a text link to 'Add' or 'Edit' 2) Links target each widget via a URL to manage independently. 3) Selection options to choose which sidebar and position will be used for a widget. These characteristics allow a single widget to be edited in isolation, the ability to assign a location without drag and drop, and visible text tools for handling widgets. One possibility to explore is having an add/edit option that opens a given widget in a modal that includes the location selection tools provided in accessibility mode. " joedolson Future Releases 13169 Return Dynamic Sidebars with get_dynamic_sidebar Widgets normal normal Awaiting Review enhancement reopened 2010-04-28T18:07:28Z 2019-05-22T07:19:20Z "Currently there is no available function to return the contents of a dynamic sidebar. The following code enables developers to return and assign the contents of a dynamic sidebar to a variable within their code. {{{ function get_dynamic_sidebar($index = 1) { $sidebar_contents = """"; ob_start(); dynamic_sidebar($index); $sidebar_contents = ob_get_contents(); ob_end_clean(); return $sidebar_contents; } }}} " w3prodigy Future Releases 42913 Scroll widgets and widget containers independently in admin ui Widgets 5.1 normal normal Future Release enhancement new 2017-12-15T18:31:30Z 2018-05-03T19:50:32Z "A ""regular"" WordPress installation with a few plugins providing widgets can easily result in a situation where the height of the ""available widgets"" div on the left can be significantly larger than the height of the ""available widget containers"" div on the right, as a result of which one may need to scroll down significantly to reach the desired widget, then scroll back up _while dragging_ to place the widget in the desired container. If the div on the right were to be configured with {{height: 1vh; overflow-y: scroll}} and then turned into fixed (?) position div, it would remain on-screen while the user scrolled through the list of available widgets, such that installing a new widget would only require scrolling to find the widget in question, and at no point would it be necessary to drag and scroll simultaneously (which, while frustrating, is easy enough on a desktop... but with a touchpad it becomes quite the challenge). On further reflection, it might actually be easier and less hacky to assign both the left and right divs a height of 1vh (and perhaps throw in a {{min-height}}) and {{overflow-y: scroll}}, then there's no need for anything but the default positioning. Both containers would scroll independently, and no need to drag and scroll. Attaching a video of the current experience." ComputerGuru Future Releases 40864 Standardize strings for missing attachments across media widgets Widgets 4.8 normal normal Awaiting Review enhancement new 2017-05-25T18:06:09Z 2017-05-25T18:46:48Z "While translating 4.8 strings, I noticed that strings for missing attachments in the new media widgets do not refer to the same thing: > We can’t find that audio file. Check your media library and make sure it wasn’t deleted. > We can’t find that image. Check your media library and make sure it wasn’t deleted. > We can’t find that video. Check your media library and make sure it wasn’t deleted. > We can’t find that file. Check your media library and make sure it wasn’t deleted. In two occasions we only use media type, but once we use ""file"" alongside of it and once we only use ""file"" and remove any mention of media (type). I propose removing ""file"" completely and just using type of media. Second possibility is to always use ""file"", though I don't see that as needed." dimadin Future Releases 35669 Store widgets in a custom post type instead of options Widgets 2.8 normal normal Awaiting Review enhancement new dev-feedback 2016-01-30T20:00:34Z 2019-01-10T05:18:15Z "Widget instances are stored in options. For a multi-widget (`WP_Widget`) the widget instances of a given type (`id_base`) are stored in a serialized array of instance arrays. A widget ID is comprised of a widget's `id_base` followed by a number which is the array index for that widget instance. For example, the third-created Text widget would have the ID `text-4` (note that multi-widget numbering starts at 2). Old single widgets do not include the numeric index after the `id_base`, and technically they could be stored anywhere (see #35656 for suggestion to deprecate old single widgets). == Issues There are several problems with how widgets are currently stored as options. '''Scalability:''' For sites with a large number of widget instances, the entire collection of widgets must be unserialized with each request to access only one widget of a given type. (Note #23909 for how all widget instances get registered with every request.) For sites that use Memcached as an external object cache where cache buckets have a 1MB limit, since all widget instances of a given type are stored in a single option, sites with a huge number of widgets will overrun this limit. What's more is that widget options get registered as autoloaded, so all widget options will get combined together in the `alloptions` key, making widgets even more liable to overrun the 1MB cache bucket limit in Memcached. '''Concurrency:''' Since all widget instances of a given type are stored in a single option, if two users attempt to update two separate widgets at the same time, it is possible that one of the updates will get lost (see #31245). Additionally, the widgets admin page and widgets in the Customizer both get loaded with the max number (array index) for each widget type. When a new widget instance is created, this maximum number is incremented in memory and used in the new widget ID which is then passed to the server for saving. If two users have loaded the UI at the same time, when they both create a widget of a given type and save their widget changes, the one who saves last will overwrite the other user's widget since the two widgets would have the same ID. (See #32183 for more about the widget ID collisions, and see [https://wordpress.org/plugins/customize-widgets-plus/ Customize Widgets Plus] for a “Widget Number Incrementing” component which uses Ajax to generate new widget IDs in a more concurrency-safe manner.) '''Addressability:''' As noted above, widget instance IDs are comprised of the widget type's `id_base` followed by the array index `number`. Two different widget instances can have the same `number`, such as `search-3` and `text-3`, since the `number` is incremented in the scope of the instances of the given type. No other objects in WordPress are identified by strings in this way, that is as of now: taxonomy terms actually used to have to be addressed by a numeric term ID and taxonomy name until term splitting happened in 4.2 (see #5809). Now, however, a term can be uniquely identified by a single integer ID. All of the above issues would be resolved by switching to store widget instances in a custom post type, where each widget instance has a single unique auto-incremented post ID. == Advantages Storing widgets in custom post type has several benefits beyond fixing the above issues, including: * widget authorship attribution * revision history * import/export * querying * widget drafts * scheduled widgets == Data Migration Migrating widgets from options to a custom post type would involve some tedious data migration to update all references to current `id_base-number` widget IDs to their new integer IDs. The old widget ID could actually be copied directly into the `post_name` field for the `widget_instance` posts. Backwards compatibility for the `sidebars_widgets` option containing the old-style IDs may be necessary. Newly created widget IDs could have `post_name` fields populated with the `id_base` followed by the post ID. This switch would also necessitate discontinuing to register all widget instances with every request (#23909). == Sidebars and Widget Groups Perhaps out of scope for this ticket, but the way that widgets get associated with sidebars should also perhaps be changed to follow the pattern of how nav menu items are associated with a nav menu via a taxonomy term. The implementing of widget groups (#19912) could be the right opportunity to do this, where a `widget_grouping` taxonomy could be introduced, and when a grouping is assigned to a sidebar, the backwards-compatible widget IDs could be copied into the existing `sidebars_widgets` option. Otherwise, backwards compatibility might entail adding `pre_option_sidebars_widgets` filter. == REST API Impacts For more on widgets and now they relate to nav menu items in the context of a harmonized interface via the REST API, see https://github.com/WP-API/wp-api-menus-widgets-endpoints/issues/10 == Feature Plugin See the [https://github.com/xwp/wp-customize-widgets-plus Customize Widgets Plus] feature plugin's “Widget Posts” module for an initial implementation of storing widgets in a `widget_instance` custom post type. This plugin depends on #32474 which facilitated plugins to store widgets in posts instead of options." westonruter Future Releases 42568 Text Widget: Media Uploader Button Label Widgets normal normal Awaiting Review enhancement new 2017-11-16T06:03:35Z 2021-06-14T15:50:14Z I was wondering if the '''Media Uploader''' in the new '''Text Widget''' has a button with label '''Insert Into Widget''' instead of '''Insert Into Post''' as shown here: http://prntscr.com/hb38jv . It would be more meaningful I guess :) saurav.rox Future Releases 43045 Trigger events equivalent to editor:image-edit and editor:image-update in media-image-widget.js Widgets normal normal Future Release enhancement new 2018-01-08T20:51:24Z 2020-06-17T04:22:54Z "The `wpeditimage` TinyMCE plugin has helpful `editor:image-edit` and `editor:image-update` events for hooking additional metadata onto the Image object. Here's an example: {{{ wp.media.events.on('editor:image-edit',function(event){ event.metadata.pinterest_text = event.editor.$(event.image).attr('data-pin-description'); }); wp.media.events.on('editor:image-update',function(event){ event.editor.$(event.image).attr('data-pin-description', event.metadata.pinterest_text); }); }}} Although the new Image Widget reuses the `image-details` frame, it doesn't fire these equivalent events, making integration difficult. It would be helpful if the `ImageWidgetControl` implemented equivalent events." danielbachhuber Future Releases 55853 Use of unsanitized data in wp_ajax_dashboard_widgets() Widgets normal major Awaiting Review enhancement new close 2022-05-27T05:39:19Z 2022-05-27T17:37:18Z "In the ""wp-admin/includes/ajax-actions.php,"" there are much data that is unsanitized. Below is one example of it. I think it is good to sanitize all the fields properly to avoid unwanted scenarios. {{{ $pagenow = $_GET['pagenow']; if ( 'dashboard-user' === $pagenow || 'dashboard-network' === $pagenow || 'dashboard' === $pagenow ) { set_current_screen( $pagenow ); } switch ( $_GET['widget'] ) { case 'dashboard_primary': wp_dashboard_primary(); break; } }}} Here the $_GET fields are used without any sanitization. " hilayt24 Future Releases 27405 Widget Customizer: Fade out sidebar sections that lack any rendered widgets Widgets 3.9 normal normal Awaiting Review enhancement new 2014-03-13T21:44:19Z 2017-06-07T00:24:28Z "Currently when there is a widget that is not rendered in the current URL being previewed (e.g. via Widget Visibility), the widget control in the customizer will become semi-transparent to indicate it is not being rendered. The same semi-transparent indicator would be useful for sidebars that are empty or which lack any rendered widgets. Originally reported in https://github.com/x-team/wp-widget-customizer/issues/76" westonruter Future Releases 53805 Widget HTML Personalized no have Title Widgets 5.8 normal normal Awaiting Review enhancement new reporter-feedback 2021-07-27T23:25:36Z 2021-09-14T11:44:18Z "The widget HTML Personalized no have one title, we can left the title blank but we need one title if we want use it, like: Note or Publicity etc. The old HTML personalized has the title... I don't no if are another widgets who need title, I no check all I hope can fix it, also is one little slow the section widgets. I like quit the previsualization, for load more faster." Guillermo77 Future Releases 45054 "Widget deletion: Add an ""Are you sure you want to delete?"" popup before it gets deleted" Widgets 4.9.8 normal normal Awaiting Review enhancement new dev-feedback 2018-10-05T10:24:33Z 2020-05-25T18:16:56Z "For the widgets the ""Delete"" and ""Done"" buttons are close to each other, and if you accidentally click Delete, there is no obvious option to restore the widget. Not great if you have added lots of html code... I would have liked to see here a ""Are you sure you want to delete this widget?"". " Vibeque Future Releases 42455 WordPress Class methods and Single Responsibility (recent posts widgets) Widgets 4.9.8 normal normal Awaiting Review enhancement new dev-feedback 2017-11-07T13:24:34Z 2022-09-22T09:16:05Z "WordPress uses PHP Classes a lot and this is great for extending and improving. The problem is, many class methods does a lot of things at once and this doesn't help extending at all. For instance, I'm trying to extend the Recent Posts Widget (`WP_Widget_Recent_Posts`). The plugin has it's internal settings and logic, query posts and apply filters. I want to change it's render method, but just that. Don't want to mess with the plugin logic. The problem is, the render method (`widget` method) does a lot of things instead of focusing only on rendering. This forces me to copy every logical actions and reproduce them on my extending class. This could be solved by just splitting the plugin logic and rendering in separated functions (an function to get the posts and filters, separated from the `widget` function). This would improve a lot the WordPress extending by plugins and themes. If we apply the single responsibility principle on WordPress classes and functions, plugins wouldn't need to have much more code. Another point: this enhancement wouldn't impact old plugins/themes if the functions signatures keep the same." viewup Future Releases 60653 Block-based Widgets Editor - Site Logo Block is not listed. Widgets 6.4 normal minor Awaiting Review feature request assigned dev-feedback 2024-02-28T15:47:51Z 2024-03-12T19:18:51Z "It would be interesting to activate the Site Logo Block to appear in the Block-based Widgets Editor. [[Image(https://i.ibb.co/BLRLFp5/Captura-de-tela-2024-02-28-124402.png)]]" williansantana Future Releases 42849 Custom HTML Widget: Allow user to be able to bypass lint errors to save Widgets 4.9 normal normal Future Release feature request new 2017-12-09T00:41:41Z 2018-03-14T21:11:53Z "In the custom HTML widget I have some div ids that are the same, and for some reason I can't save the edited widget after updating to 4.9. I would like an ignore button to be able to save the content inside a widget, especially the custom HTML widget. I don't want WordPress' brand new HTML checker feature to override code that is working completely fine. Would it be possible to do that, or make it so that you can at least checkmark something to be able to save the widget. The error it is bugging me about is this: {{{ }}} Because I have two or more widgets using the same formatting it actually wants me to change them, and in that case break the formatting just to please itself. I have made websites for over 20 years, I don't need a WordPress feature «for dummies» to tell me how to write my HTML code. " skoen Future Releases 33473 "Shortcodes + Widgets + Nav Menus. Unified ""component"" API (aka Content Blocks)" Widgets normal normal Future Release feature request new 2015-08-20T21:53:57Z 2018-03-26T16:53:02Z "Looking ahead and seeing that Shortcake is getting a lot of support, I've noticed that shortcodes and widgets are beginning to look fundamentally the same. They are both view components that express some sort of input fields for dynamic ""instance"" data. So I'm wondering what the general feeling would be toward a unified ""Component"" API. Lets say you're a designer implementing a theme and you have a stylized block for displaying an author. At times you might want to express that in a sidebar, and other times you might want to use it inline in page content. The HTML output is fundamentally the same, and differences only deal with where the input data is coming from (shortcode attrs vs. widget data) and minor presentational differences based on context. This could be very simply expressed as a single class or function pattern that does the work of registering the shortcode and widget under the hood for you. A client or someone downloading a theme often won't know that they want a component to work inside a sidebar or inside the content until they realize it isn't available. The benefit of a unified API is that you double the usable components you have to work with. There are great developers making widget bundles and other great developers making shortcodes, but not many doing both. All this to say, it's actually pretty straightforward to implement a class version of this API that handles registering both types of object for you. I have a working version of this in a plugin already. I'm just curious if anyone else thinks this is a problem worth pursuing. Thoughts? Aside: You could make a case that template parts aren't all that different from shortcodes and widgets and might also benefit from input fields (customizer anyone?), at which point you'd have a component that could truly go anywhere." brentjett@… Future Releases 16443 We need a way to programmatically tell if we are in a sidebar Widgets 2.2 normal normal Awaiting Review feature request new dev-feedback 2011-02-02T20:10:28Z 2022-07-15T16:12:27Z There is currently no way to tell if you are in_a_sidebar or doing a widget which makes me a sad stallman lookalike. jorbin Future Releases 27404 Widget Customizer: Allow adding inactive widgets to widget areas melchoyce Widgets 3.9 normal normal Future Release feature request assigned 2014-03-13T21:24:35Z 2018-12-09T21:05:49Z "Currently a user may add new widget instances to widget areas in the customizer, and they may remove these widgets to send them to the inactive widgets area (aka widget trash). However, there is currently no way to restore these inactive widgets to widget areas without leaving the customizer and going to the widgets admin page. The widget addition panel should be extended to also list out inactive widgets. Originally reported at https://github.com/x-team/wp-widget-customizer/issues/46 Related: #39693" westonruter Future Releases 28747 $.wpColorPicker cannot duplicate elements Widgets 3.9.1 normal normal defect (bug) new 2014-07-04T09:26:00Z 2019-06-05T06:40:07Z "I can't `clone()` wrap `div` when I use with `wpColorPicker`. If I just running the `$.wpColorPicker` method again, I see two instance about this. What I can to do for duplicate?" KingYes Future Releases 21396 Categories widget reports categories without posts when they have custom posts Widgets 3.4 normal normal defect (bug) new 2012-07-27T02:36:46Z 2019-06-05T06:38:44Z "This problem may be related to #14084, but this report is specific to the behaviour of the Categories Widget. - Create a custom post type eg. ""Products"" - Create a category eg. ""Photographs"" - Add some posts of type Products, assign them to category Photographs - go to the blog page and the Categories widget lists Photographs as a category - click on Photographs - the ""Nothing Found"" post is shown. There are no normal posts of category Photographs, but the widget lists a category that returns nothing. I would have expected the widget not to list a category that has no normal posts. " pkwooster Future Releases 27236 Custom Widgets lost when theme is re-activated while the widget plugin is inactive Widgets 3.8.1 normal normal defect (bug) new 2014-02-28T15:27:29Z 2019-06-05T06:39:46Z "It could be a rare issue for others, but it's a regular process for my use-case. Custom Widgets are no longer shown in the widget area when theme is de-activated and re-activated while the plugin that provided one of the widgets is inactive. Steps: (Assumes, twenty fourteen is active) 1. Install Slim Jetpack plugin (or any other plugin that provides a widget). I enabled the Extra Sidebar Widgets from Settings > Slim Jetpack. 2. Add one of the Slim Jetpack widgets to the ""Primary Sidebar"" for example ""Gravatar Profile (Jetpack)"". 3. De-active Slim Jetpack. 4. Activate ""Twenty Thirteen"" theme. 5. Activate ""Twenty Fourteen"" theme. 6. Activate ""Slim Jetpack"". Unfortunately, the custom widget is lost. If you had normally de-activated and re-activated Slim Jetpacks, the Primary Sidebar would be fine. If you had done 4 and 5 without 3, everything would be good. But doing the steps as above, the widget is no longer in the sidebar - not even under Inactive Widgets. " asadkn Future Releases 29261 Enqueue script in Widget Widgets 3.9.1 normal normal defect (bug) new has-patch 2014-08-19T07:46:11Z 2020-10-13T15:28:39Z I am trying to use wp_enqueue_script inside function widget of the Widget class. But it seems like when I print html it doesn't use the javascript functions which I enqueue before. This enqueue script works well if I use for shortcode inside shortcode and later print html. Is this a bug or there is any workaround for using enqueue inside widget function that will properly handle my html also? zishanj Future Releases 11160 Inconsistancies in Naming and Using Sidebar Names and IDs. azaozz Widgets 2.9 normal normal defect (bug) new needs-unit-tests 2009-11-17T12:58:55Z 2019-06-05T06:37:18Z "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 27180 Remove Hidden Widget UI Widgets 3.8 normal normal defect (bug) new 2014-02-21T22:09:25Z 2019-06-05T06:39:44Z "I have come up with a issue with the new widget enhancements. The fact that we have to drag the widget a long way to move it to inactive status. On most screens this is below the visual area of the screen. Yet the only UI to collapse and expand the available widget area is hidden and you don't see it until your hover over text that doesn't appear or look like something you would hover over to see a user interaction. This makes it hard to us or even know it is their or available. The other UI issue also have to do with the widget placement as well. When you go to add a widget it asks you if which area do you want it added to. (For example: Main Widget Area or Secondary Widget Area) But when removing the widget the only options you have (without dragging them) is close and delete. There is no ""Move to Inactive"" Once a widget is in the Inactive Widgets area you can't add the widget via the button you once could in the new widget area. Can we have just one experience for both New and Inactive Widgets? I also have a Screencast which you can see here: http://f.cl.ly/items/0a293y0P363W1p0V2A11/Widget-Screen-Recording.mov " RDall Future Releases 53625 The 'explode' function does not work on widget block editor. Widgets 5.8 normal major defect (bug) reopened dev-feedback 2021-07-08T13:47:39Z 2021-07-16T14:08:03Z "The `explode()` function does not seem to be working on the new Widget block editor. I am testing it on the RC-2 version. I have created a simple widget that accepts Title, Description, and multiple selections from a Checkbox list items (Screenshots attached) On selecting checkboxes, the values form a comma-separated string (e.g. 123456, 9822310, 457790 etc.) and stored in a textbox. Inside the `update()` function, I am exploding this string and storing the array as `$instance['groups']` element, which in turn gets saved in the database (`wp_options` table). The functionality works as expected if I have the `widgets-block-editor` support disabled. But when enabled, the `explode()` function is not working and nothing is in `$instance['groups]`. {{{#!php $value ) { if ( sanitize_title($value['name']) == $index ) { $index = $key; break; } } } }}} must be changed to : {{{ function dynamic_sidebar($index = 1) { global $wp_registered_sidebars, $wp_registered_widgets; if ( is_int($index) ) { $index = ""sidebar-$index""; } else { $index = sanitize_title($index); foreach ( (array) $wp_registered_sidebars as $key => $value ) { if ( sanitize_title($value['id']) == $index ) { $index = $key; break; } } } }}} " alexvorn2 Future Releases 33602 is_active_sidebar returns true when widget has been deactivated Widgets 4.3 normal normal defect (bug) assigned reporter-feedback 2015-08-30T03:10:32Z 2019-06-05T06:41:30Z "When I activate a plugin (in this case Ultimate Social Media and Share icons) Add the widget to my sidebar area Deactivate the plugin The widget is no longer visible in the sidebar BUT is_active_sidebar still returns true" karlikdesign Future Releases 17078 is_active_sidebar() doesn't work with Numeric sidebar ID's Widgets 2.8 normal normal defect (bug) new close 2011-04-07T10:06:54Z 2020-05-20T21:00:56Z "This needs a small fix: Function is_active_sidebar( $index) converts $index to a string then uses wp_get_sidebars_widgets() to see if the sidebar is active ..but keys in the array wp_get_sidebars_widgets() generates can be integers if the ID's of the registered sidebars are integers" lanceo Future Releases 24283 is_active_widget() incorrect logic Widgets normal normal defect (bug) new dev-feedback 2013-05-08T07:07:41Z 2019-06-05T06:39:17Z "`is_active_widget()` only returns 'true' only if widget used inside sidebar. But there is a provision to use widget directly using `the_widget()` function. I believe there is a need of alter the logic of just checking inside sidebars." valllabh Future Releases 57469 retrieve_widgets(): fatal error when a sidebar's widgets set to null (array is expected) Widgets 4.9 normal normal defect (bug) reopened close 2023-01-15T21:02:11Z 2024-03-06T13:09:48Z "When changing from PHP 7.4 to PHP 8.0 it's not possible to activate our theme. {{{ Fatal error: Uncaught Error: array_merge(): Argument #3 must be of type array, null given in wp-includes/widgets.php on line 1342 }}} {{{ array_merge() wp-includes/widgets.php:1342 retrieve_widgets() wp-includes/widgets.php:1287 _wp_sidebars_changed() wp-includes/class-wp-hook.php:310 WP_Hook::apply_filters() wp-includes/class-wp-hook.php:332 WP_Hook::do_action() wp-includes/plugin.php:517 do_action() wp-includes/theme.php:3395 check_theme_switched() wp-includes/class-wp-hook.php:308 WP_Hook::apply_filters() wp-includes/class-wp-hook.php:332 WP_Hook::do_action() wp-includes/plugin.php:517 do_action() wp-settings.php:617 require_once() wp-config.php:103 require_once() wp-load.php:50 require_once() wp-admin/admin.php:34 require_once() wp-admin/plugins.php:10 }}} Line 1342: {{{#!php array ( ), 'sidebar-standard' => array ( ), 'sidebar-marken' => NULL, 'sidebar-typen' => NULL, 'sidebar-test' => NULL, 'sidebar-zubehoer' => NULL, 'sidebar-ratgeber' => NULL, ) }}} PHP 8.0+ throws a type error when a non-array value is given to array_merge. I guess NULL is not a valid value for the sidebar widgets. Maybe our theme wrote this weird state to the options field. Patch: https://github.com/WordPress/wordpress-develop/pull/3848" kesselb Future Releases 23423 sanitize_title() in dynamic_sidebar() restricts the use of specific characters for sidebar IDs chriscct7 Widgets 2.2 normal normal defect (bug) reopened needs-unit-tests 2013-02-08T13:25:00Z 2019-06-05T06:39:05Z "In the dynamic_sidebar() function in wp-includes/widgets.php uses sanitize_title() on the given index when it looks for a sidebar with a name that matches the index. After that it leaves the index value sanitized making it impossible to use characters not allowed by sanitize_title() in a sidebar ID. By not overwriting the given index value with the sanitized version it would still be possible to use any character for the ID. To achieve this, lines 847-853 {{{ $index = sanitize_title($index); foreach ( (array) $wp_registered_sidebars as $key => $value ) { if ( sanitize_title($value['name']) == $index ) { $index = $key; break; } } }}} should be replaced with {{{ $sanitized_index = sanitize_title($index); foreach ( (array) $wp_registered_sidebars as $key => $value ) { if ( sanitize_title($value['name']) == $sanitized_index ) { $index = $key; break; } } }}}" paulvandermeijs Future Releases 14876 wp_get_sidebars_widgets() assumes that widgets are enabled Widgets lowest minor defect (bug) reopened 2010-09-15T02:05:43Z 2019-06-05T06:45:15Z "When a theme does not have any sidebars defined, wp_get_sidebars_widgets() will return the database option anyway. This reveals a bug where a theme that does not have any widgets may still get the recent comments CSS injected into it. is_active_widget() is returning true because that widget was active when the sidebar option was last used." nacin Future Releases 23008 Add a Hook To Hide Inactive Widgets Widgets 3.5 normal normal enhancement new dev-feedback 2012-12-19T19:59:12Z 2019-06-05T06:38:58Z "Hello, This is my first feature request so hopefully I'm going through the process correctly. Onto the request... Adding a hook to remove or hide the Inactive Widgets sidebar on the WordPress Admin Widgets page would be very useful for developers who don't use the area and want to be able to hide it for better UX. If this is approved I would love to submit a patch. :)" BFTrick Future Releases 20596 Adding more actions to a widget Widgets normal normal enhancement new dev-feedback 2012-05-02T00:14:28Z 2019-06-05T06:38:33Z "On the Widget UI, there is a ""Close"" button, aside with the ""Delete"" button, and I that developers should have a way to add more of those. For exemple, I would see as a good use case when you have a way of previewing the widget. Because right now the only way is by JS which is kinda of lame. Thanks," webord Future Releases 36532 Allow Reordering of Available Widgets Widgets normal normal enhancement new 2016-04-14T21:12:22Z 2019-06-05T06:44:15Z "It's common to see sites with 20 or even 30 widgets, even when the site user only needs a few of them: - Example 1: Core still ships with Tag Cloud and Meta widgets that I'd guess are barely ever used. - Example 2: It's always a bummer that the Text widget starts with ""T""... - Example 3: Jetpack adds a bunch of widgets, but I often only need one. Yesterday, I observed a client trying to drag-and-drop reorder the list of Available Widgets. I thought that was a perfectly reasonable thing to try, and realized I would love to do that on every site. This seems even more reasonable considering that a user can already reorder Inactive Widgets. I considered requesting that each widget be togglable via Screen Options, but I realize this wouldn't quite make sense given that a user could then hide an existing widget type. So among the options I can think of, I think the ability to reorder Available Widgets would be a relatively minor UI change with a potentially large UX improvement!" mrwweb Future Releases 31643 Allow widget sidebars to be loaded open or closed via filtering Widgets 4.2 normal normal enhancement new dev-feedback 2015-03-14T23:44:54Z 2019-06-05T06:40:41Z This could be useful to allow certain sidebars to always load open or closed. silb3r Future Releases 26112 Available widgets drag-and-drop causes trouble on touch devices Widgets normal normal enhancement new 2013-11-19T15:57:32Z 2019-06-05T06:39:35Z "Now that we have click-to-add for available widgets, I think it makes sense to disable the drag-and-drop for available widgets on touch devices. The interaction tends to cause troubles on touch devices when you intend to scroll through the list of widgets, and instead initiate the draggable. Since active and inactive widgets don't have any alternative for reordering, we can keep the draggable interaction there on touch devices — but maybe we should think of a new way of reordering these widgets without requiring drag-and-drop." shaunandrews Future Releases 16613 Extend Widget API to allow sidebar/widget manipulation Widgets 3.1 normal normal enhancement new 2011-02-21T22:55:17Z 2019-06-05T06:37:51Z "There is currently no easy way to add a widget to a sidebar using code. We should add methods of doing this. A good example usage of such an API could be when a new theme is activated, it could add it's custom widgets to it's sidebar. API should provide support for adding widget X to sidebar Y (or even just the first sidebar) along with setting some options for the widget and where in the sidebar to add it (top vs. bottom)." Viper007Bond Future Releases 28188 Make Natively-Outputted .widget_rss CSS Selector HTML5-Appropriate Widgets 3.9 normal normal enhancement new 2014-05-09T05:57:31Z 2019-06-05T06:40:00Z "In regards to the natively outputted RSS Widget entitled `.widget_rss`, the post Author's name is currently outputted as wrapped in a `` tag. An example of a natively outputted RSS feed block looks something like this for reference: `Example RSSed Post April 14, 2014
    This is the space where the RSSed information appears. […]
    Author` Please note that the author of the RSSed post is being natively outputted as wrapped in the `` tag. As per #27944 (ocean90's comment in particular) which references #24522 (re: proper way to tag comment authors), the natively outputted CSS selectors for the `.widget_rss` widget probably ought to be wrapped in something like: `` as opposed to ``. Reiterating what ocean90 said: The `` tag is supposed to be used for a cited block of text (like a citation) rather than used to tag the/an author. Additionally, changing the `` to `` will provide additional sitewide code uniformity (there's a word or phrase I am looking for and I can't remember it!) for a natively/vanilla outputted WordPress site (and especially if using a default WordPress theme) re: how author names are wrapped in tags. Thanks!" EMG Future Releases 29790 Widgets don't know the widget area context they're in Widgets normal normal enhancement new dev-feedback 2014-09-29T12:44:45Z 2019-06-05T06:40:16Z "If you have a widget in a widget area (both on the admin side and front-end side) it does not know in which widget area it is in. Use cases for this would be: - custom filtering and/or styling on the front-end of a widget based on its location. - having some editor options turned on/off based on widget-area." ruud@… Future Releases 29155 Widgets: is_active_widget returns true even when the widget is not displayed on specific page Widgets 2.3 normal normal enhancement new 2014-08-08T17:51:22Z 2021-11-23T15:55:22Z "Steps to reproduce: 1. Activate Twenty Eleven 2. In Appearance > Widgets, add a widget to the Showcase widget area (only displayed on pages using the Showcase Page Template) 3. Load your home page. {{{is_active_widget}}} will return true for that widget, even if it is not displayed on the home page. It seems like it would be nice if {{{is_active_widget}}} only returned true when the widget was actually displayed on the page. I'm not sure how to do that, though." jeherve Future Releases 44313 /wp-admin/css/forms.css problem when adding a "" />
    }}} Notice how the tags field is being inserted into my fieldset. It seems as thought the tags field is being inserted via javascript into whatever the last fieldset in the panel is. Here's the same fields in the quick edit panel: [[Image(https://www.dropbox.com/s/haju5pkzu4f80ih/Screenshot%202014-10-01%2019.02.36.png?dl=1)]] This is how it ''should'' show up." webgeekconsulting Future Releases 19859 """Bulk Edit"" Missing The Ability To Edit Tags" oglekler Quick/Bulk Edit normal normal Future Release enhancement reopened 2012-01-20T02:56:24Z 2024-02-12T09:21:55Z "Though I can add, remove and edit ""categories,"" I cannot do such actions to ""tags"" inside of /wp-admin/edit.php So basically, I'm interested in a ""bulk tag editing"" GUI for the WordPress admin. === I was hoping to find out the status of this feature (planned, not planned, etc) but it appears that no one has spoken about this feature on the WordPress Trac. Is there any interest in adding this feature? And could the respondent please provide any details on why or why not? Thank you for your time." ademos Future Releases 56137 Excerpt in Quick Edit Quick/Bulk Edit normal normal Awaiting Review enhancement new dev-feedback 2022-07-05T00:32:54Z 2022-11-30T20:43:46Z "Pretty simple request and hoping to see it in a future version of WordPress: the ability to edit the excerpt in the Quick Edit screen on the Posts page. Seems everything else, including Tags, can be edited there, so why not the Excerpt? Thanks!" saladgoat Future Releases 33833 Quick/Bulk Edit are not visually consistent Quick/Bulk Edit normal normal Future Release enhancement reopened 2015-09-11T16:41:56Z 2020-02-10T17:48:44Z "Quick/Bulk Edit are not visually consistent between uses (posts vs. comments, for example), and have typography treatment that we don't really use elsewhere in the admin, like all-caps and italic labels. It really hasn't changed much in quite some time. This needs some considered design treatment. Screenshots attached below." helen Future Releases 11472 Should QuickEdit remove posts from lists as needed? Quick/Bulk Edit 2.9 low minor Future Release enhancement new 2009-12-17T10:29:38Z 2019-12-09T17:54:37Z "Create a draft post. Visit Posts / Edit, and quickedit the draft. Set its status to Published and save. It remains around, with the published status, instead of being removed from the list. Reporting this just in case, as it might be a UI feature rather than a bug. " Denis-de-Bernardy Future Releases 12208 Add Quick Edit To Media Library list view Quick/Bulk Edit normal normal Future Release feature request new dev-feedback 2010-02-12T01:45:12Z 2023-02-07T23:15:38Z I am requesting that a quick edit link be added to the media in the media library like what is on the posts page. I would like to quickly be able to edit titles, alts, and captions at least. queenofdiy Future Releases 56129 Author Dropdown menu missing in Quick Edit Quick/Bulk Edit 6.0 normal normal defect (bug) reopened dev-feedback 2022-07-01T19:49:54Z 2023-05-15T19:47:19Z "My publishing team just reached out to me regarding a useful feature. This feature allowed my writing team to change the author for a post through ""Quick Edit"" under each post. This feature is now visibly gone from the Quick Edit menu, forcing writers to open each post in a separate tab and change the author from there. Can you provide instructions on how to re-enable the change author field in Quick Edit? Best, Duke" iheartdogs Future Releases 15761 Bulk editing on posts without Javascript enabled results in the post being set to draft garyc40 Quick/Bulk Edit 2.9 normal normal defect (bug) assigned 2010-12-10T09:03:35Z 2019-06-04T21:06:13Z "Currently, Bulk editing is available without JavaScript being enabled. The result of attempting to edit a post, is a redirect back to the posts page with the post being marked as a draft. No UI is offered for bulk editing. This behaviour exists in trunk, 3.0, and 2.9 from my testing (havn't tested earlier versions). The Bulk editing screen appears to work without Javascript for modification submittal, so it's possible that a non-js version would be possible." dd32 Future Releases 26524 Quick edit form looks strange for localized version Quick/Bulk Edit 3.8 normal normal defect (bug) new 2013-12-10T18:32:50Z 2024-02-25T19:47:57Z Please see attached screesnhot. pavelevap Future Releases 32952 Select elements don't have the same size as input elements Quick/Bulk Edit 3.8 normal normal defect (bug) new close 2015-07-09T20:22:56Z 2023-05-14T19:48:31Z "[[Image(https://cldup.com/Daws15AjdJ.png)]] - `select` elements should have the same font size as other `input` elements" sunnyratilal Future Releases 31615 UI bug using Quick Edit Quick/Bulk Edit 4.1.1 normal normal defect (bug) new dev-feedback 2015-03-12T20:13:47Z 2019-06-04T21:14:25Z "After changing the parent attribute for a page using Quick Edit, the page title is prepended with the child hyphen but the table structure does not change. Refreshing the page fixes the issue. Using latest 4.1.1 with no plugins installed and default theme. '''Steps to replicate:''' 1. Change the parent of a page or post using quick edit '''Browser''' Chrome: 41.0.2272.76 (64-bit) OS X Yosemite 10.10.2. " justingreerbbi Future Releases 30870 Add an $actions array and a filter in inline_edit() function Quick/Bulk Edit 3.1 normal normal enhancement new reporter-feedback 2014-12-31T08:07:42Z 2019-06-04T21:13:29Z "There is no current possibility for the developper not to display part of the form generated by the inline_edit() function. It would be great enhancement to store the filedset in an array, then apply a ""post_inline_edit_fields"" with as parameter the fieldset array and the post, and then echo the fieldset. For the moment, you can add a metabox but not remove any part of the form. Thank you." olivierstern Future Releases 31638 Bulk Edit & Quick Edit User Interfaces should be consistent Quick/Bulk Edit normal normal enhancement new close 2015-03-13T19:07:13Z 2019-06-04T21:14:32Z "Bulk edit and quick edit interfaces do pretty much the same thing: they let the user perform a few tasks from edit.php. However, the interfaces for these two panels is inconsistent. Take a look: Quick edit: [[Image(https://cldup.com/2pJ8J1EMxy.png)]] Bulk edit: [[Image(https://cldup.com/ly5tNO3orZ.png)]] The major difference is that items that are checkboxes in Quick Edit are dropdowns in Bulk Edit. It would seem to make sense to make these consistent across both UIs. So, maybe in Bulk Edit change Comments, Pings, and Sticky to checkboxes Or in Quick Edit change Comments, Pings, and Sticky to a dropdown. " siobhan Future Releases 29320 Bulk edit on custom post types without title support Quick/Bulk Edit 3.9.2 normal normal enhancement reopened 2014-08-22T14:48:13Z 2019-07-24T14:35:02Z "I have a custom content type that does not support titles. When I want to use bulk edit on this custom post type on edit.php, the area where the post titles should show up stays empty (instead of showing something like ""auto draft""). This is due to includes/class-wp-posts-list-table.php:925 where it is checked whether the post type supports titles. However I have a custom filter for the_title, which generates post titles dependent on custom fields. In order to let them show up in the bulk edit form, one would have to change for one class-wp-posts-list-table.php to allow post types without title support and one would additionally have to change includes/template.php:311 to use get_the_title($post->ID) instead of $post->post_title to insert the correct titles into the hidden fields in the edit.php-table. Of course I could also store my custom titles in post_title and hide the title field from view in my custom post type, but I think this to be a rather hackish way..." alexfecke Future Releases 16392 Quick Edit API should allow to pick up custom field values automatically Quick/Bulk Edit 3.1 normal normal enhancement new 2011-01-27T22:22:10Z 2019-06-04T21:06:26Z "Attached are two screenshots of the same plugin in 3.0 and 3.1. The plugin code is unchanged between the two. Only WP gets an svn switch. I'm investigating where it's coming from, but as you can note from the screenshots 3.0 lists nada for that plugin on the one hand side, while 3.1 lists actual fields and leaves them blank. The latter causes data loss when Quick-Editing a row. Cross-referencing ticket references: http://code.google.com/p/wp-e-commerce/issues/detail?id=327 Plugin SVN: http://svn.wp-plugins.org/wp-e-commerce/branches/3.8-development " Denis-de-Bernardy Future Releases 51852 """any"" value in ""post_type"" param in ""get_posts"" by default ignore attachments" Query normal normal Future Release defect (bug) assigned needs-unit-tests 2020-11-23T09:45:48Z 2021-02-18T00:24:52Z "When creating a simple call to get all posts for all post types by default to the parameters are adding `post_status` parameter with `publish` value. {{{#!php 'any']); }}} To the `WP_Query` instance are supplied followed arguments: {{{#!php 5 ""category"" => 0 ""orderby"" => ""date"" ""order"" => ""DESC"" ""include"" => [] ""exclude"" => [] ""meta_key"" => """" ""meta_value"" => """" ""post_type"" => ""any"" ""suppress_filters"" => true ""post_status"" => ""publish"" ""posts_per_page"" => 5 ""ignore_sticky_posts"" => true ""no_found_rows"" => true ] }}} All attachment posts have `inherit` post status so by default are ignored in this query. To actually get all post types the first function parameters should be expended by `post_status` parameter with `['publish', 'inherit']` value. {{{#!php 'any', 'post_status' => ['publish', 'inherit']]); }}}" dam6pl Future Releases 45343 $query->post is null when WP_Query `fields` parameter is present Query normal normal Awaiting Review defect (bug) new dev-feedback 2018-11-14T08:07:12Z 2018-11-14T10:23:21Z "Normally, WP_Query returns an object where `$query->posts` contains an array of posts and `$query->post` contains the first post. But if the `fields` parameter is present then `$query->post` returns `null`. Is it a bug or an expected behaviour? If it's expected then it should be documented because it's confusing and unintuitive. **Example:** {{{#!php 'my-post-type', ]); if ($query->have_posts()) { $firstPost = $query->post; // returns the same as $query->$posts[0] } // Weird behaviour $query = new \WP_Query([ 'post_type' => 'my-post-type', 'fields' => 'ids', ]); if ($query->have_posts()) { $firstPost = $query->post; // returns null } " wujek_bogdan Future Releases 43372 $wp_query->max_num_pages return value as float Query 4.9.4 normal trivial Awaiting Review defect (bug) new 2018-02-20T16:32:40Z 2022-02-10T15:13:40Z "As a page number, Integer would make more sense than Float. This is not a big problem but kinda annoying when you do strict comparison on this value. since no one will define a page number as float." ironghost63 Future Releases 52732 'get_posts' has been waiting for so long to have a hook Query normal normal Awaiting Review defect (bug) new reporter-feedback 2021-03-07T20:49:37Z 2024-02-13T15:33:33Z "I reckon `get_posts` is the most (frequently) used function across many plugins or scripts. I know there are internal `WP_Query` hooks available, but that makes things harder to get into. I think having hook on `get_posts` will be very useful and easy for people / developers to remind & amend things easier. patch attached." ttodua Future Releases 39914 'orderby' date results differs depend on 'post_status' Query 4.7.2 normal normal Awaiting Review defect (bug) new 2017-02-19T09:40:43Z 2017-02-19T09:40:43Z "Default 'orderby' date return different order results depend on 'post_status' passed in WP_Query. For example, 3 published posts with identical post_date (if bulk publish, import or other stuff) in WP_Query will return different posts order on page, which depend on 'post_status' = 'publish' or 'any'. Since all posts are published, setting 'post_status' should not affect default orderby date results. Most notably this difference in edit.php?post_type= in comparison with front-end WP_Query results. Is it normal behaviour of such querying results?" esemlabel Future Releases 59235 AJAX request returns critical error in class-wp-date-query.php Query 4.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2023-08-29T08:35:27Z 2023-10-30T21:34:07Z "This is due to the mktime gets the $year variable as string and not int. This is the error code given: {{{ PHP Fatal error: Uncaught TypeError: mktime(): Argument #6 ($year) must be of type ?int, string given in /wp-includes/class-wp-date-query.php:320 }}} The code is: {{{#!php 25, 'post_status' => 'private' )); // page #25 is set to ""private"" if ($the_query->have_posts()) { // ... nope, no posts for you today while ($the_query->have_posts()) { $the_query->the_post(); the_content(); } wp_reset_postdata(); } ?> }}} But it only works when I am logged in as administrator. When I am not logged in, and print_r() the $the_query, there is ""request"" index filled with: {{{SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID = 25 AND wp_posts.post_type = 'page' AND ((wp_posts.post_status = 'private')) ORDER BY wp_posts.post_date DESC}}} Querying database with it directly in PHPMyAdmin, it returns one row as expected (page ID 25 row). But template loop does not anything. ""Posts"" index in $the_query is empty. I have expected WP_Query works like ""just give me anything I want (defined by the arguments)"" ... and I want page with ID 25. " mklusak Future Releases 42164 Conditional Tags not working when using ugly URL Query 4.8.2 normal normal Awaiting Review defect (bug) new needs-unit-tests 2017-10-10T10:23:14Z 2017-10-10T13:54:21Z "When accessing a category archive via its pretty URL e.g. {{{ example.com/category/whatever }}} the conditional tag {{{ is_category() }}} returns '''true'''. Accessing the same category archive via its ugly URL {{{ example.com?cat=whatever }}} the conditional tag {{{ is_category() }}} returns '''false'''. I'm pretty sure this concerns other conditional tags too. This is not only a cosmetic flaw because it causes WP to use the wrong template. I've tested it with Twenty Seventeen and the homepage template was used in case of using an ugly URL. Due tue the ugly URL always work independently of permalink settings this is a bug in my opinion." petersplugins Future Releases 44848 Ensure that empty author profiles have proper 404 behaviour Query normal normal Awaiting Review defect (bug) new dev-feedback 2018-08-27T14:33:38Z 2019-09-17T19:09:53Z "** Summary ** - WordPress 'creates' a ''profile posts archive'' (i.e., ""See all posts by [author name]"") for each user in the system. This can be reached by clicking 'view' from the Users table in wp-admin. - It does so, ''even if they have no posts'' - and even if they lack the permission to publish posts entirely. - Whilst the empty profile pages ''look'' like they serve a standard 404 error, in fact, they return a 200 HTTP header status, and just call the 404 template part for the main page body. - This results in many 'soft 404' pages/errors, which can adversley impact the way in search engines and other systems (Facebook, Twitter, etc) crawl, extract information from, and value/evaluate websites (see Google's documentation on soft 404s at https://support.google.com/webmasters/answer/181708?hl=en). It's important that we correct this behaviour in WordPress Core for numerous reasons; from compliance with basic web standards (error pages should return an appropriate HTTP header status), to adherence with the guidelines and preferences of external platforms (search engines, social networks, etc), to consistency with other page/template handling processes. ** Example ** A newly created `subscriber` user on a test site (called 'Test User 2') with no authored posts has an author archive accessible at https://yoast.jonoalderson.com/author/test-user-2/. Although this presents as a 404 error, the page returns meta data and behaviour consistent with a valid author request (see the tags contained in the `` of the HTML source; particularly the `` tags). The body template then just calls the 404 template part. ** Solution ** We should ensure that these scenarios return proper/consistent 404 behaviour. Specifically, requests to author profiles where the author has zero posts should trigger normal 404 behaviour (including headers, query behaviour, etc), as opposed to just calling the 404 template. E.g., {{{ // If author archive has zero posts global $wp_query; $wp_query->set_404(); status_header(404); include( get_query_template( '404' ) ); die(); }}} As opposed to just: {{{ // If author archive has zero posts include( get_query_template( '404' ) ); die(); }}} " jonoaldersonwp Future Releases 40903 Filtered posts_request query can break found_posts query Query normal normal Awaiting Review defect (bug) new 2017-06-01T16:54:45Z 2017-06-01T18:40:57Z "Suppose the `posts_request` query is built with `SQL_CALC_FOUND_ROWS`. The stage is set for `WP_Query::set_found_posts` issue `SELECT FOUND_ROWS()` because `$limits` is non-empty. Now suppose a plugin filters `posts_requests` to the empty string because it gets results another way. WP_Query will still go ahead and issue `SELECT FOUND_ROWS()` erroneously. Some plugins avoid this by filtering `found_posts_query` to the empty string. However, it seems like there is a better way to write the logic of `set_found_posts` so that it respects the filtered `posts_request` query and avoids the problematic statement: simply check the filtered query for `SQL_CALC_FOUND_ROWS` instead of looking at `$limits`. Proposed fix: {{{ private function set_found_posts( $q, $limits ) { global $wpdb; // Bail if posts is an empty array. Continue if posts is an empty string, // null, or false to accommodate caching plugins that fill posts later. if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) ) return; - if ( ! empty( $limits ) ) { + if ( substr( $this->request, 0, 26 ) === 'SELECT SQL_CALC_FOUND_ROWS' ) ) { /** * Filters the query to run for retrieving the found posts. * }}}" andy Future Releases 52921 If page content blank and any page shows 404 error Query normal normal Awaiting Review defect (bug) new dev-feedback 2021-03-26T10:53:11Z 2021-03-30T01:31:53Z "If not add any content in the page default content area from the admin panel and save the page and then view the page it shows 404page not found. If add any content in the content area and save then view the page, it's working fine. https://ngatiwhatuaorakei.com/ " ujjwalghosh Future Releases 44903 Multisite - Archive Main Query Duplicate Paged Posts Query 4.9.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-09-06T16:15:45Z 2018-09-13T08:23:59Z "Hi there, I noticed today, on my multisite, a post type archive such as posts, etc, while using the main query that wordpress sets, and pagination /page/2/ for example, this shows duplicate posts. I tested this on a fresh multisite install of wordpress with a fresh database. " barryhanbury Future Releases 39540 NOT EXISTS meta condition doesn't work if meta has NULL value. Query 4.7 normal normal Future Release defect (bug) new needs-unit-tests 2017-01-10T16:42:19Z 2020-07-14T05:36:51Z "It seems problem exists since meta query class release. Right now NOT EXISTS works only if meta doesn't exist at all, but if it has NULL value we got incorrect result. I understand that better not use NULL values with metas at all, but you allow to write NULL as meta value, so please add possibility to check it. Just need to change string in class-wp-meta-query.php: {{{ $sql_chunks['where'][] = $alias . '.' . $this->meta_id_column . ' IS NULL'; }}} For example on: {{{ $sql_chunks['where'][] = ""$alias.meta_value IS NULL""; }}} And both cases will be covered. Thank you in advance. " avahura Future Releases 37251 Not return 404 on front-page with option page and url `/page/2` Query 4.5.3 normal normal Awaiting Review defect (bug) new 2016-07-01T15:31:11Z 2023-05-28T15:33:44Z "If i setup page on front-page(Go `Settings`->`Reading`->`Set show on front static page and choose own page`->`Save`). Then go to front page on my site (example http://my-domain/) i see page, which setted before. But if i try open `http://my-domain/page/2`, `http://my-domain/page/3` and etc, i get always front-page, except i am wait 404 error. After debug i found solution (line 1777 in `query.php`): {{{#!php is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') && !$this->is_paged) { $_query = wp_parse_args($this->query); // pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename. if ( isset($_query['pagename']) && '' == $_query['pagename'] ) unset($_query['pagename']); unset( $_query['embed'] ); if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) { $this->is_page = true; $this->is_home = false; $qv['page_id'] = get_option('page_on_front'); // Correct for page_on_front if ( !empty($qv['paged']) ) { $qv['page'] = $qv['paged']; unset($qv['paged']); } } } }}} Add `&& !$this->is_paged` check." sheo13666q Future Releases 48524 Notice: Undefined variable: matches Query 3.3 normal minor Awaiting Review defect (bug) new reporter-feedback 2019-11-07T07:56:40Z 2019-11-09T11:24:17Z " {{{#!php 'post', 'posts_per_page' => 3, 'orderby' => 'has_spotlight post_date', 'meta_query' => [ 'relation' => 'OR', 'has_spotlight' => [ 'key' => 'spotlight', 'value' => '1' ], 'standard' => [ 'key' => 'spotlight', 'compare' => 'NOT EXISTS' ] ], 'tax_query' => [ [ 'taxonomy' => 'post_tag', 'field' => 'name', 'terms' => 'News' ] ] ]); }}} In other areas of the web application, similar queries appeared to function as expected - the ""spotlight"" post would appear first in the list, with remaining posts ordered by date. However, for the above query, something interesting happened: A post with no spotlight metadata was appearing at the top of the list, and the actual spotlight post was appearing below it. Using PHPStorm and Xdebug, I set a breakpoint for the query and examined the object. Under the request property, the following SQL was generated: {{{ SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = 'spotlight' ) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (724) ) AND ( ( wp_postmeta.meta_key = 'spotlight' AND wp_postmeta.meta_value = '1' ) OR mt1.post_id IS NULL ) AND wp_posts.post_type = 'post' AND ( wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' ) GROUP BY wp_posts.ID ORDER BY wp_posts.menu_order, CAST(wp_postmeta.meta_value AS CHAR) DESC, wp_posts.post_date DESC LIMIT 0, 3 }}} When running this SQL directly in SequelPro, the following IDs were returned, confirming the order that I was seeing: 1 227 <-- Spotlight Post ID 225 After looking through the SQL statement, I decided to check exactly what Wordpress was seeing. After modifying the query to include everything from the wp_postmeta query, something interesting happened: {{{ SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, wp_postmeta.* FROM wp_posts ... }}} I receive the following results: {{{ ID meta_id post_id meta_key meta_value 1 51 1 _edit_lock 1496942377:1 227 20794 227 spotlight 1 225 3305 225 _yst_is_cornerstone }}} It appears that the table that's being used to define the ordering - '''wp_postmeta''' - is not being filtered the same way as the other table alias '''mt1'''. Upon changing the order clause to use the filtered meta table: {{{ SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, mt1.* ... CAST(mt1.meta_value AS CHAR) DESC }}} I received the correct results: {{{ ID meta_id post_id meta_key meta_value 227 20794 227 spotlight 1 225 NULL NULL NULL NULL 1 NULL NULL NULL NULL }}} This is strange to me, as this line should theoretically prevent other unrelated meta information from being included in the results: {{{ WHERE ... ( wp_postmeta.meta_key = 'spotlight' AND wp_postmeta.meta_value = '1' ) OR mt1.post_id IS NULL ... }}} It should be noted that simply changing the ORDER BY clause in my case - while it ""fixes"" the issue - is not technically correct. Instead, the primary meta query clause should also contain the same filtering that the second does. The complete query looks like so: {{{ SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'spotlight' ) LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = 'spotlight' ) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (724) ) AND ( ( wp_postmeta.meta_key = 'spotlight' AND wp_postmeta.meta_value = '1' ) OR mt1.post_id IS NULL ) AND wp_posts.post_type = 'post' AND ( wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' ) GROUP BY wp_posts.ID ORDER BY wp_posts.menu_order, CAST(wp_postmeta.meta_value AS CHAR) DESC, wp_posts.post_date DESC LIMIT 0, 3 }}} '''Notice that the first metadata left join contains the same filtering by meta_key as the second.''' I'm not sure what far-reaching consequences this might have, or if this issue has come up in the past. I imagine it's a bit of an edge-case. Let me know if this is something that you're able to reproduce on your end, or if you need more information in regards to this." maiorano84 Future Releases 60566 Posts Page as Draft remains publicly queryable Query normal normal Future Release defect (bug) new 2024-02-17T11:46:03Z 2024-02-19T11:04:08Z "When assigning a Posts Page at ""WP Admin > Settings > Reading"" and afterward setting that page to draft, the page remains publicly queryable. This is possible via the `?page_id=` query (not `?p=`) and the provisioned slug." Cybr Future Releases 44349 Posts show up multiple times in backend when they have the exact same date Query 4.9.6 normal normal Awaiting Review defect (bug) new dev-feedback 2018-06-11T15:46:38Z 2022-02-09T08:19:52Z When I import for example 200 posts with the Import WordPress tool and then go to wp-admin>posts, the posts show up in the query multiple times (for instance on page 1 and page 2). Seems like others are left out. wzshop Future Releases 42732 Problem with usage of WP_Term_Query inside WP_Tax_Query Query 4.9 normal normal Awaiting Review defect (bug) new 2017-11-28T15:15:21Z 2017-11-28T15:15:21Z "This problem started on WP 4.9 because of #37038. In WPML plugin, we filter the tax queries in order to convert the term IDs to their translations in the current language (if any). In WP 4.8.3, `WP_Tax_Query::transform_query` was making direct calls to the DB. In WP 4.9, `WP_Tax_Query::transform_query` is using `WP_Term_Query` to fetch the terms of the meta query. The problem is that we have filters on `WP_Term_Query` (on `get_terms_args`) which applies to this. This is usually not a problem, except for a post query with tax queries and `suppress_filters` set to `true`. Here's an example: {{{ $args = array( 'post_type' => 'post', 'suppress_filters' => true, 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => [ 3, 4 ] // 3 is the English category and 4 is the translation in French ), ) ); $wp_query = new WP_Query( $args ); }}} '''What is expected (and actual behavior in 4.8.3):''' This query should return all the posts attached to the category 3 or 4, whatever the current language. '''What we have now:''' The query returns the posts attached to 3 OR the posts attached to 4 (depending on the current language). So we need a way to flag that `WP_Term_Query` is used inside `WP_Query` (via `WP_Tax_Query`) and `suppress_filters` is set to `true`." strategio Future Releases 54853 Search only searching phrases and not searching individual terms Query 5.8.3 normal normal Awaiting Review defect (bug) new 2022-01-19T03:00:51Z 2022-01-19T07:46:09Z " {{{ get_posts(array( ""post_type"" => ""fruit"", ""s"" => ""apple orange banana"" )); }}} should search for each term separately, but it does not. It searches the entire string as a phrase. Issue is within /wp-includes/class-wp-query.php line 1398. It's a simple change: {{{ $searchand = ' AND '; to $searchand = ' OR '; }}} " jchang Future Releases 42256 Skip SQL_CALC_FOUND_ROWS when using post__in whose count matches posts_per_page Query normal normal Awaiting Review defect (bug) new reporter-feedback 2017-10-18T03:46:58Z 2017-11-21T03:39:15Z If a `post__in` array is passed to WP_Query whose length matches the `posts_per_page` value for the query, `SQL_CALC_FOUND_ROWS` is unnecessary. ethitter Future Releases 48078 Some WP_XXX_Query::query() methods produce incorrect results when called in a loop Query normal normal Awaiting Review defect (bug) new dev-feedback 2019-09-19T18:28:19Z 2019-09-20T11:47:58Z "While testing a [https://core.trac.wordpress.org/attachment/ticket/37392/37392.9.patch patch] for #37392 I came across what ''may'' be a bug in `WP_Site_Query::query()`. That patch creates a `WP_Site_Query` object and then in a loop does various different `query()`'s, as in: {{{#!php $q = new WP_Site_Query(); $args = array( 'network_id' => $network_id, 'number' => 1, 'fields' => 'ids', 'no_found_rows' => false, ); foreach ( array( 'public', 'archived', ... ) as $status ) { $_args = $args; $_args[ $status ] = 1; $q->query( $_args ); // do something with the results of this site query. } }}} However, calling `query()` in a loop like that doesn't produce the expected results other than the 1st time through the loop. Why? Because when `query()` calls `WP_Site_Query::get_site_ids()` on subsequent iterations, the protected class member `$sql_clauses` still has its value from the previous iteration through the loop and the ""new"" query basically gets added to the previous queries. In the case of the above code this results in the query for `archive = 1` to actually be `public = 1 AND archive = 1` which is **not** what is intended. Looking at other `WP_XXX_Query()` classes, I ''think'' the following suffer from the same thing (although I haven't written code to test that): 1. `WP_Network_Query` 2. `WP_Term_Query` but the following do **not**: 1. `WP_Query` (because it doesn't use a class member for the clauses) 2. `WP_User_Query` (because it uses a `prepare_query( $query )` method which resets the class member(s)) So, I guess the question is: should these `query()` methods be expected to work when called multiple times in a loop (with different queries each time) or is that **not** an intended use?" pbiron Future Releases 39140 Taxonomies - operator AND doesn't work properly for taxonomy hierarchies Query 4.6.1 normal normal Awaiting Review defect (bug) new 2016-12-07T08:54:32Z 2019-01-08T19:56:52Z "Hi, This is a problem discovered using WooCommerce shortcodes but has its core problem in the WP core according to my findings. I've already implemented a fix for this in a customer project. I’ve ran into problems using one of the Woo shortcodes and operator ‘AND’. This is questioned by others several times before (see links below) but it seems like the core of the problem is not solved. I’ve worked with the issue on WP 4.6.1 installation and come to what I believe is a solution (changes in file class-wp-tax-query.php). Even if the issue is found using Woo product categories I believe this is an issue for taxonomies in general. Problem: Using shortcode to retrieve a filtered product list and filtering on two or more product categories using operator “AND” fails when using one or more non-leaf (i.e. parent) product categories. There even seemed to be additional problems when using more than two leaf keywords. In general the ""AND"" didn't behave as expected. Other reports on the issue: [https://wordpress.org/support/topic/operator-and-on-product_category/] [https://wordpress.org/support/topic/woocommerce-display-products-from-two-categories-combined/] [https://wordpress.org/support/topic/woocommerce-product_category-and-operator-returns-no-results/] Examples using Woo shortcodes: Taxonomies (product categories) for Product1: '''Leaf'''CatA, '''Leaf'''CatB [product_category category=”'''Parent'''CatA, '''Leaf'''CatB” operator=”AND”] => '''Fails''' - shows nothing. Should show Product1 [product_category category=”'''Leaf'''CatA, '''Leaf'''CatB” operator=”AND”] => '''Ok''' - shows Product1 Reason: There is no individual and complete hierarchial evaluation of each taxonomy/category keyword specified in the shortcode. Solution that worked for me: The issue is found in the WP-core file class-wp-tax-query.php. I’ve modified three functions to correct the issue. This includes changes to the SQL-statements generated. Changes to file class-wp-tax-query.php: class WP_Tax_Query - function get_sql_for_clause – code - function clean_query – input params and code - function transform_query – input params and code You find my modified and running code/functions with my comments here (tagged with // BF): [https://gist.github.com/Nettsidespesialisten/5d4596e18dced3c7d97501f195ffe02e] This is my first ticket here so please notify me how to contribute the best way with this issue (providing code into SVN or other). Kind regards Brede " bredefladen Future Releases 56992 The Loop displays incorrect data for queries started with `fields => 'id=>parent'`. Query 3.1 normal normal Awaiting Review defect (bug) new needs-unit-tests 2022-11-04T01:17:36Z 2022-11-04T01:17:36Z "Using the Loop on custom `WP_Query` objects started with `fields => 'id=>parent'` will set the global post object incorrectly. Instead of containing all data, the global post object will only contain the post's ID and parent fields. All other fields are the default value. The following test demonstrates the issue: {{{#!php post->create( array( 'post_type' => 'page' ) ); $child = self::factory()->post->create( array( 'post_type' => 'page', 'post_parent' => $parent ) ); $query = new WP_Query( array( 'fields' => 'id=>parent', 'post_type' => 'page', 'page_id' => $child, ) ); $query->the_post(); $global_post = get_post( null, ARRAY_A ); $specific_post = get_post( $child, ARRAY_A ); $this->assertEqualSetsWithIndex( $global_post, $specific_post ); } }}} The cause of the error is within `WP_Query::next_post()` which assumes the `WP_Query::$posts` property contains full post objects which isn't nessesarily the cause if a sub-set of fields is requested. See the [https://core.trac.wordpress.org/browser/tags/6.0.3/src/wp-includes/class-wp-query.php?marks=3447-3449#L3447 source code]. Due to #56948 the test above will currently throw an error on trunk but it will demonstrate the problem if you check out the 6.0 branch. I suspect this has been an issue since the fields parameter was introduced in #14777 for version 3.1 but I am unable to test that far back due to PHP versions I have available on my local config." peterwilsoncc Future Releases 41446 The PHP notice displayed after the overwriting global $posts by a new empty query. Query 4.8 normal normal Awaiting Review defect (bug) new 2017-07-26T07:57:45Z 2020-08-25T12:46:57Z "'''Tested in WordPress 4.8, twentyseventeen theme with default configuration (just installed).''' After the overwriting a global variable {{{$posts}}} by a new {{{get_posts()}}} query (which return an empty array (no posts)) there is a PHP notice displayed: {{{ Notice: Undefined offset: 0 in /.../wp-includes/class-wp-query.php on line 3162 }}} The overwriting is not a best choice, but some themes and plugins do it, so we should solve this problem. The problem is in {{{WP_Query}}} class in {{{rewind_posts()}}} method in {{{wp-includes/class-wp-query.php}}} file. '''The original method:''' {{{#!php current_post = -1; if ( $this->post_count > 0 ) { $this->post = $this->posts[0]; } } }}} '''The problem:''' the global query has at least one posts, but a new query has not. So the {{{$this->post_count}}} property is always positive, but the {{{$this->posts[0]}}} is not exists. In this step, the PHP notice is displayed. '''An example of solution:''' {{{#!php current_post = -1; if ( $this->post_count > 0 && isset( $this->posts[0] ) ) { $this->post = $this->posts[0]; } } }}} Right now the method checks that the query has posts and the first post is set and is not null." danielpietrasik Future Releases 38709 Unlimited query for invalid post names Query 4.6.1 normal normal Future Release defect (bug) new 2016-11-08T13:25:13Z 2024-01-31T21:38:38Z "In case a request which is being parsed as one which sets a ""name"" query var (eg.: `http://localhost/wordpress-latest/2016/11/08/[` ) includes an invalid name ( the `[` ), a query without any limit with empty post_name is triggered: {{{#!sql SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND ( ( YEAR( wp_posts.post_date ) = 2016 AND MONTH( wp_posts.post_date ) = 11 AND DAYOFMONTH( wp_posts.post_date ) = 8 ) ) AND wp_posts.post_name = '' AND wp_posts.post_type = 'post' ORDER BY wp_posts.post_date DESC }}} The problem with the query is that it matches all the drafts in the database, since they don't have the post_name set (is empty). This may have a performance implications for the database in case it contains a lot of drafts (or posts without the post_name set for any reason) as it queries all the posts. The `post_name` is being set as empty due to `sanitize_title_for_query` in https://core.trac.wordpress.org/browser/tags/4.6.1/src/wp-includes/query.php#L2717 I have tested a more suitable validation function than `trim` ( eg.: `sanitize_title` ) in https://core.trac.wordpress.org/browser/tags/4.6.1/src/wp-includes/query.php#L1609 but it leads to archives being served on those invalid URLs, which does not seem like good fix. Trying to set `posts_per_page` to 1 in case the `name` is parsed based on the rewrite rule (which seems like a good thing since we really should be interested in a single and unique post_name in such cases) hits a wall as the is_singular() returns true and the limit is not set even if the posts_per_page is present ( due to https://core.trac.wordpress.org/browser/tags/4.6.1/src/wp-includes/query.php#L3215 ). So the fix might need to be more complicated than." david.binda Future Releases 41546 WP Query order by meta_clause not working correctly for decimal values Query 4.2 normal normal Awaiting Review defect (bug) new 2017-08-03T13:06:36Z 2017-08-05T07:13:01Z "Short description: When using the WP 4.2 improvements for meta queries (as described here: https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/) and trying to order the query by a decimal custom field, wordpress orders as if these fields are all integer and incorrectly handles all decimal values such as 1.5, 1.6 and 1.7 (all of these are seen as 1). In detail: {{{ WP_QUERY_ARGS Array ( [ignore_sticky_posts] => 1 [post_status] => publish [offset] => 0 [post_type] => Array ( [0] => post ) [orderby] => Array ( [cf_clause_1] => DESC [ID] => ASC ) [meta_query] => Array ( [cf_clause_1] => Array ( [key] => my_decimal_custom_field [type] => DECIMAL [compare] => EXISTS ) ) [posts_per_page] => 10 [nopaging] => ) }}} 5 Test posts: Post 1 - my_decimal_custom_field = 1 Post 2 - my_decimal_custom_field = 2 Post 3 - my_decimal_custom_field = 2.2 Post 4 - my_decimal_custom_field = 2.6 Post 5 - my_decimal_custom_field = 3 Using the query above results in the order: 1,3,4,2,5 When it should be 1,2,3,4,5. Trying out different order types as described in the WP Codex does not help." LordSpackolatius Future Releases 33341 WP_Meta_Query IN operator with empty array does not return expected result Query 3.2 normal critical Awaiting Review defect (bug) reopened dev-feedback 2015-08-11T18:32:26Z 2023-10-17T19:18:10Z "When using the `IN` compare mode in a `WP_Meta_Query` where the value is an empty array, this query is evaluated with an unexpected behavior. For example, I have some posts with a meta field called `'some-textfield'`: {{{ $posts = get_posts( array( 'posts_per_page' => -1, 'post_type' => 'post', 'post_status' => 'publish', 'meta_query' => array( array( 'key' => 'some-textfield', 'value' => array(), 'compare' => 'IN', ), ), ) ); }}} This code returns all posts although I would rather expect it to return no posts at all since the value of `'some-textfield'` (whatever it may be) is not ''in'' those provided in the `value` field. I discovered it when I needed to perform a meta query where the value was an array that was returned by a previous operation. It is obviously a minor issue since we can simply check if the array is empty (and in that case do not make the query at all) - but I thought it's not really the expected result of such a query. The solution would be to: * ignore this condition if the `relation` is set to `OR` and there are other conditions available * evaluate this condition to false otherwise (and thus return no results)" flixos90 Future Releases 40387 WP_Query bug with product post type with search parameter on Query 4.7.3 normal normal Awaiting Review defect (bug) reopened 2017-04-07T11:07:02Z 2017-04-18T21:09:16Z "I am not sure if it is a WordPress core bug, but seems like it! I have 5 different custom post types along with 'product' post type from Woocommerce. The following query gives (only) product result: {{{ $args = array( 'post_type' => array('product'), 'posts_per_page' => 5, 'post_status' => array('publish', 'future') ); }}} Actual query output: {{{SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future')) ORDER BY wp_posts.post_date DESC LIMIT 0, 5}}} But the following query: {{{ $args = array( 'post_type' => array('product'), 's' => 'mobile', 'posts_per_page' => 5, 'post_status' => array('publish', 'future') ); }}} outputs this (even post_type is specified the query is generated to search all other post types and surprisingly not product): {{{SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND (((wp_posts.post_title LIKE '%htc%') OR (wp_posts.post_excerpt LIKE '%htc%') OR (wp_posts.post_content LIKE '%htc%'))) AND wp_posts.post_type IN ('post', 'travelog', 'hotel-info', 'trips', 'package_tour') AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future')) ORDER BY wp_posts.post_title LIKE '%htc%' DESC, wp_posts.post_date DESC LIMIT 0, 5}}} and brings up results from all other post types and simply ignoring product. " subrataemfluence Future Releases 42546 WP_Query not handling 'LIKE' correctly. Query 4.8.3 normal normal Awaiting Review defect (bug) new 2017-11-14T16:27:03Z 2018-03-14T09:30:49Z "I am doing custom PHP to retrieve listings (as a CPT) from the database for a Realty Company website I'm working on and one of the criteria is searching on the city from a search field on a form. The problem is the generated SQL has some sort of guid in it instead of the expected percent character normally used with LIKE. Here is the generated SQL from WP_Query: {{{ 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_postmeta.meta_key = 'city' AND wp_postmeta.meta_value LIKE '{f270e6c7d3b231242ceefa28fdd47243cac2100fe4fe8c9df633ec6f3cc2f583}fairfield{f270e6c7d3b231242ceefa28fdd47243cac2100fe4fe8c9df633ec6f3cc2f583}' ) AND ( mt1.meta_key = 'beds' AND mt1.meta_value >= '0' ) ) AND wp_posts.post_type = 'listings' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 }}} As you can see the generated code for searching the ""city"" field is: {{{ wp_postmeta.meta_value LIKE '{f270e6c7d3b231242ceefa28fdd47243cac2100fe4fe8c9df633ec6f3cc2f583}fairfield{f270e6c7d3b231242ceefa28fdd47243cac2100fe4fe8c9df633ec6f3cc2f583}' }}} The ""expected"" code should look like this: {{{ wp_postmeta.meta_value LIKE '%fairfield%' }}} The form is found here: https://millersells.com/search-2/ After making selections and clicking the Search button it calls itself with url parameters and you get one of these errors: ""Fatal error: Maximum execution time of 60 seconds exceeded in /home/extremx1/public_html/millersells2017b/wp-includes/query.php on line 0"" OR ""Fatal error: Maximum execution time of 60 seconds exceeded in /home/extremx1/public_html/millersells2017b/wp-includes/class-wp-query.php on line 3090"" (Example URL with parameters: https://millersells.com/search-2/?cf_id=37&loc=fairfield&type=SingleFamilyHome&beds=3&baths=2&min_price=0&max_price=0) I am using this PHP code to create the query (for now I'm just working with 2 of the search fields): {{{ array( 'listings' ), 'meta_query' => array( array( 'key' => 'city', 'value' => $location, 'type' => 'CHAR', 'compare' => 'LIKE', ), array( 'key' => 'beds', 'value' => $bedrooms, 'compare' => '>=' ) ) ); $the_query = new WP_Query( $args ); ?> }}} To see the generated SQL I added this code at line 2752 in wp_includes/class-wp-query.php: echo $this->request; Also to aid in debugging I would suggest you add a ""generated_sql"" parameter to the query object that we can echo to see what the actual generated SQL looks like. EX: {{{echo $the_query->generated_sql;}}} Thanks! Tim :o] PS: Your welcome to contact me at tberneman@gmail.com" tberneman Future Releases 55207 WP_Query returns published sticky posts when post_status is set to draft Query normal normal Future Release defect (bug) new early 2022-02-20T14:06:52Z 2022-03-28T05:37:33Z "Originally reported here - [https://github.com/wp-cli/entity-command/issues/278] **Error:** If a sticky post is published, the following query returns the published sticky post: {{{ 'draft', ) ); ?> ?> }}} Steps to reproduce: 1. Create a sticky post and publish it 2. Create a WP_Query with its 'post_status' set to 'draft' 3. Run the query 4. Observe that the published sticky post is returned **Expected behaviour:** Setting `post_status` to `draft` should not return published sticky posts. " NomNom99 Future Releases 43634 WP_Query returns wrong result if 10+ search terms and all negative. Query normal normal Awaiting Review defect (bug) new 2018-03-26T15:09:42Z 2019-01-17T01:18:05Z "Set up: create single post with title or body ""Don't match this one!"" Use WP_query with 's' parameter: {{{ -one -two -three -four -five -six -seven -eight -nine -ten }}} WP_Query will find and return the single post and it shouldn't. Less than 10 negative search terms works fine. I believe it has to do with a special 'if clause' in the function '''parse_search''' in ''class-wp-query.php'' {{{ // if the search string has only short terms or stopwords, or is 10+ terms long, match it as sentence if ( empty( $q['search_terms'] ) || count( $q['search_terms'] ) > 9 ) { $q['search_terms'] = array( $q['s'] ); } }}} this makes {{{ JPH q['search_terms'] : Array ( [0] => -one -two -three -four -five -six -seven -eight -nine -ten ) }}} and later in the function the search variable becomes {{{ JPH search variable is: AND (((testsite_posts.post_title NOT LIKE '{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}one -two -three -four -five -six -seven -eight -nine -ten{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}') AND (testsite_posts.post_excerpt NOT LIKE '{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}one -two -three -four -five -six -seven -eight -nine -ten{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}') AND (testsite_posts.post_content NOT LIKE '{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}one -two -three -four -five -six -seven -eight -nine -ten{07e030b91cb064568b0acafd83d99152667b06f2ffd415e48cd2d2f458c2c217}'))) AND (testsite_posts.post_password = '') }}} " johnh10 Future Releases 52971 WP_Query's meta_query With Multiple EXISTS keys and OR Relation Doesn't Work Properly Query 5.7 normal critical Awaiting Review defect (bug) new 2021-04-05T12:31:53Z 2021-04-05T12:31:53Z "Hi There! Another Very Weird Issue :) Using WP_Query's [meta_query] with **OR relation** and Multiple **EXISTS Keys** generates a very long unnecessary inner joins relation and **stuck in an infinite loop** and **consume the MySQL resources** with high load. I'm trying to get all post IDs that have one of 50 meta keys to replace with new keys, So I collect all meta keys using foreach statement with **OR relation** and pass it to the [meta_query] in WP_Query .. Very simple but I noticed that there's no result and infinite page load and using high resources of MySQL. I create the SQL statement with $wpdb and it works very fast, So I create a new WP_MetaQuery object to see the result and I noticed a huge unnecessary INNER JOINs relation. **Here's a full example:** 1. Insert 100 Test Posts and 50 Metas For Each: Append [?action=insert] in the URL 2. Try to get posts using WP_Query: Append [?action=wp_query_and_meta_query] in URL - **RESULT: Infinite Loop** 3. Try to use $wpdb instead: Append [?action=wpdb_query_get_ids] in URL - **RESULT: Success, Takes few seconds** 4. See the SQL statement generated by WP_MetaQuery: add [?action=show_meta_query_clause] - **RESULT: a Huge unnecessary **INNER JOIN x AS x# ON y** relation** 5. [?action=wpdb_query_delete] to delete all added posts only. {{{ add_action('wp', 'oxibug_trigger_action'); /** * Trigger Suitable Function * * @return void */ function oxibug_trigger_action() { if( ! isset( $_GET['action'] ) ) { return; } $action = wp_strip_all_tags( $_GET['action'] ); switch( strtolower( $action ) ) { case 'insert': { oxibug_insert_posts_and_metas(); } break; case 'wp_query_and_meta_query': { oxibug_WP_Query_and_meta_query(); } break; case 'show_meta_query_clause': { oxibug_show_meta_query_clause(); } break; case 'wpdb_query_get_ids': { oxibug_wpdb_query_get_ids(); } break; case 'wpdb_query_delete': { oxibug_wpdb_query_delete(); } break; } } /** * Return New Meta Key * * @param mixed $key * @return string */ function oxibug_get_new_meta_key( $key ) { return sanitize_text_field( sprintf( 'oxibug_xyz%s', $key ) ); } /** * Return Key-Value Pairs array with Old and New meta keys * * @return array */ function oxibug_legacy_and_new_meta_keys() { return [ 'oxibug_abc_post_main_color' => oxibug_get_new_meta_key('_page_main_color'), 'oxibug_abc_page_layout' => oxibug_get_new_meta_key('_page_layout'), 'oxibug_abc_post_sbwide' => oxibug_get_new_meta_key('_page_sb_wide'), 'oxibug_abc_post_sbnarrow' => oxibug_get_new_meta_key('_page_sb_narrow'), 'oxibug_abc_page_sbwide' => oxibug_get_new_meta_key('_page_sb_wide'), 'oxibug_abc_page_sbnarrow' => oxibug_get_new_meta_key('_page_sb_narrow'), 'oxibug_abc_self_video_m4v_url' => oxibug_get_new_meta_key('_format_video_selfhosted_mp4'), 'oxibug_abc_self_video_ogv_url' => oxibug_get_new_meta_key('_format_video_selfhosted_ogv'), 'oxibug_abc_self_video_webmv_url' => oxibug_get_new_meta_key('_format_video_selfhosted_webmv'), 'oxibug_abc_self_video_poster_url' => oxibug_get_new_meta_key('_format_video_selfhosted_poster'), /* Audio */ 'oxibug_abc_soundcloud_url' => oxibug_get_new_meta_key('_format_audio_oembed'), 'oxibug_abc_self_audio_mp3_url' => oxibug_get_new_meta_key('_format_audio_selfhosted_mp3'), 'oxibug_abc_self_audio_oga_url' => oxibug_get_new_meta_key('_format_audio_selfhosted_ogg'), 'oxibug_abc_self_audio_m4a_url' => oxibug_get_new_meta_key('_format_audio_selfhosted_m4a'), /* Post Formats: Image | Video */ 'oxibug_abc_lightbox_check' => oxibug_get_new_meta_key('_format_image_lighbox_enable'), 'oxibug_abc_post_banner_caption' => oxibug_get_new_meta_key('_format_status_banner_caption'), 'oxibug_abc_quote_text' => oxibug_get_new_meta_key('_format_quote_text'), 'oxibug_abc_quote_author' => oxibug_get_new_meta_key('_format_quote_author_name'), 'oxibug_abc_url_text' => oxibug_get_new_meta_key('_format_link_text'), 'oxibug_abc_url_destination' => oxibug_get_new_meta_key('_format_link_url'), /* * Layout Settings - if Old = [hide] turn ON the new option * * */ 'oxibug_abc_post_breadcrumb' => oxibug_get_new_meta_key('_hide_breadcrumb'), 'oxibug_abc_post_meta_info' => oxibug_get_new_meta_key('_hide_metas'), 'oxibug_abc_post_share_box' => oxibug_get_new_meta_key('_hide_share_icons'), 'oxibug_abc_post_tags' => oxibug_get_new_meta_key('_hide_tags_box'), 'oxibug_abc_post_author_box' => oxibug_get_new_meta_key('_hide_author_box'), 'oxibug_abc_related_posts' => oxibug_get_new_meta_key('_hide_related_posts_box'), 'oxibug_abc_posts_navigation' => oxibug_get_new_meta_key('_hide_nav_box'), /* Review Items */ 'oxibug_abc_post_review_types' => oxibug_get_new_meta_key('_review_type'), /* [disabled] => Add 0 to the new meta [_review_show] */ 'oxibug_abc_post_review_position' => oxibug_get_new_meta_key('_review_position'), 'oxibug_abc_post_reviews_summation' => oxibug_get_new_meta_key('_review_items_avg'), /* This field is Dynamic - SUM of all review items */ 'oxibug_abc_review_item' => oxibug_get_new_meta_key('_review_items'), 'oxibug_abc_post_review_title' => oxibug_get_new_meta_key('_review_title'), 'oxibug_abc_post_review_desc' => oxibug_get_new_meta_key('_review_desc'), 'oxibug_abc_post_review_summary_title' => oxibug_get_new_meta_key('_review_summary_title'), 'oxibug_abc_post_review_summary_desc' => oxibug_get_new_meta_key('_review_summary_desc'), 'oxibug_abc_post_review_user_rates' => oxibug_get_new_meta_key('_review_user_ratings_status'), 'oxibug_abc_post_review_user_rates_bgcolor' => oxibug_get_new_meta_key('_review_user_ratings_result_bgcolor'), 'oxibug_abc_post_review_btn_text' => oxibug_get_new_meta_key('_review_add_btn_text'), 'oxibug_abc_post_review_btn_icon' => oxibug_get_new_meta_key('_review_add_btn_icon'), 'oxibug_abc_post_review_btn_url' => oxibug_get_new_meta_key('_review_add_btn_url'), 'oxibug_abc_post_review_btn_bgcolor' => oxibug_get_new_meta_key('_review_add_btn_bgcolor'), 'oxibug_abc_post_review_pros_word' => oxibug_get_new_meta_key('_review_pros_word'), 'oxibug_abc_post_review_pros_icon' => oxibug_get_new_meta_key('_review_pros_icon'), 'oxibug_abc_post_review_pros_list' => oxibug_get_new_meta_key('_review_pros_list'), 'oxibug_abc_post_review_cons_word' => oxibug_get_new_meta_key('_review_cons_word'), 'oxibug_abc_post_review_cons_icon' => oxibug_get_new_meta_key('_review_cons_icon'), 'oxibug_abc_post_review_cons_list' => oxibug_get_new_meta_key('_review_cons_list'), /* Post Views */ 'oxibug_abc_post_views_count' => oxibug_get_new_meta_key('_post_views'), ]; } /** * Insert 100 Test Posts and some Meta Keys * */ function oxibug_insert_posts_and_metas() { $legacy_and_new_keys = oxibug_legacy_and_new_meta_keys(); $result = []; for( $i=0; $i<100; $i++ ) { $post_id = wp_insert_post( [ 'post_type' => 'post', 'post_title' => wp_strip_all_tags( sprintf( 'Test Meta Query Post #:%s', $i ) ), 'post_content' => sprintf( 'Test Meta Query Post Content #:%s', $i ), 'post_content_filtered' => '', 'post_excerpt' => '', 'post_status' => 'publish', // 'post_author' => 1, // 'post_category' => [], 'comment_status' => '', 'ping_status' => '', 'post_password' => '', 'to_ping' => '', 'pinged' => '', 'post_parent' => 0, 'menu_order' => 0, 'guid' => '', 'import_id' => 0, 'context' => '', 'post_date' => '', 'post_date_gmt' => '', ], TRUE, TRUE ); if( ! is_wp_error( $post_id ) ) { $result[ $post_id ] = []; foreach( (array) array_keys( $legacy_and_new_keys ) as $_legacy_key ) { $upstatus = update_post_meta( $post_id, $_legacy_key, '' ); $result[ $post_id ][ $_legacy_key ] = $upstatus ? 'Added' : 'Failed'; } /* Clean Cache */ clean_post_cache( $post_id ); } else { echo 'ERROR: Insert Post Failed!'; } } /* DEBUG */ echo sprintf( '%d Posts Inserted', count( $result ) ); // echo print_r( $result ); } /** * --- DEBUG --- * Show the Meta Query SQL Statement * */ function oxibug_show_meta_query_clause() { /** * * @var wpdb * */ global $wpdb; $legacy_meta_keys = oxibug_legacy_and_new_meta_keys(); $meta_query = [ 'relation' => 'OR' ]; foreach( (array) array_keys( $legacy_meta_keys ) as $_legacy_key ) { $meta_query[] = [ 'key' => $_legacy_key, 'compare' => 'EXISTS' ]; } $objMetaQuery = new WP_Meta_Query( $meta_query ); echo print_r( $objMetaQuery->get_sql( 'post', $wpdb->posts, 'ID', NULL ) ); } /** * Query using WP_Query and meta_query key inside it * */ function oxibug_WP_Query_and_meta_query() { /** * * @var wpdb * */ global $wpdb; $legacy_meta_keys = oxibug_legacy_and_new_meta_keys(); $meta_query = [ 'relation' => 'OR' ]; foreach( (array) array_keys( $legacy_meta_keys ) as $_legacy_key ) { $meta_query[] = [ 'key' => $_legacy_key, 'compare' => 'EXISTS' ]; } $obj_WP_Query = new WP_Query( [ 'numberposts' => -1, 'paged' => null, 'post_type' => 'post', 'post_status' => 'publish', 'meta_query' => $meta_query, 'fields' => 'ids', 'cache_results' => false, ] ); /* * Stuck in an Infinite Loop Because of the Huge SQL Statement * generated by [meta_query] * * */ if( $obj_WP_Query->have_posts() ) { echo sprintf( '%d Posts Found', $obj_WP_Query->found_posts ); /* DEBUG - NOT Working - */ // echo print_r( $obj_WP_Query->meta_query->get_sql( 'post', $wpdb->posts, 'ID', NULL ) ); } else { echo 'No Posts Found'; } $obj_WP_Query->reset_postdata(); wp_cache_flush(); } /** * Get Posts IDs by one of the meta_key(s) provided * */ function oxibug_wpdb_query_get_ids() { global $wpdb; $legacy_meta_keys = oxibug_legacy_and_new_meta_keys(); $qry = ""SELECT DISTINCT tbl_posts.ID FROM {$wpdb->posts} tbl_posts INNER JOIN {$wpdb->postmeta} tbl_metas ON ( tbl_posts.ID = tbl_metas.post_id ) WHERE""; /* Add [OR] in the second condition */ $where_clause = 0; foreach( (array) array_keys( $legacy_meta_keys ) as $_legacy_key ) { $where_clause++; $qry .= ( $where_clause === 1 ) ? $wpdb->prepare( ' tbl_metas.meta_key = %s', esc_sql( $_legacy_key ) ) : $wpdb->prepare( ' OR tbl_metas.meta_key = %s', esc_sql( $_legacy_key ) ); } $result = $wpdb->get_results( $qry ); $wpdb->flush(); echo print_r( wp_list_pluck( $result, 'ID' ) ); } /** * --- DEBUG --- * * DELETE all added Posts by meta_key(s) * */ function oxibug_wpdb_query_delete() { global $wpdb; $legacy_meta_keys = oxibug_legacy_and_new_meta_keys(); $qry = ""DELETE tbl_posts, tbl_metas FROM {$wpdb->posts} tbl_posts INNER JOIN {$wpdb->postmeta} tbl_metas ON ( tbl_posts.ID = tbl_metas.post_id ) WHERE""; $where_clause = 0; foreach( (array) array_keys( $legacy_meta_keys ) as $_legacy_key ) { $where_clause++; $qry .= ( $where_clause === 1 ) ? $wpdb->prepare( ' tbl_metas.meta_key = %s', esc_sql( $_legacy_key ) ) : $wpdb->prepare( ' OR tbl_metas.meta_key = %s', esc_sql( $_legacy_key ) ); } $result = $wpdb->get_results( $qry ); $wpdb->flush(); } }}} " oxibug Future Releases 44695 WP_Term_Query unexpected 'orderby' behaviour. Query 4.9.7 normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-08-01T21:19:14Z 2019-08-27T18:33:22Z "I expected that `orderby` would behave in a similar way with `WP_Term_Query` as it does on other `*_Query` classes but it seems that `meta_value_date` and possibly some others is unsupported. Additionally `meta_type` doesn't function as expected either. These args: {{{ $args = array( 'taxonomy' => 'issues', 'number' => 5, 'meta_key' => 'issue_date', 'meta_type' => 'DATE', 'orderby' => 'meta_value_date', ); }}} Result in this query that has disregarded both `meta_type` and `orderby` in it's generation: {{{ SELECT DISTINCT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_termmeta ON ( t.term_id = wp_termmeta.term_id ) INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('issues') AND tt.count > 0 AND ( wp_termmeta.meta_key = 'issue_date' ) ORDER BY t.name ASC LIMIT 5 }}} Could we get similar support for same named keys in `WP_Term_Query` as we have in other queries?" williampatton Future Releases 43391 WP_User_Query bug Query 4.9.4 normal normal Awaiting Review defect (bug) new 2018-02-23T09:47:47Z 2018-03-03T08:44:40Z "I've got an issue when doing a query with WP_User_Query and trying to list from a specific role AND using 'orderby' => 'post_count'. The query simply fails to list the correct results. Here are the query arguments: {{{#!php array( 'ID', 'user_login', 'display_name' ), 'role' => 'expert', 'number' => $numPosts, 'offset' => $page > 1 ? $numPosts : 0, 'order' => 'DESC', 'orderby' => 'post_count' ); }}} If I remove the 'role' argument from the query it works, but with the 'role' included it doesn't. " zkingdesign Future Releases 52559 When doing JOINs for meta queries the meta_key should be in the ON clause whenever possible. Query normal normal Awaiting Review defect (bug) new needs-unit-tests 2021-02-17T17:17:35Z 2021-04-26T07:45:57Z "Currently when doing `JOIN`s for meta queries the meta_key is only included in the `ON` clause if the meta compare is `NOT EXISTS`. In all other cases only the `post_id` is included. This means that the meta key is only filtered after the JOIN is done. Case in point, a meta_query that with 5 different keys generates the following query: {{{#!sql SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id ) LEFT JOIN wp_postmeta AS mt3 ON ( wp_posts.ID = mt3.post_id ) LEFT JOIN wp_postmeta AS mt4 ON (wp_posts.ID = mt4.post_id AND mt4.meta_key = 'events_time_frame_end' ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = 'events_date_till' AND wp_postmeta.meta_value >= '20210217' ) AND ( ( mt1.meta_key = 'events_date_till' AND mt1.meta_value > '20210217' ) OR ( ( mt2.meta_key = 'events_date_till' AND mt2.meta_value = '20210217' ) AND ( mt3.meta_key = 'events_time_frame_end' AND mt3.meta_value >= '14:59:19' ) ) OR mt4.post_id IS NULL ) ) AND wp_posts.post_type = 'events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'dp-rewrite-republish') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value ASC LIMIT 0, 10; }}} This query takes 60 seconds on very well provisioned database with posts that each have 50 postmeta rows in a database with 50 million total postmeta rows. In contrast the following query: {{{#!sql SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'events_date_till' ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id AND mt1.meta_key = 'events_date_till' ) LEFT JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id AND mt2.meta_key = 'events_date_till' ) LEFT JOIN wp_postmeta AS mt3 ON ( wp_posts.ID = mt3.post_id AND mt3.meta_key = 'events_time_frame_end' ) LEFT JOIN wp_postmeta AS mt4 ON (wp_posts.ID = mt4.post_id AND mt4.meta_key = 'events_time_frame_end' ) WHERE 1=1 AND ( ( wp_postmeta.meta_value >= '20210217' ) AND ( ( mt1.meta_value > '20210217' ) OR ( ( mt2.meta_value = '20210217' ) AND ( mt3.meta_value >= '14:59:19' ) ) OR mt4.post_id IS NULL ) ) AND wp_posts.post_type = 'events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'dp-rewrite-republish') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value ASC LIMIT 0, 10; }}} Takes 400ms and returns identical results. I believe the cause here is that because in the first query filtering is only done after the join and each event has 50 postmeta fields MySQL is first creating a virtual table with 50^4^ ( 4 because the last JOIN does include the meta_key ) rows joined resulting in 60.000.000 total that are then filtered back down. Adding the meta_key condition to the `ON` clause means we're only joining 1 ( or a small number in the case of the meta_key existing in multiple rows ) rows for each JOIN meaning the virtual table being created is significantly smaller thus having much better query performance. At the very least when there is any LEFT JOIN occurring then ALL `meta_key` conditions should be moved in the `ON` clause. Although it may be simpler to always have the `meta_key` condition in the `ON` clause." herregroen Future Releases 21790 When set a static front page WP main query isn't set correctly SergeyBiryukov Query 3.4.1 normal normal Future Release defect (bug) assigned 2012-09-04T13:50:26Z 2017-05-05T09:34:57Z "In my project I use on several places pre_get_posts filter. When setting a static frontpage and blog page I get several notices on my screen. When I var_dump the main query the only value that is set it the page_id. Even the post_type isn't set." markoheijnen Future Releases 43445 Wildcard `LIKE` support for `WP_Meta_Query` (and maybe other queries?) Query normal normal Awaiting Review defect (bug) new 2018-03-01T04:09:44Z 2018-03-02T16:15:22Z "Passing `LIKE` as the `compare` parameter for a meta query (or `compare_key`, after [42768]) results in what is essentially a ""contains"" query for the literal `value` (or `key`) string. So: {{{ array( 'compare' => 'LIKE', 'value' => 'foo', ) }}} becomes `WHERE ... value LIKE '%foo%'`. MySQL `LIKE` wildcard characters `%` and `_` are escaped, so it's not possible to do a non-standard anchored search, or any other custom `LIKE` query. It would be nice if you could pass a string like `foo%` and have the wildcard characters respected. A few considerations: 1. Syntax. A potential solution is suggested in https://core.trac.wordpress.org/ticket/42409#comment:14. Another possibility is a filter for enabling the ""non-escaped"" version 2. Security. I'm unsure that there's a way to do this without introducing security issues, specifically around the `%` character. Any potential patch would need serious review." boonebgorges Future Releases 40327 Wrong SQL request for 'EXIST' OR 'NOT EXIST' on same post meta Query 4.7 normal normal Awaiting Review defect (bug) new 2017-03-31T19:57:27Z 2017-03-31T19:57:27Z "Hi, I want to make a query on a custom post type (event post type) with custom post status (on air, forthcoming...) joining optional meta (event rating) then order by decreasing rating, defaulting to increasing title. I'm using 'new WP_Query()' way as secondary loop with the following WP query parameters: {{{#!php [ // Valid events only 'post_type' => My_Post_Type::POST_TYPE_EVENT, 'post_status' => [ My_Post_Type::EVENT_STATUS_ON_AIR, My_Post_Type::EVENT_STATUS_FORTHCOMING, ], // Join optional rating 'meta_query' => [ 'relation'=> 'OR', [ 'key' => My_Post_Type::EVENT_ATTR_RATING, 'compare'=> 'EXISTS', ], [ 'key' => My_Post_Type::EVENT_ATTR_RATING, 'compare' => 'NOT EXISTS', ], ], // Order by rating then title 'orderby' => [ My_Post_Type::EVENT_ATTR_RATING => 'DESC', 'post_title' => 'ASC', ], // Limit number 'posts_per_page' => self::NB_HOME_COMING_EVENTS, ] }}} Resulting SQL query is: {{{#!php SELECT SQL_CALC_FOUND_ROWS cq_posts.* FROM cq_posts LEFT JOIN cq_postmeta ON ( cq_posts.ID = cq_postmeta.post_id ) LEFT JOIN cq_postmeta AS mt1 ON (cq_posts.ID = mt1.post_id AND mt1.meta_key = 'ev_rating' ) WHERE 1=1 AND ( cq_postmeta.meta_key = 'ev_rating' OR mt1.post_id IS NULL ) AND cq_posts.post_type = 'event' AND ((cq_posts.post_status = 'ev_on_air' OR cq_posts.post_status = 'ev_coming')) GROUP BY cq_posts.ID ORDER BY cq_postmeta.meta_value+0 DESC, cq_posts.post_title ASC LIMIT 0, 6 }}} The result set is not what I was looking for (in fact has no sense at all for me) The right SQL query should be something like this: {{{#!php SELECT SQL_CALC_FOUND_ROWS cq_posts.* FROM cq_posts LEFT JOIN cq_postmeta ON ( cq_posts.ID = cq_postmeta.post_id AND cq_postmeta.meta_key = 'ev_rating' ) WHERE 1=1 AND cq_posts.post_type = 'event' AND ((cq_posts.post_status = 'ev_on_air' OR cq_posts.post_status = 'ev_coming')) GROUP BY cq_posts.ID ORDER BY cq_postmeta.meta_value+0 DESC, cq_posts.post_title ASC LIMIT 0, 6 }}} Only one LEFT JOIN is required. Can anyone confirm it is a bug or tell me what WP query parameters I must use instead ? Thanks in advance. " solo14000 Future Releases 44964 `redirect_guess_404_permalink` doesn't support array in `post_type` var Query 4.9 normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-09-19T09:35:59Z 2018-10-01T12:37:02Z `redirect_guess_404_permalink` doesn't support array in post_type var, but other core WordPress parts support it. viliamkopecky Future Releases 43238 `suppress_filters` not set in `pre_get_posts` hook Query 4.9.4 normal normal Awaiting Review defect (bug) reopened dev-feedback 2018-02-06T21:56:46Z 2022-05-13T09:56:29Z "After updating to 4.9.4 my media library is empty locally and on my server. I confirmed this on a handful of sites that I have updated. I cleared the cache and also checked the console. I don't see any errors or any ajax requests being made. The /wp-json/wp/v2/media does however contain a response with media. Locally I am running latest OSX, my server is Ubuntu 16.04 both with PHP ~7.0" adampatterson Future Releases 40300 `title` parameter causes `WP_Query` to return sticky posts. Query 4.7.3 normal normal Awaiting Review defect (bug) new 2017-03-29T14:24:28Z 2017-03-29T14:24:28Z "When a `title` parameter is present in the WP_Query arguments array then sticky posts are included in the `$query->posts` array. I'm not sure is it a bug, or is it just an incomplete documentation. The same happens with `post__in` parameter but in this case, I'm sure that it's not a bug because the documentation mentions that sticky posts are returned when using the `post__in` parameter." wujek_bogdan Future Releases 37762 cache_results parameter doesn't prevent queried posts from being added to cache boonebgorges Query 4.6 normal normal Future Release defect (bug) assigned dev-feedback 2016-08-22T09:39:42Z 2022-06-15T13:23:14Z "Even when `cache_results` is set to `false`, the queried posts in `WP_Query` are still mapped to `get_post()` which will always add post instance to cache. For more info: http://wordpress.stackexchange.com/questions/236653/how-to-prevent-queried-posts-from-being-added-to-cache/236659. " Dang Vu Future Releases 45394 get_posts fails to return results when accessing admin with a custom user role Query 4.9.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-11-21T17:35:55Z 2018-12-10T15:05:42Z "Not sure if this is intentional or not, or if there are some capabilities required for custom user roles for 'get_posts' to work, but I'm finding that using 'get_posts' in a CPT metabox works exactly as expected and returns the correct results when accessing the admin as an admin or editor, however, accessing the same screen as any number of custom user roles results in 'get_posts' not returning any data. There are no error messages and no indication anywhere online that get_posts() is somehow dependent on user role. To my best estimation this appears to be a bug - get_posts() would work on the front end without a user being logged in, so the user level/role on the back end shouldn't be relevant to whether or not results are returned. Here's an example: {{{#!php }}} To recap: - In wp-admin, logged in as Admin or editor, the dropdown is populated with results - On front end, logged in with custom user role (most basic level, almost equivalent to a subscriber), the dropdown is populated with results - in wp-admin, logged in as custom user role, (consistent with editor caps), the dropdown is empty" tonydjukic Future Releases 53495 incorrect (and confusing) DocBlock for get_page_by_title() Query 5.3 normal normal Awaiting Review defect (bug) new 2021-06-24T00:41:14Z 2021-06-24T00:42:10Z "The DocBlock of [https://developer.wordpress.org/reference/functions/get_page_by_title/ get_page_by_title()] says: > If more than one post uses the same title, the post with the smallest ID will be returned. Be careful: in case of more than one post having the same title, it will check the oldest publication date, not the smallest ID. That description was added in [45779]. Besides the fact that the text after `Be careful:` seems to contradict that the statement that `the post with the smallest ID will be returned`, there actually is no guarentee that if there is more than 1 post with the same title that the one with the smallest ID will be returned. The query performed by [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php#L5534 get_page_by_title()] is: {{{#!php $sql = $wpdb->prepare( "" SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type = %s "", $page_title, $post_type ); }}} (with a slight mod if an array of post types is passed). Since there is no `ORDER BY` clause in that query, if there are more than 1 posts with the same title the order in which they are returned is not defined by SQL (i.e., is implemented dependent). The SQL-92 spec [http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt explicitly states]: > General Rules > > 1) All General Rules of Subclause 7.10, """", apply > to the . > > 2) Let Q be the result of the . > > 3) If Q is empty, then a completion condition is raised: no data. > > 4) If an is not specified, then the ordering of > the rows of Q is implementation-dependent. As far as I can tell, no later revisions of the SQL spec are available for free on the web, so I don't know if anything has changed in the what the language says happens in the absense of an `ORDER BY` clause I've looked through the MySQL and Maria DB docs for an explicit statement that says as much and haven't been able to find one. But I think the DocBlock should be changed to say something like: > If more than one post uses the same title, which of the multiple posts is returned is not defined. though I'm not completely happy with that wording, and welcome other suggestions. " pbiron Future Releases 40166 query_vars bug sets is_home to false. Query 4.7.3 normal normal Awaiting Review defect (bug) new 2017-03-15T18:36:27Z 2019-05-20T09:17:12Z "Hi @boonebgorges, in reference to an older ticket - #25143 following is the issue i am facing. Similar to the other ticket, when registering a query variable as follows: {{{#!php true, 'excluded_terms' => '129', 'taxonomy' => 'category' ); the_post_navigation( $args ) }}} I've debugged and it constructs the $where clause here as it should (properly excluding the term) https://github.com/WordPress/WordPress/blob/master/wp-includes/link-template.php#L1647 {{{ $where = AND tt.taxonomy = 'category' AND tt.term_id IN (127) AND p.ID NOT IN ( SELECT tr.object_id FROM wp_term_relationships tr LEFT JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.term_id IN (129) ) AND ( p.post_status = 'publish' OR p.post_status = 'private' ) }}} This is then replaced here https://github.com/WordPress/WordPress/blob/master/wp-includes/link-template.php#L1716 it improperly constructs the where clause so that the result is as follows {{{ $where = WHERE p.menu_order > '2' AND p.post_type = 'post' AND p.post_status = 'publish' }}} This means i cannot excluded other categories from the post navigation or specify which categories to exclude. " Sbaxter_Quba Future Releases 40335 using 'pre_get_terms' is confusing when it comes to ordering by meta Query 4.7.3 normal normal Awaiting Review defect (bug) new 2017-04-02T09:41:03Z 2019-10-12T00:18:14Z "There's a `pre_get_terms` hook. One might think that it works in the same way how `pre_get_posts` works, but it doesn't. I wanted to order terms by a meta field, so I did something like this: {{{#!php query_vars; $args = [ 'meta_key' => 'my_meta_key', 'orderby' => 'meta_value', 'order' => 'ASC', ]; $query->query_vars = array_merge($queryVars, $args); }); }}} And for `pre_get_posts` this technique would work. But with `pre_get_terms` it's different. Digging into `WP_Term_Query` class code I found that this code would cause `parse_orderby()` method to set the `$maybe_orderby_meta` variable to `true`. But it doesn't mean that terms will be sorted by a meta field. It only means that terms '''maybe''' will be sorted by meta. There's an another filter required. At the end of the `parse_orderby()` method there's an another filter applied: `get_terms_orderby`. So in order to sort terms by meta field there's one more thing required. Something like: {{{#!php ', wp_list_authors([ 'style' => 'none', 'optioncount' => 1, 'echo' => 0 ]) ); echo $authors; }}}" pabloeduardo Future Releases 56105 Call update_post_parent_caches in the_post function in WP_Query class Query normal normal Awaiting Review enhancement new needs-unit-tests 2022-06-30T12:01:38Z 2023-04-20T12:55:57Z "Hello Team, In {{{the_post}}} function {{{class WP_Query}}}, {{{update_post_author_caches}}} is already in use but not {{{update_post_parent_caches}}}. I am not sure if it is because of {{{update_post_parent_caches}}} calls the private function {{{_prime_post_caches}}} or what." priyankkpatel Future Releases 39447 Improvement to the get_the_posts_navigation SergeyBiryukov Query normal normal Future Release enhancement reviewing needs-unit-tests 2017-01-03T14:36:31Z 2021-01-27T06:28:38Z "[https://core.trac.wordpress.org/browser/tags/4.7/src/wp-includes/link-template.php] Here at ''get_the_posts_navigation'' the function check global wp query('''Globals['wp_query'\]''') for displaying markup. But in many cases we may need to display the navigation for '''custom wp query''' which has unique query options(max_num_page, post_per_page). So it would be great, if we can check the our custom query's max_num_page. Hope it make sense. Thank you " thirumani02 Future Releases 48408 Introduce eagerloading of meta data Query normal normal Awaiting Review enhancement new reporter-feedback 2019-10-23T13:49:00Z 2019-10-23T14:01:39Z "I believe it should be possible to introduce eagerloading to postmeta/attachments. In ""Laravel"" language you would do: take(10)->get(); ?> Which would produce two queries: 1) for the posts table 2) for the post_meta table where post ids IN posts result. That would produce TWO queries to fetch 10 posts and ALL of its meta data, instead of currently where it produces a lot of requests to the database. A SO user produced a draft that illustrates how it could work, see: https://wordpress.stackexchange.com/a/225743/50042 Speed is alfaomega in these times, and I think WordPress should take it way more serious." mattiasf Future Releases 40341 Make search possible in custom fields Query 4.8 normal normal Awaiting Review enhancement new 2017-04-02T17:36:06Z 2017-04-02T17:36:06Z "Currently when performing a search query with `WP_Query` using `s` parameter, WordPress only searches in post_title, post_content and post_excerpt. I suggest to extend search to custom fields. Say I added a ""my_description"" custom post field to my posts. I would like a regular search to return every post containing the searched word(s) in any of the fields post_title, post_content, post_excerpt or my_description. Currently the supposed way of doing this is by using a `WP_Meta_Query`: {{{ new WP_Query(array( 's' => 'foo', 'meta_query' => array(array( 'key' => 'my_description', 'value' => 'foo', 'compare' => 'LIKE', )), )) }}} The problem is that the meta query and the search WHERE clauses are going to be joined by AND, not by OR. The resulting query is going to be something like that: {{{ SELECT [...] WHERE ( posts.post_title LIKE '%foo%' OR posts.post_content LIKE '%foo%' OR posts.post_excerpt LIKE '%foo%' ) AND ( postmeta.meta_key = 'my_description' AND postmeta.meta_value LIKE '%foo%' ) AND [...] }}} But I'd need: {{{ SELECT [...] WHERE ( posts.post_title LIKE '%foo%' OR posts.post_content LIKE '%foo%' OR posts.post_excerpt LIKE '%foo%' OR (postmeta.meta_key = 'my_description' AND postmeta.meta_value LIKE '%foo%') ) AND [...] }}} which is impossible to achieve with a regular `WP_Meta_Query`. Actually it's pretty hard to do: it involves to hook into WHERE and JOIN clauses, and to rewrite almost the whole search mechanism. That's why I suggest to implement into core a simple way of doing this: {{{ new WP_Query(array( 's' => 'foo', 'meta_search' => array('my_description', 'my_other_field', 'etc') )) }}} This `meta_search` parameter would accept an array of meta_key strings and would just be ignored when not set. Please have a look into my attached solution." max345 Future Releases 42907 Meta Queries: support ordering by meta_value but still including items without that key Query normal normal Awaiting Review enhancement new 2017-12-14T21:54:48Z 2019-01-16T06:50:09Z "Consider this scenario: - You want to order a query's results by `meta_value` of a particular `meta_key`. - Not all items have that key/value pair set. - You want to still include those items in the results. - You want them to be ordered as if the `meta_value` is `NULL` (or `0` if using `meta_value_num`). There is currently no way to do this. (But it is a desired feature, see [https://wordpress.stackexchange.com/questions/28409/way-to-include-posts-both-with-without-certain-meta-key-in-args-for-wp-query 1] [https://wordpress.stackexchange.com/questions/102447/sort-on-meta-value-but-include-posts-that-dont-have-one?noredirect=1&lq=1 2] [https://stackoverflow.com/questions/17016770/wordpress-order-by-meta-value-if-it-exists-else-date 3].) If you don't care about the items that don't have the meta key set being included, then you can use `compare` => `EXISTS`. {{{#!php 'meta_value', 'meta_query' => array( array( 'key' => 'test', 'compare' => 'EXISTS', ), ), ) ); }}} However, that won't work if we want to include results where the key/value pair doesn't exist. A workaround is to do something like this: {{{#!php 'meta_value', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'test', 'compare' => 'EXISTS', ), array( 'key' => 'test', 'compare' => 'NOT EXISTS', ), ), ) ); }}} This approach solves the problem of the items with no key/value pair not being included. However, it does not order those items in the results reliably. Instead of the `meta_value` being interpreted as `null` (which we might expect), the database will choose another `meta_value` entry for that item to order that item based on. My proposal is to add a `NONE` option for `compare`, so that it would be possible to achieve the desired ordering with a query like this: {{{#!php 'meta_value', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'test', 'compare' => 'NONE', ), ), ) ); }}} This would result in a query that included a `LEFT JOIN` on the meta table for that `meta_key`, but did not include any conditions in the query. (This is basically a `NOT EXISTS` query but without the `ID = NULL` requirement, so that it is just a left join and not a left outer join.) When using `meta_value_num` in particular though, ordering by `NULL` may not be desirable (those results will be after all other results); `0` may be preferred as the imputed value (consider a case when negative values are present). To make this possible, I suggest allowing the clause to also specify a `default` value, which will be used in the `ORDER BY` clause with `COALESCE`. Initial patch forthcoming." jdgrimes Future Releases 38173 Meta query creates unecessary multiple left joins when using the same meta key Query 3.2 normal normal Future Release enhancement new 2016-09-27T16:36:27Z 2017-02-17T03:06:46Z "If you specify the below as a meta_query wordpress creates an extremely bad and inefficient query, it seems to unnecessarily create a left join for each array even though they have the same key when it could use the same join {{{#!php 'OR', array( 'key' => 'product', 'value' => '1', 'compare' => '!=' ), array( 'key' => 'product', 'compare' => 'NOT EXISTS' ) ); }}} {{{ SELECT SQL_CALC_FOUND_ROWS vvc_posts.ID FROM vvc_posts LEFT JOIN vvc_postmeta ON ( vvc_posts.ID = vvc_postmeta.post_id ) LEFT JOIN vvc_postmeta AS mt1 ON (vvc_posts.ID = mt1.post_id AND mt1.meta_key = 'product' ) WHERE 1=1 AND ( ( vvc_postmeta.meta_key = 'product' AND CAST(vvc_postmeta.meta_value AS CHAR) != '1' ) OR mt1.post_id IS NULL ) AND vvc_posts.post_type = 'news' AND ((vvc_posts.post_status = 'publish')) GROUP BY vvc_posts.ID ORDER BY vvc_posts.post_date DESC LIMIT 0, 10 }}} On my site this query takes a huge 6.640 sec, more than 80% of the page's ttfb. {{{ SELECT SQL_CALC_FOUND_ROWS vvc_posts.ID FROM vvc_posts LEFT JOIN vvc_postmeta ON ( vvc_posts.ID = vvc_postmeta.post_id && vvc_postmeta.meta_key = 'product') WHERE 1=1 AND (CAST(vvc_postmeta.meta_value AS CHAR) != '1' OR vvc_postmeta.post_id IS NULL ) AND vvc_posts.post_type = 'news' GROUP BY vvc_posts.ID ORDER BY vvc_posts.post_date }}} whereas an optimized version takes only 0.969 sec." neonWired Future Releases 41843 Provide more flexibility to the `get_{$adjacent}_post_where` hook Query 4.9 normal normal Awaiting Review enhancement new 2017-09-09T15:33:07Z 2019-03-13T18:09:55Z "I'm working on getting the previous/next post for a Custom Post Type based on a certain postmeta value, and the `get_{$adjacent}_post_where` seems the appropriate hook for this. However, it currently receives the whole WHERE clause as a parameter. IMO it would be ideal to be able to override just the `WHERE p.post_date $op %s AND p.post_type = %s` part and keep the other (useful ones) intact. This could potentially be solved in a non-breaking way by sending `$where` as it stands ''before'' concatenation with `WHERE p.post_date $op %s AND p.post_type = %s`, so that authors can neatly plugin a postmeta condition." danburzo Future Releases 39708 Provide suppress_actions argument on WP_Query::get_posts or apply suppress_filters to pre_get_posts Query 4.7.1 normal normal Awaiting Review enhancement new 2017-01-26T18:03:33Z 2018-07-03T16:12:19Z "{{{#!php parse_query(); /** * Fires after the query variable object is created, but before the actual query is run. * * Note: If using conditional tags, use the method versions within the passed instance * (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions * like is_main_query() test against the global $wp_query instance, not the passed one. * * @since 2.0.0 * * @param WP_Query &$this The WP_Query instance (passed by reference). */ do_action_ref_array( 'pre_get_posts', array( &$this ) ); // Shorthand. $q = &$this->query_vars; }}} I'm proposing that, just like we have `$q['suppress_filters']` that we add a `$q['suppress_actions']` to prevent actions like `pre_get_posts` from running (which is essentially a filter) on my query (if I want). We could also apply `$q['suppress_filters']` to the `pre_get_posts` action since the user can modify the query since it's passed by reference, and may not create another argument, but it is not really a filter. I'm not sure how this idea could be problematic, nor can I think of any reason why we couldn't do anything like this, but I thought I'd at least open it up for discussion and see what becomes of it. I guess my question really is why can I suppress filters but not actions?" aubreypwd Future Releases 51796 Raw post data instead of WP_Post instances Query normal normal Awaiting Review enhancement new reporter-feedback 2020-11-17T13:00:41Z 2020-11-19T13:20:34Z "Within WP_Query::get_posts you find: {{{#!php // Convert to WP_Post objects. if ( $this->posts ) { $this->posts = array_map( 'get_post', $this->posts ); } }}} This costs a lot of time when fetching a lot of posts (e.g. products, orders, etc). It could be fasten up by fetching only the field ""ids"" but this is also bad because when we need the post_content then a ""get_post( 123 )"" would do another query. To bypass all of this a new ""fields operator"" could be added: {{{#!php if ( $this->posts && $q['fields'] !== 'raw' ) { $this->posts = array_map( 'get_post', $this->posts ); } }}} The SQL-Query would still fetch all data but we would prevent the data from going through the ""get_post"" stuff. In times of Generator it is ridiculous to iterate over the same set of data multiple times. By receiving the raw data the developer can decide when to generate a WP_Post object. Note: filter = ""raw"" could imply ""suppress_filters"" = true because we no longer carry WP_Post objects. But it should be allowed by the developer to switch ""suppress_filters = false"" again because the stdObjects have almost the same structure as WP_Post objects. This means (in short): {{{#!php if ( ! isset( $q['suppress_filters'] ) ) { $q['suppress_filters'] = ($q['filter'] === 'raw' ? true: false); } }}} " screamingdev Future Releases 40404 Slow queries with a large number of posts (tens of thousands and above) Query 4.7.3 normal normal Awaiting Review enhancement new 2017-04-10T19:23:04Z 2017-04-10T19:28:25Z "translation yandex: TASK: Faced with such a problem that when the number of posts of 20 000+, the sample was held for 30 seconds each page. That is, the database constantly selects all records to select all of a certain number (items per page). The computer is weak for the global scale, but plans to increase to 7 000 000+ posts. Usually hard disks are not the problem. QUESTION: is There a possibility to optimize the sample? My SOLUTION (working in project MySQL): (maybe I should add this decision to the release of WP) Therefore, the solution is selected such that, upon receipt of a sample using the function get_posts () (wp-includes/class-wp-query.php) you need to ""intercept"" a standard request, modify the request function and give the already constructed list. To store ""lists"" of sorting in the database was created table: ### CREATE TABLE `wp_сорт` ( `номер_сорта` int(10) unsigned NOT NULL AUTO_INCREMENT, `значение_сорта` text NOT NULL, `время_сорта` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `период_сорта` int(10) unsigned NOT NULL, `мд5_сорта` varchar(32) NOT NULL, `записей_сорта` int(10) unsigned NOT NULL, `вызов_сорта` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', PRIMARY KEY (`номер_сорта`), UNIQUE KEY `инд_мд5_сорта` (`мд5_сорта`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4; CREATE TABLE `wp_сортировка` ( `номер_поста` bigint(20) unsigned NOT NULL, `номер_страница` int(10) unsigned NOT NULL DEFAULT '0', `номер_на_странице` tinyint(3) unsigned NOT NULL DEFAULT '0', `номер_сорта` int(10) unsigned NOT NULL DEFAULT '1', UNIQUE KEY `уник` (`номер_страница`,`номер_на_странице`,`номер_сорта`) USING BTREE, KEY `внешка_поста` (`номер_поста`) USING BTREE, KEY `внешка_сорта` (`номер_сорта`), CONSTRAINT `внешка_поста` FOREIGN KEY (`номер_поста`) REFERENCES `wp_posts` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `внешка_сорта` FOREIGN KEY (`номер_сорта`) REFERENCES `wp_сорт` (`номер_сорта`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ### Modification of the file wp-includes/class-wp-query.php in the function get_posts () somewhere 2513 string to find: ### {{{#!php 0 && !isset( $q[ 'search_terms' ] ); if ( $bMod ) { $мЗначение = [ ""join"" => $join, ""where"" => $where, ""groupby"" => $groupby, ""orderby"" => $orderby, ""posts_per_page"" => $q[ ""posts_per_page"" ] ]; $сЗначение = serialize ( $мЗначение ); $сМд5 = md5 ( $сЗначение ); $aR = $wpdb->get_results ( ""SELECT `номер_сорта`, `записей_сорта` FROM `wp_сорт` WHERE `мд5_сорта`='{$сМд5}'"", ARRAY_A ); $sTime = date ( ""Y-m-d H:i:s"", strtotime ( ""now"" ) + 14400 ); if ( !$aR ) { $stable = ""wp_сорт""; $sColumName = ""номер_сорта""; $iN = $wpdb->get_var ( 'SELECT t1.' . $sColumName . '+1 FROM ' . $stable . ' AS t1 LEFT JOIN ' . $stable . ' AS t2 ON t1.' . $sColumName . '+1 = t2.' . $sColumName . ' WHERE t2.' . $sColumName . ' IS NULL ORDER BY t1.' . $sColumName . ' LIMIT 1' ); $wpdb->insert ( ""wp_сорт"", [ ""номер_сорта"" => $iN, ""значение_сорта"" => $сЗначение, ""период_сорта"" => 86400, ""мд5_сорта"" => $сМд5, ""вызов_сорта"" => $sTime ], [ '%d', '%s', '%d', '%s', '%s' ] ); $чНомерСорта = $wpdb->insert_id; $iPerPage = $q[ ""posts_per_page"" ] - 1; $iQ = $wpdb->query ( ""SET @iVar = -1;"" ); $iQ = $wpdb->query ( ""SET @iVar2 = 0;"" ); $sQ = ""INSERT INTO `wp_сортировка` SELECT SQL_CALC_FOUND_ROWS @iVar3:=wp_posts.ID, IF(@iVar={$iPerPage},@iVar2:=@iVar2+1,IF(ISNULL(@iVar2), @iVar2:=0 , @iVar2)) t, IF(@iVar<"" . $iPerPage . "",@iVar:=@iVar+1,@iVar:=0) t1, {$чНомерСорта} FROM wp_posts {$join} WHERE 1=1 {$where} {$groupby} {$orderby} ON DUPLICATE KEY UPDATE `номер_поста`=@iVar3;""; $wpdb->query ( $sQ ); $q[ ""iRows"" ] = $iRows = $wpdb->get_var ( ""SELECT FOUND_ROWS()"" ); $wpdb->update ( ""wp_сорт"", [ ""записей_сорта"" => $iRows, ""время_сорта"" => $sTime ], [ ""номер_сорта"" => $чНомерСорта ] ); } else { $чНомерСорта = $aR[ 0 ][ ""номер_сорта"" ]; $wpdb->update ( ""wp_сорт"", [ ""вызов_сорта"" => $sTime ], [ ""номер_сорта"" => $чНомерСорта ] ); $q[ ""iRows"" ] = $iRows = $aR [ 0 ][ ""записей_сорта"" ]; } if ( isset ( $q[ ""paged"" ] ) && $q[ ""paged"" ] ) $iPaged = $q[ ""paged"" ] - 1; else $iPaged = 0; $this->request = ""SELECT $found_rows $distinct {$wpdb->posts}.ID FROM {$wpdb->posts} $join WHERE {$wpdb->posts}.ID IN(SELECT `номер_поста` FROM `wp_сортировка` WHERE `номер_страница`={$iPaged} AND `номер_сорта`={$чНомерСорта}) GROUP BY {$wpdb->posts}.ID""; //echo 0; } else { $this->request = ""SELECT $found_rows $distinct {$wpdb->posts}.ID FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits""; } }}} ### To give the number of records in set_found_posts function ( $q, $limits ) change: ### {{{#!php found_posts = $wpdb->get_var ( apply_filters_ref_array ( 'found_posts_query', [ 'SELECT FOUND_ROWS()', &$this ] ) ); }}} ### on: ### {{{#!php found_posts = $q[ ""iRows"" ]; else $this->found_posts = $wpdb->get_var ( apply_filters_ref_array ( 'found_posts_query', [ 'SELECT FOUND_ROWS()', &$this ] ) ); }}} ### in cron you need to add one-time during installation, for example, the plugin task: ### {{{#!php xray_sorting'; $aR = $wpdb->get_results ( ""SELECT * FROM `wp_сорт` WHERE (NOW()>DATE_ADD(`время_сорта`,INTERVAL `период_сорта` SECOND) OR `время_сорта`<`вызов_сорта`) AND `номер_сорта`>0"", ARRAY_A ); foreach ( $aR as $aV ) { $aЗначение = unserialize ( $aV[ ""значение_сорта"" ] ); $iPerPage = $aЗначение[ ""posts_per_page"" ] - 1; $iQ = $wpdb->query ( ""SET @iVar = -1;"" ); $iQ = $wpdb->query ( ""SET @iVar2 = 0;"" ); $sQ = ""INSERT LOW_PRIORITY INTO `wp_сортировка` SELECT SQL_CALC_FOUND_ROWS @iVar3:=wp_posts.ID, IF(@iVar={$iPerPage},@iVar2:=@iVar2+1,IF(ISNULL(@iVar2), @iVar2:=0 , @iVar2)) t, IF(@iVar<"" . $iPerPage . "",@iVar:=@iVar+1,@iVar:=0) t1, {$aV[""номер_сорта""]} FROM wp_posts {$aЗначение[""join""]} WHERE 1=1 {$aЗначение[""where""]} {$aЗначение[""groupby""]} {$aЗначение[""orderby""]} ON DUPLICATE KEY UPDATE `номер_поста`=@iVar3;""; $iQ = $wpdb->query ( $sQ ); if ( !$wpdb->last_error == """" ) { echo ""\nсорт {$iQ} "" . $aV[ ""номер_сорта"" ] . "": провал: "" . htmlspecialchars ( $sQ ) . "" "" . $wpdb->last_error . "";""; } else { echo ""\nсорт {$iQ} "" . $aV[ ""номер_сорта"" ] . "": норма;""; } $iRows = $wpdb->get_var ( ""SELECT FOUND_ROWS()"" ); echo $wpdb->update ( ""wp_сорт"", [ ""записей_сорта"" => $iRows, ""время_сорта"" => date ( ""Y-m-d H:i:s"", strtotime ( ""now"" ) + 14400 ) ], [ ""номер_сорта"" => $aV[ ""номер_сорта"" ] ] ); } # Стираем старые записи сортировок 604800 сек - это 7 суток $wpdb->query ( ""DELETE FROM `wp_сорт` WHERE `вызов_сорта`<"" . date ( ""Y-m-d H:i:s"", strtotime ( ""now"" ) - 604800 ) . "" AND `номер_сорта`>0"" ); } }}} ### I repeat that this is a working model. Can requires file. But all the errors which may be in code(commas, spaces, something like that) is the problem of copy-paste. [https://ru.wordpress.org/support/topic/%d0%bc%d0%b5%d0%b4%d0%bb%d0%b5%d0%bd%d0%bd%d0%b0%d1%8f-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d1%8b-%d0%b2%d1%8b%d0%b1%d0%be%d1%80%d0%ba%d0%b8-%d0%bf%d1%80%d0%b8-%d0%b1%d0%be%d0%bb%d1%8c%d1%88%d0%be%d0%bc/]" xrayboy Future Releases 42082 Support compare custom fields in WP_Meta_Query Query 4.9.4 normal normal Awaiting Review enhancement new 2017-10-04T01:30:51Z 2018-02-28T13:32:39Z "The syntax of `WP_Meta_Query` currently is limited to values you already know. It's not possible to compare between two meta_values: {{{ SELECT posts WHERE meta_value_one > meta_value_two }}} I propose allow compare two meta_fields. For example, the pseudocode above would be represented as a meta_query argument that looks like this: {{{#!php 'meta_value_one', 'value' => 'meta_value_two', 'compare' => '>', 'type' => 'META_VALUE' ), }}} A workaround can be found [https://wordpress.stackexchange.com/a/164041 here] and [https://gist.github.com/mariovalney/e8646d8c64db36e9f239e6d05f2e5923 here] hahaha. Feedback is welcome." mariovalney Future Releases 49429 There seems to be no way to check query value for NULL Query 5.3.2 normal normal Awaiting Review enhancement new dev-feedback 2020-02-14T04:56:53Z 2020-02-14T12:29:13Z "NOT EXISTS and EXISTS both don't do what I want I want to check `WHERE meta_value IS NOT NULL` exists does this, applied to meta field related_post_id2: ` ""where"" ""mt5.meta_key = 'related_post_id2'"" ""join"" "" INNER JOIN wp_2_postmeta AS mt5 ON ( wp_2_posts.ID = mt5.post_id )"" ` that is not what I want NOT EXISTS does: ` ""where"" ""mt5.post_id IS NULL"" ""join"" "" LEFT JOIN wp_2_postmeta AS mt5 ON (wp_2_posts.ID = mt5.post_id AND mt5.meta_key = 'related_post_id2' )"" ` well, thats not what I want either, because now it checks ""if there is a row with related_post_id2"". I want ""A row where the meta_value is not null"" in reality what I want is Any entry, that has: No value for related_post_id2 empty string for related_post_id2 or null for related_post_id2 does that make sense? " Jossnaz Future Releases 30044 Use subqueries for AND clauses in WP_Meta_Query Query 4.1 normal normal Future Release enhancement new 2014-10-19T19:04:07Z 2022-11-02T15:50:32Z "See #24093, starting about here, for background: https://core.trac.wordpress.org/ticket/24093#comment:10 When multiple clauses are passed to `WP_Meta_Query` under the scope of an AND relation, a new table JOIN is required for each clause. With very large meta tables, this can lead to poor performance. We should investigate the performance implications of using subqueries for some of these queries to avoid the joins, much like what happens in `WP_Tax_Query` for NOT IN and AND operators. Note that the improvements to OR queries in [29953] probably mean that subqueries will not be faster in most cases where relation=OR. First step toward this would be to see some benchmarks using data of different kinds: small databases; large sets of posts with relatively small postmeta tables; large sets of posts with large amounts of postmeta. As pento notes here https://core.trac.wordpress.org/ticket/24093#comment:30, we'll also need to look at how performance differs between supported versions of MySQL." boonebgorges Future Releases 49149 Write tests for WP_Query Query normal normal Awaiting Review enhancement assigned needs-unit-tests 2020-01-07T22:01:10Z 2020-02-20T02:32:06Z "WP_Query is one of the most critical classes in WordPress. It holds a lot of features and complicated rules to generate the SQL queries to fetch posts from the databases. Working on bug fixes and new features for it is very tricky because one is always afraid that any change to it could silently break things and tear the world apart. One way to make us feel more secure when working with this class is to have better test coverage for it. Looking at the tests we currently have I found very few tests for this class. I've created this ticket to organize and receive patches to add tests to this class. Below I organized the WP_Query parameters we should, at first, create tests for. Once we have tests for them individually, we can think of a way to write tests that combine different parameters. {{{ * Author params * author * author_name * author__in * author__not_in * Category params * cat * category_name * category__and * category__in * category__not_in * Tag params * tag * tag_id * tag__and * tag__in * tag__not_in * tag_slug__and * tag_slug__in * Tax_query * Meta_query * date_query * post_mime_type * fields * name * page_id * pagename * post_parent * post_parent__in * post_parent__not_in * post__in * post__not_in * post_name__in * has_password * post_password * post_type * post_status * comment_count * nopaging * posts_per_page * offset * paged * ignore_sticky_posts * order and orderby paramaters }}} PS - what motivated me to open this ticket (and start working on these tests) was #48556 and #44737" leogermani Future Releases 26937 get_adjacent_post() should use WP_Query rather than build its own SQL query nacin Query 3.7 normal normal Future Release enhancement reopened 2014-01-25T18:51:47Z 2018-01-31T20:33:04Z "With the introduction of the `WP_Date_Query` through r25139, `get_adjacent_post()` no longer needs to build its own SQL to retrieve adjacent posts. By switching to `WP_Query`, we gain the benefit of its performance improvements, including native caching. The trickiest part of this change is maintaining support for the `get_{$adjacent}_post_join` and `get_{$adjacent}_post_where` filters currently applied to the SQL built in `get_adjacent_post()`." ethitter Future Releases 44602 meta_query to support FIND_IN_SET Query normal normal Awaiting Review enhancement new has-patch 2018-07-18T17:22:08Z 2018-07-18T17:29:14Z I got `FIND_IN_SET` working in meta_query. donjajo Future Releases 43324 query_vars is not necessarely representative of the final query_vars used to build the SQL query Query normal normal Awaiting Review enhancement new 2018-02-14T23:53:57Z 2019-01-16T06:50:09Z "I've recently stumbled upon a case here where the post_type query_var changes over the process of the query building process, and the change is not reflected in the query_vars variable of the query. On the section highlighted [https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-query.php#L2067-L2088 here] (sorry for pasting a GitHub link, i just wanted to use the section highlighting feature), you can see that if there's no post_type set in the query, but you're querying taxonomies (eg a tax archive query), the post_type is set (using a separate variable), and then used on the [https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-query.php#L2345-L2366 following section] to build up the where statement. In my opinion all of the query_vars modified during the process should be reflected in the query_vars variable, so you can after see the actual value being used for querying (on the {{{posts_request}}} filter for example). You can see [https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-query.php#L2152-L2160 here] a section where the {{{$q['author']}}, {{{$q['author__in']}}} and {{{$q['author__not_in']}}}. These is an example of changes that are not reflected in the query_vars (since there's no call to fill_query_vars after all this extra parsing, sanitizing, and defaulting process is made). Let me know your thoughts." msaggiorato Future Releases 39632 Adding Query identifier attribute Query normal normal Awaiting Review feature request new 2017-01-18T19:55:17Z 2017-06-07T21:13:26Z "You create any query by passing the arguments to `WP_Query`. What will happen if we add the custom query identifier `_id` like this? {{{#!php 'custom_name', ... ); $q = new WP_Query( $args ); }}} Nothing bad, and one good thing. Using this `_id` I can work with filters like `posts_where` super easy. This would work for many other filters from ''wp-includes/class-wp-query.php'' {{{#!php query will hold the query arguments ... if ( 'custom_name' == $q->query['_id'] ){ // do our improvement on $where return $where. } return $where; } add_filter( 'posts_where', '_20170118_posts_where', 10 , 2 ); }}} If you need more details here is the original [http://wordpress.stackexchange.com/questions/252246/how-to-detect-custom-query-inside-posts-where-hook/252406#comment375812_252406 example]. This already works, but we can benefit more if we add the `_id` for all WordPress core generated queries? This should happen just after `WP_Rewrite` returns the query arguments, based on the query flags. Let's test the future in case of main search query ( `$is_search` flag is true ). You may write like this to address the search query: {{{#!php is_main_query() && $q->is_search() ){ ... // do something with $where } return $where; }}} but with the `_id` '''main-search''' argument, you could write: {{{#!php get( '_id' ) ){ ... // do something with $where } return $where; }}} This is somehow similar to the threads #15063 and #23833, but not exactly. What would be the gain? WordPress query programming may become simpler, and queries may be managed using '''human-readable''' names. " prosti Future Releases 37837 Extend WP_Query author parameters to filter by role Query 4.7 normal normal Awaiting Review feature request new 2016-08-26T10:25:01Z 2017-03-30T17:01:37Z "WP_Query contains a series of author parameters (`author', ' author_name', ' author__in', and `author__not_in` as documented on the Codex). It wpould be nice to add `author_role__in` and maybe `author_role__not_in` as valid parameters, and be able to also query for posts given one or a set of user roles. I can see a lot of usages, and this has indeed been asked inside the community in some places, although I could not find a Track dedicated ticket. AFAIK, this would require the WP_Query database interaction to include the usermeta table, which can be expensive by default, and add a LIKE statement against the `wp_capabilities` usermeta field value, which is also expensive by default. So this might introduce performance problems and be discarded because of that. But otherwise, I would like that we consider this as a possible feature to add." jadpm Future Releases 44658 Support BETWEEN for term names in WP_Tax_Query/WP_Term_Query Query normal normal Future Release feature request new dev-feedback 2018-07-27T20:23:30Z 2019-09-11T15:56:51Z This patch adds `name__between` parameter in `WP_Term_Query` and `between` operator in `WP_Tax_Query`. soulseekah Future Releases 43356 create is_403 function Query 4.9.3 normal normal Awaiting Review feature request new 2018-02-19T13:48:04Z 2018-02-19T16:04:07Z Create is_403() function and the ability to create a 403.php file in template to customize the page that visitors see when there try to access to a private content when there not loged in. fabienlege Future Releases 58600 wp_query Enhancement Query 6.2 normal normal Awaiting Review feature request new close 2023-06-22T13:21:56Z 2023-07-03T16:51:04Z "I wolud like to enhance the wp_query to retrive post base on catgory orders. Category Ex. with post Mobile -: Post-1, Post-3, Post-6 Appliance -: Post-2, Post-8, Post-10 I Need Posts like in this order using wp_query of order by category ASC/DESC Current output is according to ID order Post-1 Post-2 Post-3 Post-6 Post-8 Post-10 Expected output Post-2 Post-8 Post-10 Post-1 Post-3 Post-6" thakordarshil Future Releases 35418 Assigned post type not appeared in category and tag archive Query 4.4.1 normal normal defect (bug) new reporter-feedback 2016-01-12T14:07:24Z 2019-06-04T20:54:15Z "In case of custom post type assign to category or tag(like use register_taxonomy_for_object_type), this post type not appeared in category and tag archive. " jim912 Future Releases 23309 Not all WP_Query::query_vars get updated during WP_Query::get_posts() Query normal normal defect (bug) new needs-unit-tests 2013-01-28T15:40:56Z 2019-06-04T20:43:47Z "There is a lot of logic within the WP_Query::get_posts() method that fills in missing query vars with defaults and manipulates others based on the rest of the query. However, some of the final states for many of the variables aren't updated in the WP_Query::query_vars array. For example, the post type is lost as a local variable and post_status is used for building compiling mysql expressions, but never directly updated. The result is that any plugins that want to recreate the query for another system, (ie, an external search provider) must directly copy much of the business logic that WP_Query::get_posts() has embedded in it in order to fill in for the incomplete query_var array. " prettyboymp Future Releases 30911 Overhaul post_status logic in WP_Query Query normal normal defect (bug) new needs-unit-tests 2015-01-05T15:24:11Z 2019-06-04T20:48:22Z "`WP_Query` filters based on post_status in two different places: 1. When building the main SQL query (`SELECT ID FROM $wpdb->posts`...). https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/query.php#L2946 This block is responsible for parsing the 'post_status' query var, and rectifying these passed post_statuses with the 'perm' param, the logged-in user's permissions, and whether `is_admin()`. (The ability to query by 'post_status' dates from [5575].) 2. On `single` queries (`is_page()`, `is_single()`), additional filtering happens *after* the query. https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/query.php#L3511 The intended purpose of this block is to ensure that Preview works (since posts being previewed generally are not published). The current incarnation of the preview logic (ie, living in `WP_Query`) was introduced in [2523]. These two 'post_status' blocks have two different purposes and two different histories, but they interact in a number of problematic ways. Just a few of the problems: a. Querying posts with 'fields=ids' means that the post ids are returned before the second filter block gets a chance to run. As a result, certain `WP_Query` objects (eg 'p=123&post_status=trash') can return different post IDs depending on whether you request 'fields=ids'. b. Values passed to the post_status parameter of `WP_Query` are sometimes overridden forcibly, based on logged-in user status. In an ideal world, `WP_Query` would not make any essential reference to the logged-in user. Realistically, we can't change some of this behavior for reasons having to do with backward compatibility. But there are places where the current user logic could be reworked so that it provides defaults, which can then be overridden by the params passed to `WP_Query`. Some relevant tickets: #28568, #29167 c. Filtering out non-previewable posts after the main query has taken place means doing more SQL queries than necessary in cases where post_status=draft and `is_single()`. d. Filtering out non-previewable posts after the main query has taken place can result in certain sorts of data leakage. See eg #30910. e. Having two separate blocks that filter results based on post_status makes unnecessarily complicated to fix post_status bugs. See eg #30530, #22001, #23309. My initial thought is that the second block should be removed. Preview logic should either be merged with the first block of post_status parsing logic that runs when building the main post query, or it should be moved into a separate query_var, which would then be passed when making a Preview request. In general, the challenge here is to ensure that the default post_status whitelist is properly sensitive to the permissions of the logged-in user - which sometimes means building clauses like `(post_status = 'publish' OR ( post_status = 'private' AND post_author = 123 ))`. I've started to write some unit tests that describe the (weird and complicated) existing behavior. See #29167 [31047]." boonebgorges Future Releases 23336 Sticky Posts lack sanity bounding. If used too much, can severely degrade performance. Query normal normal defect (bug) reopened 2013-01-31T05:09:37Z 2019-06-04T20:43:50Z "Came across an issue where a site was using sticky posts for a slider on the front page. The rest of the front page used custom taxonomy queries. As such, they'd mark items as sticky, have the slider grab the first three. Over years, they accumulated thousands of sticky posts, which, as you can imagine, made the front page of their site absurdly slow, as it was querying those thousands of posts every time. Should we establish some sort of sanity limit here, to keep people from shooting themselves in the foot? I found this a REALLY hard issue to diagnose. Even with debug bar, there is no indication that sticky posts are being queried. There's just a giant WP_Query call that does a giant `IN()` query. Something like a limit of 100 with FIFO would keep things from getting too crazy, without restricting people too much. If you have a need for more than that, you need to be using a taxonomy query." markjaquith Future Releases 34934 Suppress preg_match() and urldecode() errors in WP::parse_request(). Query 4.4 normal normal defect (bug) new reporter-feedback 2015-12-09T14:38:01Z 2019-06-04T20:53:31Z "Error en la fila class-wp.php 207 - 208 Aqui lo arregle asi {{{#!php if ( @preg_match(""#^$match#"", $request_match, $matches) || @preg_match(""#^$match#"", @urldecode($request_match), $matches) ) { }}} " entreosos Future Releases 35848 WordPress 4.4 Handling Custom Taxonomies and Tax Queries Correctly Query 4.4 normal normal defect (bug) new reporter-feedback 2016-02-17T05:53:20Z 2019-06-04T20:55:22Z "As of the WordPress 4.4 release, we have seen several sites that are using custom post types and custom taxonomies that no longer respond correctly to taxonomy page requests. E.g. Custom Post Type 1 -- Custom Tax 1 (slug = customtax1) -- Custom Tax 2 (slug = customtax2) Custom Post Type 2 -- Custom Tax 3 (slug = customtax3) -- Custom Tax 4 (slug = customtax4) A query like this ?customtax1=term1&customtax3=term2&customtax2=term4 should result in a taxonomy query where you get posts/post types that have the respective term values associated with the post object for each of those taxonomies. Instead as of WordPress 4.4, these queries are returning the home page of the site with is_home = true (not a taxonomy template) and completely disregarding the taxonomy query. Important notes: 1) Custom Post Type/Taxonomy plugins have been observed on these sites. It is not limited to any specific custom post type/taxonomy plugin 2) register_post_type and register_taxonomy ARE being called by these plugins via the init hook 3) Reverting to 4.3.x fixes the issue 4) Custom taxonomies in the admin and custom post types everywhere still seem to be working the same as with previous WP versions. The issue seems to be related only to the main query of front end requests. 5) Switching themes does not fix the issue 6) Migrating the register_post_type and register_taxonomy definitions to functions.php in the main theme and verifying they are run in an init hook does not fix the issue. 7) Trying to work around the issue by running pre_get_posts and applying the appropriate tax_query to the main query does not fix the issue. 8) Setting the post_type to the associated custom post type for the custom taxonomy in a ""request"" hook or ""pre_get_posts"" hook does not fix the issue, but it does shift the theme template to the custom post type's archive template (which at least rectifies the visual display problem associated with the incorrect query parsing, but it still doesn't appropriately filter the request) 9) Creating a WP_Tax_Query manually does return the desired tax_query, but this does not appear to work with $query->set in pre_get_posts either by assigning the tax_query as an array or WP_Tax_Query object (which was a hail mary test) Any necessary information needed to debug this can be provided. But it ""appears"" to be some sort of regression or new bug associated with the new taxonomy features and that is limited to custom post types with custom taxonomies." vrazer Future Releases 27507 get_posts() not honoring post_status criteria Query 3.8.1 normal normal defect (bug) new 2014-03-25T05:49:53Z 2019-06-04T20:46:17Z "Toss in the following in a mu-plugin file to reproduce: {{{ $posts = get_posts(); var_dump($posts); }}} You'll get auto-drafts in the returned result set, instead of the expected published posts only (i.e. the default as set by `get_posts()`). I've traced the problem to this loop that calls `get_post_stati()` in the `WP_Query#get_posts()` method: {{{ foreach ( get_post_stati() as $status ) { if ( in_array( $status, $q_status ) ) { if ( 'private' == $status ) $p_status[] = ""$wpdb->posts.post_status = '$status'""; else $r_status[] = ""$wpdb->posts.post_status = '$status'""; } } }}} `get_post_stati()` latter relies on a global that isn't set yet. I'm suspicious that we should be calling it here to begin with. Assuming we should, I definitely don't think WP should silently return an empty array. It should cough a `_doing_it_wrong()` notice, and quite possibly even a warning. That being said: why aren't the built-in post statuses registered by the time plugins get loaded? Can't we register them earlier? (And: does the same apply to custom post types?)" Denis-de-Bernardy Future Releases 34211 Ability to specify fields WP_Query can search Query 4.4 normal normal enhancement new 2015-10-08T11:59:10Z 2019-06-04T20:52:08Z "Currently the `s` parameter in WP_Query is hardcoded to only search in the `post_title` and `post_content` fields. A decent enhancement would be if you could also specify which postmeta fields it can search into as well. Also allowing more fine-grained control so that it can search only postmeta fields and ignore `post_title` and `post_content` as well. Something along the lines of: {{{ 's' => 'foo', 's_fields' =>'title', 's_meta_fields' => array( 'custom_field_1', 'custom_field_2' ), }}} `s_fields` can a string/array of either post_title and/or post_content. Setting it to false would disable searching these fields and assume you have set custom meta fields to search for instead. By default it would be `array( 'title', 'content' )`. `s_meta_fields` can accept a string/array of postmeta field names to search for. By default it would be `false`. A decent use case would be the [https://wordpress.org/plugins/search-by-sku-for-woocommerce/ Search by SKU for Woocommerce] plugin which resorts to writing a custom query. I assume the only real concern would be performance." paulwilde Future Releases 35761 Add filter(s) to get_adjacent_post function to change variables further down Query normal normal enhancement new 2016-02-06T04:17:05Z 2019-06-04T20:55:03Z "I'm finding it incredibly difficult to sort a post type using the existing filters to order by custom post meta alphabetically on a single post (for next/previous post). A use case is when I have a separate field for a custom post type called ""Last Name"" where I would want my posts to display in alphabetical order by last name. When sorting on an archive with pre_get_posts, it's not a problem, however when navigating posts from the single post, there just doesn't appear to be a simple way to change the ""next"" and ""previous"" posts to maintain the same custom sort order when dealing with an alphabetical meta_value. I'm proposing adding one or two filters to the get_adjacent_post() function which allows the final query to be filtered, or more importantly, the query result to be filtered so a custom sort can be implemented." briandichiara Future Releases 27088 Allow per-query filtering of post status objects Query 3.8.1 normal normal enhancement new needs-unit-tests 2014-02-11T05:32:31Z 2019-06-04T20:45:40Z "There comes a time where queries need to pull in posts (or CPTs) that have a non-public post status. Unfortunately, there are no filters on `get_post_status()` or `get_post_status_object()` to allow this kind of atomic control within `WP_Query::get_posts()`. To rectify this, we should add (at a minimum) filters on: - `get_post_status()` - `get_post_status_object()` Additionally, a filter within `WP_Query::get_posts()` (on the return of `get_post_status_object()` with the query passed along for context) will allow per-query filtering of the status object if it needs to be overridden for specific reasons." ericmann Future Releases 20044 Enable search for pages by slug Query 3.7 normal normal enhancement new 2012-02-14T22:17:58Z 2019-06-04T20:42:51Z "Would be nice to be able to search a page by its slug. Might need to be a bit different depending on the permalink-strategy. Steps to reproduce(with Post name-permalinks enabled): 1. Create a new page with a specific slug 2. Save page 3. Search for the exact slug-name " ekitomat Future Releases 30530 Enhance privacy by hiding posts of other users Query normal normal enhancement new reporter-feedback 2014-11-27T16:32:54Z 2019-06-04T20:48:05Z "I haven't found an entry in Trac for this, but I know that this is discussed in blogs/stackexchage/... many times: A feature to hide posts of other authors in the admin interface. The proposed solutions mostly include a pre_get_posts or request filter. However, most comments critizise that the post counter is still wrong. Thus, another filter for wp_count_posts is needed, duplicating much of the code of wp-includes/post.php's wp_count_posts(). Moreover, the select query in the original wp_count_posts() is executed anyway, but the result is thrown away. Finally, to make caching work, a third filter for transition_post_status to clear the post counter cache is needed. An all this just to hide the posts of other users... There should be an easy option to achieve this provided by the Core. There could be a 'list_others_*' capability that is honoured by query.php's get_posts() and post.php's wp_count_posts(). One could argue that published posts could be seen anyway, so the capability could also be named 'list_others_protected_*' and hides/shows the posts with a post_status marked as protected (get_posts() includes all posts with these status if we are in the admin). That would be a great feature often requested by users and greatly enhancing the CMS capabilities!" minderdl Future Releases 21096 Filter on is_front_page return value Query normal normal enhancement new 2012-06-28T10:32:03Z 2019-06-04T20:43:16Z "When you set a page (as 'placeholder' with same slug) as front page which is actually a post type archive to front page, is_front_page() will always return false on that page. The return value of the is_front_page() function is not filterable. Attached patch adds this filter in the most basic way." CoenJacobs Future Releases 15249 Filtering get_search_sql for advanced queries Query 3.1 normal normal enhancement assigned needs-unit-tests 2010-10-29T07:00:35Z 2019-06-04T20:41:32Z "Currently in the code for 3.1 (trunk) there are no filters running on the new function get_search_sql which would be useful for plugins to perform more complex MySQL functionality on specific columns. I suggest adding a filter ;)" sc0ttkclark Future Releases 25190 Improve name/pagename query variable mapping Query normal normal enhancement new needs-unit-tests 2013-08-30T08:12:13Z 2019-06-04T20:44:46Z `WP_Query` performs some mappings from custom query variables to `pagename` and `name` for custom post types. This could be improved so that `pagename` is not used for hierarchical post types when a top-level item has been requested. We could also do some mappings between `pagename` and `name` in case the incorrect query variable was used (see #16323). duck_ Future Releases 25180 Make it possible to select only posts with comment_count > 0 Query 3.6 normal normal enhancement new 2013-08-29T17:03:00Z 2019-06-04T20:44:44Z May need this when #11398 goes in. wonderboymusic Future Releases 18836 ORDER BY RAND() is slow pbearne Query normal minor enhancement assigned has-patch 2011-10-01T16:59:04Z 2024-03-12T17:55:53Z "WP_Query currently accepts 'orderby' => 'rand' which translates to ORDER BY RAND(). This is very slow when you have many posts, since it effectively calls RAND() for each row. A faster way would be to call RAND() only once and put it in the LIMIT clause. The only thing is that we have to make sure that the generated number is smaller than (total number of posts - number of posts to fetch). So, this would require to do an extra query to calculate the total. It should still be faster than the current method. If we want to get more than one post, we can get them in any order and then call shuffle() on the resulting array." scribu Future Releases 33306 Only Query for author ID if user is member of blog Query 4.3 normal normal enhancement new needs-unit-tests 2015-08-07T17:45:42Z 2019-06-04T20:51:04Z In WP_Query if a user is part of the multisite install but is not part of the current blog the query is still altered from only finding public posts to finding public posts and those that are private and from that author_id. While this never has an impact on the returned end results, not having private and author ID as a parameter lets MySQL optimize the queries and in the circumstances this has been tested on (large site, lots of posts lots of users) makes them run faster. On a site without multisite installed this will have the same behavior. sboisvert Future Releases 29178 Using WP_Query only for result of SQL_CALC_FOUND_ROWS Query normal normal enhancement new 2014-08-11T15:56:32Z 2019-06-04T20:47:33Z "For certain web hosts who reject direct SQL queries and push for use of `WP_Query` everywhere, it would be nice if you could use `WP_Query` only for the result of `SQL_CALC_FOUND_ROWS` My use case is that I'm added limited faceting support to a search interface. For each facet, I'd like to indicate the number of matching results. Using `update_post_meta_cache => false` and `update_post_term_cache => false` means using `WP_Query` still produces two queries. Also, it would be interesting to compare the performance of `SQL_CALC_FOUND_ROWS` vs `COUNT(*)` when all you care about is the total count." danielbachhuber Future Releases 29823 WP_Date_Query across tables boonebgorges* Query normal normal enhancement accepted 2014-10-02T00:29:17Z 2019-06-04T20:47:50Z "The changes proposed in #29822 will make it possible to think about cross-table date queries. Things like: all posts from 2011 that have comments from 2013 or later. Using this ticket as a placeholder for ideas regarding syntax (do we allow table names to be passed as a param? or perhaps a 'type' argument like `WP_Meta_Query` has, which is then translated into table names?) and other discussion." boonebgorges Future Releases 31083 WP_date_Query does not validate string values of 'before' or 'after' Query 4.1 normal normal enhancement new 2015-01-21T08:18:57Z 2019-06-04T20:48:45Z "Currently the ''before/after'' values in ''WP_Date_Query'' can be an array or string, which will be parsed by strtotime: {{{ if ( ! is_array( $datetime ) ) { // @todo Timezone issues here possibly return gmdate( 'Y-m-d H:i:s', strtotime( $datetime, $now ) ); } }}} But we don't validate this string in ''validate_date_values'': {{{ if ( array_key_exists( 'before', $date_query ) && is_array( $date_query['before'] ) ){ $valid = $this->validate_date_values( $date_query['before'] ); } }}} ---------------------- Example: {{{ $query_args = array( array( 'before' => 'i am a valid date string!?' ) ); $date_query = new \WP_Date_Query( $query_args ); echo $date_query->get_sql; // AND ( ( post_date < '1970-01-01 00:00:00' ) ) }}}" ChriCo Future Releases 15068 merging query objects/arrays Query 3.0 normal normal enhancement new 2010-10-08T04:27:58Z 2019-06-04T20:41:30Z "As multiple post type installations proliferate, I assume more and more people will come across a situation (like me) in which they need to display two (or more) sets of content units, say posts, and post-type ""audio"" in one stream - say on the main blog page. As long as the only condition is the post type itself, that will work fine. However, if those two sets need to be selected using different conditional criteria, say a category in one case, and a custom field in the other, then the current query_posts options will not be sufficient. While it is possible to retrieve multiple arrays via get_posts and merge them, then sort them using cusomt php, such a solution will break the paged navigation. If such situations will - as I assume - become more likely as more people use multiple post types and additional variables to specify content, I think it would be useful to be able to combine multiple queries into a meta query that will sort the combined object according to a common sorting variable, say date, and thus preserve the paged navigation. " youngmicroserf Future Releases 11398 new sort method for query_posts (order by last comment date) Query 2.9 normal normal enhancement assigned 2009-12-11T15:44:42Z 2019-06-04T20:40:57Z "I think we need sorting by latest post comment ability for query_posts. ""Recent comments"" plugins does this but we need this sorting in the core. BBPress is planned as a WP plugin according latest chat logs posted by Matt. We gonna have to need this anyway." erden.ozkan Future Releases 16910 Lazy evaluation for WP_Query Query normal normal feature request new 2011-03-21T01:04:39Z 2019-06-04T20:41:58Z "Suppose we have a 'city' post type, which is associated with a 'country' post type, such that each 'city' post has a 'country' parent post. Then the 'country' CPT has a 'language' taxonomy associated to it. Now, let's say we want to find all the cities which speak a certain language. Let's assume we already have the `'post_parent__in'` query var: #13927 We could construct a two-step query, like this: 1) Get all the countries with that language: {{{ $country_ids = get_posts( array( 'fields' => 'ids', 'post_type' => 'country', 'language' => 'french', 'nopaging' => true ) ); }}} 2) Get all the cities belonging to that country: {{{ $cities = get_posts( array( 'post_type' => 'city', 'post_parent__in' => $country_ids ) ); }}} No custom SQL queries; fantastic! But, if you have many many countries (not a good example, I know), you waste a lot of time passing the IDs back and forth from PHP to SQL. Final query: {{{ SELECT * FROM wp_posts WHERE post_type = 'city' AND post_parent IN (1, 2, 3, ...) }}} It would be a lot more scalable to put the first query into the second, directly, as a subquery. So, it would now look like this: 1) Get all the countries with that language: {{{ $country_ids = get_posts( array( 'fields' => 'ids', 'post_type' => 'country', 'language' => 'french', 'nopaging' => true, 'lazy' => true' ) ); }}} 2) Get all the cities belonging to that country: {{{ $cities = get_posts( array( 'post_type' => 'city', 'post_parent__in' => $country_ids ) ); }}} $country_ids would now be a WP_Lazy_Query object, which would just contain the subquery SQL. It would be appended to the second query, when needed: Final query: {{{ SELECT * FROM wp_posts WHERE post_type = 'city' AND post_parent IN ( SELECT ID FROM wp_posts WHERE post_type = 'country' INNER JOIN wp_terms ... ) }}}" scribu Future Releases 47491 Avoid double colouring in privacy request rows w/ notices Privacy 4.9.6 normal normal Future Release defect (bug) new 2019-06-06T07:28:54Z 2020-05-11T19:46:57Z "As initially raised here - https://core.trac.wordpress.org/ticket/44135#comment:16 @karmatosed; > I would note a caution in double colouring as seen with blue and green combined in messages. I have to ask why are we showing blue and green together? I would say the following works: > - No color around the actual email itself. > - If successful green > - If no personal data found blue > Grey doesn't really mean anything in terms of this UI so I think lets just not have a double notice color combination and we're set. It after all should only have a notice for information about the state change, not wrap everything. Branching this ticket to keep trac of the issue here." garrett-eclipse Future Releases 50141 Data erasure/export links should notify the user that the action has already been confirmed Privacy normal normal Future Release defect (bug) new 2020-05-11T02:16:56Z 2020-05-12T05:53:27Z "When a data erasure/export process is started, an email is sent to the email to confirm the action. That email contains only-use-once link that needs to be confirmed for the process to start. The first request to that url has a nice ""Thanks, you'll be notified when ready"" type message, but clicking the link a second time will just trigger a `wp_die( 'This link has expired.' );` message without any context as to why. It's also possible that some email scanners (Either on the server, or on an email client) may request the URL on the users behalf to verify if the URL contains any malicious content in which case the email owner would never actually see the success message, and only the expired link message." dd32 Future Releases 44940 Empty confirm_key property in WP_User_Request when hooking in the user_request_action_email_content Privacy 4.9.6 normal normal Awaiting Review defect (bug) new dev-feedback 2018-09-13T14:42:39Z 2020-10-16T22:44:17Z "I need to change the look (and the url) of the link for the request personal data deletion/export, so I hooked to `user_request_action_email_content` filter, and inspected the `$email_data` so that I can get the request `ID` and the `confirm_key` in my email. But upon inspecting the data provided I can see the confirmation key in the `confirm_url` key of the `$email_data`, but the field in the object is empty. This is intentional or a bug? {{{#!php Array ( [request] => WP_User_Request Object ( [ID] => 334 [user_id] => 20 [email] => my.email.[at]example.com [action_name] => export_personal_data [status] => request-pending [created_timestamp] => 1536847994 [modified_timestamp] => 1536847994 [confirmed_timestamp] => 0 [completed_timestamp] => 0 [request_data] => Array ( ) [confirm_key] => ) [email] => my.email.[at]example.com [description] => Export Personal Data [confirm_url] => https://my-site.com/wp-login.php?action=confirmaction&request_id=334&confirm_key=wjjeDD3mx5J02U51F7Zt [sitename] => My Cool site [siteurl] => https://my-site.com/ ) }}} " dingo_d Future Releases 52070 Erase Personal Data & Export Personal Data Table Nav Free Space Issue Privacy 5.6 normal normal Awaiting Review defect (bug) new 2020-12-14T19:20:28Z 2021-01-28T21:45:41Z "Hello Erase Personal Data & Export Personal Data Ui Design Mistake https://www.screenpresso.com/=87BDf please remove Free Space of ""tablenav - top "" apply CSS Display: none; I think also need to check into the RTL language also. Thanks." urvik1 Future Releases 46905 Erase Personal Data without verify enable erase option and change status issue Privacy normal normal Awaiting Review defect (bug) new dev-feedback 2019-04-13T06:41:39Z 2019-04-15T05:13:16Z "Erase Personal Data 1) without verify request enable erase data option 2) Personal data but when erase data then display massage no personal data. 3) pending request change status completed when erase data without verify. See attached images 1) No personal data issue.png 2) change status automatically without varify.png 3) completed status.png" mehulwpos Future Releases 53611 Font size inconsistency in the data erasure inline notice for 'additionalMessages' list items Privacy 5.7.2 normal minor Awaiting Review defect (bug) new 2021-07-06T20:17:30Z 2021-07-06T20:17:30Z "This in reference to the unordered list items added by plugins or other code as 'additionalMessages' with a personal data erasure admin process. The inline notice has a

    tag with text about the completed request. Plugins can add messages using the wp_privacy_personal_data_erasers filter. Additional messages are displayed using the unordered list markup. Right now, the

    tag in this notice has a smaller font size and line height, so the added items are not uniform with the default message's appearance. I'm working on an update that will add CSS to adjust the font-size and line-height of these list items to match the paragraph. " kimannwall Future Releases 44669 Privacy Notification doesn't clear after dismissing notification garrett-eclipse Privacy 4.9.7 normal normal Future Release defect (bug) assigned 2018-07-30T06:38:39Z 2019-09-30T19:08:08Z "Every time the 'Suggested privacy policy text' is changed, the **Settings > Privacy** page displays a notification. Clicking the Close (x) icon doesn't clear the notification. If I navigate away from the page, the Privacy Policy notification reappears. The only way to clear the notification is to click the ''review the guide'' link. If a site has a custom privacy policy page, like most typical business sites, then they shouldn't be forced to view this page every time it changes as it's not going to be relevant to them. The Close icon should clear the notification in the same way that clicking the ''review the guide'' link does. Screenshot: https://cl.ly/3r0Y3m0P452X" ahortin Future Releases 44204 Privacy export codebase in 4.9.6 doesn't use WP Filesystem API Privacy 4.9.6 normal normal Future Release defect (bug) new 2018-05-23T13:01:28Z 2020-08-22T21:11:04Z "The codebase added in WP 4.9.6 for privacy was written with low-level file APIs like fopen(), file_exists(), fwrite(), etc. rather than the WP Filesystem API. Quick to see in wp_privacy_generate_personal_data_export_file(). This restricts core parts of the privacy management functionality to only operate on hosts with direct access to the local filesystem. It is recommended to instead use the WP Filesystem API so that more secure hosts are supported and a broader set of filesystems can be used, e.g. SSH, FTPext, FTPsocket, etc. https://codex.wordpress.org/Filesystem_API" diablodale Future Releases 14682 Privacy leakage: gravatars leak identity information Privacy 3.0 normal normal Awaiting Review defect (bug) reopened 2010-08-24T14:54:42Z 2020-07-01T19:18:00Z "If a commenter on a blog leaves a comment without having a log in to the site, and the ""Comment author must fill out name and e-mail"" preference is enabled for the blog, the author must provide an email address. The form for this says ""Mail (will not be published) (required)"" It's true that the email address itself is not published, but if the site has gravatars enabled, the persistent identity of the commenter is nonetheless revealed. Together with inspection of other posts where the commenter has chosen to reveal their identity, on the same blog or other blogs, or a brute-force approach taking a known email address to find postings attributed to them (using a global search engine) this results in a complete loss of anonymity. At the bare minimum, the user should be aware of this, so that they can choose not to comment; preferably, the software should be changed so that gravatars are not used for these sorts of posts (or made configurable, in combination with the user being made aware)." jmdh Future Releases 44084 Privacy: The personal data export file should be generated in the user's locale garrett-eclipse Privacy 4.9.6 normal normal Future Release defect (bug) assigned needs-unit-tests 2018-05-15T00:26:10Z 2020-10-08T07:01:36Z Similar to #43985, the HTML file containing the personal data export should be translated into the locale the user has selected for their profile, with a fallback to the site's locale. coreymckrill Future Releases 48265 The privacy export files cleanup can run unlink on directories throwing an error. Privacy 4.9.6 normal normal Awaiting Review defect (bug) new dev-feedback 2019-10-09T18:02:19Z 2021-11-24T09:25:40Z "Looking into some test failures on VVV flagged in Slack here; https://wordpress.slack.com/archives/C02RQBWTW/p1570445063460400 It was found that the `wp_privacy_delete_old_export_files` function runs `unlink` on all files and subdirectories older than `wp_privacy_export_expiration`, this becomes an issue as directories can't be removed via `unlink` and will throw an Operation is not permitted error. This occurs as the `$export_files` list is collected from a `list_files` call which has a level of 100 resulting in subdirectories being included. So the question for me is should the export cleanup only do files in the current `$export_dir`, or should it recurse into subdirectories and if so should the directories also be cleaned up if older than `wp_privacy_export_expiration`. If we do go to the extent of removing subdirectories should the `list_files` call be updated with an exclude filter so plugins can have custom directories in that location which would be avoided during the cleanup? Note: If subdirectories are to be removed as well we'll have to recursively traverse them and remove their contents so `rmdir` will work. Along with addressing the issue in `wp_privacy_delete_old_export_files` the cause of the original VVV test failures should also be addressed. What lies in the privacy unit test that creates the test_contents folder but doesn't clean it up here; https://github.com/WordPress/wordpress-develop/blob/master/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php#L244 * simply removing this directory at the end of the test should suffice." garrett-eclipse Future Releases 44723 The user ID in a `WP_User_Request` is not an integer as stated Privacy 4.9.6 normal normal Future Release defect (bug) assigned 2018-08-03T21:00:02Z 2022-01-30T16:54:53Z Discovered this while debugging something in #43985. The value of `WP_User_Request->user_id` is a string, not an integer as stated by the inline documentation. This was causing some unexpected behavior in `get_user_locale()`, which performs a strict comparison for `0` and was causing the condition to incorrectly evaluate as `false`. desrosj Future Releases 56694 Uncached database read for logged in users when Privacy Policy Page is deleted Privacy 5.7 normal normal Awaiting Review defect (bug) new needs-unit-tests 2022-09-29T20:47:20Z 2022-09-29T21:24:19Z "As a logged in WordPress user navigating around WordPress Admin, a hook fires on every admin page that attempts to notify you whether or not the suggested Privacy Policy text (in WordPress) has changed, sourced from the ""Privacy Policy Guide"" settings page. The Privacy Policy itself is a Page, and the numeric ID of that page is saved as a Setting. If the WordPress Page (that matches the ID that is set as the Privacy Policy Page setting) is permanently deleted, WordPress still attempts to query the database to look for this Page. This results in a single database read query that will never find what it is looking for, and is not cached because it does not exist, causing it to happen again on every subsequent page that any logged in user navigates to inside of WordPress Admin. * This user would normally never know this database chatter is happening because it isn't anything they are intentionally looking for * I discovered this misbehavior while using the Query Monitor plugin on a dev site, and noticed that there was always 1 uncached database read Screenshot of the query & call stack will be attached below." johnjamesjacoby Future Releases 59276 Wrong notice is showing up on the Privacy Policy page settings in WP dashboard. Privacy normal normal Awaiting Review defect (bug) new dev-feedback 2023-09-04T10:33:04Z 2023-09-05T10:35:59Z "If Admin does not select any page for Privacy policy from the Admin Dashboard and save the settings, the notice that appears shows that the page has been updated. **How to reproduce:** 1. Navigate to Settings > Privacy. 2. Keep 'Change your Privacy Policy page' dropdown unselected. 3. Save settings by clicking on 'Use This Page' button. **Expected Result:** As there is no page selected in dropdown, it should not show the notice that page has been updated. [[Image(https://ibb.co/3hyK6BY)]] **Environment Details:** WordPress version: 6.3.1 Browser: Chrome Version 116.0.5845.111 OS version: Windows 10 PHP version: 7.4.33 Server: Apache/2.4.57 Active Theme: Twenty Twenty-Three Active Plugins: None " anveshika Future Releases 44222 Add Archive state to privacy requests garrett-eclipse Privacy 4.9.6 normal normal Future Release enhancement assigned 2018-05-25T06:34:37Z 2020-10-20T19:46:09Z "Hello, A suggestion for v2 of GDPR is to add an archive/trash state and list view to erasure requests. Currently, the last state/phase in the erasure process is 'Completed' with the 'Next Steps' action being 'Remove request'. This automatically prompts the admin to remove and clear the deck. In many if not most cases though the site holds backups which upon site failure will be used to restore the site/content and thus the users PII data. Under GDPR my understanding is the admin is required to re-remove the users data. Backups are partially safe with GDPR because they are required for site security/integrity, but under retention can only be kept for a reasonable timeframe. So I was thinking a way to safeguard admins would be to introduce a trash/archive which would have the action for Completed be 'Archive' instead of 'Remove'. This would place the request in the trash and remove from the 'All' view to reduce the clutter. On a new Trash view you're find these requests with the ability to delete permanently. And I think I heard something about privacy settings at some point in slack which could allow a retention period setting for these archives be set and a cron to auto-remove. So admins would be able to have their database retention and erasure archive retention periods basically match. This would enable them to use the archive list, export it possible, and use it to re-remove users upon database restore. Most of it is up to the admin to disclose their backup policy and how they'll re-remove users but would definitely help safeguard them from losing requests by running through the workflow too quickly. Hope that mostly makes sense, mainly just wanted the idea out there. All the best, *Note: Most of this is to 'my understanding' so I defer to those more versed in the new regulations." garrett-eclipse Future Releases 43822 Add UX in the Network Admin for exporting/anonymizing/deleting personal data across the entire network Privacy normal normal Future Release enhancement new 2018-04-20T20:12:18Z 2020-07-06T20:17:20Z "It's not practical for a super admin to hunt down personal data by going to the Dashboard of each site in the network. There should be one centralized place in the Network Admin to receive and process SARs. This should look similar to the UX in #43546 and #43602, but the underlying functionality for managing the data across the entire network is being discussed in #43738." coreymckrill Future Releases 43821 Add UX in the Network Admin for setting a network-wide privacy policy Privacy normal normal Future Release enhancement new 2018-04-20T20:05:00Z 2020-07-06T23:31:01Z "Some multisite instances will need to set one privacy policy for the entire network, with controls on whether or not individual sites can modify/replace it. Other multisite instances may choose to leave the privacy policy entirely to individual sites. The UI for setting a network-wide policy should probably be similar to #43435, so snippets from plugins can be included." coreymckrill Future Releases 44078 Add an email pseudonymization function that preserves first letter and TLD Privacy normal normal Future Release enhancement new 2018-05-14T18:16:11Z 2019-09-20T03:35:24Z "In addition to the existing behavior of wp_privacy_anonymize_data( 'email', $email_address) which returns deleted@site.invalid, it would be useful, e.g. for debug logging to have another type that would return pseudonymized email addresses that retain a little bit of the original address, e.g. {{{#!php my-mailbox@mailprovider.com.ca }}} could become something like {{{#!php m*********@****************.ca }}} Where the number of * corresponds to the letters removed, and only the first letter of the email address and the TLD are retained. See also https://iapp.org/news/a/top-10-operational-impacts-of-the-gdpr-part-8-pseudonymization/" allendav Future Releases 43854 Add cards to the Tools page for personal data tools Privacy normal normal Future Release enhancement new 2018-04-25T00:29:46Z 2019-05-23T19:34:32Z "If the privacy tools are going to live under the Tools menu, cards should be added to the Tools page explaining each tool and linking to it. The Tools page has recently become pretty barren with the move to a plugin for Press This." desrosj Future Releases 44378 Add privacy prompt(s) to the embeds whitelist documentation in the core handbook allendav Privacy 4.9.6 normal normal Future Release enhancement assigned needs-docs 2018-06-15T21:27:19Z 2019-01-17T20:53:33Z "There are several good prompts on https://make.wordpress.org/core/handbook/contribute/design-decisions/#whitelisting-oembed-providers to consider before adding an oembed provider to core. We should come up with and add a well worded prompt to have the developer consider the privacy implications of the embed (e.g. cookies, tracking JS, etc) in addition to the other prompts already included there." allendav Future Releases 43588 Anonymize commenter IP address once a comment is no longer pending Privacy normal normal Awaiting Review enhancement new needs-unit-tests 2018-03-20T19:06:12Z 2019-01-09T19:17:26Z "A commenter's IP address is stored with each comment. The commenters IP address can often be used to identify a single individual or device at a location. To enhance commentor's privacy, and to reduce the amount of personal data stored by a WordPress site in preparation for upcoming laws like the GDPR, this issue proposes that once a comment transitions out of pending, core WordPress should zero the commentor's IP address final octet similar to how Google Analytics Anonymizes IP addresses The rationale for keeping it while a comment is pending is to continue to allow anti-spam access to the IP address which can be used to detect spam. The rationale for keeping all but the last octet is to still allow statistics to be gathered about the general geographic location of commenters based on the first three octets of the IP address." allendav Future Releases 51110 Create a UI for user-level privacy / consent management options on the profile page paaljoachim Privacy normal normal Future Release enhancement assigned 2020-08-22T15:03:00Z 2021-03-26T15:05:07Z "**Background:** The Consent API is an initiative that is currently underway in the Privacy team. The code is available in the repository here: https://wordpress.org/plugins/wp-consent-api/ The code does not include any user interface. However, this is something that the Team feels could be very useful and would greatly improve user experience. **The Challenge:** Cookie banners provide very little useful information to users - increasingly so the more they pop up as as checking-the-box responses to various pieces of legislation throughout the world. It would thus be useful to provide website users, who are registered, with a better UI to manage their consent - and to do so on a more persistent basis. **The Solution:** This may be updated, based on input received below / P2 discussions / dev chat. This ticket represents a milestone for the Consent API. ''There should be an action to re-direct users to this page (e.g.'' wp_prompt_consent_admin'') to re-affirm their consent choices when necessary.'' {{{#!php Your Privacy

    While logged in:

    }}} ''Plugins should be able to filter paragraph:'' {{{#!php Your privacy choices while logged in are saved in the database and will persist until you change them. You may be prompted to update your consent from time to time. For example, you may be asked whether you still consent to marketing if you have previously opted in and the site added a new cookie. This is merely an example, as legislative requirements differ between jurisdictions.

    Consent categories:

    }}} ''User_meta values should only be created once a user saves their privacy preferences, not once a new user is created, to not unnecessarily strain large sites. Plugins should be able to update the default values for the checkboxes (i.e. for when no user_meta value exists), as well as whether the checkboxes should be edit-able by the user or not, as obligations may vary depending on the jurisdictions involved.'' {{{#!php While logged out: }}} ''Plugins should be able to filter this paragraph:'' {{{#!php Your privacy choices while logged out are saved in a cookie and will only persist until the cookie expires, or is deleted. If this happens, these values will reset to the website's defaults. 5 checkboxes with the descriptions: Functional, Preferences, Anonymous Statistics, Statistics, Marketing. }}} ''There should be a filter here so that the Disclosure / Permissions tabs or consent management plugins can add more information if they need to, or to add more granular choices.'' {{{#!php Website defaults 5 checkboxes (not select-able) with the descriptions: Functional, Preferences, Anonymous Statistics, Statistics, Marketing. These should display the site's default values, which should be edit-able by plugins. }}} ''There should be a filter here so that the Disclosure / Permissions tabs or consent management plugins can add more information if they need to, or to add more granular choices.'' Ideally, there would be a mechanism (e.g. two buttons) to request data export or erasure here. Thanks a lot to Ronnie Burt for bringing this up on Slack! It is important to note that the user should need to log again to make either an export or erasure request. Also, the request needs to be confirmed via e-mail for registered users. I imagine this would work best if it was similar to how password resets work at the moment. More background here: https://core.trac.wordpress.org/ticket/43437 Suggested text for buttons: {{{#!php user_email; } else { $email_address = $username_or_email_address; } } }}} Please let me know if this makes any sense!" subrataemfluence Future Releases 44043 Framework for logging/retrieving a users consent state Privacy normal normal Future Release enhancement new dev-feedback 2018-05-11T09:33:28Z 2020-11-26T09:21:03Z When a users visits a website for the first time, the user should be able to opt in or out from cookies. There are a couple of WP plugins that provide such functionality. The most common cookie categories are; necessary, preference, statistics, marketing. Other plugins should be able to retrieve the users consent state through WP Core, which allows them to avoid putting unwanted cookies in the users browser, without having to explicitly support certain cookie consent plugins. cookiebot Future Releases 44268 GDPR concerns on the core commenting flow Privacy 4.9.6 normal normal Awaiting Review enhancement new 2018-05-29T18:41:11Z 2018-05-30T15:15:21Z "The checkbox on the comment template it's not GDPR compliant. 1. The act of submitting content implied informed consent (possible to edit this message) 2. It must be required 3. It must be have a link to privacy policies (possible to edit this link) 4. It must be to store the consent 5. It must be possible to change, export and delete this data Possible to edit this Thanks. Best regards. Patrice" patricedefago Future Releases 44320 Inform users when their site's privacy policy is not publicly visible Privacy 4.9.6 normal normal Future Release enhancement new 2018-06-06T19:55:31Z 2019-05-23T19:23:54Z "When a page is selected as the site's privacy policy and is not published, users that can edit the privacy policy should be notified that the page is not publicly visible. Currently, the only way to know that the selected privacy policy page is unpublished is to go to Pages in the admin and see the page listed with `- Draft` next to its title. #44100 will add `- Draft` to the page titles in the settings dropdown, but that is not visible unless viewing the Settings > Privacy page. #44131 aims to adjust some of the text on the Settings > Privacy page to indicate the page would be previewed and not viewed, but this is also only seen when on that settings page. Here are a few ideas that have been thrown tossed around. == Dashboard Widget A dashboard widget for Privacy that could indicate any issues with the site's privacy settings. Some examples of what could appear here: - ""Your site does not have a privacy policy selected."" - ""The privacy policy page selected is not publicly visible"" - Maybe further down the road, ""Several active plugins on your site do not declare support for data privacy features"" (see #43938, #43750). == Admin Notice This admin warning would be dismissible and only show up to users that have the ability to manage the privacy policy. Which pages to show this on and whether ''another'' admin notice should be introduced should be carefully considered. Related: #44100, #44131." desrosj Future Releases 43811 Licence & Policy notice during installation xkon Privacy normal normal Awaiting Review enhancement assigned 2018-04-19T13:56:37Z 2023-08-29T15:33:28Z "This was a thought mentioned in #43492 originally but it deserves it's own ticket at the moment. We all know about the lovely 5 minute installation process that WordPress provides. I feel like we can create a small placeholder during the installation process ( probably on the first page even ) to notify the users about GPL license and a text on Policy. Yes the license is included in a .txt, but people are more used when installing things to see a license / policy during the installation and then continue to the actual install. I'm not personally thinking about a full blown page with a wall of text but rather a discreet placeholder to hold just the right the information needed like an excerpt from the GPL and a link refering to the full text for the ease of use etc as well as the connection between WordPress and wp.org during updates and such as stated on other tickets so we can be even more clear and upfront to any given user. @melchoyce do you think you could check this as well so we can provide a mockup/patch to see how it feels and then we can go forth adding the texts needed here as well just in case this could make it to the release also ?" xkon Future Releases 44498 Make `_wp_personal_data_cleanup_requests()` run on cron Privacy 4.9.6 normal normal Awaiting Review enhancement new 2018-07-03T15:17:06Z 2018-07-30T15:56:24Z "When a data export or removal request is created, a user must confirm that request within x days. By default, this is 1 day (24 hours), but it can be changed using the `user_request_key_expiration` filter. If a user does not confirm the request within that time, it is marked as failed, and the request needs to be re-initiated. Currently, requests are only marked as failed when the Export/Erase Personal Data screens are accessed. By default, only administrators can access this page, and will most likely do so very infrequently. Because of this, a cron may be more appropriate for marking requests as failed. A `posts_per_page => -1` query arg is also used to fetch expired requests, which could cause issues when a large number of requests have failed. Moving this action to a cron should cut down on the number of requests that need to be transitioned at a time." desrosj Future Releases 43938 Make it clear to administrators that not all plugins support privacy policy content, personal data export and erasure xkon Privacy 4.9.6 normal normal Future Release enhancement assigned 2018-05-02T19:16:18Z 2020-06-23T00:09:22Z "It is likely that there will be many plugins that will not implement the new privacy policy content hooks nor the personal data export and erasure hooks for some time (if ever). It would be unfortunate for administrators to overlook privacy policy impacts from such plugins, or to assume that personal data export and erasure included personal data collected by such plugins. As part of privacy policy content UX, as well as export and erasure UX, we should come up with a way to prompt administrators to take this into consideration." allendav Future Releases 44539 Notify the admin when no personal data is found for a user Privacy 4.9.6 normal normal Awaiting Review enhancement new 2018-07-06T17:35:53Z 2019-12-02T17:36:32Z "When no data exists for a user's data export request, both the user and administrator handling the request should be notified that no data exists. #44133 handles the end user experience by notifying the user via email that no personal data was found. On the admin side, the person managing the data request should also be notified that no personal data was found. The ""Download Personal Data"" inline action should also be removed or changed to something like ""Recheck for Personal Data""." desrosj Future Releases 44101 Personal Data Erasure Workflow - Make the Erasure Fulfilled notification admin triggered Privacy 4.9.6 normal normal Future Release enhancement new 2018-05-15T22:59:46Z 2019-05-23T19:24:27Z "Hello, This might be more for a GDPR v2, but from an admin perspective, I found it easy to overlook any manual actions the admin may need to do to properly complete an Erasure. With the current workflow the requester confirms, and on admin clicking 'Erase Personal Data' the data WP knows about is removed and the user receives a Erasure Fulfilled notification. So is it expected the admin would remove any other non-WP core data before clicking that option? I was thinking it might be nice to have that 'Erase Personal Data' conduct the erasure but hold off on the fulfilled email and have that manually triggered by the admin once they've removed any other data. Would be nice if this step prompted the admin to conduct any other erasure steps that their process might require. Hoping that makes sense, I'm just feeling that currently there's no part in the process prompting the admin to do any other erasures that the core doesn't cover. Thank you" garrett-eclipse Future Releases 46897 Personal Data Export Report: Mobile friendly xkon Privacy 4.9.6 normal normal Future Release enhancement assigned 2019-04-12T13:13:04Z 2020-11-03T16:10:04Z "The reports are HTML files and I think we should consider making them more mobile friendly. For example: - Increase the margins around the report. - Make the data tables responsive. - Viewport - ... We could look into the admin list tables for ideas. " birgire Future Releases 44153 Plugin privacy polices and admin notification Privacy 4.9.6 normal normal Future Release enhancement new 2018-05-18T23:14:22Z 2019-04-22T16:54:53Z "If a plugin adds a privacy policy by hooking wp_add_privacy_policy_content(), the information shows up on example.com/wp-admin/tools.php?wp-privacy-policy-guide=1. However, there's no link on the dashboard menu (esp settings->privacy) regarding that. Settings->privacy does say ""Need help putting together your new Privacy Policy page? Check out our guide for recommendations on what content to include, along with policies suggested by your plugins and theme."" with a link in the text, but it's quite obscure. How about a 2nd line: If any plugins or themes have available privacy policies, you'll find them [link]here[/link]. You can them use them on your own privacy policy page." sterndata Future Releases 51555 Privacy Page: Does it need to be a Page? Also, is a warning an error? garrett-eclipse Privacy 4.9.6 normal normal Future Release enhancement reviewing 2020-10-16T19:35:53Z 2020-10-16T22:14:49Z "When defining the Privacy Page, why does it specifically have to be a **Page** content type? It could very well be a Post or another content type. As a Page, it sort of then has to live in the ''hierarchy'' of Pages. In many situations, we might want to use a special custom post type that has no hierarchy. Or, we may want to set it as a Post of category ""Legal"" and then we would have other legal-ish Post content in that same category. Or we could have a pop-up. Or it could be in the footer. And so on--- there are many places a Privacy notice could appear, because, as indicated on the support article about this [https://wordpress.org/support/article/wordpress-privacy/] ""Every website is different."" (It would be good to explain somewhere ''why'' we have to define a Privacy Page in this manner, anyway--- does it create some sort of XML feed or appear in a META tag in the header or something useful and easy to track for compliance?) **Proposal:** Allow ''any'' post type to be set as the Privacy Page. **Even better:** Add a checkbox to indicate ""We have implemented some other method of a Privacy Page (such as a popup)."" **Also, a slight bug:** Going to the **Settings: Reading** panel, there is a message that warns: ''Warning: these pages should not be the same as your Privacy Policy page! '' when I have not defined the Privacy Policy page. While that may be an important message, it is curious to see it and was not something that I would consider doing anyway. Interestingly, if I define a **Posts page** here, that message goes away. (That is, it appears when I have defined both the **Homepage** and the **Posts page.**) If you have to keep this warning here for some reason, perhaps make the warning not-red, maybe caution color, if that is possible, and add a link over to the Privacy Policy panel in WP Dashboard. Suggest to use class {{{ .notice-warning }}} rather than {{{ .notice-error }}} since this is not really an error. [[Image()]]" bkjproductions Future Releases 54390 Privacy Policy should be generated on the site language (locale) and not on users language Privacy normal normal Awaiting Review enhancement new dev-feedback 2021-11-07T08:59:03Z 2021-11-08T04:48:27Z "If the user chose another language for admin and generated the Privacy Policy page, it was created in its chosen language and not in the site's language (locale). Example: While managing site with German language and English language as personal preference, I've got English Privacy Policy page and not Datenschutzerklärung as I've exected. It can be even better to give a user option to change the default (site's language) to another available one as an added feature." oglekler Future Releases 44538 Provide a way to show what change occurred to the suggested privacy policy text. Privacy 4.9.6 normal normal Future Release enhancement new 2018-07-06T15:31:15Z 2020-11-24T16:11:48Z "Currently, when WordPress notifies me that the suggested privacy policy text has changed, it doesn't provide any indication of WHAT has changed. Given that I've customized the text I'm actually using, this makes it prohibitively time-consuming to track down what changed (because I'd have to download an old WordPress version, copy-paste out the suggested text, and then run the two versions through a diff utility manually). As a result, I wind up just dismissing the notification and getting on with my day. (Not to mention feeling irritated by further confirmation of my sense that I spend more time applying updates to WordPress or its plugins than actually posting... something I hope to remedy by migrating to a static site generator like Jekyll or Pelican.) Given that WordPress already has a diff implementation for showing changes between revisions of posts, it should offer to apply it to the two different versions of the suggested privacy policy, so I can easily know whether I need to update my customized version. (Ideally, it should apply it between whatever version was current when the privacy policy page was last edited and the current version.)" ssokolow Future Releases 44145 Rework Privacy settings page to use the Settings API xkon* Privacy 4.9.6 normal normal Future Release enhancement accepted 2018-05-18T12:23:18Z 2020-09-26T00:04:24Z Now that the Privacy page is under Settings, it should be reworked to utilize the Settings API. desrosj Future Releases 47488 "add ""extensibility"" to WP_Privacy_Requests_Table" Privacy normal normal Awaiting Review enhancement new 2019-06-05T20:09:01Z 2019-06-06T23:53:37Z "`WP_Privacy_Requests_Table` (and its 2 sub-classes `WP_Privacy_Data_Removal_Requests_List_Table` and `WP_Privacy_Data_Export_Requests_List_Table`) lack some of the ""extension"" points that other list tables (e.g., `WP_Posts_List_Table`) in core have. A short list of what is missing includes: * an `extra_tablenav()` method and the `restrict_manage_xxx` and `manage_xxx_extra_tablenav` actions that accompany it * the ability to add custom columns (via a `xxx_columns` filter) * the ability to add/remove row actions (via a `xxx_row_actions` filter) * the ability to add ""display states"" (via a `display_xxx_states` filter) I do **not** have a concrete use-case for needing any of the above **at this time**, but feel that **all** core list tables should support them **unless there is a concrete reason not to**. I'll add a patch shortly." pbiron Future Releases 44001 oEmbed two click / local emoji scripts Privacy 4.9.6 normal major Awaiting Review enhancement new 2018-05-08T06:10:40Z 2019-12-12T20:26:56Z "Hi, the first beta release 4.9.6 has a few optimziations due to the GDPR, but I think, WordPress is missing two very relevant features. With the latest beta release, WordPress would not be legal for use within the EU - except you´re using WordPress as private notepad! 1) oEmbed two click solution: similar to the shariff plugin, all embedded items via the core WordPress oEmbed function need a two click privacy. Only when the user first clicks on the embedded item, the scripts should be active and the user can view / listen to the embedded item. 2) The emoji script is loaded from Automaticc. There is no possibility to disable this behaviour or the best would be: load all scripts locally. This is one of the relevant of GDPR: you cannot tell your users or lawyers, why it is relevant for using your site, when specific scripts like emoji are loaded from a CDN. There is no need for a CDN. It would be great, if you could still imagine to implement those both things, because they are rather important than a general privacy policy page, which the most users of WordPress had already created as a single page. And I think not all related core features needs an extra plugin, when it´s time to develop the core further. WordPress should go ahead and implement more features to the core than letting even more plugins used for a proper website. Thanks and regards," yoursql719 Future Releases 44370 wp_privacy_delete_old_export_files runs too much on some setups Privacy 4.9.6 normal normal Awaiting Review enhancement new 2018-06-14T14:38:31Z 2019-06-19T12:10:21Z "The `wp_privacy_delete_old_export_files` cron job added in [43046] #43546 runs on an hourly schedule. On large multisite networks, this means that these cleanup are running more or less constantly. Yet they're almost never needed. It's possible to write a plugin that modifies the behavior, by changing the way that scheduling is done so that it conforms better to the needs of a large network. However, I thought it might be worth considering whether there are changes that WP itself could make that would mitigate the problem for all installations. A few ideas, some of which are mutually compatible: 1. Instead of scheduling the event on 'init', only schedule it when an export file is generated. 2. During the cleanup routine, check for the existence of export files. If none are found, unschedule the recurring event (or don't schedule the next one) 3. In combination with the above, use single events rather than recurring ones 4. Perhaps the cleanup routine itself would be a single event, while a less-frequent (say, daily) recurring event would be to check whether specific cleanup events need to be scheduled (these would be cases missed by 1) If the team thinks this is too complex, or should be left up to the maintainer of the site in cases where it makes a difference, feel free to close the ticket." boonebgorges Future Releases 52903 Consent Management within WordPress Core Privacy normal normal Awaiting Review feature request new 2021-03-24T15:31:29Z 2022-10-14T19:56:55Z "**Website visitor / user Privacy choices:** a. Users who are not registered on a site, or who choose not to log in when prompted, can set their consent preferences via a simple banner (Gutenberg block) on the front end, which will set a (functional) cookie value for consent. It should be possible for plugins to filter the banner contents and to change the appearance. b. Registered users can set their consent preferences via an interface in wp-admin, after logging in. The interface should extend the ""Edit Profile"" page. Once a registered user logs out, the consent cookie value should be updated to reflect their preferences as per the database (sync). **(Sane) Defaults:** Five default consent categories have been proposed: Functional; Preferences; Anonymous Analytics; Analytics and Marketing. Website owners / admins should be able to set site-wide defaults by setting a site option value, or by using a plugin to do so. [An alternative would be to allow them to do so via filter.] It should be possible for site owners / admins to add additional consent categories, or to add nested sub-categories, or to allow a plugin to do so. As privacy legislation varies across the globe, I believe that WordPress should default to TRUE for each category, if not overridden, to maintain backwards compatibility and avoid unexpected behaviour. **Proposed Consent Management hierarchy:** 1. If the user is logged in and has set consent preferences, obtain their preferences via an extension of the REST API. Using the REST API will allow us to cater for cookies that are set in JavaScript, rather than in PHP. The basic logic: {{{#!php TRUE, ""preferences"" => TRUE, ""anon_stats"" => TRUE, ""stats"" => TRUE, ""marketing"" => TRUE); return $consent; }}} **How to integrate all of this into the Developer community:** This would require a number of approaches and mechanisms, including: New functions: Creating a wp_setcookie(); function in PHP and a corresponding function in JavaScript that checks for consent before placing a cookie; Use of wp_setcookie(); can then be required for new plugin submissions to the WordPress.org repository. Updating existing functions: Updating other functions like wp_mail(); and the HTTP and REST APIs to check for the appropriate consent. In the case of wp_mail(); for example, this can be done by adding a new parameter variable for $consent_purpose. We can add a _doing_it_wrong(); if this variable is not present. In the case of the REST API, consent could possibly be integrated into a permission callback, but that is something we'd need Timothy's (and others) input on. Education drive: Voluntary compliance is preferred. By providing documentation, resources and discussing with as many stakeholders as we can (primarily on Slack), we can encourage adoption through education. **Related tickets:** I will be closing #51188 in favour of this ticket to make it easier for new contributors to get involved. Please do feel welcome to read the closed ticket if you need / want background. #51110 deals with the design of a wp-admin interface. There is not a ticket for the design of a Gutenberg block (as a front end ""interface"") yet." carike Future Releases 51092 Create a JSON schema for Privacy and Other Related Disclosures Privacy normal normal Future Release feature request new dev-feedback 2020-08-21T09:20:52Z 2020-10-07T18:41:45Z "**Background:** The Disclosures Tab is an initiative that is underway in the Core Privacy Team. The aim is to help site owners / admins better understand what information their site (plugins, themes and Core) collects, where the information is stored and where it is sent - and in particular, who it is shared with. We hope to help site owners / admins make more informed privacy choices (e.g. when choosing which plugin to install) and to better understand their risk profile when it comes to privacy. For the most part, the actual ""controlling"" is planned for a sibling plugin, the Permissions Tab, which is not currently intended to be merged into Core, as this will contain more advanced settings. You can read more about the various privacy initiatives here: https://make.wordpress.org/core/2020/08/19/minutes-core-privacy-meeting-19-august-2020/ **The Challenge:** Free-form disclosures in the readme.txt would create a lot of additional work for the plugins review team. Moreover, it makes it near impossible to compare across plugins, or to use the information in any sort of automated process. The Disclosures Tab seeks to standardize the way that plugin, theme authors and Core can disclose privacy and other related concerns to site owners / admins, by creating quasi-""headers"" and limiting the acceptable values for each. **The Solution:** Each plugin, theme and core component can have a file called disclosures.json that could be read by Core (and Meta) using relatively simple REST API functionality. In its current form, the JSON schema does not set any fields as ""required"". As URLs are not one of the six data types accepted by JSON, these types have been set as ""string""s. The format for internal URLs has been set to ""uri-reference"" to allow for relative URLs. Items are not marked as ""uniqueItems"" because we would rather warn (after validation in PHP) than reject the file because of duplicates. **Scope:** This ticket proposes the schema. [] will be created for the validation of the schema by Core (particularly the URLs using PHP). [] will be created for internationalization (WP CLI and WordPress.org). #51156 creates developer documentation. #51144 proposes a UI for site-level privacy disclosures and related settings. {{{#!php Reading, for the setting ""Blog pages show at most"". When a single blog post is set to sticky using the ""stick to the top of the blog"" setting on the blog post edit page, the ""Blog pages show at most"" setting is respected. However, when TWO blog posts are set as sticky, then the ""Blog pages show at most"" setting is NOT respected, and an extra post gets shown on the home page. For example, if your ""Blog pages show at most"" setting is set to 6, and you then make 2 blog posts sticky, then your home page will show 7 posts. " wesleytech Future Releases 49355 """Publishing failed. Error message: Could not update post in the database"" caused by encoding" Posts, Post Types 5.3.2 normal normal Awaiting Review defect (bug) new 2020-02-04T01:30:57Z 2023-07-02T14:44:32Z "I have some text that I am copying into the title of a post. I get the following error: ""Publishing failed. Error message: Could not update post in the database"" The text is: 𝐀 𝐖𝐢𝐧 𝐟𝐨𝐫 𝐚 𝐉𝐮𝐬𝐭𝐢𝐜𝐞 𝐂𝐞𝐧𝐭𝐫𝐞 𝐂𝐥𝐢𝐞𝐧𝐭! I am having trouble understanding what encoding this text is. Why is this failing to save to the database? My database is set to utf8mb4. Why WordPress is choking on it?" 1000camels Future Releases 56686 """internal"" post status practical usage?" Posts, Post Types normal normal Awaiting Review defect (bug) new dev-feedback 2022-09-29T08:19:08Z 2022-10-04T17:01:02Z "https://developer.wordpress.org/reference/functions/register_post_status/ has an ""internal"" param, however I couldn't find what practical use/meaning this has. What happens if we set ""internal"" true in practical terms when doing a WP_Query? Does it affect anything else besides WP_Query? It seems this is legacy and without any practical use? (maybe deprecate and remove?)" malthert Future Releases 47279 $post object passed to clean_post_cache action can contain outdated values Posts, Post Types normal normal Future Release defect (bug) new needs-unit-tests 2019-05-15T14:28:45Z 2019-05-15T21:57:01Z "This occurs when publishing or deleting a post. In the `clean_post_cache()` function, `get_post( $post )` is called and assigned to `$post`. At that moment, the value of the `$post` parameter `post_status` = `draft` if publishing, `publish` if deleting the post. There is then a call to `wp_cache_delete( $post->ID, 'post_meta' );`, which correctly updates the value of post_status, if you perform another `get_post()` right after. But, the `$post` object is then passed to the action `clean_post_cache`, with the outdated values instead. So if someone hooks a function on `clean_post_cache`, and uses the `$post` object passed, it's going to receive incorrect values compared to what would be expected. But if you perform a `get_post()` inside that function, you will get the correct values. I only tested this with the `post_status` parameter, but this might be affecting others too. I would expect that the `$post` object passed to the `clean_post_cache` action contains up-to-date values." tabrisrp Future Releases 46288 'get_extended' breaks when using 'more' gutenberg block Posts, Post Types 5.0 normal normal Future Release defect (bug) new 2019-02-20T10:21:14Z 2019-04-24T06:21:18Z "'get_extended' returns the closing tag ' in the extended content, which prevents 'the_content' filter from working correctly. Steps to replicate: {{{#!php ', '', $post); }}} " joewebber Future Releases 54903 (no title) bug Posts, Post Types 5.8.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2022-01-25T18:21:10Z 2022-02-01T13:49:51Z "If a user makes a post without a title, the post shows up as (no title). However, if the user tries to delete, change status, etc.. of that (no title) post, core does not render those commands. The page refreshes with no changes. " samjco Future Releases 41128 404 Page not found after using same URL in post / page Posts, Post Types 4.8 normal normal Awaiting Review defect (bug) new 2017-06-22T15:40:28Z 2017-06-22T17:13:21Z "Starting from a clean Wordpress 4.8 installation. 1. Configure permalinks to: http://domain.com/post-title/ 2. Create a post with title 'new' 3. Remove the post with title 'new' to trash 4. Create a new page with title 'new' 5. Remove post 'new' from trash (not necessarily, both cases result in 404) 6. The page you created trows a 404 due to a database error since it has two different objects with the same URL, though different objects. " jpgos Future Releases 39939 A Contributor cannot preview their own post if it's scheduled Posts, Post Types normal minor Awaiting Review defect (bug) new needs-unit-tests 2017-02-22T12:52:02Z 2017-02-23T05:36:25Z "Steps to reproduce: 1. A Contributor writes a post and submits it for review. At this point they can preview their post. 2. An Editor or Administrator approves the post and schedules it for publication at a later date. 3. The contributor viewing the Posts listing table can no longer preview their post. Previously: #33694 " johnbillion Future Releases 41324 Action of password-protect form. Posts, Post Types normal normal Awaiting Review defect (bug) new 2017-07-14T12:38:49Z 2017-07-14T12:43:17Z "The default form action too-easily (I think just two submissions of a blank or incorrect password) loads wp-login.php?action=postpass with a 'service unavailable' message'). Simple validation to ensure correct password can prevent this. " gulliver Future Releases 53195 Add $post or $post_id to the quick_edit_custom_box hook Posts, Post Types normal normal Awaiting Review defect (bug) new 2021-05-12T11:17:34Z 2021-05-12T11:17:34Z "Right now when you're adding a custom box to quick edit, you can't set an existing value without using JavaScript, cause you don't have acces to the post. For a more elaborate explanation, see the User Contributed Notes, top one by stevenlinx: https://developer.wordpress.org/reference/hooks/quick_edit_custom_box/ It would be more elegant if we could just use the post within the hook I think." tomjdevisser Future Releases 40500 Adding custom capabilities to a custom post type seems to break permalink link on post edit screen Posts, Post Types 4.7.3 normal normal Awaiting Review defect (bug) new 2017-04-20T16:28:46Z 2019-11-27T20:38:26Z "Added custom capabilities to a wordpress custom post type to be used in conjunction with a role scoper plugin .... see: https://www.dropbox.com/s/7gzvma9t3lm028j/Screenshot%202017-04-20%2010.27.15.png?dl=0) ... seems to make the permalink link that shows up on the post edit screen, beneath the title, non-functional (ie, no URL is actually outputted). Also does not have the ""view [custom post type]"" link that typically appears in the black wordpress admin toolbar. Otherwise, everything works as designed. Confirmed on two separate hosts with plugins disabled and default theme. Confirmed that removing custom capabilities fixes the issue. Confirmed that adding capability using alternative method of simply 'capability_type' => array('print', 'prints'), also has the same result. " finitejest Future Releases 35538 "AllPosts page UI: link ""All"" has incorrect color" Posts, Post Types 4.4.1 normal trivial Awaiting Review defect (bug) new 2016-01-19T23:15:48Z 2023-07-09T20:45:45Z "STEPS TO REPRODUCE: 1) Log in (administrator), remove all posts. 2) Create new post. Go to AllPosts page. 3) Remove post to trash by clicking ""Trash"" menu item. EXPECTED RESULT: ""All (0)"" link color #000 ACTUAL RESULT: ""All (0)"" link color #0073aa" antonrinas Future Releases 52178 Allowed memory size exhausted / url creates new post entry? Posts, Post Types 5.6 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-12-26T18:19:40Z 2021-01-05T05:57:58Z "We get repeated bots (across multiple WP sites) hitting a specific URL pattern, they append a query string onto the end of a wordpress URL like this: {{{ https://www.example.com/permalink-to-article?q=user%2Fpassword&name%5B%23markup%5D=id&name%5B%23type%5D=markup&name%5B%23post_render%5D%5B%5D=passthru }}} This causes a memory exhausted error here: /wp/wp-includes/post.php at line 773: {{{ } elseif ( is_object( $post ) ) { if ( empty( $post->filter ) ) { $_post = sanitize_post( $post, 'raw' ); $_post = new WP_Post( $_post ); ##<--- HERE } elseif ( 'raw' === $post->filter ) { $_post = new WP_Post( $post ); } else { }}} " sgatz Future Releases 31416 An accessibility issue with the Publish metabox Posts, Post Types 4.1.1 normal normal Awaiting Review defect (bug) new 2015-02-22T22:03:33Z 2018-12-09T20:28:05Z "Taking a closer look at the Publish metabox for posts I realise that it has what I would call a bug. Take a look at the image attached. It tells me a post is published, while it's still asking for confirmation to be published. This screen shows up when first a post is set to private -and so gets published privately- and next is set to public, without hitting the 'Publish' button. The post is actually published privately, which should show up as it's status, as it normally does. It tells me though it's published (which impies it should be published publicly). I stumbled upon this, while I was searching for a more intiutive solution for inexperienced posters on one of my sites to post privately. I found two threads in forums which adress this issue: https://wordpress.org/support/topic/how-to-set-new-post-visibility-to-private-by-default?replies=14 http://wordpress.stackexchange.com/questions/118970/set-posts-of-a-custom-post-type-to-be-private-by-default Neither of threads mention (or seem to be aware?) of this shortcoming, while both try to solve the same issue I'm having. I question whether this problem can be solved, while the Publish metabox has such shortcomings. I hope that by fixing this little bug, it might actually be possible to create a more accessisble Publish metabox for guests on a site, maybe by a hack or plugin, but preferably within the WP core files. [[Image(http://www.basbva.nl/wp-content/uploads/2015/02/publish-metabox-bug.jpg)]]" basbva Future Releases 45516 Auto Draft title issue for custom post types SergeyBiryukov Posts, Post Types 5.0 normal minor Future Release defect (bug) reopened has-patch 2018-12-07T08:52:14Z 2023-02-09T13:15:40Z "I have register post type without title support {{{ $labels = array( 'name' => _x( 'Social posts', 'post type general name', 'text-domain' ), 'singular_name' => _x( 'Social post', 'post type singular name', 'text-domain' ), 'menu_name' => _x( 'Social posts', 'admin menu', 'text-domain' ), 'name_admin_bar' => _x( 'Social post', 'add new on admin bar', 'text-domain' ), 'add_new' => _x( 'Add New', 'social-post', 'text-domain' ), 'add_new_item' => __( 'Add New Social post', 'text-domain' ), 'new_item' => __( 'New Social post', 'text-domain' ), 'edit_item' => __( 'Edit Social post', 'text-domain' ), 'view_item' => __( 'View Social post', 'text-domain' ), 'all_items' => __( 'All Social posts', 'text-domain' ), 'search_items' => __( 'Search Social posts', 'text-domain' ), 'parent_item_colon' => __( 'Parent Social posts:', 'text-domain' ), 'not_found' => __( 'No social-posts found.', 'text-domain' ), 'not_found_in_trash' => __( 'No social-posts found in Trash.', 'text-domain' ) ); $args = array( 'labels' => $labels, 'description' => __( 'Description.', 'text-domain' ), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'social-post' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 10, 'menu_icon' => 'dashicons-id', 'delete_with_user' => true, 'can_export' => true, 'show_in_rest' => true, 'supports' => array( 'editor' ) ); register_post_type( 'social-post', $args ); }}} And if i add post the list post page shows title as ""Auto Draft"" " rajanit2000 Future Releases 56728 Can we fix featured image view issue when allowed SVG image type? Posts, Post Types 6.0.2 normal normal Awaiting Review defect (bug) new 2022-10-04T09:17:51Z 2022-10-04T09:17:51Z "Hi, I am facing issue when allowing to upload SVG image on wordpress media. You can see mentioned SS. Thank you " sumitsingh Future Releases 48013 Can't make a new post < default> Posts, Post Types normal normal Awaiting Review defect (bug) assigned reporter-feedback 2019-09-10T22:41:31Z 2019-10-08T19:22:07Z "{{{ TypeError: Cannot read property 'show_ui' of undefined at https://tjinews.xyz/wp-includes/js/dist/editor.min.js?ver=9.2.6:17:119556 at i (https://tjinews.xyz/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:6:91) at An.filter (https://tjinews.xyz/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:99:338) at https://tjinews.xyz/wp-includes/js/dist/editor.min.js?ver=9.2.6:17:119521 at Td (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:82:11) at hi (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:102:385) at Qg (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217) at Rg (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76) at Sc (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109) at Z (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492) }}}" tjinews Future Releases 52389 Consistently check for non-empty post ID in attachment functions SergeyBiryukov* Posts, Post Types normal normal Future Release defect (bug) accepted 2021-01-28T10:53:31Z 2021-02-17T23:54:41Z "Background: #50679, #52196. As a result of the changes in [49084] and [50039], `wp_get_attachment_metadata()` conditionally calls `get_post()` if the attachment ID is not passed: {{{ $attachment_id = (int) $attachment_id; if ( ! $attachment_id ) { $post = get_post(); if ( ! $post ) { return false; } $attachment_id = $post->ID; } }}} This is not really consistent with other attachment functions, which just always call `get_post()` unconditionally: {{{ $attachment_id = (int) $attachment_id; $post = get_post( $attachment_id ); }}} Let's bring some consistency here, there is no reason for these minor differences. This applies at least to: * `wp_get_attachment_metadata()` * `wp_get_attachment_url()` * `wp_get_attachment_caption()` * `wp_get_attachment_thumb_file()` * `wp_get_attachment_thumb_url()`" SergeyBiryukov Future Releases 40079 Content of static pages does not show when you have a count_post in the theme Posts, Post Types 4.7.3 normal normal Awaiting Review defect (bug) new 2017-03-09T14:08:13Z 2017-03-09T14:14:38Z "in page.php when you have elsewhere: {{{#!php publish; $numberofcats = wp_count_terms('category'); echo ""

    "".$posts."" articles in "".$numberofcats. "" categories:

    ""; ?> }}} then the content inside the loop of a static page will display the content of an article. well for me i fixed it with: {{{#!php "".$count_posts->publish."" articles in "".$numberofcats. "" categories:

    ""; ?> }}} I am testing it on a custom theme but with plain code you will see this too. tested it on a plain installation with custom theme in page.php: {{{

    Categories:

    publish; $numberofcats = wp_count_terms('category'); echo ""

    "".$posts."" articles in "".$numberofcats. "" categories:

    ""; ?>

    "">

    }}} " devlink1337 Future Releases 20438 Custom Post Types with Post Format support aren't registered against post_format taxonomy Posts, Post Types normal normal Awaiting Review defect (bug) reopened 2012-04-13T16:56:40Z 2022-05-13T22:06:11Z "When a custom post type adds support for {{{post-formats}}}, this doesn't actually register the {{{post_format}}} taxonomy for the post_type. Here's a quick test: {{{ add_action( 'init', function() { register_post_type( 'not-post', array( 'supports' => 'post-formats' ) ); global $wp_taxonomies; var_dump( 'post supports post_format:', in_array( 'post', $wp_taxonomies[ 'post_format' ]->object_type ) ); var_dump( 'not-post supports post_format:', in_array( 'not-post', $wp_taxonomies[ 'post_format' ]->object_type ) ); } ); }}} The {{{post_format}}} taxonomy doesn't get returned when {{{get_object_taxonomies}}} is called for the custom post type and one side-effect of this is that the {{{post_format_relationships}}} cache does not get flushed by {{{clean_object_term_cache}}} leading to stale values when a post format is changed. (The {{{post}}} post_type is immune to this because core registers the {{{post_format}}} taxonomy with it.) When a post_type adds support for post-formats, an explicit association should be made between the post_type and the {{{post_format}}} taxonomy." batmoo Future Releases 41573 Editor and Quick Edit display the slug of a page selected as static front page Posts, Post Types 4.8.1 normal normal Awaiting Review defect (bug) new 2017-08-06T16:52:02Z 2017-08-06T17:22:26Z "Dear Happy Engineers of WP! I'm writing about a possible WP BUG after consulting the issue with 'AThemes Support' that tells me there is this possibility... The issue is about a SLUG that can not be cancelled in a ""Homepage"" (it has been a normal page before choosing it as Static Frontpage...) But please, in order to don't repeat the conversation of the issue, I beg you to read it in the following link where is more clear... https://wordpress.org/support/topic/slug-homepage-static-page-seo-front-page-wp/ Thank you a lot! " cekar Future Releases 47637 Enhance excerpt_remove_blocks to handle more types of group blocks Posts, Post Types 5.2.2 normal normal Future Release defect (bug) reopened 2019-07-02T11:29:15Z 2021-11-22T07:21:00Z "The function excerpt_remove_blocks only considers top-level Blocks in an allowed list for the autogeneration of excerpts. However, since there is now a Group Block in Core (and a lot of self-developed Grouping Blocks out there), this can lead to autogenerated Excerpts being empty although there is plenty of content within the Post. I propose to add a new filterable ""group blocks"" array, which adds another level to be included in the autogeneration. Additionally, there should be a possibility to register a callback which can be used to generate a custom excerpt dynamically if needed for custom blocks. Change function excerpt_remove_blocks to this: {{{ function excerpt_remove_blocks($content){ $allowed_inner_blocks = array( // Classic blocks have their blockName set to null. null, 'core/freeform', 'core/heading', 'core/html', 'core/list', 'core/media-text', 'core/paragraph', 'core/preformatted', 'core/pullquote', 'core/quote', 'core/table', 'core/verse', ); $group_block_excerpt_functions = array( 'core/group' => 'parse_group_block_excerpt', ); $allowed_blocks = array_merge( $allowed_inner_blocks, array( 'core/columns' ) ); /** * Filters the list of blocks that can contribute to the excerpt. * * If a dynamic block is added to this list, it must not generate another * excerpt, as this will cause an infinite loop to occur. * * @since 4.4.0 * * @param array $allowed_blocks The list of allowed blocks. */ $allowed_blocks = apply_filters( 'excerpt_allowed_blocks', $allowed_blocks ); $group_blocks = apply_filters('excerpt_allowed_group_blocks',$group_block_excerpt_functions); $blocks = parse_blocks( $content ); $output = ''; foreach ( $blocks as $block ) { if(in_array($block['blockName'],$group_blocks,true)){ //We have a group Block with no extra excerpt function $output.= parse_group_block_excerpt($block,$allowed_inner_blocks); } elseif(in_array($block['blockName'],array_keys($group_blocks),true)){ //The Block registered a custom callback for autogenerating an Excerpt $output.=call_user_func($group_blocks[$block['blockName']],$block,$allowed_inner_blocks); } elseif( in_array( $block['blockName'], $allowed_blocks, true ) ) { if ( ! empty( $block['innerBlocks'] ) ) { if ( 'core/columns' === $block['blockName'] ) { $output .= _excerpt_render_inner_columns_blocks( $block, $allowed_inner_blocks ); continue; } // Skip the block if it has disallowed or nested inner blocks. foreach ( $block['innerBlocks'] as $inner_block ) { if ( ! in_array( $inner_block['blockName'], $allowed_inner_blocks, true ) || ! empty( $inner_block['innerBlocks'] ) ) { continue 2; } } } $output .= render_block( $block ); } } return $output; } }}} Add a function parse_group_block_excerpt {{{ function parse_group_block_excerpt($block,$allowed_blocks){ $output = """"; if(!empty($block['innerBlocks'])) { foreach($block['innerBlocks'] as $inner_block){ if('core/columns' === $inner_block['blockName']){ $output .= _excerpt_render_inner_columns_blocks( $inner_block, $allowed_inner_blocks ); continue; } // Skip the block if it has disallowed or nested inner blocks. foreach($inner_block['innerBlocks'] as $inner_inner_block){ if ( ! in_array( $inner_inner_block['blockName'], $allowed_inner_blocks, true ) || ! empty( $inner_inner_block['innerBlocks'] ) ){ continue 2; } } } } return $output; } }}} After that, a custom block can register itself as an group block just by using {{{ add_filter('excerpt_allowed_group_blocks','add_my_awesome_group_block_to_excerpt'); function add_my_awesome_group_block_to_excerpt($allowed_blocks=array()){ $allowed_blocks[] = 'my-awesome/groupblock'; return $allowed_blocks; } }}} or even by using a custom excerpt function for dynamic blocks by using {{{ add_filter('excerpt_allowed_group_blocks','add_my_awesome_group_block_to_excerpt'); function add_my_awesome_group_block_to_excerpt($allowed_blocks=array()){ $allowed_blocks['my-awesome/groupblock'] = 'my_awesome_group_block_custom_excerpt'; return $allowed_blocks; } }}} (I hope i did this right as this is my first ticket)" kuchenundkakao Future Releases 58512 Enhancing Security and User Experience: Addressing Password Length Limitations and Improving Validation Process Posts, Post Types 6.2.2 normal normal Awaiting Review defect (bug) new dev-feedback 2023-06-12T11:08:25Z 2023-07-14T11:31:15Z "When I attempted to use a password consisting of 256 characters and tried to publish my post, I encountered an error message stating, ""Updating failed. Could not update post in the database."" It appears that this issue may affect all users. Therefore, I kindly request that you consider addressing this problem by either fixing it or implementing validation on the input field to prevent such errors in the future. I used below password for password protect post : 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 **Total Characters: 255** Could you please verify the attached video URL, https://www.awesomescreenshot.com/video/18248088?key=dd7a62697a5b66aaf5d332dec3a0a9b9" utsav72640 Future Releases 55385 Error in Search Posts, Post Types normal normal Awaiting Review defect (bug) new reporter-feedback 2022-03-13T13:12:40Z 2022-03-26T02:59:53Z "Hi Support, When we are searching any keyword which start from .profile it send the backend normal post and page search to the frontend not found. Instead it should stay on same page and show not found. For example please search this www.profile.com and it will send you to frontend. Can you please advise why it is happening ? Regards, Himanshu" himanshushokhanda Future Releases 45978 Excerpt always become empty after save draft / publish Posts, Post Types normal normal Awaiting Review defect (bug) new reporter-feedback 2019-01-14T03:57:46Z 2019-01-14T14:48:00Z "It's happen one time for a **new post**.. Excerpt always become empty after save draft or publish or schedule a post.. [[Image(https://i.postimg.cc/P5G8SKcD/aaa.jpg)]] well, we need to update the post again to save the excerpt" KakiNetwork Future Releases 39651 Find Posts modal does not show post-type labels correctly Posts, Post Types 4.7.1 normal normal Future Release defect (bug) new 2017-01-20T11:59:21Z 2017-01-21T02:22:58Z "The screenshot shows the output of four different posts in the '''Find Posts Modal'''. The last two post are correct, at the first and second post the post-type-label (e.g. cpt_example) is missing. The problem is the post-type parameter ""''public''"", if it is set to ""''false''"" the label will not be shown AND you will get the following PHP-Notice (if DEBUG is true): {{{ Undefined index: cpt_example in ... /wp-admin/includes/ajax-actions.php on line 1803 Trying to get property of non-object in ... /wp-admin/includes/ajax-actions.php on line 1803 }}} At the following code (1745 ff.) you will notice the reason of this issue: '''$post_types''' only includes '''public posts''' {{{#!php true ), 'objects' ); ^^^^^^^^^^^^^^^^ }}} The output of this modal shows all posts (public and unpublic), so i don't think that this ""filter"" was set for security reasons. In my opinion it must either show all posts correctly with their labels (which would be great) or it must suppress all ""unpublic"" posts completely. " arkonisus Future Releases 56004 "Found issue with ""post"" post type page attribute parent slug not working" Posts, Post Types 6.0 normal normal Awaiting Review defect (bug) new reporter-feedback 2022-06-17T19:46:44Z 2022-07-21T06:41:49Z "Hello, Found issue with ""post"" post type page attribute parent slug not working Screenshot : https://tinyurl.com/25yqto72" dipakparmar443 Future Releases 18264 Future private posts listed as already published with future date specified Posts, Post Types normal normal Awaiting Review defect (bug) new 2011-07-27T00:05:27Z 2019-05-23T19:33:38Z "Setting a post to private, and scheduling it for some future date or time, results in the stamp that the post was ""Published on (future date)"" in the publish module. The discussion on tickets #5608 and #9136 suggests that all private posts are published immediately (and privately), and that this is intentional. So, it's misleading and confusing to report that it already was published on some future date. In source:trunk/wp-admin/includes/meta-boxes.php#L163, I suggest we replace: {{{ else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published $stamp = __('Published on: %1$s'); } }}} with: {{{ else if ( 'publish' == $post->post_status ) { // already publicly published $stamp = __('Published on: %1$s'); } else if ( 'private' == $post->post_status ) { // published privately $stamp = __('Published privately'); } }}}" chrisrudzki Future Releases 47072 Hierarchical post types missing attributes meta box if post type doesn't support 'page-attributes' or have templates Posts, Post Types 5.1.1 normal minor Awaiting Review defect (bug) new 2019-04-29T17:11:09Z 2019-04-29T17:11:09Z Setting the hierarchical argument to true in the register post type function doesn't enable the post parent automatically. In order for this meta box to show up you must also enable post type support for page-attributes or the post type must have templates. I would think the post parent dropdown should be visible by default if the post type is hierarchical. This applies to both the Classic and Gutenberg editor. natereist Future Releases 59664 I have tested beta 6.4 version and some issue on mobile device Posts, Post Types normal normal Awaiting Review defect (bug) new 2023-10-17T20:08:04Z 2023-10-27T20:57:00Z "I have tested WordPress Beta 6.4 RC1 version and some issue. https://wordpress.slack.com/archives/C02RW657Q/p1697563998445079 Post listing page arrows is not doing anything. For more information see mentioned screenshots and recording. Also credit page on text color issue. " sumitsingh Future Releases 43752 ID, post_parent, menu_order on global $post object is a string in edit context; expecting int Posts, Post Types 4.9.5 normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-04-12T23:34:08Z 2018-04-19T00:27:16Z "When I'm on an edit post screen, the ID, post_parent, menu_order attributes on the global $post object are strings. I expect them to be integers. To quickly check, put this in a plugin: {{{#!php ID); }); }); }}} Here's what's happening: 1. in wp-admin/post.php the edit case happens, and within that the post gets reloaded here: https://github.com/WordPress/WordPress/blob/4.9.5/wp-admin/post.php#L167 2. that function will run the post object through its own filter with filter edit here: https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/post.php#L552 3. because at the time $this->filter = ""raw"", and the $filter is edit, that will run the object through sanitize_post here https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/class-wp-post.php#L354 4. sanitize_post will, in turn, run all the fields through sanitize_post_field here: https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/post.php#L1940 5. and even though we have 3 fields set as int (https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/post.php#L1973), by the time we get to this part (https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/post.php#L2027-L2034), those three will be ran through esc_attr 6. esc_attr will feed it through _wp_specialchars here https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/formatting.php#L3978 7. which begins with $string = (string) $string; here https://github.com/WordPress/WordPress/blob/4.9.5/wp-includes/formatting.php#L912 The part that throws me off is that `sanitize_post_field` declares these three properties to be integers at the beginning of the function, so I sort of expected them to come out as integers on the other end." javorszky Future Releases 44288 Inconsistent saving of post slug / url field Posts, Post Types 4.9.6 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-06-01T04:08:43Z 2018-06-04T13:47:08Z "Firstly see the issue I raised on the woocommerce github: https://github.com/woocommerce/woocommerce/issues/20285 I'm trying to use characters such as +, &, * etc in post (in my particular case products) urls, but encoded first obviously (e.g. + becomes %2B). My process: See my process to recreate this issue on the github link. The good people over at the woocommerce github have said this is not a problem on their end but is actually a problem with the wordpress core, in particular how it saves post slugs / urls." rhurley Future Releases 57437 "Insecure Direct Object Reference in ""author"" parameter while making a page live Leads to Vertical Privilege Escalation on a Different Account" Posts, Post Types 6.1.1 normal normal Awaiting Review defect (bug) new dev-feedback 2023-01-10T03:59:47Z 2023-01-12T02:41:14Z "{I've reported it on hackerone, they said its a bug, report it as a bug} Description: There is an Insecure Direct Object Reference in the author parameter that lets a user, set the author id to a different author, which doesnt have the rights to edit/publish the page Steps To Reproduce: Create a Page. Click on settings ICON in the page in the editor. Note that in the page section you can edit the author of page, with the list of available users. Choose a legitimate user and intercept the request. Now in the request there is an author parameter which has the id of user ""author"":id,. Change this id to a user who doesn't have the right to publish or edit the post. 6.By changing the id to a user who has no role for the wordpress, you can see that the user is now the author for the page. Thanks! Please check attached video POC for more clarity. Recommendations Make sure to check for what values of author parameter are being parsed by the backend and check if the id being passed does have the right to do so. Impact Privilege Escalation For an Unintended User/Low priv user Bypass secure Design and post unwanted content from other's account." f41z4n Future Releases 53044 Issue on mobile device when try to post QUICK EDIT. Posts, Post Types 5.7.1 normal normal Awaiting Review defect (bug) new 2021-04-15T18:24:10Z 2021-05-13T16:00:24Z "Hi, I have setup updated WP latest version 5.7.1. and some UI issue on mobile device when i am trying to quick edit Post on mobile. More information you can see mentioned screenshot. Thank you" sumitsingh Future Releases 59058 Large URLs not fully shown in popup box Posts, Post Types 6.3 normal normal Awaiting Review defect (bug) reopened reporter-feedback 2023-08-10T18:01:32Z 2023-08-24T20:14:31Z "I can’t access the advanced settings of a link while linking a large URL because the side scroll simply doesn’t work. This issue started with WP 6.3. Here’s a pic of a large URL: https://imgur.com/a/KfUYqzr The scroll won’t go right, so I can’t for example set the link to open in a new tab." igordnt Future Releases 40786 Leading spaces are added to custom textarea metabox Posts, Post Types 4.7.5 normal normal Awaiting Review defect (bug) reopened 2017-05-17T14:22:55Z 2017-05-17T17:48:51Z "I am using `esc_atr(ltrim(rtrim(br2nl($meta_value))))` to place the value of post meta in textarea metabox I have created in my custom post type. {{{#!php }}} But whenever I go to edit the post, inside all textarea metaboxes values are pre-loaded with leading spaces (exactly 10 spaces) and additional line breaks! Also tried `esc_atr(trim(br2nl($meta_value)))` with no avail." subrataemfluence Future Releases 39624 Misleading warning when editing the page_for_posts page Posts, Post Types normal normal Awaiting Review defect (bug) new 2017-01-18T14:58:00Z 2018-01-15T17:44:25Z "Whilst I was using Twenty Seventeen, I discovered some unusual page locking. It seemed the blog page was locked and I was unable to edit it, despite it being apparently not locked. I've not experienced this before and whilst it feels like a rare experience, I wanted to bring it to attention incase there was something deeper wrong. [https://cldup.com/qn5iA2HXBR.mp4 Here is the video.] Along with this, I experienced a further issue that I almost feel needs another ticket but going to throw it in together. I found I could upload and change featured images, despite a page lock. This felt weird and something I'd expect to not be able to happen. Note: I can't see a pages component so putting under posts but unsure if correct placement." karmatosed Future Releases 45680 New Page Bug Posts, Post Types 5.0.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-12-17T20:23:10Z 2018-12-18T00:44:30Z I have installed an updated WordPress. When I create a new Page, I cannot add it to an existing menu because it is created as a new post versus a new page. LadySylvia Future Releases 59014 PHP Fatal error in post-template.php Posts, Post Types 6.3 normal minor Awaiting Review defect (bug) new 2023-08-09T03:40:21Z 2023-10-31T00:34:33Z "Hi there, I hope this email finds you well. Unfortunately, we've recently encountered a critical error that requires immediate attention. This issue pertains to the single page templates, specifically an example like this: https://volunteeringqld.org.au/governance/before-you-join/. The error was not present a week ago, and we're currently grappling to determine its cause. This problem was initially observed on both WP6.22 and WP6.3. The post https://volunteeringqld.org.au/governance/before-you-join/ connected to a single template php `mytemplate/single-governance-before-you-join.php`, what calls `` what throws error ""There has been a critical error in this website"" and output steam finishes. Log error gives this line: {{{ ""PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: WP_Post - int in /.../wp-includes/post-template.php:330 Stack trace: #0 /.../wp-includes/post-template.php(247): get_the_content() #1 /.../wp-content/themes/volunteeringAU/single-governance-before-you-join.php(411): the_content() #2 /.../wp-includes/template-loader.php(106): include('...') #3 /.../wp-blog-header.php(19): require_once('...') #4 /.../index.php(17): require('...') #5 {main} thrown in /.../wp-includes/post-template.php on line 330', referer: https://volunteeringqld.org.au/governance/"" }}} To address this, we have applied the following code snippet in `post-template.php` line 330: {{{ if( ! is_int($page_no)) { $page_no = 1; // Igor //echo ''; } }}} When echo ancommented it gives {{{ Array ( [page] => WP_Post Object ( [ID] => 5 [post_author] => 7 [post_date] => 2021-10-21 04:24:08 [post_date_gmt] => 2021-10-21 04:24:08 [post_content] => [post_title] => Home [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => home [to_ping] => [pinged] => [post_modified] => 2023-05-26 13:50:03 [post_modified_gmt] => 2023-05-26 03:50:03 [post_content_filtered] => [post_parent] => 0 [guid] => https://volunteeringqld.org.au/?page_id=5 [menu_order] => 0 [post_type] => page [post_mime_type] => [comment_count] => 0 [filter] => raw ) [more] => 1 [preview] => [pages] => Array ( [0] =>

    Achieving a good transition to the next volunteer who will take over from you has benefits for you, the organisation, and the incoming governance member. Let’s explore things you can do to ensure a good handover.

    In this stage of your Governance journey we explore:

    ) [multipage] => 0 ) }}} As you can see, instead of having 1 in `$elements['page']`, it contains a `WP_Post` object of the very first post from the database, even not the one that is displayed. We are hopeful that this information helps you in resolving the issue and that a solution will be included in an upcoming patch. Please don't hesitate to reach out if you require more details or assistance. Best regards, Igor " volqld Future Releases 44997 Parent page of a page is not kept when saved as draft then published Posts, Post Types 4.9.8 normal normal Awaiting Review defect (bug) new dev-feedback 2018-09-26T15:44:14Z 2018-09-27T17:56:40Z "Write a page (page1) Write an other page (page2). Make that page parent of page1. Save it as draft. Then publish it: clic on publish, change the published date, then publish. The parent page of page2 is not page1 anymore" korsani Future Releases 58062 Positioning of custom post type submenu Posts, Post Types 3.1 normal normal Awaiting Review defect (bug) new 2023-04-02T22:48:57Z 2023-04-12T19:21:47Z "''Current Functionality (since 3.1.0):'' One can add a CPT as a submenu of another CPT by setting the `show_in_menu` argument of the `register_post_type()` function as `edit.php?post_type=CUSTOM_CPT_SLUG`. The submenu is then added into the administration menu by way of the `_add_post_type_submenus()` function. When this occurs, the submenu CPT's are displayed in the order the CPTs were registered. ''Problem:'' The current coding prohibits the ordering of CPT submenu items per the programmer's desires in the event CPT registration is unable to be controlled or in the event other submenu pages are added via the `add_submenu_page()` method. This occurs because the call to [https://developer.wordpress.org/reference/functions/add_submenu_page/#source add_submenu_page()] by [https://developer.wordpress.org/reference/functions/_add_post_type_submenus/#source _add_post_type_submenus()] only passes 5 arguments. (The sixth omitted argument is what handles menu positioning.) ''Solution:'' The `menu_position` argument passed to the `register_post_type()` function already exists, and defines a CPT's positioning within a menu. The solution is to incorporate this argument into the core by modifying line 2079 of [https://core.trac.wordpress.org/browser/tags/6.2/src/wp-includes/post.php#L2079 wp-includes/post.php] as follows: {{{ add_submenu_page( $ptype_obj->show_in_menu, $ptype_obj->labels->name, $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, ""edit.php?post_type=$ptype"", isset($ptype_obj->menu_position) ? $ptype_obj->menu_position : NULL ); }}} " mort1305 Future Releases 53418 Post Status Transition missing Hook Posts, Post Types 5.7.2 normal blocker Awaiting Review defect (bug) new dev-feedback 2021-06-15T23:42:17Z 2021-06-15T23:42:17Z "REF: https://codex.wordpress.org/Post_Status_Transitions So I have been testing this and found there is an issue creating the post type **new to pending**: {{{#!php Two [@ UTC 1900 (my timezone is set to New York UTC-5 1300)] > One [@ UTC 1800 (my timezone is set to UTC 1800)] Since 1300 is before 1800. Ordered by my `date` ---- Proposed post sequence > One [@ UTC 1800 (my timezone is set to UTC 1800)] > Two [@ UTC 1900 (my timezone is set to New York UTC-5 1300)] Since 1800 is before 1900. Ordered by absolute `date_gmt`." nickylimjj Future Releases 27494 Posts page appears into search results Posts, Post Types 3.8.1 normal normal Future Release defect (bug) new close 2014-03-23T14:27:23Z 2020-03-03T22:50:07Z "Hi, if you set a static home page, so then a page for posts, this page is just a virtual page, because it doesn't have any content, just the title. But, if you search on the site for this title, the virtual page will be shown as search result. In my opinion this should be hidden." SGr33n Future Releases 49969 "Previewing the page designated as ""latest posts"" shows the frontpage" Posts, Post Types normal normal Future Release defect (bug) new 2020-04-21T11:32:13Z 2024-02-21T18:00:31Z "This continues the discussion from https://github.com/WordPress/gutenberg/issues/2409 **The issue** * Create two pages (let's call them ""My home"" and ""My posts"") * Go to customizer and set Homepage to be ""My home"" and Posts page to ""My posts"" * Edit ""My posts"" in editor mode * Press preview * Confirm you got ""My home"" instead of ""My posts"" **The root cause** When you click ""Open preview in new tab"" while editing ""My posts"", Gutenberg redirects to a preview URL like this one: https://mywpsite.com/?page_id=5&preview_id=5&preview_nonce=12bd60d6f4&preview=true When you visit that URL, WordPress will load the front page instead of the posts page. This is because class-wp-query.php assumes that posts page is also the front page: https://github.com/WordPress/WordPress/blob/b4373fafe9b87f75bf9d65e808be8049510dff8b/wp-includes/class-wp-query.php#L1032 Then, when rendering a preview, it substitutes the page_id that was requested with the value of get_option( 'page_on_front' ): https://github.com/WordPress/WordPress/blob/b4373fafe9b87f75bf9d65e808be8049510dff8b/wp-includes/class-wp-query.php#L1904 If I remove the preview parameters and leave only ?page_id=5, it displays the correct page." zieladam Future Releases 43754 "Problem with is_page() function when gets ""NULL"" parameter" Posts, Post Types 4.9.5 normal major Awaiting Review defect (bug) new reporter-feedback 2018-04-13T09:32:09Z 2020-06-04T23:36:40Z "Problem with function is_page() when it gets ""NULL"" parameter then return ""TRUE""" pawels Future Releases 55895 Register custom post statuses Posts, Post Types normal normal Awaiting Review defect (bug) new dev-feedback 2022-06-02T10:21:10Z 2022-06-02T13:42:04Z "When a developer register a custom post status with {{{ register_post_status() }}} The post status is not added to the visual parts of a post this means you can not set the post to this new status after register the new post status. There have been several workarounds to this adding functions to get them visible but with recent WP versions this seems to have stopped working. Another feature to add is regarding the {{{ get_post_statuses() }}} and {{{ get_page_statuses()}}} only returns a static array instead of checking the available post statues. There should also be a filter on this function to Add The correct label for your custom post status. Things to improve: - Expand get_post_statuses() and get_page_statuses() to actually return the registered statuses. Add a filter to be able to label your custom post status correctly. - When custom post status is added it should also be available: • In the post list overview the post status if not published should be in the name like (draft etc) • When quick editing / bulk editing the options of all post status types should be available. • When editing a post the post status should be available in the right settings column this should also work with the classic- and Gutenberg- mode. There is an old ticket with large thread about similar issues here: #12706." angryjim Future Releases 39942 Restored Post may steal slug to published Post Posts, Post Types 4.7.2 normal normal Awaiting Review defect (bug) new 2017-02-22T15:37:10Z 2017-02-22T15:49:15Z "Steps to reproduce: 1. Create a Post 1 with title ""Post"", 2. Assign the slug 'post' to Post 1, 3. Publish Post 1, 4. Unpublish Post 1 by setting it as 'Draft', then Update, 5. After Update, Trash Post 1, 6. Repeat 1-5 for Post 2, 7. Create a Post 3 with title ""Post"", 8. Assign the slug 'post' to Post 3, 9. Publish Post 3, 10. Now restore Post 2, 11. Open/Reload the edit screen for Post 3, 12. It'll show 'post-2' as slug, 13. Saving/Updating Post 3 will change the slug from 'post' to 'post-2'. Probably the following functions participate in the issue: * `wp_add_trashed_suffix_to_post_name_for_post`, which is checking for {{{ if ( '__trashed' === substr( $post->post_name, -9 ) ) { }}} while Post 2 has `post__trashed-2` as post name * `wp_unique_post_slug`, which is not checking the uniqueness of the slug if the post is `draft`." ziodave Future Releases 44805 Resurrecting post from trash reverts its slug Posts, Post Types 4.9.7 normal normal Awaiting Review defect (bug) assigned dev-feedback 2018-08-16T06:26:13Z 2018-08-30T00:53:02Z "=== Steps to reproduce Using the REST API: * Create a post * Delete the post (not forced) * Update the post's slug * Update the post's status to `publish` ==== Create `POST wp-json/wp/v2/posts` {{{#!json { ""status"": ""publish"", ""slug"": ""a"", ""title"": ""a"" } }}} ==== Delete `DELETE wp-json/wp/v2/posts/` ==== Update slug `POST wp-json/wp/v2/posts/` {{{#!json { ""slug"": ""foo"" } }}} ==== Update status `POST wp-json/wp/v2/posts/` {{{#!json { ""status"": ""publish"" } }}} === Expected Post should be published with a slug of `foo` (the updated value) === Actual Post is published with a slug of `a` (the old value) " ajmccluskey Future Releases 39443 Search Page Template the_category() bug Posts, Post Types 4.7 normal normal Awaiting Review defect (bug) new dev-feedback 2017-01-03T07:38:03Z 2020-01-04T03:30:46Z "Suppose If I've selected three categories following a structure HR -> Reports -> Daily Reports. Single.php shows the structure in the right way but when I use the same the_category () function inside Search template then it shows the different result. Rather than showing it in the default structure, it shows it like Daily Reports -> HR -> Reports. In search template the structure changes to order by name. The_category working perfectly in other pages." cybentizen Future Releases 57438 Slug is not generated when saving posts as draft Posts, Post Types normal normal Awaiting Review defect (bug) new dev-feedback 2023-01-10T04:28:22Z 2023-03-08T16:39:30Z "When saving posts as draft, the slug is empty. Only when publishing posts, the slug is generated. Slug should be auto-generated even when saving posts as draft. Steps to reproduce: - Add a new post (in the classic editor or Gutenberg) - Enter the post title - Save the post as draft - Reload the page (if in Gutenberg) and see the slug is empty" rilwis Future Releases 57737 Start composing post with same title as existing post, click Preview, post_title is set to point to existing post Posts, Post Types 6.1.1 normal normal Awaiting Review defect (bug) new has-patch 2023-02-16T19:58:43Z 2023-02-21T16:17:36Z "1. Start composing a new post. 2. Set the title of the post to be the same as the title of another recently published post. 3. Click Preview and then Preview in new tab. 4. Go look at the post_title column for the post in the wp_posts table in the database, and observe that it's pointing at the existing post whose title you used, not the new post. If you then publish the post, its link on your home page will be to the old post, not the new one." jikamens Future Releases 51374 The initial revision of an imported post goes missing Posts, Post Types normal normal Awaiting Review defect (bug) new 2020-09-22T09:58:24Z 2020-09-22T09:58:24Z "There are two problems relating to revisions when making a change to an imported post. 1. The first change does not cause the Revisions meta box to appear. A second change is required. 2. The first change gets ""lost"" and appears as if it was part of the first version of the post. Steps to reproduce: * Import a published post * Make a change to it * Observe that the ""Revisions"" meta box does not show up even after reloading the editing screen * Make a second change to the post * Click the ""2 Revisions"" link and observe that the second revision is recorded correctly, but that the first revision shows the entire contents of the post being added. The first change made ""disappears"" as it's incorrectly included in the entire contents of the first revision. I think the root cause here is that imported posts do not create an initial revision. A possible solution might be to create an initial revision at the point where a user makes a change to a post and there isn't an existing revision. I assume this can also be reproduced by deleting all the revisions from your database and then making changes to a post." johnbillion Future Releases 56241 The post category count according post data not showing on admin side. Posts, Post Types normal normal Awaiting Review defect (bug) new has-patch 2022-07-18T12:04:35Z 2022-07-18T20:49:12Z "we are created category as parent and child relationship. This category shows on the category listing with count number. The clicking on the count show all post which are assigned category and redirect to post listing page. But the no of count shows for parent category with child category. I mean to say not show only parent category count. Screenshots: [https://www.awesomescreenshot.com/image/30272055?key=d91d4077475e475448b781faf504be14 Categories screen] and [https://www.awesomescreenshot.com/image/30272057?key=b44d8d751e7f1ced24ae065b364a8c5a Posts listing]" rima1889 Future Releases 40588 Trashing and restoring a draft post replaces the slug Posts, Post Types 4.5 normal normal Awaiting Review defect (bug) new needs-unit-tests 2017-04-27T20:39:43Z 2018-07-31T14:57:32Z "Using the latest version of WordPress, if you create a draft post with a slug, lets say 'test-post', then trash it and restore it, the slug becomes {{{__trashed-xxx}}}, where xxx is a number Related to https://core.trac.wordpress.org/ticket/11863" TJNowell Future Releases 56136 Unable to move panels from below post editor content section to sidebar Posts, Post Types 5.0 normal normal Awaiting Review defect (bug) new reporter-feedback 2022-07-04T08:32:21Z 2022-07-20T18:20:41Z "I am having the same problem reported here https://wordpress.org/support/topic/additional-panels-appear-at-foot-of-page-edit-area-rather-than-in-tool-bar/. The ""Additional"" panels in the WordPress editor are appearing at the bottom of the page. When I try to drag and drop to the sidebar, an infinitely long horizontal scrollbar appears and keeps scrolling right. Screen capture video: https://drive.google.com/file/d/1Iy0G1I2OMgnOv4-grMApbY5V2W_l1kQs/view?usp=sharing" wpdev8195 Future Releases 44423 Unicode characters in get string breaks pagination Posts, Post Types 4.9.6 normal normal Awaiting Review defect (bug) reopened reporter-feedback 2018-06-21T11:59:20Z 2018-06-25T12:11:41Z "This was found when working with this plugin: [Ajax-Enabled Enhanced Layered Navigation](https://woocommerce.com/products/ajax-layered-navigation/) . If there are unicode characters used in a parameter in a get string, then it breaks pagination by not allowing access to page 2+. 1. Set your blog posts to display 1 per page 2. View blog 3. Append this to the url in address bar and hit enter: `?dddd%D7%99%D7%A6%D7%A8%D7%9F=metabo` 4. Once page reloads, try to go to page 2 5. You should receive a too many redirects error " jessepearson Future Releases 59354 Unnecessary queries performed when updating a post without providing categories or tags Posts, Post Types normal normal Awaiting Review defect (bug) new needs-unit-tests 2023-09-14T22:43:53Z 2023-09-14T22:43:53Z "Given an existing post with at least some categories or tags present, updating the post via `wp_update_post()` (which calls `wp_insert_post()`) with data that does not include categories or tags, many unnecessary taxonomy-related database queries are performed. This slows down the saving significantly. * If `$postarr` doesn't contain a `post_category` element, there's no point in calling `wp_set_post_categories()`. * If `$postarr` doesn't contain a `tags_input` element, there's no point in calling `wp_set_post_tags()` == Todo == * Need tests to verify the above is correct * Need a list of queries that are performed before and after the change == To reproduce == 1. Publish a post with at least one category 2. Update the post via: {{{#!php $id, 'post_content' => 'Hello, World!', ] ); }}} 3. Observe that a significant number of unnecessary taxonomy queries are performed" johnbillion Future Releases 48268 Updating failed. Error message: The response is not a valid JSON response. Posts, Post Types normal critical Awaiting Review defect (bug) new reporter-feedback 2019-10-10T05:26:03Z 2021-03-31T21:52:09Z "Hi, When i try to update the Page Template from default to full page then i am getting that error ""Updating failed. Error message: The response is not a valid JSON response."" in WordPress Version 5.3" phpdocs Future Releases 58134 Use correct plural of status Posts, Post Types normal normal Awaiting Review defect (bug) new 2023-04-15T06:58:24Z 2023-08-18T23:37:30Z "Core uses a variable named **$stati** (10 times to be found, in 3 files), but that's not the correct plural form of '**status**', neither in english, nor in latin or elsewhere. So I plead to change it to **$statuses**. While there seems to be no decent rule for variable names, so technically the variable could be named $stsii or whatever, still we are called to not {{{ ""abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting."" }}} see https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/ Also, as we all know, ""**Code is Poetry**"", isn't it? Now you could argue poetry has some freedoms, but I strongly believe it should use correct grammar, at least in this case. So I may have convinced you finally of that one, but there's one more issue: There's also a function {{{ get_post_stati() }}} see https://developer.wordpress.org/reference/functions/get_post_stati/ c'mon, let's rename it to **get_post_statuses**, while we're on it. You may think this is petty, but it gave me some confusion and after all it's just wrong. Let's get rid of an usage of a plural form which doesn't exist. " Presskopp Future Releases 37917 Users without the edit_private_posts capability can still create private posts Posts, Post Types 2.1 normal normal Awaiting Review defect (bug) new dev-feedback 2016-09-01T21:32:26Z 2019-04-19T13:20:11Z "Currently, users without the ""edit_private_posts"" capability, can still view the ""Private"" radio button under ""Visibility"". They can also save / publish the post (depending on their capabilities) with no issue. The same goes for pages as well with the ""edit_private_pages"" capability. I think it's reasonable enough to assume that users that don't have the ""edit_private_{post_type}"" capability, shouldn't be able to create posts with a visibility of private." ryan.kanner Future Releases 40521 Using a custom query var on a static front page results in wrong $post Posts, Post Types 4.7.4 normal normal Awaiting Review defect (bug) new 2017-04-21T20:52:36Z 2017-04-22T09:15:03Z "'''Steps to reproduce:''' * Create a page and make it the static front page * Add a new query var via filter in theme's functions.php: `add_filter( 'query_vars', function( $vars ) { array_push( $vars, 'buggy' ); return $vars; } );` * Open the front page setting the newly added query var (e.g. ""https://example.com/?buggy=yep"") '''Result:''' displays the latest blog post '''Expected result:''' displays front page" mechter Future Releases 58714 View post link issue in post/article listing screen Posts, Post Types normal normal Awaiting Review defect (bug) new 2023-07-05T10:04:19Z 2023-07-05T10:04:19Z "Hello, View post or permalink not generated when ""public"" argument is ""false"" in custom post type but ""View"" link show in post/article listing screen if ""public"" argument is ""false"" so It should be not shown in listing screen" hiren1094 Future Releases 54720 WP_List_Table Inside Metabox With Bulk Actions Not Working on Submit Posts, Post Types 5.8.2 normal normal Awaiting Review defect (bug) new dev-feedback 2022-01-03T11:40:53Z 2022-01-03T11:40:53Z "I'm trying to display a WP_List_table inside a metabox. The metabox is for questions which are from assessment_question custom post type.The metabox is being displayed on an other custom post type 'cs_questionnaire'. The table columns display some data taken from questions. Also I am using bulk actions to link questions to a questionnaire. What's happening is that it all looks fine until I click the Publish/Update button on the custom post type edit screen. If the WP_List_Table has bulk actions it will redirect back to the /wp-admin/edit.php page, if I remove the bulk actions then it Works fine. And in both cases, the nonce stays the same and no extra nonce is created. I've whole code below. I have already overridden the display_tablenav function by commenting the nonce generating code. It stops working when I provide bulk actions else it works fine with the following code. {{{#!php data /** Class constructor */ public function __construct() { parent::__construct( array( 'singular' => __( 'Question', 'conditional-shortcode' ), // singular name of the listed records 'plural' => __( 'Questions', 'conditional-shortcode' ), // plural name of the listed records 'ajax' => false, // does this table support ajax? ) ); } /** * Function to filter data based on order , order_by & searched items * * @param string $orderby * @param string $order * @param string $search_term * @return array $users_array() */ public function list_table_data_fun( $orderby = '', $order = '', $search_term = '' ) { $args = array(); $questions_array = array(); $questions = ''; $flag = false; if ( ! empty( $search_term ) ) { $args = array( 'fields' => 'ids', 'orderby' => $orderby, 'order' => $order, 'search' => intval( sanitize_text_field( $_REQUEST['s'] ) ), 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); } else { if ( $order == 'asc' && $orderby == 'id' ) { $args = array( 'orderby' => 'ID', 'order' => 'ASC', 'fields' => 'ids', 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); } elseif ( $order == 'desc' && $orderby == 'id' ) { $args = array( 'orderby' => 'ID', 'order' => 'DESC', 'fields' => 'ids', 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); } elseif ( $order == 'desc' && $orderby == 'title' ) { $args = array( 'orderby' => 'name', 'order' => 'DESC', 'fields' => 'ids', 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); } elseif ( $order == 'asc' && $orderby == 'title' ) { $args = array( 'orderby' => 'name', 'order' => 'ASC', 'fields' => 'ids', 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); } else { $args = array( 'orderby' => 'ID', 'order' => 'DESC', 'fields' => 'ids', 'post_type' => 'assessment_question', 'posts_per_page' => -1, ); $flag = true; } } $questions = get_transient( 'pd_questions' ); if ( $flag == false ) { $questions = get_posts( $args ); } elseif ( $flag == true && ! $questions ) { $questions = get_posts( $args ); set_transient( 'pd_questions', $questions, 1 * DAY_IN_SECONDS ); } if ( count( $questions ) > 0 ) { foreach ( $questions as $question_id ) { $question = get_post_meta( $question_id ?? 0, CONDITIONAL_SHORTCODE_ASSESSMENT_QUESTION_META, true )['question'] ?? 'NA'; $questions_array[] = array( 'id' => $question_id, 'title' => '' . get_the_title( $question_id ) . '', 'question' => $question, ); } } return $questions_array; } // prepare_items public function prepare_items() { $orderby = sanitize_text_field( isset( $_GET['orderby'] ) ? trim( $_GET['orderby'] ) : '' ); $order = sanitize_text_field( isset( $_GET['order'] ) ? trim( $_GET['order'] ) : '' ); $search_term = sanitize_text_field( isset( $_POST['s'] ) ? trim( $_POST['s'] ) : '' ); if ( $search_term == '' ) { $search_term = sanitize_text_field( isset( $_GET['s'] ) ? trim( $_GET['s'] ) : '' ); } $datas = $this->list_table_data_fun( $orderby, $order, $search_term ); $per_page = 30; $current_page = $this->get_pagenum(); $total_items = count( $datas ); $this->set_pagination_args( array( 'total_items' => $total_items, 'per_page' => $per_page, ) ); $this->items = array_slice( $datas, ( ( $current_page - 1 ) * $per_page ), $per_page ); $columns = $this->get_columns(); $hidden = $this->get_hidden_columns(); $sortable = $this->get_sortable_columns(); $this->_column_headers = array( $columns, $hidden, $sortable ); $this->process_bulk_action(); } public function get_bulk_actions() { return array( 'add_questions' => __( 'Add Questions', 'conditional-shortcode' ), 'remove_questions' => __( 'Remove Questions', 'conditional-shortcode' ), ); } // get_columns public function get_columns() { $columns = array( 'cb' => '', 'id' => __( 'ID', 'conditional-shortcode' ), 'title' => __( 'Title', 'conditional-shortcode' ), 'question' => __( 'Questions', 'conditional-shortcode' ), 'action' => __( 'Action', 'conditional-shortcode' ), ); return $columns; } public function get_hidden_columns() { return array( '' ); } public function get_sortable_columns() { return array( 'title' => array( 'title', true ), 'id' => array( 'id', true ), ); } /** * Generate the table navigation above or below the table. * * @since 3.1.0 * @access protected * * @param string $which */ protected function display_tablenav( $which ) { // REMOVED NONCE -- INTERFERING WITH SAVING POSTS ON METABOXES // Add better detection if this class is used on meta box or not. /* if ( 'top' == $which ) { wp_nonce_field( 'bulk-' . $this->_args['plural'] ); } */ ?>
    "">
    bulk_actions( $which ); ?>
    extra_tablenav( $which ); $this->pagination( $which ); ?>
    Add Question'; default: return 'no value'; } } public function column_title( $item ) { $post_id = get_the_ID(); $action = array( 'edit' => sprintf( 'Add Question', $post_id, 'edit', 'add_question', $item['id'], $post_id ), ); return sprintf( '%1$s %2$s', $item['title'], $this->row_actions( $action ) ); } function column_cb( $item ) { return sprintf( '', $item['id'] ); } function no_items() { esc_html_e( 'No Questions Found.', 'conditional-shortcode' ); } public function process_bulk_action() { // security check! if ( isset( $_POST['_wpnonce'] ) && ! empty( $_POST['_wpnonce'] ) ) { $nonce = filter_input( INPUT_POST, '_wpnonce', FILTER_SANITIZE_STRING ); $action = 'bulk-' . $this->_args['plural']; if ( ! wp_verify_nonce( $nonce, $action ) ) { wp_die( 'Nope! Security check failed!' ); } } $action = $this->current_action(); switch ( $action ) { case 'delete_questions': wp_die( 'Delete something' ); break; case 'add_questions': wp_die( 'Save something' ); break; default: // do nothing or something else return; break; } wp_redirect( esc_url( add_query_arg() ) ); exit; return; } } /** * Shows the List table for all questions. * * @return void */ function conditional_shortcode_questions_list_table_layout() { $table = new Class_Conditional_Shortcode_Questions_Listing(); printf( '

    %s

    ', __( '', 'conditional-shortcode' ) ); echo ''; $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRIPPED ); $paged = filter_input( INPUT_GET, 'paged', FILTER_SANITIZE_NUMBER_INT ); printf( '', $page ); printf( '', $paged ); $table->prepare_items(); // this will prepare the items AND process the bulk actions $table->search_box( __( 'Search question by id' ), 'conditional-shortcode' ); // Needs To be called after $myRequestTable->prepare_items() $table->display(); echo ''; echo '
    '; } conditional_shortcode_questions_list_table_layout(); }}} I was able to resolve this issue by changing the value of name attribute of bulk actions select field. Like from name to names. What I think the issue could be is when here the name=""action"" for this select and it has some value xyz on the other side WordPress save post looks for action to be equal to edit. Can we provide a way of changing this name attributes value either by providing a filter or by changing it. But I think changing name attribute would require a lot of other code changes so its better to provide a filter for custom use. Or add a comment on top so someone else using WP LIST Table in a metabox must override this function with custom value to name attribute. For clarity I changed This echo '\n""; Thanks! " muhammadfaizanhaidar Future Releases 41857 Walker_PageDropdown doesn't set correct selected value when using value_field Posts, Post Types 4.8.1 normal normal Awaiting Review defect (bug) new 2017-09-11T17:16:16Z 2020-07-22T16:55:25Z "If the ''value_field'' is different from ID, the selected value was not set. Function Walker_PageDropdown::start_el {{{ if ( $page->ID == $args['selected'] ) $output .= ' selected=""selected""'; }}} See also #32330 " it4life Future Releases 32773 You cannot move Private nor Passworded posts to Draft. You must make them public first. Posts, Post Types normal normal Awaiting Review defect (bug) new 2015-06-24T03:30:09Z 2017-07-03T16:32:40Z "This is an odd quirk of the editor and might be a security issue for some. However, there is no option from the main editor to move a post directly to draft status from Private nor from Passworded status. I suspect you can trash the post first and then mark it as draft and maybe you could do it from the quick edit. In any case marking as draft should be able to be done from within the actual editor without the disclosure of private information. NOTE: This kinda is a security issue, but not in the way the check box is asking about. It is procedural. So I'm marking ""I am not reporting a security issue.""" BrianLayman Future Releases 48622 `editable_slug` filter does not pass the correct value Posts, Post Types 5.3 normal normal Future Release defect (bug) new 2019-11-14T05:23:52Z 2019-11-14T15:36:42Z "''Originally reported in https://github.com/WordPress/gutenberg/issues/15802.'' **Describe the bug** When using the block editor, the 1st param $post_name passed to the editable_slug filter hook is not the same as the classic editor, which is the expected one. **To reproduce** 1. Install Classic Editor to switch from block to classic 2. Create a draft post with title ""the post title"" and slug ""this-is-the-slug"" 3. Create a muplugin with: add_filter( 'editable_slug', function( $post_name ) { wp_die( $post_name ); } ); 4. Refresh your edit page **Expected behavior** With the classic editor you should have ""this-is-the-slug"" but when using block editor you have ""the-post-title"", sounds like the post_title sanitize with sanitize_title, it should be the real post_,name like classic is doing." noisysocks Future Releases 45764 blog page and homepage the same list pages and not posts Posts, Post Types 5.0.2 normal minor Awaiting Review defect (bug) reopened dev-feedback 2018-12-25T11:47:36Z 2019-12-12T19:24:07Z "Hi I don't know when this was changed but if you set the same page as blog page aswell as your homepage the website starts listing pages on that blog and home page and not posts. Why was this changed and when? Thanks for any advice. " BackuPs Future Releases 53383 bug: pre_get_posts modify vs posts (pages, etc) found numbers Posts, Post Types 5.7.2 normal normal Awaiting Review defect (bug) new 2021-06-11T13:22:50Z 2021-06-11T13:22:50Z "Dear WP! I'm pretty sure I've just found a bug. I want to hide certain posts, pages, media elements and custom post type posts from users. These posts are filtered by their IDs with a pre_get_posts action. The filter itself works well, but the displayed found numbers (on the top of the page) are invalid. On the bottom it's ok again. {{{#!php set('post__not_in', array(5800)); } } } add_action('pre_get_posts', 'mod_func', 999); }}} Screenshot: [https://webgeek.hu/wp-bug-post-counter.jpg] Hope you can understand me, I'm not the best in English. If you have questions, feel free to ask me. Thanks for helping in advance (and thanks for working hard for years), Sincerely, Somogyi Balázs " err Future Releases 55442 count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/post-template.php on line 319 Posts, Post Types normal normal Awaiting Review defect (bug) new reporter-feedback 2022-03-22T21:59:34Z 2022-03-22T23:41:57Z "Call get_the_content() with no arguments and $post is null. If post is null then this is ran: {{{#!php $elements = compact( 'page', 'more', 'preview', 'pages', 'multipage' ); }}} Associate array has keys with null values. Then on lin3 319 is {{{#!php if ( $elements['page'] > count( $elements['pages'] ) ) { }}} Which causes this notice: {{{ Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/post-template.php on line 319 Notice: Trying to access array offset on value of type null in /var/www/html/wp-includes/post-template.php on line 325 }}} " davidscpl Future Releases 43084 dashboard confuses published posts count with all posts Posts, Post Types 2.7 normal normal Awaiting Review defect (bug) new 2018-01-13T23:22:05Z 2019-05-15T08:11:35Z "the following is a good first bug for new contributors, IMO! because it's very easy to fix https://core.trac.wordpress.org/tickets/good-first-bugs in dashboard, in ""at a glance"" section there's a misleading link: 1. its hyper reference uri leads to list of '''all existing''' posts /wp-admin/edit.php?post_type=post there are currently 26 posts in my blog 2. its label is ""8 posts"" where 8 -- is the number of '''currently published''' posts /wp-admin/edit.php?post_status=publish&post_type=post there are currently 8 published posts in my blog 3. its icon is the pushpin. and the pushpin usually means '''sticky''' posts /wp-admin/edit.php?post_type=post&show_sticky=1 there are currently 1 sticky post in my blog thus, as you can see, this link confuses ""all posts (26)"" with ""published posts (8)"" AND with ""sticky posts (1)"" I know, WordPress uses pushpin icon to indicate any post, so, maybe, I'm wrong about sticky posts. But I'm definitely not mistaken in that you cannot label the link as ""8 posts"" and make it refer to the list of 26 posts -- it should be fixed. Either label should be ""26 posts"" or it should go to list of published posts. IMO, the latter choice (lead to published posts)." awardpress Future Releases 47427 deleted pages for a plugin prevent page creation during re-installation of plugin Posts, Post Types 5.2.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-05-29T13:56:00Z 2019-06-01T12:07:13Z "Plugin xyz creates pages 'login' and 'registration' when it is installed. Those pages are subsequently deleted (moved to trash) and the plugin is uninstalled. If the plugin is then re-installed it will not be able to create 'login' and 'registration' because these pages are sitting in trash. That should not happen because an active 'login' page should not be equal to a 'login' page in trash, they should be separate and distinct page instances which cannot affect each other unless the user takes explicit action (similar to the philosophy behind package installation in Linux): 1. The current behavior should be modified to allow concurrent active and trash instances of the same page. 2. A plugin should have a force option for creating pages. 3. There should be a force restore from trash option. The user would need to be warned, but it should be their choice. " nbi1 Future Releases 57507 function wp_unique_post_slug inconsistent for numerical page slugs, e.g. 404 Posts, Post Types 6.1.1 normal minor Awaiting Review defect (bug) new dev-feedback 2023-01-19T11:03:36Z 2023-01-19T11:03:36Z " {{{ if ( $post_name_check || in_array( $slug, $feeds, true ) || 'embed' === $slug || preg_match( ""@^($wp_rewrite->pagination_base)?\d+$@"", $slug ) || $is_bad_hierarchical_slug ) }}} Will always return true for preg_match as long as 'page' is optional and it is a numerical slug, e.g. 404 {{{ preg_match( ""@^($wp_rewrite->pagination_base)?\d+$@"", $slug ) preg_match( ""@^(page)?\d+$, 404"") => 1 }}} Assuming pagination is the point for this check, a possible solution could be to check if post pagination navigation exists first. {{{#!php $pagination_based = get_the_post_navigation() ? preg_match( ""@^($wp_rewrite->pagination_base)?\d+$@"", $slug ) : false; if ( $post_name_check || in_array( $slug, $feeds, true ) || 'embed' === $slug || pagination_based || $is_bad_hierarchical_slug ) }}} Suggestion: Either allow numerical slugs if it does not interfere with paginations, or disallow it with a warning. " arve5 Future Releases 32651 get_adjacent_post() doesn't return posts with the same date Posts, Post Types 4.3 normal normal Future Release defect (bug) new 2015-06-15T05:48:40Z 2019-06-24T05:28:53Z "When using `get_adjacent_post()` on a post, the query skips posts with exactly same date and time. In a blog context, the problem is rarely encountered, but it's more present when posts are added programmatically." willybahuaud Future Releases 8107 get_next_post, get_previous_post do not work for posts posted within same second Posts, Post Types 2.7 normal normal Future Release defect (bug) new dev-feedback 2008-11-08T12:34:22Z 2018-12-09T21:00:15Z "if you have posts that are published shortly one after the other (e.g. through a script or plugin that posts several posts at once) several of them may end up having the same post_date in the wordpress database table. this is due to the fact that mysql datetime seems to only maintain a precision of one second (see also this discussion: http://bugs.mysql.com/bug.php?id=8523). the problem now is that wordpress functions like get_next_post/get_previous_post (get_adjacent_post resp.) will no longer work correctly if something like this happens as they solely rely on a comparison of the post_date field and they don't treat the case where these timestamps are the same for several posts. the result is that e.g. get_next_post will pick one of the posts having the same timestamp and ""jump"" over the others, so the user will never see them. i see two possibilities around this 1.) treat cases with the same post_date by e.g. looking also at the post id (assuming it is always strictly increasing) or probably preferably 2.) make sure that no two posts have the same post_date timestamp by e.g. increasing post_date artificially when publishing the post and if another post already has the same timestamp. " whoismanu Future Releases 54964 get_permalink() does not use the correct slug rewrite base Posts, Post Types 5.9 normal blocker Awaiting Review defect (bug) new reporter-feedback 2022-01-27T22:10:49Z 2023-10-04T11:54:50Z "Hello, get_permalink does not work well for custom posts with slug rewrite. E.g. I have implemented articles post type: {{{#!php array('slug' => _x('articles','slug','mydomain')),...)); }}} 'articles' is translateD to slovak language as 'clanky'. But **get_permalink({id_of_article})** returns '''localhost:10010/articles/my-title'''. It is wrong and i have recieve error 404, because right link is '''localhost:10010/clanky/my-title'''. It works OK for older WP version. Thanks a lot for any result. Kind regards, Ondrej Jakuba " jakubaondrej Future Releases 41355 get_post_status filter is ignored in some cases Posts, Post Types 4.8 normal normal Awaiting Review defect (bug) new 2017-07-18T11:55:09Z 2017-07-18T11:55:09Z "Code: {{{#!php ID; $cid = $_POST['catid']; $dates = $_POST['dates']; $pages = $_POST['page']; $datesArray = explode('-', $dates); $datemonth = date_parse($datesArray[0]); if($pages){ $pages = $pages; }else{ $pages = 1; } if($cid != 'all'){ $tax_query = array( array( 'taxonomy' => 'category', 'field' => 'id', 'terms' => $cid ) ); }else{ $tax_query = ''; } if($dates != 'all'){ $date_query = array( 'relation' => 'AND', array( 'year' => $datesArray[1], 'month' => $datemonth['month'], 'compare' => '=', ), ); }else{ $date_query = ''; } $args = array( 'post_type' => 'post', 'orderby' => 'ID', 'post__not_in' => array($latestpost), 'order' => 'DESC', 'posts_per_page' => 6, 'paged' => $pages, 'tax_query' =>$tax_query, 'date_query' =>$date_query ); $the_query = new WP_Query( $args ); $totalPage = $the_query->max_num_pages; if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $images = wp_get_attachment_image_src( get_post_thumbnail_id( $the_query->ID ), 'single-post-thumbnail' ); $html .='

    '.get_the_title().'...

    '.get_the_date().'

    READ MORE
    '; endwhile; endif; wp_reset_postdata(); wp_reset_query(); if($totalPage >1){ $html .='
      '; if($pages > 1 ){ $j = $pages-1; $html.='
    • Prev
    • '; } for($i=1; $i<=$totalPage; $i++){ if($i == $pages){ $activeClass = 'active'; }else{ $activeClass = ''; } $html.='
    • '.$i.'
    • '; } if($pages < $totalPage ){ $j = $pages+1; $html.='
    • Next
    • '; } $html.='
    '; } echo $html; die(); } }}} " sumitsingh Future Releases 43618 get_the_excerpt breaking wp-json API Posts, Post Types 5.0 normal normal Awaiting Review defect (bug) new 2018-03-23T13:35:23Z 2019-01-17T01:18:57Z "When creating a dynamic block for Gutenberg I added this code to a plugin: {{{ register_block_type( 'my-plugin/latest-post', array( 'render_callback' => 'my_plugin_render_block_latest_posts', ) ); function my_plugin_render_block_latest_posts( $atts ) { $output = ''; $args = array( 'posts_per_page' => 3, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); $output .= '
  • '; $output .= get_the_excerpt(); $output .= '
  • '; endwhile; wp_reset_postdata(); else : $output .= 'No posts found.'; endif; return $output; } }}} For some reason, get_the_excerpt is causing this error in /wp-json/wp/v2/posts: Fatal error: Maximum function nesting level of '256' reached, aborting! in /app/public/wp-includes/plugin.php on line 899 When I remove get_the_excerpt() or replace it with get_the_content() the error disappears. I use 'Local by Flywheel' and this is happening on PHP5.6 and 7" DannyCooper Future Releases 50438 item_ labels do not work once registered in a post type Posts, Post Types normal normal Awaiting Review defect (bug) new close 2020-06-20T09:38:42Z 2023-10-04T11:02:23Z "Labels starting with prefix item_ from here: https://developer.wordpress.org/reference/functions/get_post_type_labels/ Are not used in the dashboard when registering them in a custom post type. {{{#!php _x( 'Cars', 'Post Type General Name', 'abcde' ), 'singular_name' => _x( 'Car', 'Post Type Singular Name', 'abcde' ), 'menu_name' => __( 'Cars', 'abcde' ), 'name_admin_bar' => __( 'Car', 'abcde' ), 'archives' => __( 'Car Archives', 'abcde' ), 'attributes' => __( 'Car Attributes', 'abcde' ), 'parent_item_colon' => __( 'Parent Car:', 'abcde' ), 'all_items' => __( 'All Cars', 'abcde' ), 'add_new_item' => __( 'Add New Car', 'abcde' ), 'add_new' => __( 'Add New', 'abcde' ), 'new_item' => __( 'New Car', 'abcde' ), 'edit_item' => __( 'Edit Car', 'abcde' ), 'update_item' => __( 'Update Car', 'abcde' ), 'view_item' => __( 'View Car', 'abcde' ), 'view_items' => __( 'View Cars', 'abcde' ), 'search_items' => __( 'Search Car', 'abcde' ), 'not_found' => __( 'Not found', 'abcde' ), 'not_found_in_trash' => __( 'Not found in Trash', 'abcde' ), 'featured_image' => __( 'Initial Image', 'abcde' ), 'set_featured_image' => __( 'Set initial image', 'abcde' ), 'remove_featured_image' => __( 'Remove initial image', 'abcde' ), 'use_featured_image' => __( 'Use as initial image', 'abcde' ), 'insert_into_item' => __( 'Insert into Car', 'abcde' ), 'uploaded_to_this_item' => __( 'Uploaded to this Car', 'abcde' ), 'items_list' => __( 'Cars list', 'abcde' ), 'items_list_navigation' => __( 'Cars list navigation', 'abcde' ), 'filter_items_list' => __( 'Filter Cars list', 'abcde' ), 'item_published' => __( 'Car published', 'abcde' ), 'item_published_privately' => __( 'Car published privately', 'abcde' ), 'item_reverted_to_draft' => __( 'Car reverted to draft', 'abcde' ), 'item_scheduled' => __( 'Car scheduled', 'abcde' ), 'item_updated' => __( 'Car updated', 'abcde' ), ); $capabilities = array( 'edit_post' => 'update_core', 'read_post' => 'update_core', 'delete_post' => 'update_core', 'edit_posts' => 'update_core', 'edit_others_posts' => 'update_core', 'delete_posts' => 'update_core', 'publish_posts' => 'update_core', 'read_private_posts' => 'update_core' ); $args = array( 'label' => __( 'Car', 'abcde' ), 'description' => __( 'Post Type Description', 'abcde' ), 'labels' => $labels, 'supports' => array( 'title', 'thumbnail' ), 'hierarchical' => false, 'public' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 40, 'menu_icon' => 'dashicons-businessman', 'show_in_admin_bar' => true, 'show_in_nav_menus' => false, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => true, 'publicly_queryable' => false, 'rewrite' => false, 'capabilities' => $capabilities, 'show_in_rest' => false, ); register_post_type( 'abcde_car', $args ); }}} e.g. on post update the notice is Post updated. Not Car updated. " ninetyninew Future Releases 11311 kses converts ampersands to & in post titles, post content, and more Posts, Post Types 2.9 normal normal Future Release defect (bug) new 2009-12-03T01:49:32Z 2022-08-03T15:41:48Z "Make a test user that has the ""author"" role (i.e. no `unfiltered_html`) and write a post with a title that has `&` in it. After saving, it will becomes `&` due to `wp_filter_kses()`. It gets saved in the database this way too. It's confusing to the user." Viper007Bond Future Releases 49805 missing get_the_title / confusing the_title filter Posts, Post Types 5.5 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-04-04T08:52:05Z 2020-04-04T15:19:16Z "I and probably many others (e.g. #39848) got problems with filtering H1 - the problem is, that in most templates (and also in twenty twenty) there is no way how to filter H1. There is the_title function, that encloses the get_the_content() result with defined prefix and suffix, but this the_title function has no filter! And what is VERY confusing - there is the_title filter, but that filter is not called from the_title function, but from get_the_title function! I understand that it would be probably very difficult to move that the_title function where it belongs and replace it with proper get_the_title filter, but i believe there must be some quick way, e.g. that proposed wrap (but i would recommend to add all the arguments of the the_title function, so resulting in apply_filters( 'the_title_wrap', $title, $before, $after, $echo ); This way we could easily filter the result based on any option. " thomask Future Releases 43689 next_post_link()/previous_post_link() broken for custom post types in same custom taxonomy term Posts, Post Types 4.9.5 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-04-04T09:11:13Z 2022-05-26T22:22:37Z "The link to the next post is being displayed however the third parameter $in_same_term seems to be completely ignored even though parameter $taxonomy is correct (https://codex.wordpress.org/Function_Reference/next_post_link). E.g. you are on singular pages of a custom post type ""Job"". You want to have the next post link of ""Jobs"" which are in the same ""Job Group"" (a custom taxonomy) e.g. ""Developer"". However next post link will deliver a next Job which is in the ""Job Group"" ""Graphic Designer"" even though $in_same_term was set to true." Blackbam Future Releases 49343 post attributes not saving post order Posts, Post Types 5.3.2 normal normal Awaiting Review defect (bug) new has-patch 2020-02-02T16:31:17Z 2020-02-02T21:08:15Z "the post attributes are not saving post order once the number of posts added has reached the amount to display in reading settings. I set my posts to display post attributes order. {{{ add_action( 'admin_init', 'posts_order_wpse_91866' ); function posts_order_wpse_91866() { add_post_type_support( 'post', 'page-attributes' ); } }}} They were all saving fine and showing in order until I got to my 11th post. My reading settings are set to 10 per page. All of a sudden my posts orders had all been reset to zero. Now trying to add the order again to the posts is not even saving the order amount when republished. It seems to be a bug in the Rest API somewhere because it was working until it got to my reading settings display limit." shadiadi Future Releases 48201 post_updated_messages event stop working version 5.2.3 Posts, Post Types 5.2.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-10-03T11:35:18Z 2019-10-09T08:10:20Z "I really think that there is some problem with post_updated_messages event in 5.2.3 version. Tried the same code in vanila vrsion 4.9.11 and vanila 5.2.3. In 4.9.11 messages are overwritten and they are working good in 5.2.3 nothing’s happened. Try to add next code in wp-content/plugins/hello.php and activate Hello Dolly plugin: {{{#!php ID); $messages['post'] = array( 0 => '', 1 => sprintf( __('Article updated. View post', 'frl'), esc_url($permalink)), 2 => __('Custom field updated.', 'frl'), 3 => __('Custom field deleted.', 'frl'), 4 => __('Article updated.', 'frl'), 5 => isset($_GET['revision']) ? sprintf(__('Article restored to revision from %s', 'frl'), wp_post_revision_title((int)$_GET['revision'], false)) : false, 6 => sprintf( __('Article published. View post'), esc_url($permalink)), 7 => __('Article saved.', 'frl'), 8 => sprintf( __('Article submitted. Preview', 'frl'), esc_url(add_query_arg('preview','true', $permalink))), 9 => __('Article scheduled. Preview', 'frl'), 10 => sprintf( __('Article draft updated. Preview', 'frl'), esc_url(add_query_arg('preview', 'true', $permalink))) ); return $messages; } add_filter('post_updated_messages', 'frl_change_post_updated_labels'); }}} Also tried adding new category ‘article’ instead of ‘post’ and create new array $messages[‘article’] and assinged post to article category but it is working the same. So the problem exists in both cases: – when we want to overwrite existing messages (post, page, attachment) – when we want to add the new message type I would be very thankful if someone helps me with solving this. Tnx." majavsc Future Releases 60427 "small ""ü"" in page as anchor causes a mistake when try to save (wrong JSON-response)" Posts, Post Types 6.4.3 normal minor Awaiting Review defect (bug) assigned 2024-02-02T19:00:04Z 2024-02-02T19:00:04Z "I tried to make some changes on a page with pre-block content. It contains some anchors and everytime I tried to save the page after some small changes I got the alert ""Aktualisierung fehlgeschlagen. Die Antwort ist keine gültige JSON-Antwort."". The well know answer that there is something wrong with JSON. I found the reason is that in the anchors where small ""ü"" (a german umlaut). It happened with the anchor target as well as with the anchor link. And at the same time there are some anchors with other umlauts, namely with a big ""Ü"", which do not cause the issue." gregordoehnert Future Releases 43036 the_posts_pagination() - redirect URL for first page in category Posts, Post Types 4.9.1 normal normal Awaiting Review defect (bug) new 2018-01-06T20:51:56Z 2018-01-06T20:51:56Z "When you are on the second, third, etc. the page function `the_posts_pagination ()` outputs a link to the first page for the current category with a slash `/` at the end of the URL: {{{ /category/category-1/ }}} But when clicking on a link, a redirect to the page takes place without a slash `/` on the end: {{{ /category/category-1 }}} A link to the following pages from this category is displayed already without a slash on the end of the URL: {{{ /category/category-1/page/2 }}} Permalink at the same time on the site are configured to look like this: {{{ /%postname%.html }}}" webliberty Future Releases 46555 update fails when I have a print statement in my code. Posts, Post Types 5.1 normal minor Awaiting Review defect (bug) new reporter-feedback 2019-03-18T11:38:41Z 2019-03-18T18:12:42Z "I get the the pink bar message ""update failed"", when I attempt to update a page that has an executed print statement in the code. The file saves/updates, even though there is an error message. Can the message be changed to ""update returned unexpected characters"" or some such. running wordpress 5.1.1 " rweil55 Future Releases 44991 wp-login.php postpass no redirect Posts, Post Types 4.9.8 normal normal Awaiting Review defect (bug) new dev-feedback 2018-09-25T14:52:12Z 2018-09-26T17:47:34Z "I'm running wordpress 4.9.8 on an Archlinux host. Whenever I try to password protect a post, the redirection after entering the correct password fails. Going back to the post using the browser history works, and the post is unlocked, but only a blank page is visible to the user after entering the password. I suspect {{{ wp_get_referer(); }}} to be the root of the problem. I've added some debug output to the code: {{{ $referer = wp_get_referer(); if ( $referer ) { $secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) ); print ""True""; } else { $secure = false; print ""False""; } }}} and it prints ""False"" on that formerly blank white page after entering the password. Also adding {{{ print $referer; print $_SERVER['HTTP_REFERER']; }}} to the code prints nothing. I've tested different up-to-date browsers: Firefox, Chromium on Linux, Firefox, Opera on Windows 8.1, Firefox Klar, Safari on iOS, to no avail. Only Internet Explorer on Windows 8.1 works as expected, the redirect occurs immediately. Any ideas what could cause this problem, or how to further debug this?" lukelr Future Releases 43672 wp_delete_post() function ignores `$force_delete` parameter for custom post types Posts, Post Types normal normal Awaiting Review defect (bug) new dev-feedback 2018-04-02T05:23:01Z 2023-07-05T15:55:14Z "The `wp_delete_post()` function has a second optional parameter called `$force_delete` (default false) that decides whether to send the post to trash or delete it permanently. But when the function is invoked with a post id that belongs to a custom post type, this parameter is ignored and the post is always deleted permanently and never sent to trash. Here is the relevant code inside that function that does this. {{{ if ( ! $force_delete && ( 'post' === $post->post_type || 'page' === $post->post_type ) && 'trash' !== get_post_status( $postid ) && EMPTY_TRASH_DAYS ) { return wp_trash_post( $postid ); } }}} I think the post types check in the above condition should not be made, but I am not sure why it is there and what are the implications of it. Steps to replicate this issue. - Create a post in a custom post type and note the post id. - Make the call to the function. Assuming 42 is the post id, the call will be `wp_delete_post( 42, false)` - Since the `$force_delete` parameter is set to `false`, the expectation is that the post should be sent to trash - But the post will be permanently deleted If it is agreed that it is a bug, then I can submit a patch to remove the post type check. " sudar Future Releases 41714 "wp_list_pages() - horrible performance due to eventual ""SELECT *""" Posts, Post Types 4.9 normal normal Awaiting Review defect (bug) new dev-feedback 2017-08-23T16:15:00Z 2023-07-06T14:29:05Z "I'm investigating awful performance (MySQL slow queries logged constantly) a site which uses a plugin to display a page list. The plugin calls wp_list_pages(). wp_list_pages() in turn calls get_posts(). And get_posts() ends up making the slow query: {{{ SELECT * FROM wp_posts WHERE (post_type = ‘page’ AND post_status = ‘publish’) ORDER BY wp_posts.post_date ASC; }}} So, all the post_content fields (along with everything else) are being requested, just for the purposes of constructing a page list. (The site has ~ 1200 pages - and the above call returns 34MB from the MySQL server). It looks like either get_posts() needs some more flexibility so that it has an option to return only specified fields." DavidAnderson Future Releases 46171 "Add ""backing up this post in your browser"" label to post-type" Posts, Post Types normal normal Awaiting Review enhancement new dev-feedback 2019-02-01T20:58:56Z 2019-02-01T20:58:56Z "When the internet connection is lost, on a non-block-based post-type, some helpful text appears in an admin notice to alert users their content will not be lost: ""We’re backing up this post in your browser, just in case"" Keyword: **post**. It would be nice if that string were post-type specific, perhaps part of the `labels` array of the post-type registration process." johnjamesjacoby Future Releases 54376 Add `is_post_publicly_viewable` filter Posts, Post Types normal normal Awaiting Review enhancement new 2021-11-04T22:33:22Z 2022-02-03T20:31:39Z "Related to #49628, #54375. Add a filter to the is_post_publicly_viewable() function to allow theme and plugin developers to override the default value. In some circumstances a developer may require the checks use different conditions to the default. " peterwilsoncc Future Releases 32545 "Adding actions before and after ""Add New"" button" Posts, Post Types 4.2.2 normal normal Awaiting Review enhancement reopened dev-feedback 2015-06-01T05:33:27Z 2019-05-30T00:04:12Z "We need a proper action to add new customs options (button, link, information) before and after the ""Add New"" button of post pages. Such as http://stackoverflow.com/questions/29811433/wordpress-add-custom-button-on-post-type-list-page on #wp-admin/edit.php line 281 on #wp-admin/edit-form-advanced.php line 395 This is just a addition of actions to make wordpress more customizable and modular. Few use-case scenarios [[Image(screenshot1.png)]] [[Image(screenshot2.png)]] '''Solution''' We can use the following sample code to solve the problem. {{{#!php /** * Fires before the Add New button is added to screen. * * The before_add_new- hook fires in a number of contexts. * * The dynamic portion of the hook name, `$pagenow`, is a global variable * referring to the filename of the current page, such as 'edit.php', * 'post.php' etc. A complete hook for the latter would be * 'before_add_new-post.php'. */ do_action('before_add_new-'.$pagenow); if ( current_user_can( $post_type_object->cap->create_posts ) ) echo ' ' . esc_html( $post_type_object->labels->add_new ) . ''; /** * Fires after the Add New button is added to screen. * * The after_add_new- hook fires in a number of contexts. * * The dynamic portion of the hook name, `$pagenow`, is a global variable * referring to the filename of the current page, such as 'edit.php', * 'post.php' etc. A complete hook for the latter would be * 'before_add_new-post.php'. */ do_action('after_add_new-'.$pagenow); }}} " vivekbhusal Future Releases 39841 Additional Post Button Options Posts, Post Types 4.7.2 normal normal Awaiting Review enhancement new 2017-02-10T18:38:24Z 2017-02-14T08:39:25Z "Turn ""Update""/""Publish"" into a button with a dropdown. So if a user selects say Update & Return it will redirect the user back to the posts admin screen. If a users selects the Update & Add New option then it would update that existing post, then redirect to a new posts screen or return to the post list screen instead." lukecavanagh Future Releases 35546 "AllPosts page UI: ""Edit"" name in ""Bulk Actions"" does not match with ""Bulk Edit"" group box" Posts, Post Types normal minor Future Release enhancement new 2016-01-20T19:42:09Z 2017-08-07T16:15:17Z "This may mislead a user. Because not all users know that there are 3 types of editing on this page: 1. Hidden menu ""Edit"". 2. Hidden menu ""Quick Edit"". 3. ""Edit"" in the ""Bulk Actions"" list. This name is equal to the 1. when it is not the same. Should ""Edit"" in the""Bulk Actions"" be changed on ""Bulk Edit""?" antonrinas Future Releases 35537 AllPosts page: sorting is not remembered Posts, Post Types 4.4.1 normal minor Future Release enhancement new dev-feedback 2016-01-19T22:43:43Z 2017-02-06T09:13:22Z "STEPS TO REPRODUCE 1) Log in (administrator). 2) Remove all posts. 3) Create 3 new posts with titles accordingly ""1"", ""2"", ""3"" 4) Go to AllPosts page. 5) Click on ""Title"" column header to sort posts by title (as a result: posts is sorted in order 1,2,3). 6) Click ""Published (3)"". 7) Click ""All (3)"" EXPECTED RESULT: posts is sorted in order 1,2,3 ACTUAL RESULT: posts is sorted in order 3,2,1" antonrinas Future Releases 38599 Allow verbose rewrite rules with custom post types Posts, Post Types normal normal Awaiting Review enhancement new 2016-11-01T00:08:41Z 2021-07-27T05:50:55Z "Every time I create a custom post type (say, Book) I invariably want a structure like this: /books/ - static page where I can write all sorts of overview content with all of the formatting provided by the theme's page template (not a basic post type archive) /books/book-1/ /books/book-2/ - custom post type permalinks This is possible by using a rewrite slug of books. However, if someone then creates a subpage of books, they'll get a 404 error, full stop. This has been around a long time, and many workarounds have been provided in trying to get verbose rules triggered, such as: https://gist.github.com/mattberridge/2960966 Rewrite rules underwent some major changes a while ago for improved performance (to get %postname% permastructures working well, then there were pretty attachment URLs, etc), which results in these workarounds no longer working. (Custom post type rules get inserted at a place which isn't easy to reorder and conflicts with other rules). Instead, I have to keep using unique prefixes which make things look messy and confusing to visitors: /books/ /book/book-1/ (even though there is no /book/ page on my site) Having a nicer structure seems like a very common use case (especially given the number of search results you'll find about workarounds). I'd like to suggest allowing custom post types to trigger verbose rules in a way that will work." smerriman Future Releases 50292 Change 'post updated' notification text to '[post type name] updated' Posts, Post Types normal normal Awaiting Review enhancement new close 2020-06-01T09:48:27Z 2020-07-28T01:36:16Z "When working with a custom post type if you update the post you get the notification ""Post updated."" - would this be better to show the post type name instead of post? It's more descriptive. I have flagged 'updated' but I suspect there maybe more instances of this with other statuses." ninetyninew Future Releases 50921 Consider adding title attributes for metabox order buttons joedolson* Posts, Post Types 5.5 normal normal Future Release enhancement accepted 2020-08-12T04:48:33Z 2021-05-26T09:02:02Z It's obvious but I feel the title attribute for new metabox indicators will be helpful for some users to know what will these indicator buttons do by browser's tooltip. ibachal Future Releases 43702 Empty State UX for Posts & Pages screen when there is no content Posts, Post Types 4.9.5 normal normal Awaiting Review enhancement new 2018-04-05T16:35:04Z 2020-10-27T19:51:04Z "The default screen people see when they first visit the Posts, Pages, etc., dashboard sections is quite uninspiring. Taking a cue from WooCommerce's default product screen (screenshot included), we can enhance the default Posts & Pages screens to make it a bit more welcoming to new users." mrtortai Future Releases 37671 Emptying Bin with large amount of posts results in whitescreen Posts, Post Types normal normal Future Release enhancement new needs-unit-tests 2016-08-15T16:01:56Z 2017-08-06T00:31:10Z "When the Bin has a large amount of posts, e.g over 1,500, clicking Empty takes a long time to load, several minutes. After it finishes, it loads a blank white page and has only deleted about 75% of the posts. There's ~500 remaining." atomicjack Future Releases 49428 Extend get_the_post_pagination() to consider total argument luludak Posts, Post Types normal minor Awaiting Review enhancement assigned 2020-02-13T16:57:34Z 2020-02-13T16:57:34Z "Right now, the usage of the_posts_pagination() is associated directly with the Global query. By investigating its code in [https://developer.wordpress.org/reference/functions/the_posts_pagination/ documentation], I noticed that, it practically retrieves the pagination arguments expected by {{{paginate_links($args)}}}, but it checks on global query ({{{$GLOBALS['wp_query']}}}) for the maximum number of pages. However, one of the arguments of {{{paginate_links($args)}}} is {{{total}}}, which, by documentation is: ""The total amount of pages. Default is the value WP_Query's max_num_pages or 1."". Since this exists as argument, my question is, why don't we check for the {{{total}}} in {{{get_the_posts_pagination()}}}? That way, we can allow its usage on custom queries (they can propagate the number of pages in the {{{total}}} argument), not using the global query at all - as this check can block the use of {{{total}}} as argument. This fix can be made by changing this code in **link-template.php**: {{{if ( $GLOBALS['wp_query']->max_num_pages > 1 ) {}}}} into: {{{if ( (! empty( $args['total'] ) && $args['total'] > 1 ) || $GLOBALS['wp_query']->max_num_pages > 1 ) {}}} Note I did not remove the previous check on global query, to ensure backwards compatibility - {{{paginate_links($args)}}} uses global query to retrieve default arguments - so this part of code is useful. I also check for emptiness and then checking for the argument check in order to apply partial evaluation. Please note I am adding this ticket for further discussion - since I am new to the community. If this is considered of value, I will be happy to work on the patch. " luludak Future Releases 38715 Facilitate posts storing raw JSON in post_content by short-circuiting KSES and other filters Posts, Post Types normal normal Future Release enhancement new dev-feedback 2016-11-08T21:55:55Z 2019-03-26T07:59:01Z "When attempting to store arbitrary JSON in WordPress, the `post_content` field is the logical choice. Using `post_content` to store arbitrary JSON instead of postmeta is more performant and it also means that the JSON content will automatically get support for revisions. Storing JSON is done in core now for `customize_changeset` posts and it is done in the `widget_instance` post type in the Customize Widgets Plus plugin. In both cases, however, there are challenges when storing the JSON due to filters that may apply on `content_save_pre`. In particular, the KSES filters will apply on the `post_content` and strip out markup that is intended to be contained within JSON strings. The solution taken by changesets is to wrap the updates to the `customize_changeset` post type by the `\WP_Customize_Manager::save_changeset_post()` method. Before this method calls `wp_update_post()`/`wp_insert_post()` it suspends the KSES filters temporarily: {{{#!php post_status; return ( is_preview() && $is_draft ); } }}} " paulschreiber Future Releases 42088 Function to detect if current page is a scheduled post (is_scheduled() or is_future()) Posts, Post Types 4.8.2 normal normal Awaiting Review enhancement new 2017-10-04T17:52:44Z 2018-02-24T11:51:01Z "It would be very helpful if there was a function to detect if the page being viewed is a scheduled post. Call this is_scheduled() or is_future(). Currently, you can achieve this check with code link this: {{{#!php post_status; return ( is_preview() && $is_future ); } }}} " paulschreiber Future Releases 57597 Have a button to copy permalinks on the post & page overview Posts, Post Types normal normal Awaiting Review enhancement new close 2023-02-01T08:31:00Z 2023-02-02T06:50:31Z "I think it would be quite handy if in the post & page overviews, there is a button to copy to the link to that page/post in the quick links. So, you don't have to go to the page OR have to open the editor to copy the permalink. This would especially be handy if you work with hidden pages." NekoJonez Future Releases 48375 Introduce a separate capability for trashing a post Posts, Post Types normal normal Awaiting Review enhancement new 2019-10-20T20:40:44Z 2020-01-06T20:06:53Z "Related: #41674 It's sometimes desirable to allow users to trash posts but not permanently delete them once trashed, nor empty the trash. There should be a meta capability, `trash_post|trash_posts`, which by default maps to `delete_post|delete_posts` which is used when a post is trashed instead of deleted. This would allow a plugin to grant a user the ability to trash posts but not permanently delete them." johnbillion Future Releases 51787 Introduce dedicated function that retrieves post object by metadata Posts, Post Types 5.5.3 normal normal Awaiting Review enhancement new dev-feedback 2020-11-16T13:39:13Z 2020-11-16T13:39:13Z "Just wanted to suggest a function I routinely use when building custom themes that utilize metadata. {{{#!php $post_type, 'meta_key' => $meta_key, 'meta_value' => $meta_value, 'meta_compare' => '=', ); $posts = get_posts( $args ); if ( ! empty( $posts[0] ) ) { return $posts[0]; } return false; } }}} " DaveyJake Future Releases 51365 Introduce dedicated function to check if post meta exists Posts, Post Types normal normal Awaiting Review enhancement new dev-feedback 2020-09-20T21:12:09Z 2020-09-20T23:15:28Z "Just wanted to suggest a simple function that checks for pre-existing metadata for the native `post` post type. Looking forward to getting more involved and collaborating with everyone! {{{#!php ...
    }}} It will only spit out the HTML elements, but not the buttons, as there is nothing to show. Another example: {{{#!php 25, 'paged' => $paged, ) ); $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; if ( $wp_query->have_posts() ) : ?> have_posts() ) : $wp_query->the_post(); ?>
  • "">
    "">
  • }}} Nothing works. Best case scenario is that it adds a page, but you then get the following: websiteURL/post-url/page/number And of course, that also does not work and therefore you can't scroll through posts as you like. Can we get this checked and hopefully fixed, please? I am desperately waiting for this, and many more are like me (Stackoverflow is filled with these questions)." 1BJK903 Future Releases 34009 Need ability to query what post_type_supports values plugins and themes might use Posts, Post Types 4.4 normal normal Awaiting Review enhancement new 2015-09-25T10:11:30Z 2017-07-01T10:43:48Z "A number of plugins and themes define their own values to pass to add_post_type_support(). e.g. Jetpack's `publicize`, and the Genesis theme framework's values prefixed with `genesis-`. I have a post type UI where I allow the user to decide which feature a post type supports. The current API does not allow me to find the full set of possible values. `$_wp_post_type_features` only lets me find out what's currently registered. I propose a new API `get_all_post_type_supports_features()` that invokes a filter `post_type_supports` to allow plugins and themes to return a complete list of post type supports values, along with user friendly labels. Currently my routine returns the set I can get from `$_wp_post_type_features` and my filter function augments it with additional options. {{{ array ( 'publicize' => ""Publicize with Jetpack"" 'home' => ""Display in blog home page"" 'genesis-layouts' => ""Genesis layouts"" ... ) }}} WordPress core would respond to the `post_type_supports` filter with: title, editor, author, etcetera " bobbingwide Future Releases 45864 On list page All(x) count does not consider Trash items. Hence Trash should appear differently Posts, Post Types 5.0.2 normal normal Awaiting Review enhancement new dev-feedback 2019-01-08T13:29:48Z 2019-05-22T12:33:17Z "I find it confusing with the way WordPress shows `All(xx)` along with a broken down counts of each status when we have trashed items, `All(xx)` only considers un-trashed posts. So I feel displaying `Trash(xx)` exactly as rest of the status is not visually right. Since Trashed items are not considered in `All` count, it needs to be displayed a bit differently. I think if we can do something like the following it will look more logical. 1. Increase left margin before `Trash(xx)` so that it looks a bit separated. 2. Change the color of Trash link to `#dc3232`. Since `Delete Permanently` and `Trash` links are also using red color. 3. One more observation. We are writing `Published`, `Scheduled`, so I think rather `Trashed` could be used instead of `Trash` to match the rest. Here is a proposed solution: File: `/wp-admin/css/common.css` {{{ .subsubsub li.trash-posts { margin-left: 2rem; } .subsubsub li.trash-posts a { color: #dc3232; } }}} File: `wp-admin/includes/class-wp-list-table.php` {{{#!php $view ) { if( 'trash' === $class ) { $views[$class] = ""\t
  • $view""; } else { $views[$class] = ""\t
  • $view""; } } ... } }}} File: `wp-includes/post.php` {{{#!php _x( 'Trash', 'post status' ), ... ... 'label_count' => _n_noop( 'Trash (%s)', 'Trashed (%s)' ), ... ) ); }}} Please let me know if this makes sense." subrataemfluence Future Releases 41773 Page Templates // Post Type Templates | Any Post Type? Posts, Post Types 4.7 normal normal Awaiting Review enhancement new reporter-feedback 2017-09-01T00:39:03Z 2021-06-07T09:59:55Z "If I add a template like this: {{{#!php array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, /* Database separation */ 'db_tables' => array( 'prefix' => '', //by default, value of $table_prefix will be used. If user sets this value to something, it will be used as prefix for both of following tables 'base_prefix' => '' , //this will control it tables are to be kept sitewide or per blog 'posts_name' => 'acme', 'postmeta_name' => 'acmemeta', ), ); }}} This small enhancement (not from coding perspective) will help more plugins authors go for custom post type. Reasons are - first they will get option to have separate data storage. Second - if some other badly coded plugin manipulates wp_posts table in some wrong way, it won't have sideeffect on third-party data. Third - Plugin authors will get more space to experiment as at any time they will be dealing with their own plugin's data. Of course, one of the goal of this nice feature must be to abstract database layer, but as a developer I feel it would be better if I can have some control over database without loosing power of this new (custom post type) feature." rahul286 Future Releases 39439 Should wp_insert_attachment() update GUID Posts, Post Types 4.8 normal normal Awaiting Review enhancement new dev-feedback 2017-01-02T12:58:08Z 2021-08-06T11:58:02Z "I have a ""special"" case scenario related to media library attachments. For the context, I've built a plugin that connects to an external server and sync images stored into the remote server into local WordPress media library. The importer upload files, generate the thumbnails and create a new ""attachment"" post. Now, an import process is ran everyday, and basically we re-import the remote images into WordPress but in order to avoid duplicates, we're updating existing attachments if exist. Now, during this update process, we only remove the files stored into the `uploads` directory, import the new one with its thumbnails and update the attachment post. Before doing so, our first approach was to check if an attachment exists, if exists, delete the attachment + its files and then simply create a new attachment. This first approach works but we're having huge ID number into the DB after the import as it generates thousand of new records which we didn't want. So now, only the files are updated, if an attachment post exists, we update its metadata and everything works as expected. Now the issue/remark we have is that during the update of the attachment post, each time we import the new image file, we set the `guid` property to change and use the new imported file path. But when we check the database table, the `guid` is not updated at all and reflects the path to the image file imported the first time. Looking at source code, during an update, the `guid` is not modified in general as for RSS feeds we need that unique `guid`. Our question is, is it relevant in this scenario to keep old `guid` property that points to a file that no longer exists? and so should we allow the `guid` to be updated by default in core for the attachment? If RSS readers need that `guid`, why attachments use the file path and not an attachment page permalink ? Is there another location that uses this `guid` property in place of the meta data for the file path ? " jlambe Future Releases 43294 Sticky class should be added regardless of where posts are queried Posts, Post Types normal normal Awaiting Review enhancement new 2018-02-12T12:18:27Z 2019-01-16T06:50:09Z "post_class() function is only adding `.sticky` class when `is_home()` is true, basically > ...if the query is for the blog homepage. [http://developer.wordpress.org/reference/functions/is_home/ is_home() reference] Check out [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post-template.php#L512 the code] in [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post-template.php#L461 get_post_class()] function {{{ #!php 512 // sticky for Sticky Posts 513 if ( is_sticky( $post->ID ) ) { 514 if ( is_home() && ! is_paged() ) { 515 $classes[] = 'sticky'; 516 } elseif ( is_admin() ) { 517 $classes[] = 'status-sticky'; 518 } 519 } }}} This behavior complicates recognizing sticky post when using custom queries, as they're mostly used outside of homepage, which fails `is_home()` check, requiring extra work to add `.sticky` class where it should be. I suggest removing the `is_home()` check from the condition in `get_post_class()` function." Selrond Future Releases 41739 "Support a ""source"" attribute in post types, taxonomies, and post statuses" Posts, Post Types 3.0 normal normal Awaiting Review enhancement new 2017-08-28T02:07:31Z 2017-08-28T02:27:55Z "When registering custom post types, taxonomies, or post statuses, it would be nice to have a way to tell the system what plugin was responsible for those registrations. Use Case: In bbPress, there are 3 post types, 1 taxonomy, and 4 post statuses. There are several places where an ""any bbPress post type"" or ""any bbPress post status"" comparison is necessary, but it's somewhat annoying and repetitive to need to write: {{{ array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ) }}} I'd prefer to write: {{{ get_post_types( array( 'source' => 'bbpress' ) ) }}} Tangentially, this could replace the otherwise vague `internal` property, with: {{{ 'source' => 'wordpress' }}} I'm not confident that `source` is the best descriptor, or if `domain` or `namespace` or something else might be more appropriate (without being too vague to be useful.)" johnjamesjacoby Future Releases 28798 htaccess and protected option Posts, Post Types 4.0 normal normal Awaiting Review enhancement reopened 2014-07-09T08:50:25Z 2021-10-15T13:25:45Z "I already tried to solve this problem in the forum and was told that it is a matter of the core. So here is not a bug but my suggestion for an improvement of the following matter: For security reasons I use htaccess to protect my wp-login.php. Now I'd like to protect a single page by using the WordPress password protected option. Unfortunately the /wp-login.php?action=postpass is needed by this option. In the consequence all the visitors that want to see my password protected page need as well my htaccess password for wp-login or I can't use htaccess to protect my wp-login. Would it be possible to use the password protection for single pages and posts without using wp-login.php. Maybe by creating an extra transfer page for protected content naming differently as wp-login? I'm no developer and just talking from the perspective of a WordPress user. In case this idea is foolish I excuse myself in advance. " YU.Design Future Releases 31154 register_post_type function does not check reserved post_types Posts, Post Types 4.2 normal normal Awaiting Review enhancement new 2015-01-28T11:13:28Z 2022-02-21T15:39:56Z "the function register_post_type() in wp-includes/post.php does not check for reserved post types. But later on this will cause malfunctions or unexpected behaviour and bugs. I wrote a very simple patch that checks if any of the reserved post_types are being registered and if so it notifies the developer by _doing_it_wrong and WP_Error as a fallback. Projects and plugins that are using reserved post_types in the wild will not break. But the developers will be notified via the logs or on their development environments where WP_DEBUG is true. ps. I will submit a similar ticket for taxonomies after this one. " sebastiaandegeus Future Releases 43256 wp_delete_post() should use get_post() not wpdb->prepare Posts, Post Types 1.0 normal normal Future Release enhancement new 2018-02-08T06:22:26Z 2018-02-13T11:24:59Z "wp_delete_post() uses a custom SQL query to pre-load the post info in a raw state and ends up adding one extra data I/O call per post/page being deleted. This bypasses the WP_Post::get_instance() wp_cache seeding. Consequently later calls to get_post() such as the 'before_delete_post' action to call _reset_front_page_settings_for_post() then falls through and calls WP_Post::get_instance() calling a nearly-identical SQL query (adds LIMIT 1 to to the same query. Is there any reason why the start of wp_delete_post() should not just call $post = get_post( $postid ) ? Replace: {{{ $post = $wpdb->get_row( $wpdb->prepare( ""SELECT * FROM $wpdb->posts WHERE ID = %d"", $postid ) ); if ( ! $post ) { return $post; } $post = get_post( $post ); }}} With: {{{ $post = get_post( $postid ); if ( ! $post ) { return $post; } }}} reference article for in-depth analysis and performance implications is online at [http://lance.bio/2018/02/08/improving-wp_delete_post-wordpress-core/] If this warrants attention I can find time to spin up my VVV box on latest build and generate a patch file when time allows. " charlestonsw Future Releases 48370 "Add ""next/previous"" links to Edit Post screen" Posts, Post Types normal normal Awaiting Review feature request new dev-feedback 2019-10-18T17:37:06Z 2019-10-19T10:39:15Z "Maybe a good idea for blogs or shops to have some sort of ""next/previous"" links inside the edit post page so it's easier to navigate through posts, pages and products without leaving the edit page. At the moment it's a bit un-logical since when i am on page 5 and i open a post i want to edit then after i have updated it i want to edit the next one or the previous one in the list. Only way possible is to click on all posts but then your back to page 1. You can do a go back through the browser back tab but that's not the proper way to work. " Hein35 Future Releases 55733 Add option to sort Pages by Slug Posts, Post Types 5.9.3 normal normal Awaiting Review feature request new close 2022-05-14T14:49:12Z 2022-05-15T16:05:45Z "Please add an option to sort list of Pages by Slug (that is, make the Slug column sortable). Right now, for some reason, WordPress only offers to sort by Title - which is of useless as Title is just a SEO-formatted blurb that's irrelevant for a meaningful sort order. (Yes, I'm aware of a free plug-in - that appeared just 3 months ago - that allows to sort by slug. Still, this essential feature must be in core WordPress functionality)." zevrix Future Releases 37965 Add post_last_activity column to posts database table Posts, Post Types normal normal Awaiting Review feature request new dev-feedback 2016-09-07T07:49:59Z 2019-08-05T22:45:26Z "I have a need to order posts by their most recent ""activity."" Activity is purposely ambiguous, but in the context of WordPress core, this would likely mean either: * the publish time if no comments * the time of the most recent comment * For something like bbPress, this would mean the `post_date` of the most recent child post I'm currently storing this data in `postmeta`, but even with type hinting, ordering `meta_value` by `DATETIME` is a slow query, particularly when there are millions of rows in both the `posts` and `postmeta` database tables. (I'd considered repurposing the `post_modified`, but unwinding the way core uses this internally, paired with not wanting to confuse other developers with the oddity, along with `post_modified` not being an indexed column, made this a lot of work for not very much gain.) To be efficient, this new column would require additional compound indexes akin to `type_status_date`. I suspect it would also need an accompanying `post_last_activity_gmt` column, as well as some kind of back-fill upgrade routine on existing posts. Rather than hacking this into bbPress core in a bespoke way, or creating a separate plugin to shoe-horn this idea into all of the core queries, I figured I'd drop the feature request here for deeper discussion first, to get a read on how viable modifying core like this is to everyone." johnjamesjacoby Future Releases 28006 Add visual cues when viewing drafts on the frontend Posts, Post Types normal normal Awaiting Review feature request assigned 2014-04-24T08:07:28Z 2019-04-22T16:46:38Z "This is a relatively minor issue, but I've often had the problem where I think a post is published because I can view it on the frontend and there is nothing on the page that indicates that I am viewing a draft. If this happens to me from time to time then I'm sure it happens to other users too. I propose adding a few unobtrusive visual cues to the single post page that indicates that you are viewing a draft. I have attached my changes here - they include: * Adding ""(Draft)"" to the end the 'edit post' text in the admin bar * Adding ""(Draft)"" to the end of the default link generated by {{{ edit_post_link() }}} * Adding a new body class to single post pages: {{{ single-status-{status} }}} These changes are minor enough to not break the existing display, yet significant enough to clearly show that you are currently viewing a draft. The addition of the post status to the body class will also help with customising the page according to the current status." hlashbrooke Future Releases 55287 Allow for DISTINCT in WP_Query method Posts, Post Types 6.0 normal normal Awaiting Review feature request new 2022-03-01T15:55:09Z 2022-03-01T15:55:09Z "Dear wordpress developers, Currently I'm working with a plugin to create designs. This plugin has an element called a repeater element that basically makes use of the core WP_Query method in order to fetch custom post types or normal post types. However, since I'm using this page builder or theme builder, I am in no way capable of using DISTINCT within the filter https://developer.wordpress.org/reference/hooks/posts_distinct/ Because this requires me to send the WP_Query instance, which is basically only used within the repeater element and can not be set to a variable in this particular case. This means I'll have to rebuild everything through code, instead of being able to use my page or theme builder. Now I get the idea of saying this is a bug with the page or theme builder plugin. But in fact, what I want to know is why are we using a filter to create a DISTINCT query inside of WP_Query? Isn't it possible to implement this inside of the WP_Query arguments instead? I basically want to say: fetch posts with unique titles. This seems much more logical as the SQL query is build from WP_Query... I've already looked through the entire codex, and couldn't find any possible parameter that could be used for this... My question to you is: Can this please be added to wordpress core? I find it highly frustrating that WP_Query doesn't have this sort of capabilities out of the box." simbaclaws Future Releases 32824 Consistent search fields between posts and terms Posts, Post Types normal normal Awaiting Review feature request new 2015-06-29T13:42:54Z 2017-07-23T02:17:53Z Searching for posts [https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/query.php#L2091 currently checks] the `post_title` and `post_content` fields, while [https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/taxonomy.php#L1899 searching terms] checks the `name` and `slug` fields. Could `post_name` be added to the where clause for posts, and `description` be added to terms? That way, searching would consistently check an entity's title, slug, and content. ashworthcreative Future Releases 43348 Filter by 'Authors' option in wp-admin/edit.php?post_type=page Posts, Post Types normal normal Awaiting Review feature request new 2018-02-18T21:21:44Z 2018-02-20T15:03:56Z "Hey! Currently, I am able to filter by posts created by myself, It would be handy to have the option to filter by other authors contributing to the site, to keep track of who has posted what. Possibly an author drop down could be added which lists all Authors and a filter button to show their posts, similar to how the page is currently styled." lkhwt96 Future Releases 41953 Improved Meta Box Save Hook Posts, Post Types 4.8.2 normal normal Awaiting Review feature request new 2017-09-22T07:55:37Z 2017-09-22T10:39:51Z "Hi, This is suggestion how to reduce some conditionals for saving meta boxes with function for example. Below is code of meta box save function with all conditions for security and inside that function we always write some core condition for security that can be separated in one or more core functions to do that for us, so we can just call that function. {{{ if ( ! function_exists( 'save_admin_meta_boxes' ) ) { /** * Saves admin meta box to postmeta table * * @param $post_id int - id of post that meta box is being saved * @param $post WP_Post - current post object */ function save_admin_meta_boxes( $post_id, $post ) { // If we're doing an auto save, bail if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // If default wp nonce isn't there, bail if ( ! isset( $_POST['_wpnonce'] ) ) { return; } // If current user can't edit this post, bail if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } // If current post type are not in list, bail $post_types = apply_filters( 'wp_allowed_post_types_for_meta_boxes', array( 'post', 'page' ) ); if ( ! in_array( $post->post_type, $post_types ) ) { return; } // If our nonce isn't there, or we can't verify it, bail $meta_boxes = apply_filters( 'add_meta_boxes_filter', array() ); $nonce_array = array(); if ( is_array( $meta_boxes ) && ! empty( $meta_boxes ) ) { foreach ( $meta_boxes as $meta_box ) { $nonce_array[] = 'extensive_vc_meta_box_' . esc_attr( $meta_box ) . '_save'; } } if ( is_array( $nonce_array ) && count( $nonce_array ) ) { foreach ( $nonce_array as $nonce ) { if ( ! isset( $_POST[ $nonce ] ) || ! wp_verify_nonce( $_POST[ $nonce ], $nonce ) ) { return; } } } // Make sure your data is set before trying to save it global $meta_boxes_options; foreach ( $meta_boxes_options as $key => $value ) { $field_key = $_POST[ $key ]; if ( isset( $field_key ) && trim( $field_key !== '' ) ) { update_post_meta( $post_id, $key, esc_html( $field_key ) ); } else { delete_post_meta( $post_id, $key ); } } } add_action( 'save_post', 'save_admin_meta_boxes', 10, 2 ); } }}} Example function with that conditionals {{{ if ( ! function_exists( 'wp_meta_boxes_security_check' ) ) { /** * Check is meta box secure and valid for saving * * @param $post_id int - id of post that meta box is being saved * @param $post WP_Post - current post object * * @return boolean */ function wp_meta_boxes_security_check( $post_id, $post ) { $return_value = true; // If we're doing an auto save, bail if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { $return_value = false; } // If default wp nonce isn't there, bail if ( ! isset( $_POST['_wpnonce'] ) ) { $return_value = false; } // If current user can't edit this post, bail if ( ! current_user_can( 'edit_post', $post_id ) ) { $return_value = false; } // If current post type are not in list, bail $post_types = apply_filters( 'wp_allowed_post_types_for_meta_boxes', array( 'post', 'page' ) ); if ( ! in_array( $post->post_type, $post_types ) ) { $return_value = false; } return $return_value; } } }}} and then finally code for saving meta boxes will be {{{ if ( ! function_exists( 'save_admin_meta_boxes' ) ) { /** * Saves admin meta box to postmeta table * * @param $post_id int - id of post that meta box is being saved * @param $post WP_Post - current post object */ function save_admin_meta_boxes( $post_id, $post ) { // If meta box doesn't paste check, bail if ( ! wp_meta_boxes_security_check( $post_id, $post ) ) { return; } // If our nonce isn't there, or we can't verify it, bail $meta_boxes = apply_filters( 'add_meta_boxes_filter', array() ); $nonce_array = array(); if ( is_array( $meta_boxes ) && ! empty( $meta_boxes ) ) { foreach ( $meta_boxes as $meta_box ) { $nonce_array[] = 'extensive_vc_meta_box_' . esc_attr( $meta_box ) . '_save'; } } if ( is_array( $nonce_array ) && count( $nonce_array ) ) { foreach ( $nonce_array as $nonce ) { if ( ! isset( $_POST[ $nonce ] ) || ! wp_verify_nonce( $_POST[ $nonce ], $nonce ) ) { return; } } } // Make sure your data is set before trying to save it global $meta_boxes_options; foreach ( $meta_boxes_options as $key => $value ) { $field_key = $_POST[ $key ]; if ( isset( $field_key ) && trim( $field_key !== '' ) ) { update_post_meta( $post_id, $key, esc_html( $field_key ) ); } else { delete_post_meta( $post_id, $key ); } } } add_action( 'save_post', 'save_admin_meta_boxes', 10, 2 ); } }}} Also I added some filter for allowed post types inside that function {{{ $post_types = apply_filters( 'wp_allowed_post_types_for_meta_boxes', array( 'post', 'page' ) ); }}} which allows authors to easily add their own custom post type with meta boxes for saving. Best regards, Nenad" Nenad Obradovic Future Releases 43347 Introduction of 'has_single' register_post_type parameter Posts, Post Types normal normal Awaiting Review feature request new 2018-02-18T18:28:45Z 2022-07-19T09:48:55Z "I have done some research but have not been able to find anything exactly on this issue. I frequently encounter use cases where I need to create a CPT with the following characteristics: 1) disable the slug display/editor from the admin post edit page (this is for usability. It is not used and having it available/displayed can confuse website editors) 2) maintain the archive page is viewable on the front end 3) disable the single page for the CPT on the front end I have found some partial solutions like this https://wordpress.stackexchange.com/questions/128636/how-to-disable-the-single-view-for-a-custom-post-type but setting `'publicly_queryable' => false` would disable the archive view. The `register_post_type` function includes the `has_archive` parameter. Is it possible to introduce a `has_single` parameter which will achieve the desired functionality stated above? I feel this can be beneficial in many cases, to the extent it is worthwhile introducing as a core feature. " stevepuddick Future Releases 28463 Need core concept of the first publication of a post/comment. Posts, Post Types normal normal Awaiting Review feature request new dev-feedback 2014-06-05T17:21:56Z 2022-07-15T14:35:48Z "Because status transitions are permitted to occur in a cyclic fashion, it is possible to publish a post/comment more than once. The first publication event has unique significance, e.g. to push-based subscription delivery systems, but this concept is not represented anywhere in WordPress. Restricting status transitions to a directed acyclic graph is a non-starter. What I have done in plugins (and Nacin also suggests) is to mark the initial publication in meta: if transitioning to publish/approved, try adding the meta; if the add succeeds, this is the initial publication. I suspect that a significant number of plugins duplicate this. It would be even more useful to keep the history of changes to post_status in revisions rather than put ""inherit"" in that field. This would have repercussions in the already complex system for revisions, which has no facility for dealing with changes to non-content fields. It may also conflict with the existing uses of the ""inherit"" status, such as calling get_post_status() on a revision with the intention of getting the parent's status. Status revisions may have other uses as well (see #23314, #12706) but comment revisions don't exist yet. Ultimately what I want is a hook that fires only on the initial publication of a post or comment. The add_post_meta/add_comment_meta system can accomplish this much more easily." andy Future Releases 40255 Parameter to Enable/Disable Trash on register_post_type(); Posts, Post Types 4.7.3 normal normal Awaiting Review feature request new 2017-03-24T21:39:36Z 2017-03-24T21:39:36Z "It would be nice to have the ability to toggle on/off the ""trash"" feature on specific Post Types. I figured, for extreme simplicity; A parameter could be specified during Post Type registration. Or perhaps factored into the ""supports"" parameter (similarly to revisions) Thoughts?" michael.ecklund Future Releases 14375 Post pagination should have a show all option Posts, Post Types 3.0 normal normal Future Release feature request reopened 2010-07-21T07:03:29Z 2017-06-12T05:22:35Z When people use the nextpage html comment tag to paginate posts we should also have a show all link displayed to make it easier for people to read the whole content without pagination. westi Future Releases 43083 "adding ""Unlisted"" type for post visibility" Posts, Post Types normal normal Awaiting Review feature request new 2018-01-13T16:29:17Z 2018-03-02T01:27:19Z "I think there is a good reason that WP natively supported ""unlisted"" posts, in addition to PUBLIC, DRAFT and PRIVATE. Why not WP add that feature? btw, Private is not same as ""unlisted"". " tazotodua Future Releases 13926 Adding 'page-attributes' to a custom post type slows down edit screen in the admin Posts, Post Types 3.0 normal normal defect (bug) new 2010-06-16T20:01:17Z 2019-06-04T20:41:18Z "When I add 'page-attributes' to a custom post type it takes roughly 1.5 to 2 min for the edit screen to load... When I remove 'page-attributes' edit screen load is extremely fast. Under the post type i created I have 5000+ entries." granulr Future Releases 16600 AdminMenu rendering code chokes on uppercase Posts, Post Types 3.1 normal minor defect (bug) reopened 2011-02-20T02:43:25Z 2019-06-04T20:41:50Z "When registering custom taxonomies for a custom post type, if the post type name contains uppercase letters, the menu items for the custom taxonomies are not shown. It looks like the post type name is lowercased in some parts of the core code (but no all) and so string comparisons fail. Just isolated this behaviour, so I'm still not sure how much of the core this affects. Moreover, when I saved posts with the intended mixed-case name, they have been saved to the DB with lowercased post_type It it is indeed the intended behaviour, a note should be added to the Codex: ""Custom Post Type names must be lowercase"" The attached sample (real) code reproduces the problem by setting ""post_type_tag"" to ""DomainName"" instead of ""domain_name"". Numbers work properly, however. Tested with latest SVN (RC4 + r17467)" jltallon Future Releases 22022 Can’t properly add pages of type edit.php?post_type=xxx as submenu items to arbitrary parent menus Posts, Post Types 3.0 normal normal defect (bug) new 2012-09-27T20:22:43Z 2019-06-04T20:43:26Z "The following code illustrates the problem. {{{ add_menu_page('My Pages', 'My Pages', 'edit_posts', 'parentslug', array(class, func)); add_submenu_page('parentslug', 'Settings', 'Settings', 'edit_posts', 'mysettings', array(class, func)); add_submenu_page('parentslug', 'Custom Post Type', 'Custom Post Type', 'edit_posts', 'edit.php?post_type=xxx'); }}} When you click on the first submenu item, the menu stays open, displaying the submenu items as it should. When you click on the item for the custom post type, the parent menu is closed and submenu pages are not displayed. The root of the problem is how $parent_page is handled for pages of type edit.php?post_type=xxx. In get_admin_page_parent(), $parent_file is always set to $submenu[$parent], which may cause the submenu slug to be different from $parent_file. But in _wp_menu_output, if the submenu slug and parent slug are not equal, the 'wp-has-current-submenu wp-menu-open' classes do not get added which means the menu gets displayed as being closed. Since there are no actions called between get_admin_parent_page() and the output of the menu, the only workaround I can see is some ugly JS that fixes up the classes. It seems like the least intrusive fix would be to just move the call to apply_filters(""parent_file) in menu-header.php to after the call to get_admin_page_parent() so that $parent_file can truly be overridden. This also seems inline with the intent of the filter. " jjharr Future Releases 19031 Category view incorrectly counting custom posts Posts, Post Types 3.2 normal normal defect (bug) new 2011-10-24T02:40:31Z 2019-06-04T20:42:32Z "If you define a custom post-type something like this: {{{ Array ( [taxonomies] => Array ( [0] => category [1] => post_tag ) [label] => Book [rewrite_slug] => [query_var] => [public] => [show_ui] => 1 [show_in_nav_menus] => 1 [publicly_queryable] => [exclude_from_search] => 1 ) }}} Even if the post-type is NOT public or NOT publicly_queriable (see above), the counts of the posts in each category still shows, totally ignoring the settings of the post-type. == Expected Output == I would expect the count to be related to the results displayed. If there are no visible results for that category (i.e. the user can't see them due to public settings), I would expect the count to go to zero. == Actual Output == The count of posts in the given category seems to have nothing to do with the visible results. This is related to this bug: #18950" fireproofsocks Future Releases 25798 Certain single CPT items result in 404 since 3.7 Posts, Post Types 3.7 normal normal defect (bug) new needs-unit-tests 2013-11-01T14:58:10Z 2019-06-04T20:45:08Z "Related: #25749 The changes in [25182] to the query_var mapping of hierarchical post types have broken single permalinks in some cases, when Permalink setting is set to ""Post name"". To reproduce: 1. Register a post type as follows: {{{ register_post_type( 'bbg_test', array( // ... 'hierarchical' => true, 'public' => true, 'rewrite' => true, // any value other than false 'query_var' => false, // ... ) ); }}} 2. Set permalink settings to ""Post name"" (and flush) 3. Create a new post of the type above, and attempt to visit at the url `http://example.com/bbg_test/foo` (or whatever). Result: 404. 4. Change to any other permalink setting. Result: page loads as expected. Cause: When the CPT is registered with `'rewrite'` other than `false`, it passes the test at http://core.trac.wordpress.org/browser/tags/3.7/src/wp-includes/post.php#L1275. When it's hierarchical, it passes the test at line 1293. When, because `'query_var'` is set to `false`, the rewrite tag set on line 1294 is of the form 'post_type=bbg_test&pagename=foo' (instead of 'bbg_test=foo'). Then, when an item is loaded, during `WP::parse_request()`, it passes the `preg_match()` test here http://core.trac.wordpress.org/browser/tags/3.7/src/wp-includes/class-wp.php#L198, but a page (ie, an item with `post_type` 'page') is not found by `get_page_by_path()`, and as a result the correct rewrite rule is not matched. As noted, this is a regression in 3.7 [25182], before which `preg_match( '/pagename=\$matches...` wouldn't have matched. Obviously it's an edge case that (a) a post type is hierarchical AND has query_var set to false, and also (b) permalinks are set to ""Post name"", but it is a change in behavior that broke one of my plugins, and has been a bit of a bear to track down :) I'm going to set `query_var` to true for my purposes (no harm done on my end) but that may not be possible for others." boonebgorges Future Releases 24867 Feeds for custom posts type can not be set independently of has_archive and supports => comments nacin Posts, Post Types 3.8 normal normal defect (bug) assigned 2013-07-29T00:12:27Z 2019-06-04T20:44:35Z "I was testing the patch for ticket (Feeds or Feed - add_permastruct missunderstanding: #23302) and discovered a few things (I'm using trunk rev 19712). Turning of feeds for custom post types only works if supports feeds & has_archive are set to either false or true. If you, e.g. set the argument feeds in rewrite to true and has_archive to false then the rewrite rules for feeds do not get created (some happens of you switch true & false around in both arguments). This happens due to this condition in /wp-includes/post.php, line 1242: {{{ if ( ! isset( $args->rewrite['feeds'] ) OR ! $args->has_archive ) $args->rewrite['feeds'] = (bool) $args->has_archive; }}} Another problem I run into is that: With the patch for ticket (#23302) you can not enable/disable the comments feed independent of the main feed of the custom post type. It also does not get disabled if you do not enabled comments via supports. Rewrite rules for feeds seem to always get created. I've attached an example to showcase what I wrote above." marcosf Future Releases 37156 Multisite: WP-generated permalink for title-less post does not work (Or: numeric post slug that matches existing post ID number generates 404 error) Posts, Post Types 4.4.3 normal normal defect (bug) new reporter-feedback 2016-06-23T00:51:59Z 2019-06-04T21:00:50Z "On a Multisite installation, a permalink with a post-name structure results in a 404 error when its slug is a number and that number matches an existing post ID number. Example: http://myblog.com/blog/7 where a post (any post) has an ID of 7. When WordPress generates a slug for a title-less post, it forms the slug using the post ID. Since the post ID is (now) in use, the default permalink for the title-less post is broken. It appears ticket #5305 resolved the issue for regular installs by automatically appending -2 to the slug (http://myblog.com/blog/7-2). Can this be done for Multisite? Or better yet, use some other more elegant designation that doesn't imply that this is the second of two posts using 7 for the slug? To replicate: Use a Multisite installation. Set permalinks to Post name structure. Create a post without a title. Note that the generated slug is the ID number of the post. Save and then click on the Permalink slug below the title text field. Arrive at 404 page. In admin, change the slug to include a character. Try again. Arrive at correct page. You can also see the same behavior by choosing any titled post in admin and changing its slug to a number that matches its own or any other existing ID. " raskull Future Releases 28288 New Post overwriting a previously published post Posts, Post Types 2.5 normal normal defect (bug) new 2014-05-17T01:03:45Z 2019-06-04T20:47:04Z "This was seen on wordpress.com, a user had multiple draft windows open. At one point when saving one draft, it wrote over another previously published post. I believe that it was caused by a race condition that has to do with the environment being hosted on multiple servers. '''To reproduce:''' 1. Open in quick succession multiple draft windows. 2. Check in developer tools for post_id duplicate. I believe that a possible solution would be to enhance post-locking to include if a post is open in duplicate windows by the same user." jackreichert Future Releases 18395 Non-URL GUIDs are stripped on post update Posts, Post Types 3.2.1 normal normal defect (bug) new 2011-08-13T18:31:48Z 2019-06-04T20:42:09Z "The post guid is run through several filters before the post is saved. the esc_url_raw() call will end up setting a GUID to an empty string if the GUID does not begin with a known/accepted protocol. If a plugin/etc. wants to use the GUID column to store an external ID for an item brought in from another system (say a Flickr photo ID), then updating a post that has the Flickr ID as its GUID through the WP admin will end up setting the GUID for that post to ''. This would need to be changed if the move was made to UUIDs for GUID values as well. Related: #6492. A very basic patch for this specific issue is attached, but a larger discussion around how this should work is likely needed. Related: #18315" alexkingorg Future Releases 21234 Recursive directory creation & get_calendar() for custom post types Posts, Post Types 3.4.1 normal normal defect (bug) new 2012-07-12T12:31:28Z 2019-06-04T20:43:17Z "Hello! I made two patches, and sent the pull request on githab. https://github.com/WordPress/WordPress/pull/12 https://github.com/WordPress/WordPress/pull/14 And I want to join to contributers team. How can I do it? Irc chanel is Terminated :(" avaddon Future Releases 22003 Saving custom fields goes to post-new.php rather than post.php Posts, Post Types 2.5 normal normal defect (bug) reopened 2012-09-26T15:57:01Z 2019-08-09T00:46:50Z "Create a new post or page. Add a title and message. Add a custom field (click ""Add Custom Field"") The post is saved, but as you are taken to post-new.php rather than post.php, it looks as if your post has disappeared! All is well - it is actually saved - but it's confusing. Tested on 3.5-alpha-21989" curiousdannii Future Releases 28017 Slug conflict with hierarchical Custom Post Types Posts, Post Types 3.9 normal normal defect (bug) new 2014-04-24T20:32:46Z 2019-06-04T20:46:48Z "To Replicate, create a '''hierarchical ''' custom post type and make sure it has support for page attributes, lets call it ""items"" Publish 3 ""items"" posts with the following slug and content ( IN THIS ORDER! ) Post 1: Slug - samsung , No Parent , content : ""Welcome to Samsung"" Post 2: Slug - cell-phones , No Parent , content : ""Welcome to cell phones"" Post 3: Slug - samsung , Parent: cell-phones , content : ""Welcome to cell phones by Samsung"" Navigate to http://localhost/items/samsung/ , You will see the content for Post 3. The correct content should be from Post 1. http://localhost/items/cell-phones/samsung/ works just fine. To get the correct results: Modify wp-includes/query.php , line 2340: {{{ // ORIGINAL LINE if ( ! $ptype_obj->hierarchical || strpos($q[ $ptype_obj->query_var ], '/') === false ) { // MODIFIED LINE if ( ! $ptype_obj->hierarchical ) { }}} " internetrnd Future Releases 15993 Sort arrows improperly wrap on narrow columns Posts, Post Types 3.1 normal normal defect (bug) reopened 2010-12-27T06:14:21Z 2019-06-04T20:41:43Z Specifically, I noticed the 'Posts' column on a taxonomy screen (or 'Links' for link categories, etc). nacin Future Releases 25493 Sorting posts in ascending order of date at admin side wonderboymusic Posts, Post Types 3.1 normal normal defect (bug) reopened 2013-10-06T08:57:14Z 2019-06-04T20:44:49Z Posts are displayed in descending order of date in the admin side but if we click on date column header to sort it then again it is sorted in descending order of date instead it should be sorted in ascending order of date. vinod dalvi Future Releases 24415 The 'show_in_admin_all_list' argument for the 'register_post_status' function is ignored when the argument 'public' is set to 'false' Posts, Post Types 3.5.1 normal normal defect (bug) new dev-feedback 2013-05-25T00:06:51Z 2023-05-24T16:08:16Z "Hello, I stumbled upon a bug in the admin section of WordPress. I'm currently running the latest release (3.5.1) without any third-party plugins. After creating some custom post statuses via the 'register_post_status' function, I noticed that posts with them do not appear in the default (all) post listing in the admin section, despite me setting the 'show_in_admin_all_list' argument to 'true'. I narrowed this problem down only to the 'public' argument of the same ('register_post_status') function: if the 'public' argument of custom post status is set to 'true', then everything works as expected and the posts with a custom post status appear in the default (all) post listing in the admin section — but this also makes posts with that custom post status appear to the regular users, making them public, hence the name of the argument. It's worth noting that the 'public' argument has no such buggy effect on the 'show_in_admin_status_list' argument of the same ('register_post_status') function: it doesn't matter to what the 'public' argument is set — the links to the appropriate post statuses are showed at the top of the post listing only based on the 'show_in_admin_status_list' argument, just like it should." XyntaMan Future Releases 30452 _wp_translate_postdata() redundantly+destructively checks current_user_can( $ptype->cap->edit_others_posts ) on update Posts, Post Types normal normal defect (bug) new dev-feedback 2014-11-21T23:13:46Z 2019-06-04T20:48:03Z "The product use-case is that the creator of a post should always be able to edit the post, even when they've assigned someone else as a byline. To do so, I'm storing their user ID to post meta: {{{ public function action_wp_insert_post_persist_author( $post_id, $post, $update ) { $post_obj = Post::get_by_post_id( $post_id ); if ( $update || ! in_array( $post->post_type, Fusion()->get_post_types() ) || ! $post_obj || ! $post->post_author ) { return; } $post_obj->set_first_author_id( $post->post_author ); } }}} And then filtering `map_meta_cap`: {{{ /** * Filter map meta cap to do whatever custom caps we need */ public function filter_map_meta_cap( $caps, $cap, $user_id, $args ) { switch ( $cap ) { case 'edit_post': $post_obj = Post::get_by_post_id( $args[0] ); if ( ! $post_obj ) { break; } $post_type = get_post_type_object( $post_obj->get_post_type() ); // Allow first authors to always edit the post if ( $post_obj->get_first_author_id() && $user_id == $post_obj->get_first_author_id() ) { // Don't require editing others' posts if ( false !== ( $key = array_search( $post_type->cap->edit_others_posts, $caps ) ) ) { unset( $caps[ $key ] ); } // If the post is published... if ( 'publish' == $post_obj->get_status() ) { $caps[] = $post_type->cap->edit_published_posts; } elseif ( 'trash' == $post_obj->get_status() ) { if ( 'publish' == get_post_meta( $post_obj->get_id(), '_wp_trash_meta_status', true ) ) { $caps[] = $post_type->cap->edit_published_posts; } } else { // If the post is draft... $caps[] = $post_type->cap->edit_posts; } } break; } return $caps; } }}} This approach generally works — except the original author isn't able to save an update to a post because `_wp_translate_postdata()` aggressively checks `current_user_can( $ptype->cap->edit_others_posts )` ([https://core.trac.wordpress.org/browser/tags/4.0.1/src/wp-admin/includes/post.php#L67 ref]). A check for `current_user_can( $ptype->cap->edit_post, $post_data['ID'] )` was added to `_wp_translate_postdata()` in r22950, but the changeset also leaves in the `edit_others_posts` check. Given `current_user_can( 'edit_post' )` falls back to `edit_others_posts` behind the scenes ([https://core.trac.wordpress.org/browser/tags/4.0.1/src/wp-includes/capabilities.php#L1114 ref]), I'd expect we could remove the second check." danielbachhuber Future Releases 35871 before_delete_post incorrectly triggered from edit.php to post.php Posts, Post Types 4.4.2 normal normal defect (bug) new reporter-feedback 2016-02-19T10:44:18Z 2019-06-04T20:55:27Z "It seems there's a bug where {{{before_delete_post}}} triggers when clicking the post name (on edit.php) to go to the post.php admin edit screen. I have this code {{{#!php 'test', 'post_content' => 'test', 'post_status' => 'publish', 'post_type' => 'test', 'post_author' => 1, 'post_date' => '2015-01-22 22:00:12', 'post_modified' => '2016-04-18 12:12:12', 'comment_status' => 'closed' ); wp_insert_post( $wp_test ); }}} outcome: post_modified = '2015-01-22 22:00:12'" gijsgg Future Releases 11381 display_page_row() generates boat loads of needless queries pbearne Posts, Post Types normal normal defect (bug) assigned 2009-12-10T12:41:45Z 2024-02-22T22:43:04Z "on sites with many static pages that are spread across multiple parents, display_page_row() triggers multitudes of calls to the db. specifically, it's repeatedly calling get_pending_comments_num(). it's also calling get_editable_user_ids() and wp_dropdown_users(), both of which do not seem to cache their results in case they're used several times on the same page." Denis-de-Bernardy Future Releases 17374 get_pages() with child_of forgets sort DrewAPicture Posts, Post Types 3.1.2 normal normal defect (bug) assigned dev-feedback 2011-05-11T10:06:17Z 2023-04-18T12:45:36Z "If you call {{{get_pages()}}} with both the {{{child_of}}} and {{{sort_column}}}, the sorting is not applied. {{{child_of}}} makes it select all pages (sorted) and later applies a subselect via {{{get_page_children()}}}. This subselect can mess up the sort order. An example was reported on http://wordpress.stackexchange.com/questions/16921/get-pages-not-ordering-as-it-should Related: #12821" janfabry Future Releases 25113 non-latin CPT rewrite slugs fail `wp_safe_redirect` Posts, Post Types 3.6 normal normal defect (bug) new 2013-08-21T20:37:36Z 2019-06-04T20:44:40Z "If you localize your custom post type rewrite slugs in non-latin language and pass it to `wp_safe_redirect` it will strip all non-latin characters and attempt to redirect to stripped location. This can be easely reproduced if your custom post type supports comments and you submit a comment from post type single page as `wp_safe_redirect` is called after comment submission." entr Future Releases 30250 Add filter for query used in `wp_count_posts()` Posts, Post Types normal normal enhancement assigned 2014-11-04T18:04:59Z 2019-06-04T20:47:58Z "Use case: if my list table is filtering to a specific taxonomy term, I'd like my view counts to reflect that filter. The existing filter added in #16603 still means I need a lot of duplicate code, and two queries." danielbachhuber Future Releases 27253 Enhancement Request: direct link to Drafts under Posts and Pages on the sidebar chriscct7 Posts, Post Types 3.8.1 normal normal enhancement assigned 2014-03-02T04:32:36Z 2019-06-04T20:45:53Z "It would be awesome if there were a link under posts and pages to get directly to Drafts. So, for example the sidebar would have: {{{ Pages All Pages Drafts Add New }}}" imanilea Future Releases 36314 If orderby undefined, alter get_posts to defer to WP_Query's default Posts, Post Types normal normal enhancement new needs-unit-tests 2016-03-23T22:22:46Z 2019-06-04T20:56:15Z "If the argument is undefined, defer `get_posts` orderby & order to that of WP_Query's. For search strings, this will order posts by relevance. In other cases it will have no effect." peterwilsoncc Future Releases 20748 Include CPT Posts in Author Count & Archive Page Posts, Post Types normal normal enhancement new 2012-05-25T17:59:48Z 2019-06-04T20:43:09Z "For whatever reason, the default behavior is to only count the number of 'post' that an author has published. With the advent of custom post types, they should be included as well if the CPT has the 'author' capability. Currently, the author archive can include CPTs if you manually alter the query - this should be enabled by default if authorship is allowed." iridox Future Releases 23169 Introduce register_post_status_for_object_type Posts, Post Types normal normal enhancement new 2013-01-10T08:35:46Z 2019-06-04T20:43:41Z Similar to what `register_taxonomy_for_object_type` does with taxonomies. kovshenin Future Releases 23168 Introduce remove_post_status Posts, Post Types normal normal enhancement new 2013-01-10T08:32:49Z 2019-06-04T20:43:39Z Plugins and themes should be able to remove the default post statuses defined by core. kovshenin Future Releases 15930 Make trashed posts/pages still readable Posts, Post Types 2.9 normal minor enhancement new 2010-12-21T10:32:30Z 2019-06-04T20:41:42Z "I hoped I was able to see the pages which I delete (in the trashbin) but the all stay dark... So I can't view them! I think it would be a good feature to see them to see if somebody didn't delete the wrong page! Or when you need something form a deleted page that you can still get it without restoring it first" JonezJeA Future Releases 22845 On 32-bit systems, with post IDs higher than PHP_INT_MAX (2147483647) wordpress does not run fine Posts, Post Types 3.4.2 normal normal enhancement assigned 2012-12-10T09:13:01Z 2019-06-04T20:43:30Z "Logging all the MySQL queries I discovered that the queries that should pick my posts were all doing something like this: SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647) This 2147483647 number clearly has something in it: it's the PHP_INT_MAX value on 32-bit operating systems, while on 64-bit machines it's 9223372036854775807 http://php.net/manual/en/language.types.integer.php So, the problem is divided in 2 parts: I run on a 32 bit system, and I have my IDs a bit too high. I know that 2147483647 is a bit high for a post ID, but I discovered this the hard way. Now, I would have preferred an error message in the administrator interface. Do you think it's a good idea?" copesc Future Releases 36324 Post status labels use inconsistent grammar Posts, Post Types normal normal enhancement new dev-feedback 2016-03-25T05:57:25Z 2019-06-04T20:56:27Z "Our post status labels switch back and forth between being verbs, adjectives, or potentially past-participles: * All * Mine * Published * Scheduled * Drafts * Trash I'd like to suggest we tidy these up. Maybe something like: * All * Authored (I don't love this, but you get the idea) * Published * Scheduled * Drafted * Trashed " johnjamesjacoby Future Releases 35842 Register Post Type function label default Posts, Post Types normal normal enhancement new dev-feedback 2016-02-16T10:14:42Z 2019-06-04T20:55:17Z "When registering a Post type if the label or labels arguments are not set the label takes on a default of 'Posts' and not the Post type's name. It states in the documentation that the label takes on the name of the Post type passed in as the first argument. I believe the fix is as simple as updating the defaults variable in wp-includes/post.php on line 1017 with the label argument set to the post_type variable. {{{#!php $post_type, 'labels' => array(), 'description' => '', 'public' => false, 'hierarchical' => false, 'exclude_from_search' => null, 'publicly_queryable' => null, 'show_ui' => null, 'show_in_menu' => null, 'show_in_nav_menus' => null, 'show_in_admin_bar' => null, 'menu_position' => null, 'menu_icon' => null, 'capability_type' => 'post', 'capabilities' => array(), 'map_meta_cap' => null, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'has_archive' => false, 'rewrite' => true, 'query_var' => true, 'can_export' => true, 'delete_with_user' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', ); }}}" moshiezz Future Releases 24572 Should be able to unlock a post outside of ajax handler Posts, Post Types normal normal enhancement new dev-feedback 2013-06-12T20:28:37Z 2019-06-04T20:44:25Z "Right now you can programmatically lock a post for editing using wp_set_post_lock, but you can't unlock it in a similar fashion. The only unlocking code is found in the ajax handler wp_ajax_wp_remove_post_lock. I've created a function wp_unset_post_lock in the style of wp_set_post_lock that unlocks a post with a given ID. I've also refactored wp_ajax_wp_remove_post_lock to use this function. The only resulting difference is that we use the current user's ID instead of the one supplied in the ajax call, but since we're unlocking the post instead of locking it, it doesn't really matter who's ID is in the meta. This change was requested by Joey Kudish of the VIP team." bbrooks Future Releases 35082 get_adjacent_post() when using in term doesn't account for child terms Posts, Post Types normal normal enhancement new 2015-12-14T21:05:29Z 2019-06-04T20:53:35Z "When using any of the next or previous post functions with $in_term set to true only top level terms are accounted for. This means if two posts are in the same child term, and a third is not but is between the posts date range then the third will take precedence. Although I am sure it will be up for discussion, I believe child terms should take priority. Take the following posts for example: '''Post 1''' Date: 01/01/2015 Categories: Parent -> Child '''Post 2''' Date: 02/01/2015 Categories: Parent '''Post 3''' Date: 01/01/2015 Categories: Parent -> Child '''Expected Functionality (In my opinion):''' Post 1 get_adjacent_post(true) should return Post 3 '''Actual Functionality:''' Post 1 get_adjacent_post(true) returns Post 2, which does not match the child term. My attached patch simply removes parent terms from the query, where a child of it is set. This means that only the deepest selected terms will be used, where children and parent terms are set. I have also attached an export of my posts to highlight the issue more clearly, along with a patch to Twenty Fifteen purely to help represent the issue. This really is just an initial draft suggestion for the code, backwards compatibility is obviously extremely important however more discussion about this is needed. There is another issue related to this function involving dates . Sorry if this should be tagged as an enhancement rather than a bug." WazzaJB Future Releases 12567 make post_submit_meta_box more generic Posts, Post Types normal normal enhancement new 2010-03-10T00:46:20Z 2019-06-04T20:41:05Z "Currently there isn't a way to modify the meta boxes which set the post status. The function post_submit_meta_box in wp-admin/includes/meta-boxes.php is a closed function with post statuses hard coded. A new post status registered using register_post_status is available to the query object and plugins but cannot be added to the post status select box in the publish meta box. A lot of the post_submit_meta_box is hardcoded to the default post status types. Consider the use case where you want posts to only be visible to logged in users. A custom post status selectable by the user in add/edit post could be used which is then added or excluded in the query (filtered by posts_where) depending on whether the user is logged in or not. This way core can handle the non-visible posts the way private or future posts are handled. " themattharris Future Releases 19572 switch_to_post() stack implementation (similar to switch_to_blog()) Posts, Post Types 3.3 normal normal enhancement new 2011-12-15T21:54:57Z 2019-06-04T20:42:36Z "One of the challenges themes and plugins have is the balance between utilizing the core APIs that rely on global variables, while leaving things in a ""clean"" state for the next worker in the chain. For example, I might have a shortcode that pulls content from another post, outputs a title or some other data, then needs to restore the previous post environment. The attached patch provides APIs for doing just this - using the same stack approach that switch_to_blog() takes in a multi-site instance. To set up a post context, call: switch_to_post($post_id); This can be called multiple times, diving deeper into the stack. Then each process is responsible for restoring the $post context by calling: restore_post(); This goes back to the stack, bumps out the current post and restores the previous post's context. There is some test code for demonstration here: https://gist.github.com/1309915" alexkingorg Future Releases 43326 Delay when setting Featured Image Post Thumbnails 4.9.4 normal normal Awaiting Review defect (bug) new 2018-02-15T00:09:47Z 2018-02-15T03:49:14Z "When setting a Featured Image on a page/post, there's a delay of a few seconds after choosing the image. If you hit the page/post Update button before the Featured Image is displayed, it won't be saved. Perhaps disable the Update button until the featured image has finished setting." bluesix Future Releases 58402 Featured Image Preview breaks when an SVG image is uploaded. Post Thumbnails normal normal Awaiting Review defect (bug) new dev-feedback 2023-05-25T09:26:43Z 2023-05-30T17:15:00Z "Steps to reproduce. Add a new post - set a featured image. Use an **SVG** as the featured image. The layout breaks inside **InspectorControls** It seems to be because the image tag returns 0 as its naturalWidth/naturalHeight. Reference for what seems to be the issue with SVG. https://bugzilla.mozilla.org/show_bug.cgi?id=1607081 **Note**: This can only be reproduced if, SVG image upload is enabled via functions.php. Since by default, WordPress doesn’t allow SVG upload." deepakvijayan Future Releases 44077 Image editor not working after WP update 4.9.5 this week Post Thumbnails 4.9.5 normal major Awaiting Review defect (bug) new reporter-feedback 2018-05-14T17:36:37Z 2018-06-25T11:02:16Z "Hi: I used to upload images to my wordpress site, then resize them to fit my columns of info. After this week's update: 1. I am unable to select & copy images; it must be done at the text level. 2. If you left click on an image, you automatically jump to the bottom of the open page. 3. If you try to use the image delete (""X"") or edit (pencil image), nothing happens. I am using regular google browser, I see that some other users have inquired about this exact problem recently, but it appears unresolved. Is there a way to make it function like before? Thanks & we appreciate all you do. Paul Chandler www.pickguardplanet.com " adrianchandler Future Releases 55019 Missing the Upload Featured image and Categories option after update the WP 5.9 Post Thumbnails 5.9 normal major Awaiting Review defect (bug) new 2022-02-01T06:06:16Z 2023-10-18T15:18:47Z "Hello. With the update to WordPress 5.9, I discovered one significant inconvenience. I read all the descriptions, searched the forum, but did not find how to solve a problem. The only way, which is working now – to log out, delete all cookies for the website in the browser, log in back and edit ONE post. For the second post, the problem is back and I need to log out and delete cookies again. And yes, the problem occur even when I deactivate all plugins and use the default theme. [[Image(https://i.ibb.co/0KSmCXK/2022-02-01-08-56-27.png)]] The point is that my theme (like many others) is designed to be used with Featured Image. Previously, it was in the right column in the admin panel, where I can select a picture and the theme displayed as the cover of the post. Also, there was a list with categories, but now it's empty. [[Image(https://i.ibb.co/Br330Hp/2022-02-01-08-57-14.png)]] And of course, I have a lot of categories. And no, I can't activate the Featured image in settings, cause there is NO such setting in the preferences. Sorry for the Russian language on the screens, but you can see that these elements just don't exist. [[Image(https://i.ibb.co/9nFgYcH/2022-02-01-08-56-54.png)]] Now I need to add a block in the text itself with the Featured Image. But the problem is that the theme takes a picture from this block and puts it on the cover. Plus, because I inserted the image into the text, it appears in the text as well. I end up with a duplicate image on the page. I think this is very strange. Please, fix it, cause I can't work with the 5.9 :( We need to spend doubled time on 1 post. Thank you in advance." Kuuuzya Future Releases 39736 Thumbnail src image link to direct large image, cause low page speed Post Thumbnails normal normal Awaiting Review defect (bug) new 2017-01-29T19:38:13Z 2022-03-22T04:33:53Z "Hi, i have install wordpress and add some images to my post.. but when i test it on page speed check it returns me bad figures you may check http://bit.ly/2k6lXNw. i have used coped images but google take it as large images. I have searched a lot and find out something. related images thumbnail src linked with direct image link you may see through source code: [https://postimg.org/image/k71uvbah9/] it is not causing by theme it is causing by wordpress. but i don't know how to fix it" mcky909 Future Releases 45356 adding a featured image takes forever now, what's going on with that. Post Thumbnails 5.0 normal minor Future Release defect (bug) assigned reporter-feedback 2018-11-15T01:48:06Z 2018-12-16T23:33:11Z "If I try to quickly add a featured image, and click publish the featured image won't save. I have to wait until the thumbnail appears indicating that it's actually saved the featured image. The only problem with this is that it takes likes 5 seconds, whereas it used to be near instantly. This could be improved, I may take a look into it myself and see if I can figure anything out to improve the performance there. I experienced this issue on Ubuntu 16.04 LTS on Google Chrome" coffeywebdev Future Releases 50847 update_post_thumbnail_cache returns notice when get_the_post_thumbnail used with ID after setup_postdata() Post Thumbnails 5.4.2 normal normal Awaiting Review defect (bug) new 2020-08-04T17:23:43Z 2020-08-21T10:55:00Z "**Situation:** - Inside main loop - foreach over array of (related) post_id's, - use ''setup_postdata($post)'' for each item - Items call get_template_part(something) - Template parts uses ''get_the_post_thumbnail'' which allow a post_ID - ''get_the_post_thumbnail'' calls ''update_post_thumbnail_cache'' (because in_the_loop) - ''update_post_thumbnail_cache'' gives **notice on line 101: Trying to get property 'ID' of non-object** - Restore main loop with wp_reset_postdata() **Possible fix:** Change this {{{#!php posts as $post ) { $id = get_post_thumbnail_id( $post->ID ); if ( $id ) { $thumb_ids[] = $id; } } }}} To this {{{#!php posts as $post ) { if (is_object($post)) { $post = $post->ID; } $id = get_post_thumbnail_id( $post ); if ( $id ) { $thumb_ids[] = $id; } } }}} in /wp-includes/post-thumbnail-template.php line 101 " tomcent Future Releases 28461 Add a fallback parameter to get_the_post_thumbnail() to find images Post Thumbnails 3.9 normal normal Awaiting Review enhancement new 2014-06-05T06:55:46Z 2017-02-06T12:42:44Z "In the 3.6 cycle, there was a lot of talk about grabbing various media types from the content for post format handling. #22960 is basically the end of that conversation, and includes a lot more stuff. #23593 is also related, but ended up getting closed in favor of #22960, which died with the post format UI. Within that realm, the `get_the_image()` function from Justin Tadlock's Get The Image (https://github.com/justintadlock/get-the-image) plugin came up a bit. It's a super handy function. Although, it was mostly discussed as a piece of post formats. You can see it's got a whole bunch of functionality, but I'm mostly interested in its ability to find a fallback image in the content. I'd like to see something like `get_the_image()` be able to be called via some kind of parameter within `get_the_post_thumbnail()` and therefore `the_post_thumbnail()`. Justification: There are times in building out a theme where you'd want the **exact** featured image or none at all (like a big wide header banner or something), but other times it's great to have any 'ole fallback, like a more traditional square thumbnail on blog archives. In these situations, often which are theme driven, and not custom site driven, it'd be great for the theme developer to be able to assign fallback rules when they call `the_post_thumbnail` itself. Whether that's through a new parameter, or maybe just an additional key / value for 'fallback' to the `attr` parameter... I don't know. But for a theme (where most image sizes are registered anyway) to be able to define fallback behavior for those same image sizes would be powerful." krogsgard Future Releases 40469 How to remove full size image path from srcset and more intelligent choices in srcset candidate list Post Thumbnails 4.7.3 normal normal Awaiting Review enhancement new 2017-04-16T22:41:15Z 2017-06-28T12:38:06Z "On our site, we have a number of image sizes registered in WP, in addition to the default ones, for a variety of purposes. A large one to fill the width of our column, smaller ones for some custom image output, etc. The result of this is a sloppy srcset candidate list filled with URLs that may make no logical sense in a particular location in the markup. WP does have an upper size limit to prevent giant images from being in srcset, and also matches aspect ratio, but nothing else. I have been able to hack together a filter using `wp_calculate_image_srcset_meta` to unset various sizes in the `sizes` array. But if the full size of the image is smaller than the `max_srcset_width` parameter, it still gets included, and there should be some way to remove it. The full size of the image is not part of the `sizes` array in image_meta. It actually points to a larger issue with WP srcset implementation, which is that is mindlessly fills the HTML with srcset candidates that in many instances would never be used, adding lots of excess markup that a developer wouldn't add. For example, we have a 300px wide sidebar where we output an image. The sidebar is never larger than 300px, and even is that size in our responsive site on mobile. The srcset outputs a 150px, 200px, 300px, 600px, 768px and 1240px, based on the sizes registered in our installation and the built-in ones. Logisitically, all that is really needed for this layout is 300px and probably the 600px version. We have all sorts of examples like this where the srcset includes either smaller or larger sizes than are physically possible in a given layout. Obviously WordPress cannot know how a site is styled, but it feels like there needs to be a more robust way of dealing with this. It is not a great feature to load up on unneeded markup. As a theme developer, I would like the ability to constrain the srcset candidate list in an intelligent way each time I output img tags into the markup. It is easy for me to say ""at this location, this image will never be smaller than 300px, so don't give me anything smaller, and will also never be bigger than 300px, so only go up to a 2x version and skip anything larger. I'm guessing this is exacerbated by a variety of themes and pluging that may load up on extra registered image sizes as well." lisota Future Releases 56056 Specify a Custom Array of $sizes for `wp_get_attachment_image` to Reduce HTML Bloat Post Thumbnails normal normal Awaiting Review enhancement new 2022-06-23T15:44:50Z 2022-10-12T18:04:54Z "Plugins and the theme can specify multiple thumbnail sizes. Using `wp_get_attachment_image` provides a modern solution to responsive image sizes, however, it does not currently account for reducing the bloat to all the registered thumbnail sizes that are added by plugins / theme. Therefore a proposal is to allow a custom list of thumbnails to use, this can, for example, be specified as: {{{#!php Writing, change the Default Post Format to Video 3) Add a new post, it will show the Video format post selected (even if it's not allowed). Add a Featured Image and publish the post. The Featured Image will not show on the front page. I've tested and reproduced this behavior with WP Admin and Calypso for WordPress.com and on a self hosted site. I tried different themes and post formats, but was able to reproduce only with Video format, and found only this theme that it's not allowed. Let me know if you need any other information. Thanks, Carina Pilar Happiness Engineer Trial" carina.pilar Future Releases 43613 Default post format setting does not respect theme support Post Formats normal normal Awaiting Review defect (bug) new 2018-03-22T22:20:39Z 2023-08-01T16:30:49Z "In `options-writing.php`, the `Default Post Format` setting does not check whether the current theme supports the built-in formats. Would it not be more intuitive if only the formats supported by the current theme were in the list to select? Then a description could be added underneath to say ""these are the formats supported by the currently selected theme"". Alternatively, there could be a filter added to `get_post_format_strings` in `wp-includes/post-formats.php` to allow themes/plugins to remove available formats from this list. " seanleavey Future Releases 43482 Draft Posts Throw 404 on Preview when Supporting post_format Post Formats 4.9.4 normal normal Awaiting Review defect (bug) new 2018-03-07T01:07:03Z 2018-03-07T01:07:03Z "A client is reporting that they're not able to preview drafts of some of the custom post types we have running on their site. The issue is not occurring for all post types on their site. I believe I've traced the issue to the fact that the errant post types support ""post_format."" The preview URL that gets generated when I preview the ""ask-the-expert"" post is: https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&post_format=standard&_thumbnail_id=-1 That above URL throws a 404 page. When I pull out the 'post_format=standard' part of the query, so that the URL looks like: https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&_thumbnail_id=-1 then the preview loads correctly. Interestingly, just for giggles I also tried: https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&_post_format=standard&_thumbnail_id=-1 and that also worked as it should. (notice the added underscore before 'post_format.' For now I think I'm just going to disable post formats for the offending post types, but methinks I found a bug. " marklavin Future Releases 47359 Unable to distinguish post formats when viewing list tables on mobile Post Formats 5.2.1 normal normal Future Release defect (bug) new 2019-05-23T01:03:32Z 2021-04-27T16:51:41Z "Post format icons were recently removed from post list tables and a post format dropdown menu introduced to allow people to filter posts by format. See #46591 and [44961]. On narrow screens, however, the filter tools are hidden leaving mobile users with no way distinguish the format of their posts. I suggest we revisit the decision to remove post format icons and consider the mobile user experience." ajfleming Future Releases 23257 Add plural versions of Post Format strings Post Formats 3.5 normal normal Future Release enhancement new 2013-01-22T00:59:30Z 2017-07-17T16:37:15Z "To make it easier for theme authors to create meaningful titles for post format archive pages, we could extend `get_post_format_strings()` to also provide a standardized set of plurals. I'm not entirely sure whether the plurals I used in the diff are the ones we actually want to go with (apparently there is no plural of 'Audio'?), but the change is fairly simple and is backwards compatible. See [https://github.com/Automattic/_s/pull/137 this discussion] for additional context." obenland Future Releases 34552 Remove default post format setting Post Formats normal normal Awaiting Review enhancement new 2015-11-02T06:16:58Z 2017-04-24T20:01:48Z "It doesn't matter why, but it seems to me that there isn't any real theme support for post formats (real = post formats are actually displayed in a vastly different way than standard), therefor I doubt anyone actually uses the default post format setting or needs it. The default should most likely be standard with a filter to override it, I don't think there is a need to anything more complex than that with the way the feature is actually being used." mark-k Future Releases 23863 Post Formats: allow filtering content_width per format in wp-admin Post Formats normal normal defect (bug) new dev-feedback 2013-03-25T20:55:33Z 2019-06-04T20:43:59Z "On front-end a theme can filter {{{$content_width}}} like so: {{{ function twentythirteen_content_width() { if ( has_post_format( 'image' ) || has_post_format( 'video' ) ) { global $content_width; $content_width = 724; } } add_action( 'init', 'twentythirteen_content_width' ); }}} But ... functions called in wp-admin that use the global {{{$content_width}}} variable won't be changed. For example, using trunk and Twenty Thirteen theme: 1. Create a new post, set to Image post format 2. Click Add Media to insert an image 3. Upload an image at least 800 px wide 4. You'll see in ""Attachment Display Settings"" that width for the ""large"" size to insert to the post is 604 pixels and not 724. Also, even if detecting a Post Format this way worked correctly on edit, it wouldn't work on first post creation because of how the UI uses JS to switch between the formats." lancewillett Future Releases 27425 Templates For Posts Formats Post Formats normal normal enhancement new dev-feedback 2014-03-15T18:16:18Z 2019-06-04T20:46:12Z "If I opt to use Custom Post Templates, then I can easily put a custom post template by putting a file named single-[name of the custom post], but that same feature is not available for the post formats. I love the post format feature in WordPress, and people just don't want to use that for some reasons, but this would really attract some of the audience to use the post formats. For example, a post with Audio format will first look for single-audio.php or single-audioformat.php or anything cuz it single-audio.php may effect the Audio Custom post type. What do you guys think of this idea?" hardeepasrani Future Releases 60550 A plugin is deactivated if it is updated and the plugin folder has been renamed at some point. Plugins 6.4.3 normal major Awaiting Review defect (bug) new dev-feedback 2024-02-15T14:56:38Z 2024-02-15T15:28:57Z "This seems to be a new unexpected behavior: A plugin whose folder has been renamed will be deactivated as soon as you update it. Reproduce: - Rename the folder of an activated plugin to something like plugin-name-xy (People do this all the time for several reasons) - The plugin will be disabled (expected due to the modified plugin folder) - Activate again the plugin via wp-admin - Update the plugin to a new version - The plugin folder will be renamed to plugin-name (Unexpected) - The plugin will be disabled silently (Unexpected) " ReneHermi Future Releases 54994 Action Hook admin_enqueue_scripts and wp_enqueue_scripts Plugins 5.9 normal normal Awaiting Review defect (bug) new reporter-feedback 2022-01-30T08:58:51Z 2022-01-31T01:12:29Z "Hey, I'm a developer, I wanted to know if it's a bug, or am I doing it wrong way? When using admin_enqueue_scripts (both methods static in the same class, I can not use it this way [ ( new self() ), 'admin_enqueue_scripts' ], It will throw errors). {{{#!php You could also just edit the database entry of `_site_transient_update_plugins` to trigger the ""has update"" alert in the plugins list... All this makes the `Update URI` pretty much dysfunctional (in the sense that it is not really useful at all) and the developer still needs to manually filter the ThickBox content for the ""View update details"" or even for the ""Plugin details"". And the documentation about all this is either inexistent or very limited (opened a separate issue about that [https://github.com/WordPress/Documentation-Issue-Tracker/issues/1194 here] IMO, passing a custom Update URI should completely unhook all Callisto the WP Org Api and either not allow to ""view details"" at all, or at least provide some ways to populate that window with custom details (or at least read from the plugin data, which it does not: it reads from remote)." bedas Future Releases 43505 Display of html encoded text in dashboard. Plugins normal normal Awaiting Review defect (bug) new 2018-03-08T21:59:56Z 2018-03-08T22:57:45Z "I have discussed the issue in this thread https://make.wordpress.org/polyglots/2018/02/26/hello-18/, I report here the issue of the display of the text in UI, not the editorial choice of the translation itself. In fr_FR and fr_CA, there where changes done (last year?) to accomodate french ponctuation typographic rules but also, I guess, make sure the text doesnt fall on two line inadvertantly (ex. ""text !"", so a non-breaking space is inserted instead of a space). This non-breaking space is inserted as html encoded entity and it looks like it is displayed as is, without decoding like it is visible in this exemple screenshot : https://imgur.com/a/iVy9h " anonym999999 Future Releases 60491 Fix handling of plugins with unmet requirements Plugins 5.1 normal normal Future Release defect (bug) new 2024-02-10T01:03:03Z 2024-02-20T07:25:40Z "There are several bugs/inconsistencies when WordPress handles plugins with unmet requirements. - A plugin with unmet requirements cannot be installed or updated when using the UI, but this is possible to do/there are no checks when a plugin is installed or updated directly (with FTP, SSH, or git/svn). - A plugin with unmet requirements cannot be activated if already installed (happens only when a plugins is installed/updated from FTP, SSH, or git/svn). But if the plugin is already activated, it is not deactivated and continues to load. - The UX can be better. The warnings in wp-admin when a plugin has unmet requirements are somewhat inconsistent, and there are no email notifications if any of these errors occur automatically (for example a script is running on the server that uses svn or git to update plugins). " azaozz Future Releases 47730 Function plugins_api is not triggered for non wp-marketplace plugins Plugins 5.2.2 normal normal Awaiting Review defect (bug) new dev-feedback 2019-07-18T07:32:17Z 2019-08-23T07:28:43Z "I currently try to setup a private-hosted repository for my own plugins / themes and tried to do that with the filter hooks in the plugin-install.php file - the documentation of it indicates that this should be possible, even on the latest version (5.2.2). I activated my own plugin on my bedrock (https://roots.io/bedrock/) setup and following the tutorial https://rudrastyh.com/wordpress/self-hosted-plugin-update.html#comments i tried to implement the update mechanism. I think while doing that i stumbled upon a bug that causes wordpress to not trigger the plugins_api method at all - i can hook into the ""site_transient_update_plugins"" filter to display the update-badge next to the plugins navbar item but the update text / button and show-details button for my plugins wont show up." marthm Future Releases 52829 Getting some code when Update failed plugin Plugins 5.7 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-03-17T04:55:36Z 2021-03-17T17:51:16Z "Hi, When i ma trying to update plugin then got script return n the page. So it is WordPress issue? You can see mentioned screenshot." sumitsingh Future Releases 53168 Ghost pages from Plugin Plugins 5.7.1 normal normal Awaiting Review defect (bug) new 2021-05-06T17:50:18Z 2021-05-06T17:50:18Z "Opening a ticket here for potential security vuln caused by plugin that has since been disabled. I was unable to get an answer to the problem from the plugin sub-forum. **PROBLEM:** Elementor Plugin creates ""preview"" pages that remain in service even after disabling the plugin. **SPECIFICS:** Ghost Elementor pages most likely left over from drafting the page. **EXAMPLE:** https://www.example.com/?elementor-preview=7&ver=1618188909 **LINK WP SUPPORT:** https://wordpress.org/support/topic/ghost-pages-elementor-preview/#post-14346655 **VERSION:** WordPress 5.7.1 running Zita theme Please advise where/how to resolve this issue if bug ticket is not the correct path for the problem. Thank You." Beeblebrox-BSD Future Releases 45544 Headers already sent at Plugins Page Install Plugins 5.0 normal minor Awaiting Review defect (bug) new reporter-feedback 2018-12-08T23:21:02Z 2018-12-13T03:39:53Z "I updated to the latest version (Bebo 5.0) and began to appear this alert and this error on the plugins installation page. [[Image(https://lunestudio.com.ar/wp-colaborate/warnnings.png)]]" lunestudio Future Releases 55616 Helper function to unhook anonymous class methods Plugins normal normal Awaiting Review defect (bug) new dev-feedback 2022-04-25T13:12:13Z 2022-05-13T08:50:06Z "Problem: it’s pretty common (even if it’s not polite) for plugins to use a class constructor to hook their own public methods into things, but doing so makes it ''near-impossible'' to unhook procedurally. Solution: I just ran across the following function on StackExchange, and imagined something similar could be quite useful to have globally available: https://wordpress.stackexchange.com/a/304861 It’s gnarly, but it works, and I think having WordPress core include this functionality makes more sense than having plugin authors all include their own version of it." johnjamesjacoby Future Releases 40795 If plugin zip file has very long name, windows systems can fail to upgrade Plugins 4.7.5 normal normal Awaiting Review defect (bug) new 2017-05-17T23:17:52Z 2018-09-17T17:01:06Z "If a plugin upgrade zip file has an extremely long name and the plugin a deep directory structure, windows can fail to create directories and therefore the plugin upgrade will fail. I suggest WordPress have an upper limit on the working directory name that is well-shy of that limit--and realistically, even 32 characters might be plenty, as the upgrader only needs to avoid other plugins being upgraded at the same time. Windows has a 247-character limit to the total ''path'' name for directories, as said directory needs to be able to hold, at a minimum, an ""8+3"" file, and allow for a null byte or similar at the end of path + file (260 total characters). As an example, SearchWP fails to upgrade on my local system (WAMP running on top of Windows 10) because the downloaded zip filename is 142 characters long ''sans'' extension (redacted in case this is a license key): {{{ XXX0XXX0XxxxXXxxXXX0XxXxXxX0XXXxXxXxXXXxXxXxXXX0XXx 0X0XxXXx0XxX0XXxxXXX0XXx0X0XxXXX0Xxx0XxX0XXXxXXX0XX XxXxx0xXXXXx0xXXXxxxxxXxxxX0XxXxX-0xxXXx.zip }}} Combine that with my wordpress location on disk: {{{ C:/wamp/www/example/wp-content/upgrade/ }}} And this directory cannot be created because the total path is 254 characters long (including the hidden null): {{{ C:/wamp/www/example/wp-content/upgrade/XXX0XXX0Xxxx XXxxXXX0XxXxXxX0XXXxXxXxXXXxXxXxXXX0XXx0X0XxXXx0XxX 0XXxxXXX0XXx0X0XxXXX0Xxx0XxX0XXXxXXX0XXXxXxx0xXXXXx 0xXXXxxxxxXxxxX0XxXxX-0xxXXx/searchwp/vendor/ pdfparser/vendor/smalot/pdfparser/src/Smalot/PdfParser }}} I think that while this may be an outlier, it's a hard bug to chase for a vendor who may not have windows systems available...and even they do have such an environment available, the results returned by Apache when running WAMP (or in similar environments) does not reflect the actual cause of the error. Looking at the structure above as pretty much as edge-case as you are likely to get, even a truncate at 64 characters would have been more than adequate, while 32 characters would give quite a bit of room for flexibility. I believe that this could be affected by altering `wp_tempnam()` in `file.php`: {{{ /** * Returns a filename of a Temporary unique file. * Please note that the calling function must unlink() this itself. * * The filename is based off the passed parameter or defaults to the current unix timestamp, * while the directory can either be passed as well, or by leaving it blank, default to a writable temporary directory. * * @since 2.6.0 * * @param string $filename Optional. Filename to base the Unique file off. Default empty. * @param string $dir Optional. Directory to store the file in. Default empty. * @return string a writable filename * * @since x.x.x * @param int|string $maxlen Optional. Maximum length (excluding extension) of returned filename */ function wp_tempnam( $filename = '', $dir = '', $maxlen = 32 ) { if ( empty( $dir ) ) { $dir = get_temp_dir(); } if ( empty( $filename ) || '.' == $filename || '/' == $filename || '\\' == $filename ) { $filename = time(); } // Use the basename of the given file without the extension as the name for the temporary directory $temp_filename = basename( $filename ); $temp_filename = preg_replace( '|\.[^.]*$|', '', $temp_filename ); // new: truncate the filename if longer than specified $max = intval( $maxlen ) > 0 ? intval( $maxlen ) - 6 : 32; $temp_filename = strlen( $temp_filename ) > $max ? substr( $temp_filename, 0, $max ) : $temp_filename; // ... remainder omitted for clarity return $temp_filename; } }}} An alternative would be to require plugin upgrade files to have filenames shorter than [insert recommendation here], though actually checking that would mean a similar chunk of code would need to be added elsewhere in WP. (Not sure exactly where the best place to document this for plugin authors, which could be done immediately.)" rogerlos Future Releases 38012 Improve data validation in plugin.php Plugins 4.6 normal normal Awaiting Review defect (bug) new reporter-feedback 2016-09-09T19:04:22Z 2022-08-27T23:33:18Z "function plugin_basename does not do proper data validation of $realdir variable before attempting to use strpos(): PHP Warning: strpos(): Empty needle in /wp-includes/plugin.php on line 736" rpayne7264 Future Releases 60728 Install/upgrade latest supported version of plugin, when latest version of plugin is not supported Plugins trunk normal normal Future Release defect (bug) new close 2024-03-07T20:49:11Z 2024-03-14T13:38:00Z "== Expected behaviour == When a user finds a plugin to install and the latest version requires a newer version of WordPress, an older version of that plugin which does support the installed version of WordPress is installed. When a user goes to the plugins page to update their plugins, the user is prompted to install newer versions of a plugin which still support the installed version of WordPress. == Actual behaviour == User is presented with an error telling them that the plugin doesn't support their version of WordPress and can't be installed. User is not shown any updates available for plugins where the latest version doesn't support the installed version, even if dozens of newer versions are available which do support it. == Problem == This becomes a particular problem when using something like the Debian packaged version of WordPress (where the version will only be updated every 2 years) when combined with plugins (e.g. Yoast) that, for some reason, keep increasing the minimum version every few months to the latest release. In the above situation, the user upgrades to a newer version of WordPress, but the plugin has already made a new release that requires an even newer version of WordPress. Thus the user doesn't get any notification or easy way to upgrade a plugin which is now several years old and doesn't work with the installed version of WordPress." Dreamsorcerer Future Releases 43077 Misleading error when updating plugins Plugins 4.9.1 normal normal Awaiting Review defect (bug) new 2018-01-12T10:22:04Z 2018-09-16T03:45:16Z "Hi, I am in /wp-admin/plugins.php A plugin has a new update and I click ""Update now"". After a few seconds I get ""'''Update Failed: Could not copy file.'''"" However, when I refresh the page and I see that the plugin was updated. After a few tests I realise that if there are Core Translation Updates and they fail(for example due to bad filesystem permissions), you will get the error mentioned above even though the plugin was successfully updated. I would like to comment on two things: a) The translations shouldn't get updated with any plugin update. I might NOT want to update the translations. By doing it in the background without asking me that's bad. b) The error message shown is irrelevant to the plugin update and might cause confusion to some admins who might try to reinstall manually a plugin or do any other changes which might eventually end up breaking a site for nothing. Thanks in advance for your time." SGURYGF Future Releases 42656 Multisite Global $pagenow variable Plugins 5.1 normal normal Awaiting Review defect (bug) reopened 2017-11-22T03:58:15Z 2019-03-22T13:35:45Z "When the site is configured as multisite, plugins are loaded before ""vars.php"", causing plugin getting null value when trying to access the $pagenow variable. Sample Plugin : Brightcove Video Connect Defect : Setting page is empty Caused by : In the setting page logic, it will check whether $pagenow is in the array of 'admin-ajax.php', 'admin.php', 'post-new.php', 'edit.php', 'post.php'. And since the $pagenow is not initialized yet, it will just display an empty page." thorthecoder Future Releases 43716 "Not work ""option_active_plugins"" filter in front-end" Plugins 4.9.5 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-04-07T07:46:22Z 2022-03-07T14:42:29Z "The ""option_active_plugins"" filter work just in admin and not work in front-end. i test wp_get_active_and_valid_plugins function in wp-includes/load.php#L598 the ""$active_plugins"" correct and work in front-end but related filter not work and i have to use ""alloptions"" filter for work" hamedmoodi Future Releases 44582 Notice: Undefined property:stdClass::$plugin - wordpress Plugins 4.9.7 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-07-13T19:15:50Z 2022-01-29T08:12:43Z Notice: Undefined property: stdClass::$plugin in /hermes/bosnaweb07a/b1754/ipg.account_name/folder_name/wp-includes/class-wp-list-util.php on line 150 sangwan4pankaj Future Releases 51548 Orphan cron on multisite Plugins normal normal Awaiting Review defect (bug) new dev-feedback 2020-10-16T05:41:44Z 2020-10-16T05:41:44Z "Hello, on a multisite, the upgrade task for plugins and themes are done in the network level. Each sites " sebastienserre Future Releases 55415 Pluggable.php file is causing Fatal Errors Plugins normal major Awaiting Review defect (bug) new reporter-feedback 2022-03-17T17:46:55Z 2022-03-17T19:06:42Z "I'm facing an issue with my WordPress install. I have two plugins getting a PHP Fatal Error due to the pluggable.php file on my site using PHP 8.0. My host is Closte (closte.com). The host doesn't allow changes to WP core files. The plugin developers are saying that the issue is WordPress and not the plugin. I'm using the latest versions of the plugins and the latest version of WP. Here is the error I'm seeing: 1. PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /wp-content/plugins/updraftcentral/site-management.php:486 Would really prefer not to downgrade my PHP version so any help would be appreciated. " ceceet Future Releases 53905 Plugin activation from overview not working Plugins 5.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-08-10T08:59:21Z 2021-08-19T19:26:47Z "After I upgraded to the latest WordPress version, I can no longer activate recently installed plugins from the ""add new plugin"" overview. Clicking on the ""activate now"" Button will result in endless loading while it works fine from the ""installed plugins"" directory. " gre4twh1te Future Releases 41141 Plugin edit: Missed message about making file writeable Plugins normal normal Awaiting Review defect (bug) new 2017-06-23T18:09:08Z 2017-06-23T18:25:28Z "Again, the messages are easy to miss. This may get scooped up in one improving ticket, but worth reporting. [[Image(https://cldup.com/zzF9FEjMvT.png)]] " karmatosed Future Releases 41139 Plugin editing: Should the 'browsing' stand out more? Plugins normal normal Awaiting Review defect (bug) new 2017-06-23T17:56:50Z 2017-06-23T18:25:28Z "This message seems to get lost on the page: [[Image(https://cldup.com/ZKUO4NfdPq.png)]] While we are reviewing this making it not just say 'active' and making the message a bit more relatable could be good. " karmatosed Future Releases 44072 Plugin repository search error - cannot find plugin with Author's name Plugins normal normal Awaiting Review defect (bug) new close 2018-05-14T13:02:45Z 2023-10-20T00:33:06Z "If I search with Author option selected in plugin repository (/wp-admin/plugin-install.php), no plugin is found unless the author name is present in the Plugin name or may be somewhere in the description. Example: I searched with `Takayuki Miyoshi` as a Keyword and got a handful of result, but when I selected Author, it returned no result." subrataemfluence Future Releases 29539 Plugin viewer not displaying video tutorials. Plugins 4.0 normal normal Future Release defect (bug) new dev-feedback 2014-09-05T16:19:32Z 2017-05-05T20:25:17Z "In the WordPress 4.0 plugin page viewer, my video tutorials for my plugins are not displaying. [[Image(http://www.redeemerdanceacademy.ca/wp-content/uploads/2014/09/Ticket.png)]]" kidsguide Future Releases 49454 Plugins list page update available shows 3 plugin to update but actually have only 2 plugins to update Plugins 5.3.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-02-17T12:15:11Z 2020-02-17T13:19:36Z vivek5512 Future Releases 59109 Prevent plugins from creating admin accounts Plugins 6.3 normal normal Awaiting Review defect (bug) new close 2023-08-15T13:32:51Z 2023-08-15T16:38:19Z "Honestly someone needs to see the sense in this. I'm pretty confident if you petitioned the worldwide wordpress community everyone would want this fixed regardless of it being self hosted or wordpress.com this is a flaw in the current wordpress. I have given you the email to describe the issue it explains fully. This flaw needs to be fixed. (13:14:10) James: Regardless of whether it's open source or not WordPress needs to be secure (13:14:23) James: People. Business, even enterprise use your product (13:14:59) James: There must be a way for WordPress to prevent any plugin from creating a admin account surely? (13:15:21) James: And only allow WordPress admin to do it (13:15:46) James: That would eliminate the flaw (13:15:54) James: And actually make it secure (13:16:57) James: I don't get how all these minds working on wordpress don't get this is important (13:17:55) Happiness Engineer: Part of the open source spirit is that everything is open and available to change for everybody. After downloading the software you can do with it whatever you want, this is what's also appealing for a lot of developers and users. (13:18:19) James: What you basically telling me is this flaw is OK because wordpress is open source? It's not OK? (13:18:28) Happiness Engineer: Suggestions to improve the software can be made using a tool called Trac https://core.trac.wordpress.org/ (13:19:46) James: Can you send this email to me please (13:19:54) James: I will post this message there (13:20:13) Happiness Engineer: You will receive a transcript of this conversation after we close i. (13:20:25) James: OK thanks let's close it (13:23:41) Happiness Engineer: Ok, no problem. Feel free to pop back in if there is anything else we can help you with. Conclusion... Honestly think of this from a critical point of view, this is a Flaw, that should be able to be fixed so that Plugins cannot make admin accounts and only Admin can make admin accounts. I'm not a coder, and I do not have the foggiest how this would be done, but I hope it can be done, because if you surveyed everyone who uses wordpress I think everyone would feel safer with this implemented." tspnet Future Releases 41001 Recently Active Plugins Option does not reset when you delete a plugin. Plugins 4.8 normal normal Awaiting Review defect (bug) new close 2017-06-11T17:25:39Z 2022-02-26T20:18:45Z "When you deactivate a plugin like Akismet, a value gets saved into ""wp_options"" under the option name ""recently_activated"". The value looks like: ''a:1:{s:19:""akismet/akismet.php"";i:1497201452;}'' When you reactivate Akismet, the value is updated and resets the option back to look like this: ''a:0:{}'' '''The Bug.''' When you deactivate Akismet and delete akismet, the ""recently_activated"" option keeps this in the option value. ''a:1:{s:19:""akismet/akismet.php"";i:1497201452;}'' when it should reset back to ''a:0:{}''" GeekStreetWP Future Releases 57606 Recently Active instead of Recently Deactivated Plugins 6.1.1 normal major Awaiting Review defect (bug) new 2023-02-02T10:42:48Z 2023-07-09T15:35:23Z "Hello team, Hopefully, you are doing well. I am Afzaal Shamraiz a WordPress developer and a learner. I found on the 6.1.1 version that when I deactivate any plugin, the new filter comes up in the plugin filter menu ""**Recently Active**"", but when I click on it, it displays the list of the recently deactivated plugins, please make this correction. I think it should be ""**Recently Deactivated**"" [[Image(https://ataatravels.com/wp-content/uploads/2023/02/wordpress-bug.png)]]" afzaalshamraiz Future Releases 40252 Redirection during activation Plugins normal normal Future Release defect (bug) new 2017-03-24T19:33:28Z 2024-02-29T10:56:50Z "for example, i select several plugins (which are deactivated) at once and click BULK ACTIVATE... if any of plugin has custom filter `add_action( 'activated_plugin', ...` (inside where it redirect to plugins settings page after activation), then those plugins are not activated in bulk, instead while that plugin's turn comes, it is activated and the page is redirected to that plugin's url.. i think there is no easy solution... you should create a new hook, that will be named i.e. `redirect_to_after_activation` which will be solely dedicated and used for redirection, while that plugin is activated individually. " tazotodua Future Releases 58291 Speed up WordPress hooks addition/removal by ~20% Plugins 6.3 normal normal Awaiting Review defect (bug) new changes-requested 2023-05-11T01:02:20Z 2023-06-22T11:54:57Z "I present a patch where `add_filter`/`remove_filter`/`has_filter` are sped up by ~20%. Here's what's changed in the proposed patch: - Calling a static method than a function is faster - check `static-faster.php` for proof - Removed unused arguments, passing less data to the stack - speed should be obvious here - [https://github.com/php/php-src/blob/7c44baa/ext/spl/php_spl.c#L661-L672 spl_object_id] is faster than [https://github.com/php/php-src/blob/7c44baa/ext/spl/php_spl.c#L649-L659 spl_object_hash], as we are not calling [https://github.com/php/php-src/blob/7c44baa/ext/spl/php_spl.c#L674-L677 strpprintf]. - Sometimes `WP_Hook::build_unique_id` will return a string (when concatenated), and sometimes an integer, but this should be okay. - No need to concatenate `'::'` - speed should be obvious here, fewer strings to concatenate - If the argument is an object, return `spl_object_id` right away rather than constructing a pair where the second element is `''` and then concatenate that empty string - speed should be obvious here - Bail early on `add_filter` if `$idx` is null - speed should be obvious here Tested with PHP 8.2.5 by launching `wp shell` a lot of times, after adding `mu-plugin.php` to the `mu-plugins` folder. With the patch applied, several runs average `0.19570341110229492`. Without the patch, the runs average `0.24287629127502441`. Calculating `abs(0.24287629127502441 - 0.19570341110229492)/0.24287629127502441` we get a 19.57% improvement. " bor0 Future Releases 43489 Strengthen resilience of wp_register_plugin_realpath to support Gutenberg Plugins normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-03-07T18:25:25Z 2020-12-01T05:24:00Z "For many years now I've been working in a Windows development environment with multiple subdirectory installs referencing plugins using symlinks. Every now and then I get problems due to plugin files apparently not being present when they quite clearly are. I have not been able to track it down. I think it's a bug in PHP associated with OpCache. Anyway, the bottom line is that sometimes this problem, or something similar, results in the `$wp_plugin_paths` array containing entries with a null value for `$realdir`. This can lead to the following: `Warning: strpos(): Empty needle in C:\apache\htdocs\hm\wp-includes\plugin.php on line 658.` This message has the uncanny knack of happening at the most inappropriate times. Now, with Gutenberg looming, the problem is further reducing my ability to create content locally; Gutenberg can't handle the unexpected Warnings and Notices from a development server and fails. See https://github.com/WordPress/gutenberg/issues/5439 To reduce the likelihood of the problem I'd like to propose a change to `wp_register_plugin_path()` to cater for a false value being returned from the `realpath()` PHP function. The proposal being that if `$plugin_realpath` does appear to be null, then don't add an entry in `$wp_plugin_paths`. This change will prevent the warning message being issued from plugin_basename()'s test {{{ if ( strpos( $file, $realdir ) === 0 ) { }}} and therefore increases the robustness of the system. Bottom line. - `realpath()` may return false. - This should be catered for. " bobbingwide Future Releases 41140 Theme/plugin editing: Long file list goes off page Plugins normal normal Awaiting Review defect (bug) new 2017-06-23T18:01:40Z 2017-06-23T18:25:28Z "If you have a long list of files, the list goes a long way down. Could we paginate? Have a 'scrollbox' (probably bad idea)? Have some better way of showing these? [[Image(https://cldup.com/91gj2sr2jz.png)]] " karmatosed Future Releases 40393 Using remove_action within an action callback skips over execution of other callbacks with lower priority Plugins normal major Awaiting Review defect (bug) new dev-feedback 2017-04-07T16:01:05Z 2020-07-07T14:23:02Z "Description: When remove_action is used by an action callback to remove itself from the list of callbacks, this results in all callbacks hooked with the immediately lower priority to be skipped by apply_filters. Here is simple code to demonstrate: {{{#!php First Run'; echo '
    ';
    		do_action('custom_action');
    		echo '
    '; echo '

    Second Run

    '; echo '
    ';
    		do_action('custom_action');
    		echo '
    '; } public function callback_1() { echo ""Callback 1\n""; } public function callback_2() { echo ""Callback 2\n""; remove_action('custom_action', array($this, 'callback_2')); } public function callback_3() { echo ""Callback 3 - Priority 20\n""; } } $runner = new Sample; $runner->test(); }}} The output is: First Run Callback 1 Callback 2 Second Run Callback 1 Callback 3 - Priority 20 The expected output should be: First Run Callback 1 Callback 2 Callback 3 - Priority 20 Second Run Callback 1 Callback 3 - Priority 20 The net effect of this issue is that a plugin using remove_action in that way will break another, totally unrelated plugin, if they both add actions on same tag, with different prorities. WooCommerce is using this method, it uses remove_action inside a pre_get_posts action callback. This broke our Accelerated Mobile Pages plugin when doing AMP pages for WooCommerce. This was reported to [https://github.com/woocommerce/woocommerce/issues/14092 WooCommerce here], but it was then suggested it was a core issue. '''Additional notes''': - all callbacks must '''object methods'''. The problem does not occur if callbacks are functions. - the callback using remove_action must be the only registered callback for that priority level {{{#!php }}} This should either embed the video or at the least display a link to the video. Here's an example plugin for reference: https://wordpress.org/plugins/simple-icons/" thememason Future Releases 48656 Views details blocked by SAMEORIGIN Plugins 5.3 normal major Awaiting Review defect (bug) new 2019-11-15T19:43:41Z 2019-11-17T17:19:12Z "Hello, On multisite, the ""view detail"" link on this page /wp-admin/plugins.php (in each plugin) is bloked by an error {{{ Chargement refusé par X-Frame-Options : « SAMEORIGIN » à l’adresse « https://example.com/wp-admin/network/plugin-install.php?tab=plugin-information&plugin=loco-translate& », le site ne permet pas l’utilisation de cadres multiorigines depuis « https://example.com/wp-admin/plugins.php ». }}} " sebastienserre Future Releases 56729 Vulnerability in plugin update notification (impersonation of plugins with possible RCE) Plugins normal normal Awaiting Review defect (bug) new close 2022-10-04T09:21:13Z 2022-10-04T09:32:00Z "During the development of a private plugin (not uploaded to the WordPress market https://es.wordpress.org/plugins/) with our own metadata, we noticed that the WordPress plugin update notification system informs us that an update is available for our plugin, how is this possible? Well, the only explanation for this is that the update review system is based solely on the plugin's folder name, ignoring any authorship metadata and project URIs. To make sure that the update system is evidently ignoring any data in the plugin's metadata, we proceed to download it (the plugin). This confirms our suspicions, the update system is only governed by the name of a directory. Due to this lack of security in the metadata check, the only solution so far is to never activate the auto-update and to manually check each update. If you click on the ""update now"" link, the system will install the possible malicious plugin without any confirmation. Criticality: HIGH [8.8] - Exploitation of this vulnerability would affect the server in remote code execution (RCE) mode. It is downgraded from critical to high because it requires human action on plugin configuration. CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Affected environments: All installations with custom plugins that are not in the official WordPress marketplace. Aggravated if the unattended updater is accidentally activated. If a maintenance technician is unaware of the custom plugin development and hits the update button. Conclusion: As there is no signature checking system in the plugin update review system, there is a possibility of impersonation of our plugin if an attacker created a plugin in the official market with the same name as the directory of our custom plugin, being able to execute remote code on our server. Temporary solution: Disable the automatic update systems and generate plugin page with a so that no one can get to take that name to perform the impersonation. Having today as a warning, process to request a CVE ID for the formal vulnerability write-up. " sylm87 Future Releases 49729 Warning: fread() expects parameter 1 to be resource, bool given in \wp-includes\functions.php on line 5785 Plugins 5.3.2 normal minor Awaiting Review defect (bug) new reporter-feedback 2020-03-30T12:47:43Z 2022-03-10T15:46:55Z "Happens in dashboard and it goes coupled with: {{{ Warning: fread() expects parameter 1 to be resource, bool given in ...\wp-includes\functions.php on line 5785 Warning: fclose() expects parameter 1 to be resource, bool given in ...\wp-includes\functions.php on line 5788 }}} PHP 7.4 I think it occurs mostly when one loads the dashboard after a directory's previously active plugin has been deleted from the filesystem." DrLightman Future Releases 50850 When the deactivate_plugins() function is called in the ABSPATH/wp-admin/includes/plugin.php file, the is_plugin_active_for_network() conditional tag always returns true when the active_sitewide_plugins sitemeta option is set to 1 Plugins 5.4.2 normal normal Awaiting Review defect (bug) new 2020-08-05T01:28:10Z 2020-09-08T21:11:46Z "On multisite during the process of activating a plugin across the network (sitewide plugin activation), I noticed that if the activation process is not successful or if errors are triggered, the `active_sitewide_plugins' sitemeta option will be set to 1 and this causes the **is_plugin_active_for_network()** conditional tag to return true when called within the **deactivate_plugins** function, which is so untrue. Also, when on the admin or network `plugins.php` screen, the **deactivate_plugins()** function triggers the following error becuase the **$plugins = get_site_option( 'active_sitewide_plugins' )** code doesn't return the correct type (array): {{{ Fatal error: Uncaught Error: Cannot unset string offsets in ABSPATH\wp-admin\includes\plugin.php on line 779 }}} Futhermore, after exploring the error, I found that since the **active_sitewide_plugins** sitemeta option is set to 1 and the **array_keys()** function is used to extract the plugin basenames into a new array and merged with non-sitewide activated plugins, then when used in the **foreach()** loop, this will always return true. {{{#!php upload plugin and you try to insall a .php file instead of a zip file you get this error message: Abort class-pclzip.php : Missing zlib extensions. This error message is bad, zlib extensions are not missing, the file type is wrong. Also this message is missing translation support (I might be wrong on this)." jnhghy Future Releases 45374 apply_filters_ref_array() no longer passes arguments by reference Plugins 4.7 normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-11-19T10:58:35Z 2019-01-25T13:54:36Z "It appears that since the introduction of the `WP_Hook` class in WordPress 4.7 (#17817), `apply_filters_ref_array()` no longer passes its arguments by reference. Example: {{{ add_filter( 'posts_clauses', function( $clauses, &$query ) { return $clauses; }, 10, 2 ); }}} The above code will trigger the following PHP warning: {{{ Parameter 2 to {closure}() expected to be a reference, value given }}} cc @jbrinley FYI" johnbillion Future Releases 49678 do_action default first parameter Plugins 5.3.2 normal normal Awaiting Review defect (bug) new dev-feedback 2020-03-22T18:55:26Z 2020-05-04T17:19:49Z "This code looks like bug: we don't pass any parameters to action but the first parameter is passed anyway and have the value '' (empty string). Why? {{{#!php string(0) """" }}} " Tkama Future Releases 9968 dynamically adding/removing filters breaks plugins Plugins low normal Awaiting Review defect (bug) reopened needs-unit-tests 2009-05-28T23:43:11Z 2020-03-02T15:43:22Z "noticed this while doing something similar to this: {{{ add_action('foo', 'bar1', 10); add_action('foo', 'bar2', 20); function bar1() { remove_filter('foo', 'bar1', 10); } }}} in the above, bar2() doesn't get called. it is because of the usage of next()/current() to loop through filters. attached patch uses a foreach loop instead, to make it work." Denis-de-Bernardy Future Releases 43453 heartbeat_received filter requires data in order to execute Plugins 3.6 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-03-01T15:38:38Z 2022-02-26T22:34:38Z "With regards to the heartbeat api, the plugin developer handbook states: Not every feature will need all three of these steps. For example, if you don’t need to send any data to the server, you can use just the latter two steps. But this does not seem to be the case given this line of of [https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/ajax-actions.php#L2808 wp_ajax_heartbeat]. This makes it less useful if you just want to include some new data on an interval. It requires an approach like: {{{ #!javascript $( document ).on('heartbeat-send', (e, data) => { data.wouldLikeFilterToTrigger = true; }); $(document).on('heartbeat-tick', (e, data) => { // do something with data generated by filter console.log(data); }); }}} If you omit the send event, the filter on the server never runs. It seems like this constraint should be lifted, or at the very least the documentation should be updated." brianscaturro Future Releases 57792 no way to find the plugin Plugins 6.1.1 normal major Awaiting Review defect (bug) new reporter-feedback 2023-02-23T06:44:18Z 2023-05-10T17:10:55Z In the add new plugins section there is a problem, which can be seen in the screenshot. purisov Future Releases 58933 plugin-install.php search works incorrect Plugins 6.2.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2023-07-29T11:41:02Z 2023-08-08T16:43:13Z "i got 29 pages as result of search but after i go to last page more results coming also search very weak by default many irrelevant results coming after search with 2 keywords " AlexeyVertinsky Future Releases 60783 plugins_api() and parameters audrasjb* Plugins normal normal 6.6 defect (bug) accepted 2024-03-15T13:57:13Z 2024-03-18T04:04:23Z "Hello there, (running WP6.5+, might be useless to say) By reading the doc for `plugins_api()` you can read that some fields are included or not in the response, the doc says ''""$fields: Array of fields which should or should not be returned.""'' and then you have a list of fields, some true some false by default. Let's try it, this is my simple request on my plugin on repo: {{{#!php 'secupress', 'fields' => [] ) ); }}} Since the doc says ''""@type bool $contributors Whether to return the list of contributors. **Default false**.""'' I should not receive this field. Let see the response: {{{#!php string(37) ""SecuPress Free — WordPress Security"" [""slug""]=> string(9) ""secupress"" [""version""]=> string(7) ""2.2.5.1"" [""author""]=> string(44) ""SecuPress"" [""author_profile""]=> string(41) ""https://profiles.wordpress.org/secupress/"" [""contributors""]=> array(4) { ... }}} There is. Same for those params that are ""false"" by default but still included: ""sections"", ""versions"", ""reviews"", ""banners"", ""active_installs"" (I don't know for ""group"", can't get the thing). Also there is one param that is not affected by the arguments passed and always returned: ""num_ratings"". Finally there is some fields that are always returned where the doc can't help, I tried to use they array keys to cancel them, no chance, this is : ""author', ""author_profile"" (those 2 may be forced, that's ok), ""support_threads"", ""support_threads_resolved"", ""upgrade_notice"", and ""requires_plugin"" (I know it's new, but don't forget it) The patch may have to be done on w.org since this is the site that add too much data and to not respect the passed parameters. Thanks for your time" juliobox Future Releases 55101 pre_set_site_transient_update_plugins was called from deactivated plugin while uninstall. Plugins 5.9 normal normal Awaiting Review defect (bug) new 2022-02-07T08:59:01Z 2022-02-13T12:45:42Z "I have this sample plugin. {{{#!php hooks(); } static public function uninstall() { error_log('uninstall method was called on ' . date('Y-m-d H:i:s')); } } $ATest = new \ATest(); $ATest->run(); }}} When I click on delete plugin (the plugin is already deactivated), the `pre_set_site_transient_update_plugins` hook was called. To reproduce. 1. Copy and paste the sample code above to new plugin file. For example test.php 2. Go to your WordPress > admin > plugins. 3. Activate this plugin. 4. Go to your DB, delete `_site_transient_update_plugins` option name in `options` table to make sure that this hook will be call next time. 5. Reload admin plugins page. This hook will be called as normal process because plugin is activated. The error log will be write to **wp-contents/debug.log** file. 6. Deactive this plugin. 7. Maybe try to reload plugins admin page again. The hook will not called from this plugin, no error log were write. This is correct. 8. Click on delete this plugin. 9. The error log were write because this hook is called while it is on uninstall process. This is incorrect!! It should not be called. WordPress 6.0-alpha-52682" okvee Future Releases 39474 """Update plugins"" button also updates pending translations without express consent, while there's a specific button for that (Update translations)." Plugins 4.7 normal normal Awaiting Review enhancement new 2017-01-04T22:04:19Z 2023-07-09T16:12:47Z "Usability problem in wp-admin/update-core.php If there are at least one pending plugin update AND one pending translation update, the label of the button ""Update Plugins"" should be ""Update Plugins AND Translations"", because that's exactly what it does: it updates BOTH the plugins AND the translations. Otherwise, if the label ""Update plugins"" is to remain as it is now, then it should ONLY update the plugins (and not also the translations, because there's already a specific button for that action). (Windows 7 Pro 64bit + Firefox 50.1.0 64bit + WordPress 4.7.0) " Carlos ASR Dias Future Releases 43671 'Search installed plugins' on plugins page unneccesary and possibly misleading, possibly replace it for 'search new plugins' Plugins 4.9 normal normal Awaiting Review enhancement new 2018-04-01T11:46:07Z 2019-05-07T22:12:30Z "Hello! I consider 'Search installed plugins' input on plugins page unneccesary and possibly misleading. Very often I use this input to search for plugin that I want to install. Also I don't know whether there is any reason at all to have search for installed plugins, because usually user just scrolls window to check this and rarely can remember name of the plugin etc. It would be cool to replace this input with input for searching for new plugins (or totally remove it). Thanks!" Vishnja1 Future Releases 58370 Add 'Activate' button to View details modal Plugins 6.3 normal normal Future Release enhancement new 2023-05-21T19:46:26Z 2024-01-29T20:19:05Z In [https://wordpress.slack.com/archives/CULBN711P/p1684696308556829?thread_ts=1684691032.713709&cid=CULBN711P| discussions] with @azaozz regarding the Plugin Dependencies feature, it was thought that a button in the View details modal would provide for a smoother UX. This way the user wouldn't need to go to a different page to activate an installed plugin. afragen Future Releases 45439 Add a link to plugins/themes details in dashboard to translation page Plugins normal normal Awaiting Review enhancement new 2018-11-28T06:48:19Z 2019-01-16T06:50:09Z "Currently locale translators don't get credit for their contributions, I know there are pages in translate.wp.org, But WordPress users usually can't reach those pages easily, because they install plugins directly via dashboard I think we can add a link in dashboard plugin details, a link to current language translators page, For example: if our current language is Persian, for woocommerce plugin, we can add a link (Translation Team, Help us!) to related Persian translators page: https://translate.wordpress.org/locale/fa/default/wp-plugins/woocommerce And the link can be auto generate for any other active language in dashboard This help users to find that area easily and encourage them to participate in those translations, And also help plugin/themes developers to get more translation for their product, And will give a credit to that translators I think the dashboard credit would make more sense So we can have more plugin translation updates and more contributors This can be also for Themes " parsmizban Future Releases 38183 Add hooks to be run before and after each callback Plugins normal normal Future Release enhancement new needs-unit-tests 2016-09-28T23:41:23Z 2017-08-25T21:15:07Z "Since before the dawn of time, debugging tools have relied on the `all` hook to collect information about how long hooks take to run, and which callbacks are registered to that hook. This has a few drawbacks. Primarily, it's not possible to collect timing information about individual callbacks, and it's quite difficult to manage recursive hook behaviour. With that in mind, hooks that run before and after each callback would be quite valuable, but they do need to be considered carefully. * What kind of performance impact would they have? If there are no callbacks registered to these hooks, there should ideally be no performance impact. * Should they be `WP_DEBUG` only? This would discourage plugins from abusing them on production systems - they would only be used if the site admin explicitly sets the site to debugging mode. * Dealing with recursion is fun, should they provide any helpers for indicating recursion level, or is it up to the code hooking into them to handle that?" pento Future Releases 54778 Adding Filters in UI (Plugins) Plugins 5.8.3 normal normal Awaiting Review enhancement new 2022-01-10T10:50:03Z 2023-05-20T06:47:16Z "**Problem:** Searching for any particular plugins shows the related plugins based on the keywords, out of which some old and unmaintained plugins also appear in the results which might be a vulnerability issue for their users. **Possible Solution:** Adding Filters to categorize the results for searchers query: 1. Latest to Oldest 2. Oldest to Latest 3. Most Downloads 4. Least Downloads 5. Highest Rated 6. Lowest Rated **Exception:** Adding the filters, rather than completely changing the way the results appear (such as: showing the most updated results first, etc) would be more useful, and it would be more fair for all publishers/plugin-maintainers. **Possible Improvements:** Reducing the risk of downloading incompatible old, untrusted, unmaintained plugins leading to vulnerability or other risks in website (business :D)." ritvikux Future Releases 40475 Additional way to add plugin by indicating URL|slug of plugin page Plugins normal normal Awaiting Review enhancement new 2017-04-18T18:28:43Z 2021-07-28T21:38:15Z "Today, when using the UI to add a new plugin, I only have two basic options. • I may either upload the plugin as a zip-file, which somehow hasn't got into my behavior yet. (But soon may, if the issue described here doesn't get a nice solutuion.) • Or I can search for Keyword|Author|Tag I'd like to have a third way of finding the plugin. Reason is I may already know the exact plugin slug (or plugin URL). One way might be to add one more option in the drop-down, to make it Keyword|Author|Tag|Plugin URL And if the user selects the option Plugin URL, then we should disregard anything up to last occurrence of ""/"" and then use that last part as the plugin slug." tobifjellner Future Releases 20578 Allow users to delete a plugin without uninstalling Plugins normal normal Future Release enhancement reviewing 2012-05-01T01:18:35Z 2021-08-27T15:40:46Z Sometimes, a user may need to delete plugin files without deleting all the plugin data. scribu Future Releases 40971 Clicking More Details in Add Plugins page shows old version of Plugin Directory page Plugins 4.8 normal normal Awaiting Review enhancement new 2017-06-09T11:09:29Z 2017-06-12T13:26:05Z "If you click the More Details link below the Install/Activate button of any plugin listed on the Add Plugins page, it opens a modal with the corresponding page in the plugin directory. However, in 4.8 this still uses the old styling, not the new plugin directory theme that was launched recently. If this was only a visual thing it wouldn't be much of an issue, but the old style also displays different statistics than the new design. It would be nice to bring this in line with what it looks like on wordpress.org/plugins." hedgefield Future Releases 40804 Display important informations in plugins list Plugins 4.7.5 normal normal Awaiting Review enhancement new 2017-05-18T17:27:03Z 2017-05-18T17:37:33Z Showing last plugin update date in plugins list and compatibility with current wordpress version may quickly give a look if any plugins are no more up to date by his creator. xsweb Future Releases 31192 "Enable sorting of search results on ""Add Plugins"" admin page" Plugins 4.1 normal normal Awaiting Review enhancement new 2015-01-31T20:59:57Z 2021-07-30T12:19:08Z "Searches on the ""Add Plugins"" page often return thousands of results in no particular order, making it very hard to find high-quality plugins (I generally end up having to use Google to hunt down plugins). Often, plugins that are used by hundreds of thousands or millions of users are placed far below obscure, outdated, unmaintained plugins that are used by a few thousand people. It would be very helpful if there was a dropdown menu that enabled you to sort the search results by things like ""Most Downloads"", ""Highest Rated"", ""Last updated"", etc. This way, I could make sure that widely used, actively maintained plugins were at the top of my list, and quickly find what I need. A great example search if you wish to see the type of problem I'm addressing is ""Content Slider"". The first page of results is populated by many unmaintained/low-quality slider plugins, and then when you get to the second page of results you find several actively maintained high-quality plugins with hundreds of thousands of users (Easing Slider, Meta Slider, etc). Thanks!" tayjes16 Future Releases 16838 Excluding Akismet from Future WordPress Releases / Plugin Directory Plugins 3.1 normal normal Awaiting Review enhancement reopened 2011-03-12T02:49:31Z 2024-03-02T21:23:45Z "This issue was more mute prior to the shift in Akismet's 'keying', which previously just required you to have a free WP.com account to hook up to the API. Since Akismet now charges for access, or solicits fees by default for Personal website activations (when you go through the sign up process, it defaults at something like $5 with a slider that lets the person choose how much they want to pay). It's not immediately apparent that 'free' is an option within the slider, but that's not the primary issue here - I digress :) The issue is that Akismet is no longer free for EVERYONE. It's only an option for Personal sites, and in certain cases. What if someone has multiple personal sites? They click that option and they are categorized into a Professional plan, which has a fee associated to it. Since the plugin directory itself has officially been described (and in practice) to have a restriction that explicitly prohibits functionality be disabled from a plugin behind a Paywall, why wouldn't that apply in this case? I certainly don't mean to rock the boat, but this brings up a number of important questions. The plugin has a potentially confusing signup process that does lead people otherwise categorized as Personal site owners, to pay for the service while it's advertised under the plugin description that it's 'free' for Personal use. This produces a grey area of sorts, which puts this plugin under a sort of Paywall, which could be alleviated in a minor way by modifying the signup process. It still doesn't clear the air on how the Paywall for professional sites can be officially allowed versus a full Paywall. Perhaps someone who officially represents the WP.org Plugin Directory or WP.org can clarify the undocumented (not shown at http://wordpress.org/extend/plugins/about/) Paywall restriction for future reference. Besides the plugin itself now finding itself in this grey area, it's bundled with WordPress by default and presents what could be described as an unfair market advantage for Automattic's product offering, sort of like anti-competitive business practices. I feel weird saying that, but I'm not throwing stones here. Just saying what it feels like, even if the core developers say it should be included, I'd say it now doesn't cover the 70/30 rule (or whatever the amount is). If Akismet is allowed to remain in the plugin directory as is, and within WP core, then would other plugins be allowed to be included in the plugin directory that follow the same Paywall model and signup process?" sc0ttkclark Future Releases 60495 "Following ""plugins_list"": Add a filter in get_views() in class-wp-plugins-list-table" Plugins 6.3 normal normal 6.6 enhancement new 2024-02-11T23:21:34Z 2024-02-13T12:55:21Z "Since WP 6.3 there is a new filter named ""**plugins_list**"" added in #57278 Using this filter, we can now add a new array key like ""''my_plugins''"" and set some plugins in here. ""''my_plugins''"" is now considered as a ""''status''"" by the WP behavior, like ""''all''"", ""''recently_activated''"", etc, the whole list is here : https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-plugins-list-table.php#L49 We can also delete (unset()) one of them if we want too, (like hide the must-use plugins or the ""''upgraded''"" tab) So now WordPress will go through each iteration of the array keys (aka statuses) and create a tab link to get a new view, here : https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-plugins-list-table.php#L495 **What's the issue here.** WP will try to display a ""text"" for each iteration, if there is no case in the switch, it will still display the $text var, and indeed the last used value, aka incorrect value. But remember line 49, WP sets a list of allowed statuses, this shouldn't be there anymore since the new filter '''plugins_list''' allow us to add ANY status using an array key. We have to remove line 49 and modify line 52 to remove the in_array() stuff. Still need a check to keep the same behavior when a wrong status is loaded? it's already done line 315: https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-plugins-list-table.php#L315 Now to get the correct translated label in get_views() we need a hook line 586 like: {{{#!php (%s)'; break; } }}} Now please test in WP 6.3.x, using this: {{{#!php bulk_upgrade( array( $plugin ) );}}} called, and any other update progress run on same time. Eg: there are translations update exists and when contain errors on translations update, the plugin update tell that the plugin fail to download, but the plugins successfully updated. " arrayiterator Future Releases 37301 A way to test plugin/theme installs and updates before applying Plugins 4.4.3 normal normal Awaiting Review feature request new dev-feedback 2016-07-07T09:13:20Z 2020-04-15T20:41:18Z "The # 1 reason for WordPress sites going completely down or becoming partially broken is the bad install or an update of a plugin or a theme. The worst case scenario being a complete white screen of death from which the only way to recover is to manually remove the culprit plugin files, which unfortunately requires remote access to the server filesystem. The current plugin upgrader checks if the upgrade causes errors and can in some cases recover from the most obvious cases syntax errors in the critical plugin code. This however fails to mitigate the slightly more subtle issues like incompatibilities between plugins/themes and javascript errors that may still completely wreck the site. Furthermore, the more seasoned WordPress users are known to avoid updating plugins and themes on their site due to the volatility of running an update in production. This of course leaves their sites vulnerable to possible security issues. The best practice of running staging environments to test plugins before updating requires a significant amount of technical knowledge and labour, and is not widely practiced among regular users. I suggest we give the option for users to test plugin / theme installs and updates prior to applying them. This requires a sort of sandbox environment for the user where they can freely install and test plugins without worrying about breaking anything. I've created an example implementation of these plugin update sandboxes in (slightly hacky) plugin form. The plugin adds a ""test update"" button to the update.php admin screen, which creates a sandbox where the user can test the updated plugin without affecting the live site. Both the plugin directory and the database are separated from the live ones. https://github.com/anttiviljami/wp-safe-updates Screenshots: The ""test update"" button in update.php [[Image(https://github.com/anttiviljami/wp-safe-updates/raw/master/assets/screenshot-1.png)]] Updating the plugin in an alternate heap (sandbox) [[Image(https://github.com/anttiviljami/wp-safe-updates/raw/master/assets/screenshot-2.png)]] Testing the plugin inside the sandbox [[Image(https://github.com/anttiviljami/wp-safe-updates/raw/master/assets/screenshot-3.png)]] -- I would love more discussion about this. I feel the safety of theme / plugin updates is definitely among the most important issues to solve for the future of WordPress security. Love, @anttiviljami" Zuige Future Releases 60507 Add a view for plugins with missing dependencies Plugins normal normal Awaiting Review feature request new 2024-02-12T14:39:07Z 2024-02-13T23:34:47Z "Instead of directing the user to review their plugins or look for plugins that cannot be activated, it would be really useful to have a filter (similar to Active, Update Available, etc.) that can be linked to. Maybe ""Missing Requirements"" or ""Unmet Requirements"". I don't love either of those names, but I prefer those over ""Missing Dependencies"" or ""Unmet Dependencies""." desrosj Future Releases 15971 Add ability to rate and report compatibility of plugins from wp-admin Plugins 3.1 normal normal Future Release feature request new 2010-12-24T08:25:27Z 2019-04-08T19:34:03Z "For the millions of downloads some plugins get there are way to few ratings on them. I think the ability to rate and report the compatibility of plugs from the backend dashboard page would dramatically increase participation in rating. This could be accomplished most easily placing a link to the ""details"" of a plug-in (like the one that appears while searching for a plug-in) after it is installed on plugins.php. This could be accomplished even more effectively by showing direct link next to each listing on the plugins.php page link stars/compatibility and link text reading ""rate now or ""report compatibility now""... For reference I point you to the excellent new to FireFox 4 (beta) add-on compatibility reporting features. " jb510 Future Releases 57064 "Add individual ""Support"" links to the plugin list page / theme page" Plugins normal normal Awaiting Review feature request new 2022-11-10T15:23:38Z 2022-11-10T22:27:58Z "Finding context-relevant support can be challenging for new users and many of them are not aware of the fact that each plugin has its own support forum. One simple way to bridge this gap could be to include a ""Support"" link underneath the plugin description. This link would take to that plugin's forum." mrfoxtalbot Future Releases 51731 Add the reason for deactivation to the 'deactivate_plugin' hook. Plugins normal normal Awaiting Review feature request new 2020-11-09T14:28:12Z 2020-11-09T14:38:20Z To be able to check if a plugins was disabled by a user action or because of the 'validate_active_plugins' check that is done on when visiting the plugins.php page would be great from a management perspective. Many WordPress installations have some required plugins which are not necessary for the site to work but do need to be active for one reason or another. This enables the option to notify the admin when a plugin gets disabled by accident because of a failed updated or any other reason. merlijnvanlent Future Releases 40460 Add-On Grouping for Plugin List Screen Plugins normal normal Awaiting Review feature request new 2017-04-15T16:25:17Z 2017-04-15T16:25:17Z "I'd like to see if anyone has thoughts on (or has previously discussed) reworking the plugins API & plugins list screen to group ""child"" or ""add-on"" plugins under their required parent plugin. There are obviously some API implications that go along with this. It seems pretty common now for a well-rounded base plugin, premium or free, to develop a handful of add-ons that require the base functionality of the main plugin and provide no meaningful value on their own. These ""child"" plugins can be from the same developer as the parent, or from a 3rd party community that wants to extend the usefulness of the parent plugin. Because WordPress plugins have no concept of relationships between one another, several less-than-ideal scenarios can occur. Firstly, an add-on plugin can be activated while the parent plugin is not active or even present. Without it being expressed in the title or description, there's nothing to necessarily tell a user that another plugin is required for the one they're installing to function. In the best case scenario, the add-on plugin developer has put safe guards to check for the parent plugin into their code, and will write a message out to the user upon activation to tell them why there's an issue. In the worst case scenario, the developer simply assumed that they parent plugin would exist, did no checks for the availability of the base code, and WordPress encounters a fatal error. Now dependency management is a broad and weighty topic and I do not believe that a full-blown dependency system is what I am proposing here. We do already have a pattern for how to express a basic requirement in the existing parent + child theming system. A child theme expresses that it requires the parent theme with the template attribute and appropriate handling takes place upon it's activation. I think plugins could potentially take the same form. [[Image(https://raw.githubusercontent.com/brentjett/WP-Core-Add-On-Plugins-Proposal/master/plugin-declaration-with-template.png)]] A plugin declares that it requires it's base plugin to function with a ""Template"" (or Parent, Required, etc...), and the system handles including it at the proper time, or not at all depending on the base plugin's existence. The UI benefits from this by grouping these add-on plugins with their associated parent plugin so there is a visual understanding of that relationship. This serves to organize the plugin list in a friendlier way, regardless of what a plugin my be named. [[Image(https://raw.githubusercontent.com/brentjett/WP-Core-Add-On-Plugins-Proposal/master/plugin-screen-addon-groups.jpg)]] There's plenty of complexity to work out both in the UI and API design for this to be a nice addition to the platform. The plugin list should end up more clear and easy to read, not more cluttered and disjointed in the end. I'd love to hear thoughts! Thanks for taking the time." brentjett@… Future Releases 41627 Additional parameter for multisite activation Plugins 4.8.1 normal normal Awaiting Review feature request new 2017-08-13T13:42:15Z 2017-08-13T18:00:53Z "It could be good, if there was something additional parameter, which made 'register_activation_hook' function to be executed per individual sub-sites, while activating it from Network dashboard. that is good, because i.e. in activation hook, we want sometimes to create tables, add options ( and etc) per each sub-site." tazotodua Future Releases 43115 Improve plugin search results Plugins 4.9.2 normal normal Awaiting Review feature request new 2018-01-17T19:05:36Z 2018-09-14T19:40:00Z "Hi there, I'm not sure if I post this at the right place, but being new to 'get involved' I find this to be the most direct place to share my thoughts. Maybe someone before me has suggested my request before, but I could not find existing tickets about it. For a long time I do miss a good filtering and sorting option in the plugin repository, both on wordpress.org/plugins and in the admin plugin section. I would like to see a filter and sorting option for the following attributes: - WP version compatiblility (tested up to ...) - WP version required - number of active installs -> if this is high, it must be a quite good plugin, otherwise not so many websites would use it - in plugin repository since -> plugin can be fairly new and therefore not yet have a high number of active installs - last updated -> to filter out plugins that are not regularly updated - rating I also would like to see that 'last updated' would be added to the info for a single plugin search result (where now only the number of active installs, developer and 'tested with' is displayed), so you can see right away if a plugin is well maintained or not. I would also suggest that plugins which have not been updated or maintained at all for over a year will be marked; for example with a traffic light: orange for 'updated more than a year ago', red for 'updated more than two years ago' (and off course green for 'updated less than a year ago'). I think the least plugin writers can do is test their plugin for compatibility with each new WP version and update this information if the plugin still works fine. Maybe make this mandatory if you want your plugin to be included in the plugin reporitory? I hope this will also encourage all plugin writers to maintain their plugins better. My goal is to separate the plugins of good quality and high developer dedication from the plugins that are less well maintained. And make this visible to users. I'm looking forward to a response from the core developers community. Thanks!" prodefu Future Releases 38743 Introduce add_action_once() Plugins normal normal Awaiting Review feature request new 2016-11-10T10:26:25Z 2018-03-23T20:04:13Z "Hi there. I was wondering if noone ever needed to add a callback to some action or filter hook only if it hasn't been added (potentially by someone else) before. Possible use cases are: * only add `my_callback` if it hasn't been added before, no matter with what priority; * only add `my_callback` if it hasn't been added before with a specific priority. Naming-wise, I'd suggest `add_action_once()` and `add_filter_once()`, respetively, although one could be more verbose (e.g., `add_action_if_not_exists()` etc.). Here is a possible implementation of this: {{{#!php WordPress automatically discovers all the block.json files in the plugin/core blocks folder and registers the corresponding block types. These block types are made available through the block registry (https://developer.wordpress.org/reference/classes/wp_block_type_registry/) PHP class, and the blocks scripts and styles are added as dependencies to the wp-block-library script and style handles. At the moment, it's mandatory to create the PHP file for the plugin that contains only a single block type registration code when developing for Block Directory. Those plugins rarely have PHP code, so we could simplify the flow for developers by making it possible to use `block.json` to source all required metadata. If the current metadata schema doesn't contain some fields that can be declared only in the PHP comment (some are duplicated in `readme.txt`, we can always include it in `block.json`. In the case when developers would like to use the `render_callback`, they could use the concept proposed in #53148 - the `renderTemplate` file reference in `block.json`. This way, the process of validation of block types submitted to Block Directory would get further simplified." gziolo Future Releases 51842 Disabling pingbacks nulls the DB entry Pings/Trackbacks 5.5.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-11-21T20:58:36Z 2020-11-25T13:06:42Z "Disabling pingback option from Settings nulss ''default_ping_status'' thus crashing New Post function. Have to change it to closed via phpMyAdmin to fix the issue. Error: {{{#!php video, 1=>audio) server environment: PHP 5.5.3-1ubuntu2.1 Apache 2.4.6 running WP 3.8.1, no multisite " tamas_dxw Future Releases 14902 weblogUpdates.extendedPing does not implement standard josephscott Pings/Trackbacks 3.0.1 normal normal defect (bug) reviewing 2010-09-19T23:35:37Z 2019-06-04T20:41:29Z "When a blog post is published or updated, Update Services are notified if they are listed in the Wordpress Writing Settings panel. The services are notified by the weblog_ping() function in comment.php That function first attempts an XMLRPC call to the service's weblogUpdates.extendedPing. If that fails, it attempts to notify weblogUpdates.ping. {{{ if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping $client->query('weblogUpdates.ping', get_option('blogname'), $home); }}} '''1) The weblogUpdates.extendedPing does not match the published standard.''' See: http://www.google.com/help/blogsearch/pinging_API.html Where 5 parameters are specified: * Name of site * URL of site * URL of the page to be checked for changes * URL of RSS, RDF, or Atom feed * Optional a name (or ""tag"") categorizing your site content. You may delimit multiple values by using the '|' character. The third parameter should be the page to be checked for changes, and not the RSS feed. No 4th or 5th parameter is passed. '''2) The weblogUpdates.extendedPing does not take advantage of notifying the service of the exact page that changed (as is provided in the standard)''' If implemented correctly, this would allow the receiving service (perhaps a search engine) to come directly to the correct page for re-indexing, instead of trying to figure it out from the RSS feed. I am unable to find if pingomatic.com publishes a competing version of the standard. " Scott Schram Future Releases 37754 Support Receiving Pings for Non Post-Type Permalinks Pings/Trackbacks 1.0 normal normal enhancement new 2016-08-20T23:57:21Z 2019-06-04T21:03:23Z "Related: #2700 Ten years ago, it was proposed that the ability to ping the homepage(often linked in the author_url of a comment). After a year, the issue was closed and turned over as a plugin issue. While the idea of pinging comments is certainly one that can be added as a plugin, the infrastructure to support receipt on arbitrary pages is not. This enhancement is specifically about making it possible for Core or a plugin to receive and direct these pingbacks, separate from the issue of what to do with them once received. After the changes are made, that could be explored as plugin territory. However, the only way to do this now is to completely replace the pingback handler with a custom one. Probably the easiest way to do this is to expand url_to_postid to allow it to return an arbitrary post_ID(using a filter) if it detects that the URL in question is a valid URL on the site, but does not refer to a post_type. " dshanske Future Releases 34419 Update Pingback Processing Code Pings/Trackbacks normal minor enhancement new needs-unit-tests 2015-10-23T21:36:25Z 2019-06-04T20:52:31Z "Related to #34141, which would pass the retrieved pingback source to preprocess_comment and comment_post for additional processing, pingback_ping currently strips all content from the source as part of its processing. Suggesting that specifically: 1. Sanitization be done using core sanitization functions(wp_kses, etc) 2. The code that returns relevant errors(URL not found, etc), be processed ahead of anything else. 3. The older code that duplicates the functionality of url_to_postid noted as FIXME be removed. If there really is another difference, that should be an enhancement to url_to_postid. This, combined with the enhancements in #34141, would allow moving toward improving linkback presentation(#32653), which is a long term goal." dshanske Future Releases 45331 'rest_url_prefix' filter fails to impact flush_rewrite_rules() on plugin activation Permalinks 4.9.8 normal major Awaiting Review defect (bug) new reporter-feedback 2018-11-12T14:39:16Z 2020-10-25T04:25:29Z "'rest_url_prefix' filter fails to impact flush_rewrite_rules() on plugin activation ========================================================================= So here is the bug - 'flush_rewrite_rules' is called on plugin activation after 'rest_url_prefix' filter added with new API ENDPOINT, but if I go to '//' it gives me 404 error. And if I access '/wp-json/' on Firefox Developer Edition in 'Header' section I see:\\ `Link //>; rel=""https://api.w.org/""`\\ So the header is correct here. And it will fix the issue if I go to WP Settings -> Permalinks -> Save.\\ But that is a bug. As you won't have to instruct that to your plugin user, after his activation he will see that API is not working.\\ \\ Install Controller class - 'flush_rewrite_rules' is called on plugin activation after 'rest_url_prefix' filter added with new API ENDPOINT: {{{#!php public function setCustomWP_RestAPI_Prefix() { // NOTE: Do not forget to do the same on install with flush_rewrite_rules(); after it. add_filter('rest_url_prefix', function() { return ConfigurationInterface::WP_REST_API_PREFIX; }, 10, 1); // NOTE: As there is no custom post types or custom taxonomies registration later, we perform rewrite rules flush right now flush_rewrite_rules(); } <...> } }}} \\ Main Controller class: {{{#!php final class MainController { <...> public function __construct(ConfigurationInterface $paramConfWithoutRouting) { <...> if(!is_null($this->confWithoutRouting)) { register_activation_hook($this->confWithoutRouting->getPluginPathWithFilename(), array(&$this, 'networkOrSingleActivate')); register_deactivation_hook($this->confWithoutRouting->getPluginPathWithFilename(), array(&$this, 'networkDeactivate')); <...> } } /** * Activate (enable+install or enable only) plugin for across the whole network * @note - 'get_sites' function requires WordPress 4.6 or newer! */ public function networkOrSingleActivate() { if(is_multisite()) { // A workaround until WP will get fixed // SHOULD be 'networkActivate' but WordPress does not yet support that feature, // so this means as long as the 'MULTISITE' constant is defined in wp-config, we use that method $this->multisiteActivate(); } else { // A workaround until WP will get fixed $this->activate(); } } public function activate() { try { <...> // Install plugin for single site $objInstaller = new \GreatestEverManager\Controllers\Admin\InstallController($conf, $lang, $conf->getBlogId()); // Install <...> $objInstaller->setCustomWP_RestAPI_Prefix(); <...> } catch (\Exception $e) { if(StaticValidator::inWPDebug()) { // In WP activation we can kill the install only via 'trigger_error' with 'E_USER_ERROR' param $error = sprintf(static::LANG_ERROR_IN_METHOD_TEXT, __FUNCTION__, $e->getMessage()); trigger_error($error, E_USER_ERROR); } } } public function run() { if($this->canProcess) { <...> add_filter('rest_url_prefix', function() { return ConfigurationInterface::WP_REST_API_PREFIX; }, 10, 1); add_action('rest_api_init', array(&$this, 'frontEndAPI_Callback'), 0); <...> } } <...> } }}} \\ Plugin main file (wp-content/plugins/GreatestEverManager/GreatestEverManager.php): {{{#!php */ namespace GreatestEverManager; require_once 'Models/Configuration/ConfigurationInterface.php'; require_once 'Models/Configuration/Configuration.php'; require_once 'Controllers/MainController.php'; <...> use GreatestEverManager\Models\Configuration\Configuration; use GreatestEverManager\Controllers\MainController; if(!class_exists('GreatestEverManager\GreatestEverManager')) { final class GreatestEverManager { // Configuration const REQUIRED_PHP_VERSION = '5.4.0'; const REQUIRED_WP_VERSION = 4.6; const OLDEST_COMPATIBLE_PLUGIN_VERSION = 6.0; const PLUGIN_VERSION = 6.0; // Settings private static $params = array( 'plugin_id' => 0, 'plugin_prefix' => 'greatest_ever_manager_', 'plugin_api_namespace' => 'gem/v1', 'plugin_handle_prefix' => 'greatest-ever-manager-', <...> ); private static $objConfiguration = NULL; private static $objMainController = NULL; <...> /** * @return Configuration */ public static function getConfiguration() { if(is_null(static::$objConfiguration) || !(static::$objConfiguration instanceof Configuration)) { // Create an instance of plugin configuration model static::$objConfiguration = new Configuration( $GLOBALS['wpdb'], get_current_blog_id(), static::REQUIRED_PHP_VERSION, phpversion(), static::REQUIRED_WP_VERSION, $GLOBALS['wp_version'], static::OLDEST_COMPATIBLE_PLUGIN_VERSION, static::PLUGIN_VERSION, __FILE__, static::$params ); } return static::$objConfiguration; } /** * Creates new or returns existing instance of plugin main controller * @return MainController */ public static function getMainController() { if(is_null(static::$objMainController) || !(static::$objMainController instanceof MainController)) { // NOTE: This is not passing by reference! static::$objMainController = new MainController(static::getConfiguration()); } return static::$objMainController; } <...> } <...> // Run the plugin GreatestEverManager::getMainController()->run(); } }}} \\ The coding pattern is S.O.L.I.D. MVC, Version 6, based on PSR-4 Autoloaders and PSR-2 Coding Standards. To deeply inspect load process (without the REST_API part), you can inspect 'Expadandable FAQ' - SolidMVC boiler-plate plugin: [https://wordpress.org/plugins/expandable-faq/]" KestutisIT Future Releases 37812 404 when using a numeric slug and /%category%/ base Permalinks normal normal Future Release defect (bug) new needs-unit-tests 2016-08-24T15:29:53Z 2023-03-11T11:36:36Z "To reproduce: 1. Create a top and sublevel category. Lets say Parent > Child 2. In permalink settings, set custom permalink structure /%category%/%postname%/ 3. Create a post with slug 12345 and assign to category ""child"" 4. View post. There is a 404. Tested in 4.6 only. No other plugins active." mikejolley Future Releases 50222 Autocorrect redirect to the wrong URL based on a word after permalink Permalinks 5.4.1 normal normal Awaiting Review defect (bug) new close 2020-05-22T06:31:24Z 2020-05-22T08:56:48Z "Sometimes, when the URL of a post ends with a keyword following the slash it redirects to a different page based on the keyword rather than the permalink. For example: Let's take this wordpress post URL: [http://awishyourheartmakes.com/virtual-services/ ] If I had the word ""super"" at the end of the URL: [http://awishyourheartmakes.com/virtual-services/super ] rather than redirecting to http://awishyourheartmakes.com/virtual-services/ It will redirect to http://awishyourheartmakes.com/super-fun-santa-maria/" bloup Future Releases 18523 Can't change page permalink if slug metabox is removed helen Permalinks 3.0 normal normal Future Release defect (bug) assigned 2011-08-26T14:42:56Z 2021-01-07T17:19:03Z "If the slug metabox is removed from the ""Edit Page"" page, it is not possible to change permalinks, using the edit permalink function at the top of the page. Slug and other metaboxes are removed by the karma theme, in its admin/theme-functions.php (but only if 'ka_hidemetabox' in the wp_options table is 'true'): {{{ remove_meta_box('slugdiv','page','normal'); }}} Technically, without the slug box, the ""post_name"" field containing the new slug is not sent with the form data when you click the ""Update"" button. I believe this is bug was introduced after version 3.1.3. " dankod Future Releases 42248 Can't create category slug with same name for different parents Permalinks 4.9 normal normal Awaiting Review defect (bug) new dev-feedback 2017-10-17T13:11:38Z 2017-10-25T12:52:46Z "Issue with same category slug creation even though both have different parent category. For example I have structure like this wanted to build up. Cars - Category Toyota & Maruti - Subcategory of Cars Parts - Subcategory of Toyota & Maruti /cars/toyota/parts /cars/maruti/parts Wordpress isn't allow it. See attached screenshot." ashokrd2013 Future Releases 8905 Category pagination broken with certain permalink structures Permalinks 2.7 normal normal Future Release defect (bug) assigned 2009-01-21T07:26:31Z 2021-01-27T10:17:49Z "If one uses a permalink structure with %category% followed by %postname%, accessing pagination can cause a 404, as WordPress attempts to look for a post called ""page"". As per http://barefootdevelopment.blogspot.com/2007/11/fix-for-wordpress-paging-problem.html Presumably can occur with other permalink structures too." rmccue Future Releases 40176 Filter user_trailingslashit called with inconsistent $type_of_string for Post-Tags Permalinks 4.7.3 normal normal Awaiting Review defect (bug) new dev-feedback 2017-03-16T22:32:05Z 2021-06-07T10:00:27Z "It seems to be a general inconsistency issue with the handling of post-tags in combination with the user_trailingslashit function/filter. Assumption: `$type_of_string` should be consitent and of type **tag** or **post_tag** == Testcase == Permalink Structure with Trailing-Slash: {{{ /%year%/%monthnum%/%day%/%postname%/ }}} === Testcode to produce debug output === {{{#!php // disable canoncial redirects add_action('redirect_canonical', '__return_false'); // show all events with tag/ urls add_filter('user_trailingslashit', function($string, $type_of_url){ if (strpos($string, 'tag/') !== false){ echo 'Tag Link: ', $string, ' of type ', $type_of_url, PHP_EOL; } }, 100, 2); }}} == Expected behaviour == Outputs like **Tag Link: /tag/mytag1/ of type post_tag** everytimes the url is of type **Tag** == Current behaviour == On Post Pages: **Tag Link: /tag/mytag1/ of type category** for related post-tag links On Canoncial Redirects: **Tag Link: /tag/mytag1/ of type category** AND **Tag Link: /tag/mytag1/ of type** (not set!) == Identified Issues == **wp-includes/canoncial.php** line 425 its not checked if current page if of type **tag** {{{#!php foreach ( array('single', 'category', 'page', 'day', 'month', 'year', 'home') as $type ) { }}} **wp-includes/taxonomy.php** line 3882 the `$type_of_string` variable is set to **category** by default instead of `$taxonomy` {{{#!php $termlink = home_url( user_trailingslashit($termlink, 'category') ); }}} " Andi Dittrich Future Releases 48146 Google breadcrumbs problem Permalinks 5.2.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-09-26T05:47:42Z 2020-07-20T15:34:53Z "It is discussed at the Yoast support forum: https://wordpress.org/support/topic/google-webmaster-reporting-breadcrumb-problems/ Last post I made up to date with some tests/conclusions: I find that not only my website shows the “funny” links. Some examples: https://techcrunch.com/page/6/?cat=-1 http://www.bbcamerica.com/page/3/?cat=-1 https://variety.com/page/4/?cat=-1 I tested on a test website. https://test.bikegremlin.com/page/2/?cat=-1 Installed Twenty Nineteen and disabled ALL the plugins. If I make all the posts uncategorized, the “strange links” are no longer working (as they shouldn’t work any time). Looks like a WordPress itself is a problem, but it just got reported by Google after the Breadcrumb reports introduction." bikegremlin Future Releases 58764 Incorrect return type in `WP_Rewrite::using_index_permalinks()`. costdev Permalinks 2.7 normal normal Awaiting Review defect (bug) assigned dev-feedback 2023-07-08T10:08:29Z 2023-07-31T12:58:33Z "== Overview In [8899], [https://github.com/WordPress/wordpress-develop/blob/6.2/src/wp-includes/class-wp-rewrite.php#L357-L373 WP_Rewrite::using_index_permalinks()] was documented to return `bool`. However, its actual return type is `int|false`. A guard explicitly returns `false`, however the final return statement returns the result of a `preg_match()` call. Per [https://www.php.net/manual/en/function.preg-match.php the PHP manual]: > `preg_match()` returns 1 if the pattern matches given subject, 0 if it does not, or false on failure. == Docs change, or `bool` cast? === Docs change We could change the return type to: {{{#!php @return int|false 1 if permalink links are enabled and index.php is in the URL, 0 if permalinks are enabled but there was a failure, false if permalinks are disabled. }}} However, I think this is an overly complicated return for a method called `using_index_permalinks()` that suggests, and is currently documented as, a simple `bool` return type. === `bool` cast: Is there a backward compatibility concern? Yes, but a very small one. WP Directory shows: - [https://wpdirectory.net/search/01H4T8ZA3EYAHNCJH57EKTSYH2 all 135 plugins] and [https://wpdirectory.net/search/01H4TEEJ598PDEK1WCRJ4C3SGW all 138 themes] that call this method use a loose check on the result, treating `0` and `false` as ""No, it does not use index permalinks"". These are safe from a `(bool)` cast. - It's possible that someone out there is using `1 === $wp_rewrite->using_index_permalinks()`, but as the method is documented to return `bool`, they're most likely using a loose check after an assumed attempt of `true ===` would have always failed, as the method currently ''never'' returns `true`. === When does `preg_match()` return `false`? Per PHP-src, a call to [https://github.com/php/php-src/blob/c6b9db2131deda7ca0683a6006fe9ae8dd767f51/ext/pcre/php_pcre.c#L1465 preg_match] eventually leads to [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L589C26-L589C58 pcre_get_compiled_regex_cache_ex]. The following failure conditions are listed: - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L642 Empty regular expression] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L654 Delimiter must not be alphanumeric, backslash, or NUL] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L698 No ending delimiter '%c' found] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L700 No ending matching delimiter '%c' found] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L750 Unknown modifier '%c'] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L752 NUL is not a valid modifier] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L764 The /e modifier is no longer supported, use preg_replace_callback instead] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L779 Failed to generate locale character tables] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L801 Compilation failed: %s at offset %zu] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L852 Internal pcre2_pattern_info() error %d] - [https://github.com/php/php-src/blob/master/ext/pcre/php_pcre.c#L862 Internal pcre_pattern_info() error %d] === Which of these failures could happen here? In the context of `WP_Rewrite::using_index_permalinks()`, there is only one possible failure: `WP_Rewrite::$index` contains the delimiter, `#`. [https://3v4l.org/M94EH 3v4l]. The `index` property is set to `'index.php'` by default. However, it's a `public` property and could therefore be directly overridden, or set in a subclass of `WP_Rewrite`. WP Directory shows: - [https://wpdirectory.net/search/01H4TBP4HXJZQ8G58BGB6A0QFE 0 plugins] directly assign a value to this property. - [https://wpdirectory.net/search/01H4TBT9RAKWGY41CCPD320RBA 0 themes] directly assign a value to this property. - [https://wpdirectory.net/search/01H4TBW9JQNVX9Q580Z0FPD6DH 1 plugin] extends the `WP_Rewrite` class, but does not set a value for the property. - [https://wpdirectory.net/search/01H4TC0P3CYKZ27FK2KBGJQSP5 0 themes] extend the `WP_Rewrite` class. === Can we prevent the potential failure? Yes, by using `preg_quote( $this->index, '#' )`. [https://3v4l.org/CYsS7 3v4l]. === ''Should'' we prevent the potential failure? As demonstrated by the failure, the regex is currently susceptible to special characters. When the default value of `$this->index` (`'index.php'`) is concatenated, the resulting pattern is `'#^/*index.php#'`. See the `.`? The `preg_match()` call is currently vulnerable to `index[any character except newline]php`. [https://3v4l.org/LQSOG 3v4l]. Given this, it's possible that a developer out there has set a custom `$index` value that contains a regex pattern. However, I think that's very unlikely. Contrarily, the flawed regex has the potential to cause false positives if, for example, the permalink structure starts with `/index2php`. While that's also unlikely, using `preg_quote()` here would prevent that false positive. ----- == Call for opinions 1. Should we just change the documented return type and description? If so, what makes sense here? 2. OR should we cast the result to `bool`? 3. ADDITIONALLY should we use `preg_quote()` here to prevent the potential failure?" costdev Future Releases 57804 "Missing word ""wordpress"" on the permalink that's why not opening a separate tour on the website" Permalinks 6.1.1 normal major Awaiting Review defect (bug) new reporter-feedback 2023-02-24T17:17:03Z 2023-02-25T18:58:18Z "Hi, Maybe I found a bug coming from wordpress. I bought a theme on Tour website and installed local host on xampp or wamp. Could you please support me on the issue: when I click on a separate tour from the admin dashboard I could see the separate tour and the permalink is ok in that case, but when I click from the main menu bar on the ""Tours"" and clicking on a separate tour it shows not found, errors like in the video I'm showing, besides the word ""wordpress"" is missing from the link, even I changed the permalinks to ""postname"" but it's showing again not found on the separate tour clicked from the main menu bar ""Tours"". [https://youtu.be/Apl9UfkN12g] So, how could you help me to solve that problem?" artowpress Future Releases 48365 No 301 redirection for Numeric style permalink structure Permalinks normal normal Awaiting Review defect (bug) new 2019-10-18T02:43:11Z 2019-11-11T22:34:52Z " Hi :) If permalink structure is **Post name** style and I changed it to **Numeric**. the post get a 301 redirect from http://newwp.local/hello-world/ to http://newwp.local/archives/1 but not so happen with permalink structure **Numeric**. when the current permalink structure is **Numeric** and I changed it to **Post name** or anything else. ideally, the post should get 301 redirection from http://newwp.local/archives/1 to http://newwp.local/hello-world/ but this is not happening. post giving 404 error instead of 301 redirecting to the correct URL format. when I try to access the post with http://newwp.local/archives/1 Thanks Naveen Giri " 1naveengiri Future Releases 56359 Non-existent URLs show contents of homepage instead of 404 error Permalinks 6.0 normal normal Awaiting Review defect (bug) new dev-feedback 2022-08-10T05:05:44Z 2023-05-18T15:28:40Z "In a fresh install of WordPress, I noticed that non-existent URLs would show the contents of the homepage instead of returning 404 Not Found. For example, when WordPress is configured to use the “Plain” permalink structure (which is the default), going to `http://example.com/does-not-exist/` would display the homepage instead of returning 404. The only time a 404 might be shown is when trying to access a post by its ID. For example, `http://example.com/?p=9999`. Is there something wrong with the “Plain” permalink setting that causes it to display the contents of the homepage instead of returning 404? " softrain Future Releases 51001 Numbers at the end of the URL are removed Permalinks 5.5 normal normal Awaiting Review defect (bug) new close 2020-08-14T11:41:04Z 2020-08-14T19:10:43Z "Before upgrading to 5.5, the site was at 5.4.2 and the url worked with no issue https://example.come/show-listings/654493 Upgrading to 5.5, the above URL gets changed and it removes the numbers at the end of the URL. If I put a question mark before the number like https://example.com/show-listings/?654493 the page loads with my data being displayed. I would like to keep the same format like it was in 5.4.2 Another user is having the same issue, see link to the forum below. https://wordpress.org/support/topic/wp-5-5-problems-with-permalinks/" dmwebhosting Future Releases 3451 Page URI canonization markjaquith Permalinks 2.1 normal normal Awaiting Review defect (bug) reopened close 2006-12-07T04:46:08Z 2023-02-20T16:05:43Z "The nice permalink URIs for posts or categories are case-insensitive, but the page URIs are not. e.g. http://matt.wordpress.com/about/ cannot be reached via http://matt.wordpress.com/About/ This results in 404s being returned when a user incorrectly gets the case of the URI wrong. This is particularly a problem for weblogs that have migrated old pages to WordPress, and have external pages pointing to them with varying case applied to the URIs." pah2 Future Releases 34972 Permalink for unattached media same as a post Permalinks 4.4 normal normal Future Release defect (bug) new needs-unit-tests 2015-12-10T11:53:16Z 2018-12-17T21:55:36Z "First step - upload media ""tralala.jpg"" I got pretty link example.com/tralala/ Second step - create a post with Title ""Tralala"" it creates post with slug example.com/tralala/ this works. So post with the same title as unattached media filename creates the same permalink - slug as already exists for unattached media. In this case, unattached media is unreachable as permalink point to new post with the same slug." petercralen Future Releases 50439 Post name permalinks htaccess directives do not consider subdirectory installation Permalinks 5.4.2 normal normal Awaiting Review defect (bug) assigned 2020-06-20T12:40:36Z 2020-06-20T12:40:36Z "Having wordpress installed in /wordpress/ subdirectory, and site address as root (following [https://wordpress.org/support/article/giving-wordpress-its-own-directory/#method-i-without-url-change method I in guide]), enabling post name permalinks gives 500 error on any page other than homepage or admin panel pages. This seems to be due to wordpress adding rewrite driectives to root .htaccess file, that seem to override the rewrite rules from method I. Changing permalinks to plain, making root .htaccess read-only (with no wp directives), or disabling them by putting an ifmodule with false condition around them fixes this. I think that wordpress should consider subdirectory installation when writing htaccess directives." filatovdanyl Future Releases 44847 Redirect old date-based permalinks on structure changes Permalinks normal normal Awaiting Review defect (bug) new needs-unit-tests 2018-08-27T13:43:48Z 2019-01-08T07:14:12Z "If someone switches from `/%year%/%monthnum%/%day%/%postname%/` to `/%postname%/`: * `/%year%/%postname%/` redirects to the correct URL. * `/%year%/%monthnum%/%postname%/` shows a 404 error. * `/%year%/%monthnum%/%day%/%postname%/` shows a 404 error. All of these URLs should redirect to the correct one." SergeyBiryukov Future Releases 31728 Search bug (Cyrillic) Permalinks 4.1.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2015-03-22T15:03:14Z 2020-07-20T12:52:35Z "There is a bug, when I search something in my WordPress site. The correct search link should be: {{{http://site.com/search/word}}}. When I type something in English, the link is correct: {{{http://site.com/search/word}}}. But when I type something in Bulgarian language (Cyrillic), the link is different: {{{http://site.com/?s=абвгд}}}. The structure of my WordPress permalinks is: {{{http://site.com/%post_id%}}}." kazumy Future Releases 9296 Settings API & Permalink Settings Page Bug jfarthing84 Permalinks 2.7.1 normal major Future Release defect (bug) reopened 2009-03-07T05:33:55Z 2020-09-25T23:12:01Z Although there is a hook in the options-permalink.php to insert custom settings, it does not actually save any custom setting which is added to that page. Instead of posting to options.php like all the other options pages, it posts to itself and only handles the form data which is built into the wordpress core. It should be implemented on that page to also store custom settings that may be hooked onto that page. jfarthing84 Future Releases 55401 Subpages of a web page can be called twice Permalinks 5.9.3 normal major Awaiting Review defect (bug) new dev-feedback 2022-03-16T15:48:12Z 2023-07-20T18:41:13Z "Subpages of any website created with WordPress can be accessed twice. If you add a /0/ to the end of the regular URL, the same page can be called again. This page with /0/ at the end of the URL will also be indexed in Google. Example: https://wordpress.org/news/2022/03/wordpress-5-9-2-security-maintenance-release/ https://wordpress.org/news/2022/03/wordpress-5-9-2-security-maintenance-release/0/" manuel10503 Future Releases 30784 Subsites won't show 404 with default permalink structure Permalinks normal normal Future Release defect (bug) new 2014-12-19T17:10:49Z 2020-07-02T14:20:26Z "On my Multisite (subfolder) installation, I have every site set to use the default (ugly) permalinks. If I go to a subsite and add extra invalid characters after the site name, it displays the site, not a 404 error page. Example: If I type in domain.tld/sitename/EXTRACHARS it displays the content from domain.tld/sitename, yet keeps the /EXTRACHARS in all the links. I spoke with Andrea Rennick and she said that this happens because WordPress ignores anything after the sitename because pretty permalinks are not enabled. This all came up because our Google appliances were crawling millions of invalid URLs because .tld/sitename/EXTRACHARS returns a 200, instead of a 404. Would it be possible to make it so that an invalid URL would return a 404 instead of ignoring characters beyond the sitename when permalinks are set to default?" danhgilmore Future Releases 38595 Unable to access wp-admin/options-permalink.php when .htaccess file is on NFS Permalinks 4.4 normal normal Awaiting Review defect (bug) new 2016-10-31T19:03:14Z 2017-05-03T05:59:25Z "After nearly a week of troubleshooting, we have identified an issue with wordpress which is preventing us from storing our .htaccess file on an NFS mount. This issue exists as far back as 4.4 In order to reproduce: install wordpress in a directory where .htaccess is located on a mounted nfs share. Once wordpress is installed, navigate to yoursite.com/wp-admin/options-permalink.php - the page should fail to load. This issue appears to be caused by the function ""flock();"" in the function ""insert_with_markers();"" in wp-admin/includes/misc.php Per PHPs documentation, flock(); is only acceptable for use on local filesystems. I found an existing ticket regarding this function - #31767 - if I understand correctly, flock(); was added to the ""insert_with_markers(); function to resolve a concurrent write issue on shared filesystems. Disclaimer: I am not a PHP developer, and only understand the basic concepts. The testing for the above bug consisted of commenting out functions till I could find the source of the issue. Commenting out the ""flock();"" function in the ""insert_with_markers();"" function resolved the issue in our environment." kicwordpress Future Releases 41272 Unattached media URLs broken for anything over 1000 Permalinks normal normal Awaiting Review defect (bug) new 2017-07-07T23:09:21Z 2017-07-08T16:26:17Z "'''Steps to reproduce''' 1. On your local computer, rename a file to {{{1180.jpg}}} 2. Upload the file to the Media Library 3. Visit {{{example.com/1180}}} You will get a 404 broken link. If you do the same for a 1, 2 or 3 digit filename, you won't see the issue. {{{ example.com/31.jpg // Works example.com/872.jpg // Works }}} The problem isn't just related to images. {{{ example.com/1871.mp3 // 404 }}} " henry.wright Future Releases 32048 Uploaded file reserves a name, page can't be named it. Permalinks 4.1.1 normal normal Awaiting Review defect (bug) new 2015-04-22T03:51:57Z 2017-03-09T01:04:29Z "1) Upload a file-name.png file to media library. 2) Publish a page named ""file-name"". 3) Note that (if site is set to post-name permalink) the page is now file-name-2 4) Try to rename the attachment and then give the page the natural name, and it still doesn't work. This might have a similar root cause as bug #13459." programmin Future Releases 58502 Visiting /wp-admin/options-permalink.php causing Fatal Error Permalinks 6.2.2 normal normal Awaiting Review defect (bug) new close 2023-06-09T10:05:47Z 2023-06-28T15:48:07Z "I'm using WordPress 6.2.2 on PHP 8.1.x `Fatal error: Uncaught ValueError: Unknown format specifier ""<"" in /wp-admin/options-permalink.php:38 Stack trace: #0 /wp-admin/options-permalink.php(38): sprintf() #1 {main} thrown in /wp-admin/options-permalink.php on line 38` Here is the WordPress Health Status: {{{ ### wp-core ### version: 6.2.2 site_language: bn_BD user_language: bn_BD timezone: Asia/Dhaka permalink: /%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 1 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /home/PATHTRUNCATED wordpress_size: 685.79 MB (719102256 bytes) uploads_path: /home/PATHTRUNCATED/wp-content/uploads uploads_size: 584.80 MB (613205338 bytes) themes_path: /home/PATHTRUNCATED/wp-content/themes themes_size: 7.46 মেগাবাইট (7824982 bytes) plugins_path: /home/PATHTRUNCATED/wp-content/plugins plugins_size: 121.31 MB (127206397 bytes) database_size: 25.04 MB (26253129 bytes) total_size: 1.39 GB (1493592102 bytes) ### wp-dropins (1) ### maintenance.php: true ### wp-active-theme ### name: Twenty Fifteen (twentyfifteen) version: 3.4 author: ওয়ার্ডপ্রেস টিম author_website: https://wordpress.org/%20 parent_theme: none theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, title-tag, post-thumbnails, menus, html5, post-formats, custom-logo, custom-background, editor-style, editor-styles, wp-block-styles, responsive-embeds, editor-color-palette, editor-gradient-presets, customize-selective-refresh-widgets, custom-header, widgets theme_path: /home/PATHTRUNCATED/wp-content/themes/twentyfifteen auto_update: off ### wp-themes-inactive (1) ### Twenty Twenty-Three: version: 1.1, author: the WordPress team, automated updates is turned off ### wp-mu-plugins (1) ### InfiniteWP - Client Loader: version: 1.0.1, author: Revmakx ### wp-plugins-active (1) ### Maintenano: version: 0.0.1, author: nanodesigns, automated updates is turned off ### wp-media ### image_editor: WP_Image_Editor_GD imagick_module_version: not found imagemagick_version: not found imagick_version: not found file_uploads: File uploads is turned off post_max_size: 8M upload_max_filesize: 2M max_effective_size: 2 মেগাবাইট max_file_uploads: 20 gd_version: 2.3.3 gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM ghostscript_version: 9.25 ### wp-server ### server_architecture: Linux 4.18.0-348.20.1.lve.1.el7h.x86_64 x86_64 httpd_software: LiteSpeed php_version: 8.1.18 64bit php_sapi: litespeed max_input_variables: 1000 time_limit: 180 memory_limit: 128M admin_memory_limit: 256M max_input_time: 60 upload_max_filesize: 2M php_post_max_size: 8M curl_version: 7.87.0 OpenSSL/1.1.1p suhosin: false imagick_availability: false pretty_permalinks: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 10.3.39-MariaDB client_version: mysqlnd 8.1.18 max_allowed_packet: 268435456 max_connections: 151 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/PATHTRUNCATED/wp-content WP_PLUGIN_DIR: /home/PATHTRUNCATED/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: true WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: undefined DB_CHARSET: utf8mb4 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable }}}" wzislam Future Releases 41008 WP_Error wrote instead of category name in wp_options table, category_base field Permalinks 4.8 normal normal Awaiting Review defect (bug) new 2017-06-12T12:31:13Z 2020-09-08T21:18:17Z "I just installed WordPress 4.8, yet I'm not sure it's a bug specific of this version or not. The issue is documented in the following post: http://www.ryadel.com/en/catchable-fatal-error-object-of-class-wp_error-could-not-be-converted-to-string-wordpress-fix/ Long story short, it seems that sometimes (when some errors occurs, in my scenario was a I/O error) the category_base value of the wp_options table gets filled with a WP_Error json object instead of a category name. This raises an exception in the rewrite.php script (line 326) when the function tries to use that value against a regex, expecting a string. Sadly enough, it doesn't seem easy to reproduce. " Neilgaiman Future Releases 55597 WordPress 6.0-beta2-53224 not creating .htaccess Permalinks 6.0 normal critical Awaiting Review defect (bug) assigned 2022-04-21T10:58:53Z 2022-05-24T18:46:49Z "on my development site (Plesk Obsidian, Centos 7.9) a fresh installed latest WP 6.0 beta2 does not create an .htaccess file at all. Steps: - wordpress-6.0-beta2.zip does not contain .htaccess - unzipped and uploaded to site - domain opened in browser - run set up process until login - no .htaccess created - table wp_options 'permalink_structure' contains ""/index.php/%year%/%monthnum%/%day%/%postname%/"" - login as admin - selecting a permalink structure and saving on /wp-admin/options-permalink.php - table wp_options 'permalink_structure' contains ""/%postname%/"" as expected - no .htaccess created - repeated saving of permalink structure does not help to create .htaccess - no entry in debug.log - as to be expected: permalinks not working in front end - only solution: create a basic .htaccess manually To me this seems a severe bug. Found this while testing one of my plugins on WP 6.0 before updating it to plugin repository Chris PS: no answer required " campation Future Releases 50490 WordPress URL guessing cannot be stopped Permalinks 5.4.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-06-27T17:03:02Z 2020-06-30T13:55:52Z "Hello. https://wordpress.org/support/topic/how-can-i-remove-redirect/ example: https://www.ozgurbilgi.net/etiketler/aysegul-tecimer (There is no such link in the site.) to https://www.ozgurbilgi.net/aysegul-tecimer-ustsuz-danscilar ** I tried this** {{{ function remove_redirect_guess_404_permalink( $redirect_url ) { if ( is_404() && !isset($_GET['p']) ) return false; return $redirect_url; } add_filter( 'redirect_canonical', 'remove_redirect_guess_404_permalink' ); }}} **I tried this** {{{ DELETE FROM wp_postmeta WHERE meta_key = '_wp_old_slug' }}} **my htaccess** {{{ RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] }}} **I tried this** {{{ remove_action('template_redirect', 'wp_old_slug_redirect'); remove_filter('template_redirect', 'redirect_canonical'); remove_action( 'post_updated', 'wp_check_for_changed_slugs', }}} I searched for it in the database but I couldn’t find it. I do not understand how it redirect.. I tried all this but these did not solve the problem. How can I stop this redirect? thanks others examples https://www.ozgurbilgi.net/etiketler/aysun-kayaci to ------> https://www.ozgurbilgi.net/aysun-kayaci-fatih-optu https://www.ozgurbilgi.net/etiketler/seo to -----> https://www.ozgurbilgi.net/icerik-pazarlamasinda-basarisiz-olmanizin-onemli-nedenleri **I can stop guessing for the normal link but if it gets the prefix (etiketler like this) , the guessing cannot be stopped.**" devrekli Future Releases 58125 WordPress post-name permalink is not compatible with Nginx server, working fine with Apache. Permalinks 6.2 normal normal Awaiting Review defect (bug) new 2023-04-13T10:33:44Z 2023-05-04T14:36:56Z "While I am setting up WordPress in my local environment, after setting up my WordPress I clicked on the sample page link from my home it redirected me to the sample page, and then I changed the permalink to the post-name nav link is not working properly and giving a 404 error. I have provided an image link here. [[Image(https://ibb.co/k84qkBV)]]" lovesoni1999 Future Releases 41132 permalinks are broken when using PHP7.0-fpm with nginx Permalinks 4.8 normal normal Awaiting Review defect (bug) new 2017-06-22T21:34:07Z 2020-05-29T05:43:02Z "Setting permalinks to anything but plain causes a white screen of death with the nginx error message: the error is ""2017/06/22 19:55:49 [error] 20482#20482: *28040 FastCGI sent in stderr: ""Primary script unknown"" while reading response header from upstream, client: MYIPHERE, server: MYSERVER, request: ""GET /apps/my-secret-drinks-android/ HTTP/1.1"", upstream: ""fastcgi://unix:/var/run/php/php7.0-fpm.sock:"", host: ""MYHOST"", referrer: ""https://MYDOMAIN/apps/"" This is my Nginx site configuration: https://paste.ngx.cc/7e It was working when I was using php5-fpm and only started after upgrading php5-fpm to php7.0-fpm" Towlieban Future Releases 47813 permalinks broken when article name is numeric(if the post id above 1000) Permalinks 5.2.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-07-31T20:17:19Z 2019-08-01T01:32:07Z "This is a follow-up to #5305. The problem on ticket #5305 stil happens if the post have the id above 1000 Steps to reproduce: Create a post without title(it shout have the id above 1000) Change the permalink structure to post name (/%postname%/) Click on the post permalink and try view it it sends back to the archive page of the post_type instead of the single page of the post " guigmonteiro Future Releases 43789 the_posts_pagination() outputs the slash at the first link Permalinks 4.9.5 normal normal Future Release defect (bug) new needs-unit-tests 2018-04-17T19:25:04Z 2021-09-17T12:21:50Z "Hello. Permanent link settings: `http://wp-test.ru/%postname%` (without a slash on the end) On the second and other pages of pagination, any category has a link to the first page with a slash on the end. {{{ http://wp-test.ru/category/bez-rubriki/ (with a slash on the end, why?) http://wp-test.ru/category/bez-rubriki/page/2 http://wp-test.ru/category/bez-rubriki/page/3 (current page) ..... }}} " campusboy1987 Future Releases 6778 Detect when the config will cause infinite loop Permalinks 2.5 normal normal Future Release enhancement reopened dev-feedback 2008-04-19T13:46:14Z 2019-03-15T00:34:39Z "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" Analogpoint Future Releases 18672 "Implement rel=""prev"" and rel=""next"" for archives" joostdevalk Permalinks 3.3 normal normal Future Release enhancement new 2011-09-15T12:37:23Z 2020-02-29T17:21:40Z "As can be seen here: http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html Google now uses rel=""prev"" and rel=""next"" to navigate paginated archives. As we already do a lot of these types of links (rel=""index"", rel=""start"" etc.) I think we should add these. I'll come up with a first version of a patch." joostdevalk Future Releases 43722 On changing of permalinks ask a confirm before to save Permalinks normal normal Awaiting Review enhancement new 2018-04-09T13:10:16Z 2018-04-09T13:10:16Z "Discussing with the support Italian team seems that one of the most common issue is that there is people that change permalinks and not remember that. After save see that website is not working anymore and complain about the issue and the support team has to ask what is happened. The ideal process can be like for changing the password where you have to check a field that confirm to change the password so that situation can be avoided." Mte90 Future Releases 34542 Permalink settings page should offer a filesystem API based way to save .htaccess Permalinks normal normal Future Release enhancement new 2015-11-01T10:06:30Z 2020-07-02T17:50:02Z Right now if .htaccess is not writable from PHP, the user is presented with the rules he should manually copy&paste into the file. There is no real reason to sent the user at that point to launch his FTP software to do something that in most cases can be done via the filesystem API. The filesystem API is both faster and most likely less prone to user mistakes. mark-k Future Releases 29669 Static base in permalink_structure unexpectedly sets $wp_rewrite->front value Permalinks normal normal Future Release enhancement new 2014-09-14T17:44:11Z 2020-07-02T17:46:14Z "When I use a permalink structure like `/story/%post_id%/%postname%/`, the author and date URLs inherit the same `/story/` base (e.g. `/story/author/danielbachhuber/`). I'd expect my author and date URLs to remain unchanged, unless I explicitly specify a base. There appears to be some crude `%post_id%` conflict resolution for date which forces this. It's not clear why the `front` value is applied to `author_structure`. This code is 9 years young (#2433), so probably too late to make a breaking change. It would be nice to have a filter around `$wp_rewrite->front` in `$wp_rewrite->init()` so I don't have filter both rewrite rules and links." danielbachhuber Future Releases 23060 Throw 404 if URL Rewriting is Used With Default Permalinks Permalinks 3.5 normal normal Awaiting Review enhancement reopened dev-feedback 2012-12-26T20:54:55Z 2019-04-19T15:21:06Z "Suddenly I discovered that my blog is not returning error 404 page. My blog permalink is set as default style http://test.onetarek.com/?p=123 Now I am trying to create 404 error by using this url http://test.onetarek.com/adsfjkasjdd , it showing home page. Then I tested http://test.onetarek.com/?p=123654 now it shows 404 page. Then I tried to load a not existing image http://test.onetarek.com/wp-content/themes/twentyeleven/images/headers/not-image.jpg it shows my home page instead of 404 page. I changed my permalink settings to ""Day and name"" then it show 404 page. I tested this problem in my another blog, this blog is return 404 page but that is not generated by wordpress. Wordpress 404 theme page is not being loaded. A blank page is being loaded with a message by Apache Server ""Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request...."" So what is the problem with permalink settings and 404 page." onetarek Future Releases 42148 url_to_postid plain permalinks for CPTs Permalinks 1.0 normal normal Awaiting Review enhancement new needs-unit-tests 2017-10-08T11:42:20Z 2017-10-08T11:46:15Z "Would be nice to have {{{url_to_postid}}} working with plain permalinks for custom post types. There's are currently some issues in {{{url_to_postid}}} where the wrong ID is returned for custom post type plain permalinks (query-based). {{{ true ) ); /** Create a post */ $post_id = wp_insert_post( array( 'post_type' => 'findme', 'post_status' => 'publish' ) ); $findme = get_permalink( $post_id ); $found = url_to_postid( $findme ); /** Guess it */ printf( ""%s (%s) == %s (%s)"", $post_id, $findme, $found, get_permalink( $found ) ); exit; } ); }}} {{{30 (http://localhost:8080/?findme=30) == 0 ()}}} and {{{30 (http://localhost:8080/?findme=30) == 2 (http://localhost:8080/)}}} if the frontpage is setup to point ot a post. Why is it not working? Why is the frontpage post being returned? Let's see how the {{url_to_postid}} function works: {{{ // First, check to see if there is a 'p=N' or 'page_id=N' to match against if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) { $id = absint($values[2]); if ( $id ) return $id; } }}} Then? {{{ if ( trim( $url, '/' ) === home_url() && 'page' == get_option( 'show_on_front' ) ) { $page_on_front = get_option( 'page_on_front' ); if ( $page_on_front && get_post( $page_on_front ) instanceof WP_Post ) { return (int) $page_on_front; } } }}} Uh, wait what... already? So a short-circuit without checking the custom post types. And that's understandable, since there is inherently no support for custom post type ID mappings as pointed out by: {{{ // Check to see if we are using rewrite rules $rewrite = $wp_rewrite->wp_rewrite_rules(); // Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options if ( empty($rewrite) ) return 0; }}} What stands in our way to find the URL earlier? 1. The query var is not one of p, page_id, attachment_id 2. The query var value for CPTs is not necessarily, and most often not numeric (the post_title) A proposed solution would be to look at the query parameters much higher, maybe by injecting the custom ones, ones that support slugs as well, since WordPress sets the {{{page_title}}} for a CPT itself, so that {{{\d+}}} check would fail. Use case? Well, this was encountered when trying to paste plain oEmbed URLs for a custom post type (https://github.com/gravityview/GravityView/issues/927)." soulseekah Future Releases 37831 Change the permalink structure without changing the url of older articles Permalinks normal normal Awaiting Review feature request new dev-feedback 2016-08-25T22:22:50Z 2019-04-19T15:19:48Z "A nice feature would be to change the permalink structure without changing the url of older articles. Many users complain of having 404 errors on old articles. This causes problem when there are dozens or hundreds of articles. Not everyone has the competences to manage the redirections " Djibs13 Future Releases 42702 "Most common issue inside post edit - ""Links Live search""." Permalinks 4.9 normal normal Awaiting Review feature request new 2017-11-26T09:59:46Z 2017-11-26T09:59:46Z "'''Most common issue in WP Back End Search''': My original parmalink is not matching with Search URL and for that way i have trouble in interlinking of blog articles to 1 post to another one because of wrong category URL. I have set Primary category (Messaging). But in Search you will see wrong category (Linux). For more details please view below 2 attach files carefully… https://drive.google.com/file/d/1XoDVa_zMygIWs8bFfgaSag4-iou7BCl3/view?usp=sharing https://drive.google.com/file/d/1u5ZlOXAA_5q30qo-HLnO8Qtz75tJkj3Q/view?usp=sharing For more details: This above issue is in 2-fold i will try to explane you below… Our website permalinks are configured like so: /%category%/%postname%/ The first issue is that although a '''primary category is set for all of my posts''', when using the WordPress Link button, WordPress does not always insert the link using the primary category in the URL. I read that other people were having a similar issue where the categories where being inserted in alphabetical order. This does not seem to be the case for me as for the most part the permalink is working correctly, but not accross every post. The second issue is that the post is not redirecting to the url which contains the primary category eg. example.com/secondary/test-post is not being redirected to the correct permalink as shown below example.com/primary/test-post Instead, the post is visable on both URL’s. And for that way we have trouble in interlinking of blog articles to one post to another one because of wrong category URL But if any fix in functions.php can help to resolved above issue and for that we need your help. Your help would be appreciated. Thank you." Softfully Future Releases 24776 Need Filter Hooks on Creating Slug - Check Availability of Slug if That is Used for Post, Page, Taxonomy or any Plugin Permalinks normal normal Awaiting Review feature request new dev-feedback 2013-07-16T21:06:09Z 2022-02-14T05:01:30Z "I did not find any '''filter hook''' for choosing slug for any object. I have a plugin that creates its own URLs. eg. example.com/my-campaign . If someone hits on this url then he will see my plugin generated page. But if there is already a page ""'''My Campaign'''"" then WP is unable to show that page because that '''permalink''' already taken by my plugin. So Before creating my plugin slug I need to check '''WP posts, pages and taxonomies''' if any of those already used my slug. I also need to check Root directory of WordPress installation if there is a '''directory with same name''' of my slug. WP Core checks available slug in its own database and reserved words. But it doesn't check slugs those are used by any plugin. If there is a post name ""'''my-campaign'''"" then my plugin don't let to chose this slug but If my plugin took this before and user want create a page ""my-campaign"" then WordPress will take the same slug. And here is the main problem. In the same way my plugin is conflicting with other plugins. My plugin can check WordPress core slugs but not other plugins. ""'''Pretty Link'''"" is one of the most popular plugin. It also creates its own url. It also checks available slug in wordpres db but not in other plugin. Any plugin may have custom rewrite rule, then my plugin can not handle that. So I think we need a standard rule that will be followed by WordPress core and all plugins. I have three different plugins those need own slugs. I made a universal process that I am using in all of my plugins. I am explaining my process bellow. I am using a filter hook ''''onetarek_is_slug_available'''' all of my plugin use this filter before choosing a slug. MY CODES: {{{ get_var($wpdb->prepare(""SELECT post_name FROM {$wpdb->posts} WHERE post_name=%s LIMIT 1"",$slug)); $has_taxonomy = $wpdb->get_var($wpdb->prepare(""SELECT taxonomy FROM {$wpdb->term_taxonomy} WHERE taxonomy=%s LIMIT 1"",$slug)); if( $has_postname or $has_taxonomy )return false; #Check if any same named file or directory exists in the root of wordpress installation $root_directory = opendir(ABSPATH); $slug_lower=strtolower($slug); #we consider wp-content and Wp-ContENT and WP-CONTENT are same. while (($file = readdir($root_directory)) !== false) { $filename = strtolower($file); if($filename == $slug_lower) return false; } #Check same slug is exists in click jacker database. #if same slug exists and associate for given id then return slug . We allow this if($id){$id=intval($id);} if($id) { $SQL = $wpdb->prepare(""SELECT slug FROM "".CLICK_JACKER_CAMPAIGN_TABLE."" WHERE slug=%s AND id =%d"", $slug, $id); $has_slug = $wpdb->get_var($SQL); if( $has_slug == $slug ){return $slug;} } #if same slug exists and no id given then we don't accept this. $SQL = $wpdb->prepare(""SELECT slug FROM "".CLICK_JACKER_CAMPAIGN_TABLE."" WHERE slug=%s"", $slug); $has_slug = $wpdb->get_var($SQL); if( $has_slug == $slug )return false; return $slug; } add_filter('onetarek_is_slug_available', 'otk_filter_available_slug', 10, 2); ?> }}} I am calling above filter where I need {{{ }}} My technique is limited. In my filter function I run 2 SQL query to check WP slugs , but that is limited. WordPress has reserved words also, those are not being checked in this process. And my other 2 plugins also run the same. Now if any website uses my 3 plugins then same process will be run 3 times and 6 SQL query will be run to check WP slugs. My function is unable to check the slug of ""Pretty Links"" plugin. But if '''WORDPRESS core''' would have a '''FILTER HOOK''' and run a function with this filter to check any kind of WP slugs then my plugins would search only its own database once. AND other plugin developer would attach a function with this filter. And they would check only their own database. Plugins don't need to check WP slugs because core function already fired with this FILTER HOOK. In the same way WP core should respect other plugin slugs and '''custom url rewrite rules'''. When WP check available slug for post, page, taxonomies then it should use this FILTER also. I THOUGHT THIS WAY BECAUSE I DON'T FIND ANY WAY. IF ANYTHING ALREADY EXISTS IN WP PLEASE LET ME KNOW. Regards Jahidul Islam (oneTarek) [http://onetarek.com] " onetarek Future Releases 19686 404 - File or directory not found Permalinks 3.3 low normal defect (bug) new dev-feedback 2011-12-29T19:47:45Z 2019-06-04T21:03:41Z "We are running Wordpress using multiuser with Buddypress. Users are getting the 404 error after they click the save button in their settings. I'm opening this ticket to report the source of the problem. Wordpress 3.x Buddypress 1.5 Windows 2008 R2 (IIS 7.5) Themes installed are all Buddypress compatible and all themes seem to be affected. All option pages are affected. Settings are updated when the user returns to the page - despite the error. A screen shot of the error can be seen at http://blogs.cnc.bc.ca/gagel/?attachment_id=38 The source of the problem appears to be in the wp_get_referer() function on line 164 in options.php. With the variables passed to the function it should redirect the user to the page they just submitted when they updated options. Instead they get the 404 error. The page they're redirected to appears to be the absolute path of the submitted page appended to the absolute path again (minus the domain). So it looks like this: userblog/wp-admin/userblog/wp-admin/options-general.php?settings-updated=true When I switch out the wp_get_referrer() function with the variable $parent_page then the redirect worked as expected. I'm uncertain about leaving it like this as my change may have introduced issues elsewhere... This issue is discussed at http://wordpress.org/support/topic/recuring-404-file-or-directory-not-found-error?replies=8#post-2527566" kwgagel Future Releases 17450 Almost pretty permalinks with non-ASCII characters do not work in Apache westi Permalinks 3.1 normal normal defect (bug) reopened needs-unit-tests 2011-05-16T05:53:14Z 2019-06-04T20:42:05Z 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 28156 In date-containing permalink structures, /dddd/dd/comment-page-d/ urls don't work Permalinks 3.9 normal normal defect (bug) new needs-unit-tests 2014-05-06T22:42:17Z 2019-06-04T20:46:56Z "I was in the process of writing a plugin to allow people to test their rewrite rules as they develop a site, and when I setup examples of core rewrite rules, one of them was failing. If you set your permalink structure to one containing dates, e.g. ""Day and Name"", one of the generated rewrite rules for posts is: {{{ '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]' }}} And later on, another rule is: {{{ '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]' }}} The URI /2014/5/6/comment-page-2/ would end up matching the earlier rule, looking for a post named ""comment-page-2"" published on 2014-05-06, instead of looking for comment page 2 in the... I actually don't even know what the comment-page URLs do. For me, the ones that work just redirect to the date archive. I'm happy to patch this, but would like to hear from someone else on what exactly should be done done. Do the comment-page-n rules do anything? Can they just be removed?" mboynes Future Releases 16126 Multisite name conflict check doesn't check for pages. Permalinks 3.0 normal normal defect (bug) new 2011-01-06T19:11:19Z 2019-06-04T20:41:45Z "Running WP 3.1-RC2 I made a page off my main site called foobar. Then I went in and made a sub-site (using SubFOLDERS) called foobar. The subsite took precedence and there was NO check or warning. I was able to reproduce this on 3.0.4 Then I went the otherway. I have a subsite called camels (don't ask). I went to make a PAGE called camels and it also let me. No conflict check. Basically you have to add the main blog page names into the banned names list manually, which strikes me as a bit odd. I can see why checking that would be onerous if someone had 600 million pages (and we all know they do) but forcing people to do it manually seems like a gap. Need love! :D This is minor, since not a lot of people have bitched, so clearly we're not running into it YET." Ipstenu Future Releases 23229 Pagination Links Broken Permalinks normal normal defect (bug) new 2013-01-17T23:11:04Z 2019-06-04T20:43:46Z "Currently, if the request URL ends with ""page/[\d]+/?"" it will always assume that it is the pretty version of the paged parameter, and rewrite that section of the URL. This breaks in any condition where a numeric value follows that string at the end of a URL. An example that can be easily reproduced is as follows: 1) Set theme to TwentyEleven 2) Modify the theme to output the results of get_pagenum_link(2) anywhere. 3) Change permalink structure to ""/daily-page/%year%/%monthnum%/%post_id%/"" 4) Go to a year archive for the permalink structure above. 5) The result of the get_pagenum_link will look like this: ""/daily-/page/2/"", breaking pagination within this context. I've attached a patch against current trunk code that addresses this, providing the following features: 1) Pagination links functional in the scenario above, along with custom rewrite rules. 2) Updated to allow numeric post names for hierarchical post types (currently always rewritten with ""-2"") 3) Updated get_pagenum_link filter to include pagenum parameter as it was passed in. " ssmathias Future Releases 35209 Permalinks of published pages get changed when creating new pages as a draft Permalinks 4.4 normal normal defect (bug) new dev-feedback 2015-12-23T13:14:39Z 2019-06-04T20:53:45Z "While looking over ticket #35197 I found some other strange behavior where a permalink of a published page will be overwritten by a newly created draft page. Here are the steps to reproduce it (''4.4''/''trunk''): '''Step 1''' Add a new page with the title ''""Test 1""''. When switching to the editor, a permalink is generated: ''http://your-site.com/test-1/'' '''Step 2''' Click the ''Edit'' button next to the generated permalink, change the permalink from ''""test-1""'' to ''""test""'', click ''OK'' and click the ''Publish'' button to publish the newly created page. '''Step 3''' Add a new page with the title ''""Test 2""''. When switching to the editor, a permalink is generated: ''http://your-site.com/test-2/'' '''Step 4''' Click the ''Edit'' button next to the generated permalink, change the permalink from ''""test-2""'' to ''""test""'' and click ''OK''. The permalink gets changed back to ''test-2'' correctly because the already published ''Test 1'' page is using ''test'' as a permalink. '''Step 5''' Click the ''Save Draft'' button to save the ''Test 2'' page as a draft. Do '''NOT''' publish it! '''Step 6''' Switch to the ''""All pages""'' area and open the ''Test 1'' edit page. '''Step 7''' SURPRISE! The permalink of the already published page ''Test 1'' changed from ''""test""'' to ''""test-2""''. Curiously when you hover the permalink it still uses the correct ''""test""'' permalink. [[Image(http://fs5.directupload.net/images/151223/r6gqvcph.png)]] '''Step 8''' Okay, now lets change something at the site. Add some text for example and click the ''Update'' button. After ''Step 8'' the permalink of the ''Test 1'' page gets changed to ''""test-2""'' while the ''Test 2'' page is using the ''""test""'' permalink now. There should be a patch for this because permalinks of already published pages can easily get changed when you are not aware of this problem. The main issue is that in this case all incoming links from third-party websites will not link to the correct page anymore." Asgaros Future Releases 34822 Post name permalinks problems Permalinks 4.3.1 normal normal defect (bug) new dev-feedback 2015-12-01T16:41:16Z 2019-06-04T20:53:19Z " When using the ""post name"" permalink options and creating/deleting duplicates it can happen that the links get confused and the correct permalink doesn't work anymore. (page not found) The workaround shows a little more of this strange behaviour. If you change the link of the old page to blog/pagename-2, create a new one (with changing the link to the correct/old one if necessary), and delete the old one, the permalink blog/postname works, but redirects to blog/pagename-2. Something gets mixed up there... --- To add another workaround that we've tried to fix it: If one changes the permalink setting to standard, the post show up as normal, but when changing the settings back (to ""article name""), the problem persists/reappears. The permalinks do not seem to be freshly generated but rather to somehow half-and-half rely on old and new setting, very weird. " stevenbauers Future Releases 27019 Redirect by page slug does not work in permalink structure /%category%/%postname%/ Permalinks 3.8.1 normal normal defect (bug) new 2014-02-05T08:44:36Z 2019-06-04T20:45:36Z "Wordpress has a feature to redirect by page slug. For ex. site with two pages: {{{ yoursite.com/pageone/pagetwo }}} With default permalink settings redirect works like this: {{{ yoursite.com/pagetwo -> yoursite.com/pageone/pagetwo yoursite.com/randomtext/pagetwo -> yoursite.com/pageone/pagetwo }}} With permalink structure '''/%category%/%postname%/''' redirection from root stops working: {{{ yoursite.com/pagetwo - 404 error }}} , but from non root ok: {{{ yoursite.com/randomtext/pagetwo -> yoursite.com/pageone/pagetwo }}} How to reproduce. Clean wordpress install. Create pages: ""pageone"", ""pagetwo"" with parent page ""pageone"". Try to open url: {{{ yoursite.com/pagetwo - 301 moved }}} Set custom permalink structure to '''/%category%/%postname%/'''. Try to open url: {{{ yoursite.com/pagetwo - 404 error, but 301 expected }}} I think, permalink structure is for post, not for pages. Am I right? After investigations I found, ""pagetwo"" in url ""yoursite.com/pagetwo"" detected as category name in class-wp.php/'''parse_request()'''. And later canonical.php/'''redirect_guess_404_permalink()''' does not try to find page by category name, only by get_query_var('name'), that is blank." dimagsv Future Releases 35635 Redirect loop for custom post types in WP 4.4 Permalinks 4.4.1 normal critical defect (bug) new dev-feedback 2016-01-27T19:46:48Z 2019-06-04T20:54:50Z "I have a client site hosted on WPE that was on 4.3.1 and when I updated to 4.4.1. it now has a redirect loop error (ERR_TOO_MANY_REDIRECTS) when trying to access a single post page (for a custom post type) from a category page. What it is doing is trying to redirect without the category in the the URL and then tries to redirect with the category, and loops; [[br]] /%category%/%postname%/ => /%postname%/ => /%category%/%postname%/ => etc. On my category page a have a list of posts with links with the markup {{{"" class=""custom"">...}}} and my permalinks setup is ""Post name"" or ({{{/%postname%/}}}). I don't know the code causing this so I don't have much info, but with the assistance of WPE support we confirmed this is due to the WP 4.4.1 update by cloning versions and updating WP and reverting, etc. Here is [https://wordpress.org/support/topic/this-webpage-has-a-redirect-loop-43/ another instance I found] as well, but they claim to have reinstalled 4.4 and it fixed it. I tried this several times with no luck. Note: This is my first time submitting a defect/ticket, so please let me know if I need to add any other info." standuncan Future Releases 36694 [Pages] [Edit Page] Changing the Permalink URL updates the displayed anchor text, but not the HREF (URL) property Permalinks 4.5.1 normal normal defect (bug) new reporter-feedback 2016-04-27T23:25:56Z 2019-06-04T20:57:57Z "Steps to reproduce: 1. Create a page or post 2. Edit said page or post 3. Change the Permalink URL using ""Edit"" button next to displayed permalink 4. Click OK button after updating Permalink URL Observe. Expected: the anchor link text is updated and the anchor link HREF property is updated to the new value input in the field Actual: the anchor link text is updated but the anchor link HREF property remains the same." setsailmedia Future Releases 32705 `includes_url` shouldn't use `site_url()` on the frontend Permalinks normal normal defect (bug) new dev-feedback 2015-06-18T15:18:09Z 2019-06-04T20:50:36Z "Multisite / Domain Mapping 1. `site_url()` is your admin, `home_url()` is your frontend 1. The site url is blocked behind a firewall 1. You call `includes_url()` for a script on the frontend: your script is blocked, because it loads your admin domain on the frontend I noticed this because we are trying to upgrade the NYT to 4.2.* and emoji scripts are showing up everywhere. I can remove the action for now." wonderboymusic Future Releases 36323 home_url returns url with wrong scheme Permalinks 4.4.2 normal normal defect (bug) new dev-feedback 2016-03-25T02:40:21Z 2019-06-04T20:56:21Z "Hello, I have a multisite with HTTPS on all subsites. When using {{{ home_url( '/' ); }}} , on a subsite page, logged in user got a https url, when anonymous got just http. In the track, it seems that the error comes from those lines... {{{#!php 2963 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { 2964 if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) 2965 $scheme = 'https'; 2966 else 2967 $scheme = parse_url( $url, PHP_URL_SCHEME ); 2968 } }}} ... Thank you for your time." Gerkin Future Releases 23117 permalink failed on IIS7 and Reserved Proxy for wordpress 3.5 Permalinks 3.5 normal normal defect (bug) new 2013-01-04T06:30:33Z 2019-06-04T20:43:38Z "it seems to work fine on local but get into a canonical redirect loop when we deploy to production after we upgrade to wordpress 3.5. We did a little debug and found the issue with permalink in file .\wp-includes\canonical.php at line 42 with new coded ""&& !iis7_supports_permalinks()"" added in 3.5. the issue is iis7 does support permalink and so it go into create and redirect to pretty link which use the website URL in wp-admin settings which is the site URL. when it hits the site URL, our reserved proxy write back to the wordpress site on diff server with port and canonical.php think that's incorrect, so it redirect back to the website URL and the loop go on and on. we found a temp workaround but not desirable, add this ""remove_filter('template_redirect', 'redirect_canonical');"" in the function.php file in the theme folder you are using. or add a wordpress plugin or simply remove the additional codes in canonical.php file that was added in 3.5. but may cause issue in future upgrade." romeoqngo Future Releases 34555 superscript in url Permalinks normal normal defect (bug) new dev-feedback 2015-11-02T10:39:17Z 2019-06-04T20:53:06Z "If you have a superscript in the post title and selected post-name structure for permalink, it creates a slug as in the image: http://prntscr.com/8y3wsc " sabrisahincan Future Releases 35796 """Permalink Settings"" admin page is largely blog/post specific" Permalinks normal normal enhancement new dev-feedback 2016-02-10T17:44:29Z 2020-02-06T19:41:12Z "The current verbiage in `options-permalink.php` is a little cryptic, and in a world pull of custom post types (including Pages) it's actually a bit confusing: Here's the current verbiage: > '''Permalink Settings''' > > WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started. I'd like to see these changed to something more like: > '''Post Link Settings''' > > WordPress offers the ability to customize the URL structure of your post and post-archive permalinks, improving the aesthetics, usability, and forward-compatibility. Several tags are available, and we've included the most popular configurations below: In addition, I'd like to propose we include the permalink tags in the dropdown Help section, rather than link off to WordPress.org. All of this would offer several UX improvements: * Keep the user on the same page rather than link off and open a new browser tab for WordPress.org * It better expresses to the end-user that this settings page is largely dedicated to posts, implying that pages and custom post types get pretty URLs largely as a consequence * Now that `unregister_post_type()` is in trunk, we should start thinking about trimming the options down to ""Pretty"" and ""Unpretty"" if the ""Posts"" type isn't even registered anymore. (There are likely to be many other considerations in this circumstance, but it's relevant here.) * It's a friendly nod to developers to remind them that this page won't help them with their custom post types, taxonomies, or rewrite rules for other purposes." johnjamesjacoby Future Releases 34118 Allow permalinks to spell out when certain symbols are used Permalinks normal normal enhancement new 2015-10-01T16:37:15Z 2019-06-04T20:51:58Z "Someone just pasted this link to me in IRC: http://www.rawstory.com/2015/10/alabama-to-stop-issuing-drivers-licenses-in-counties-with-75-black-registered-voters/ whereas a more accurate URL would be: http://www.rawstory.com/2015/10/alabama-to-stop-issuing-drivers-licenses-in-counties-with-75-percent-black-registered-voters/ Give the propensity of people to skim read things online, this would be very useful." mattlee Future Releases 9825 Enforce permalink history, outright Permalinks 2.8 normal normal enhancement assigned needs-unit-tests 2009-05-15T01:06:37Z 2019-06-04T20:40:43Z "currently, we enforce old slugs and www pref (not even sure that works, since I ended up fixing it in a plugin). canonical doesn't work for pages, or hardly. we should enforce permalink history, outright. store it in a a db field, and query against it to optimize url2post()." Denis-de-Bernardy Future Releases 10384 Make IIS Permalink support enabled based on capability not on version number westi Permalinks 2.8 normal normal enhancement new 2009-07-11T08:37:44Z 2019-06-04T20:40:48Z "At the moment we enable the IIS permalink support based on checks for IIS7 and then some capabilities. We should remove the version checking and work solely on capabilities so that we don't have to revisit when IIS8 is released." westi Future Releases 25006 Display date pages from categories with permalinks Permalinks normal normal feature request new close 2013-08-10T00:46:10Z 2019-06-04T20:44:39Z "When permalinks are not set up we can view posts from a specific category from a specific year (date), but if the permalinks are set up we can view only date pages or category pages. This works: `site.com/?cat=1&m=201307` (works) This does not work: `site.com/category/uncategorized/2013/07` (does not work)" alexvorn2 Future Releases 21432 Deprecate *_blog_option() Options, Meta APIs 3.4.1 normal normal Future Release defect (bug) assigned dev-feedback 2012-07-31T21:53:06Z 2017-06-26T17:58:41Z "Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option(). The regular *_option() functions wrapped with switch_to_blog() and restore_current_blog() should be used instead. Previous discussion: http://core.trac.wordpress.org/ticket/21270#comment:11" ryan Future Releases 47278 General settings page allows html tag. Options, Meta APIs 5.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-05-15T11:38:45Z 2019-05-15T20:07:55Z In the General Settings page, when we add HTML tags into the text fields. It allows admin to save those settings with HTML tags. Please see the screenshot link: [https://prnt.sc/nout9b] parthsanghvi Future Releases 49432 Need of maximum character limit for Site Title Options, Meta APIs low minor Awaiting Review defect (bug) new close 2020-02-14T11:03:40Z 2021-12-14T21:49:41Z "1. There should be a maximum limit of characters for setting up the site title in Admin Dashboard -> Settings -> General. The limit should also be there at time of site setup. 2. Currently, the site title has no limit of characters. This may break the site UI on the frontend. 3. Site title allows to add spaces only, but gets saved as empty." sharduld Future Releases 40012 Only add_metadata if no matching value Options, Meta APIs 2.9 normal normal Awaiting Review defect (bug) new dev-feedback 2017-03-02T02:04:43Z 2017-03-02T02:58:15Z "`add_metadata()` has a `$unique` parameter, but it only looks for a unique `meta_key` for the given object ID. I have a need to add meta-data with the same `meta_key` but different values, and only if that `meta_value` isn't already present with the same key. To do this now, requires: * Getting all meta-data for the ID by `meta_key` * Checking those array-values for my value * Bailing if it's already present, or... * Proceeding with `$unique` set to `false` It'd be lovely if `add_metadata()` either: * Accepted strings like `key`, `value` for the `$unique` parameter, to switch up the check * Added a second parameter for unique value in addition to a unique key" johnjamesjacoby Future Releases 48573 Permalinks Settings screen unnecessarily calls sanitize_option( 'permalink_structure' )... Options, Meta APIs normal normal Awaiting Review defect (bug) new dev-feedback 2019-11-12T17:56:31Z 2019-11-12T23:49:29Z "...just before it calls [https://developer.wordpress.org/reference/classes/wp_rewrite/set_permalink_structure/ WP_Rewrite::set_permalink_structure()]. It is unnecessary because `sanitize_option()` will be called by the `update_option()` call in `WP_Rewrite::set_permalink_structure()` if it the value needs to be sanitized (i.e., it has changed). " pbiron Future Releases 59871 Prime further options in `wp_load_core_site_options()` Options, Meta APIs normal normal Future Release defect (bug) new 2023-11-10T02:00:57Z 2024-01-11T17:43:33Z "In Multisite, individual database queries are made to query a number of commonly used options. On each request: * WPLANG * nonce_key * nonce_salt On each authenticated request: * auth_key * auth_salt The *_(salt|key) requests are only made if the constant is not defined or uses the default phrase `put your unique phrase here`. Follow up to #56913." peterwilsoncc Future Releases 41604 REST API: Attempting to create or update a non-existent setting doesn't return an error response Options, Meta APIs normal normal Awaiting Review defect (bug) new 2017-08-10T16:35:44Z 2017-08-10T16:37:07Z "Attempting to create a new setting via a POST request to `/wp/v2/settings` returns a 200 response, despite the request having been invalid. The same goes for attempting to update a non-existent setting with a PUT request. I would have expected maybe a 400 from such requests. The internal logic in `WP_REST_Settings_Controller` routes the request through the `update_item()` method, treats it as a setting update, and silently ignores the problem. " johnbillion Future Releases 38203 Remove `absint` on object IDs in `delete_metadata`, etc Options, Meta APIs 2.9 normal normal Awaiting Review defect (bug) new dev-feedback 2016-10-01T06:40:14Z 2017-04-19T02:50:43Z "Absint is run on the object ID in the functions called with a meta key: `delete_metadata()`, `get_metadata()`, `add_metadata()`, `update_metadata()` and `metadata_exists()`. This leads to unexpected behavior in the event a negative or floating object ID is passed. Related #37746, #37738, #33372." peterwilsoncc Future Releases 50181 Second params of get_option() not used Options, Meta APIs 5.4.1 normal normal Awaiting Review defect (bug) new dev-feedback 2020-05-15T15:50:44Z 2020-05-18T10:08:43Z "Hello In a develp=opment I have something like {{{ $options = get_option( 'my_option', array() ); foreach ( $options as $option ) { // doing things } }}} The option stored seems to be not unserializable. So when going through https://github.com/WordPress/WordPress/blob/master/wp-includes/option.php#L152 + unserialize() which return false on error the second parameter is not used and we got a Warning. We're not testing `$options` thinking with the second param setted to `array()` will allways return an array... " sebastienserre Future Releases 44977 Transient fill fail delete to itself if it's timeout option is missing Options, Meta APIs normal normal Awaiting Review defect (bug) new 2018-09-21T11:25:44Z 2018-09-23T12:47:02Z "Just faced this issue - for some reason, the transient was not deleting itself. While checking the DB, the option with the transient was there, while the timeout option was missing (probably a glitch while saving to DB). Now, if you check get_transient() in option.php (quick link https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-includes/option.php#L0 ) you can see that these are deleted only if both exist and both pass the test: {{{ [...] if ( false !== $timeout && $timeout < time() ) { DELETING TRANSIENT} [...] }}} Otherwise transient will hang... forever. This should be tuned up so it also checks that these options exist, and delete transient if timeout is absolete." nlozovan Future Releases 54805 When on the /wp-admin/network/site-settings.php network settings page, calling the update_option() always add the setting Options, Meta APIs 5.8.3 normal minor Awaiting Review defect (bug) new 2022-01-13T00:03:48Z 2022-01-13T00:03:48Z "When on the network settings (/wp-admin/network/site-settings.php), the udpate_option() used to update the changed settings always adds the settings whenever the form is submitted. So instead of firing the ""update_option"" action hook after the settings are updated, it still fires the **add_option** action hook every time! Obviously, this should give an error but because there's a bailer when adding option using **ON DUPLICATE KEY UPDATE**, no error is shown." zenithcity Future Releases 54006 Wp Multisite Get, Add, Update and Delete Site Meta Issue. Options, Meta APIs 5.8 normal normal Awaiting Review defect (bug) new dev-feedback 2021-08-25T16:26:30Z 2021-08-27T14:21:30Z "Just working on some code to help with WP Multisite integration... I have noticed that the `add_site_meta` function is currently not working. I had a look through the functions in wp-includes/ms-site.php and found that the first parameter in the 'add_metadata' function called by add_site_meta (line 1012) is 'blog'. I figured since you changed the blogmeta table to sitemeta that something might be amiss. If the metadata is added thus: add_metadata( 'site', 1, 'test_site_feta', 'cheese', false ); All appears to work okay, however this does not; add_metadata( 'blog', 1, 'test_site_feta', 'cheese', false ); Think its a bug...until I had a closer look I had to use MySQL queries to add the site meta. " leeml Future Releases 45505 get_post_custom() doesn't pull values Options, Meta APIs 5.0 normal normal Awaiting Review defect (bug) new 2018-12-06T21:37:29Z 2018-12-06T22:07:14Z "When you are on a post or page and change the content and reload, so that the autosave post pops up at the top, the get_post_custom() values in custom metaboxes aren't being pulled in. get_post_meta() values however still works in that scenario." dryane Future Releases 45273 get_postmeta: Inconsistent behavior of the 'single'-argument Options, Meta APIs normal normal Awaiting Review defect (bug) new dev-feedback 2018-11-03T19:29:48Z 2019-01-16T22:58:54Z "The phpdoc of the ''get_postmeta''-function in meta.php mentions that the ''single''-argument has no effect if ''meta_key'' is not specified. This is not true when the ''get_{$meta_type}_metadata''-filter is used. If this filter returns an array and ''single'' is true only the first item of the array is returned. This not the expected behavior when ''meta_key'' is empty. In my opinion this part: {{{#!php $check = apply_filters( ""get_{$meta_type}_metadata"", null, $object_id, $meta_key, $single ); if ( null !== $check ) { if ( $single && is_array( $check ) ) { return $check[0]; } else { return $check; } } }}} should be replace by: {{{#!php $check = apply_filters( ""get_{$meta_type}_metadata"", null, $object_id, $meta_key, $single ); if ( null !== $check ) { if ( $meta_key && $single && is_array( $check ) ) { return $check[0]; } else { return $check; } } }}} (Notice how I added {{{$meta_key && }}}) NOTE: This is a breaking change in the rare occasion that ''get_{$meta_type}_metadata''-filter is used in combination with an empty ''meta_key'' and ''single'' == true. If a fix is not desired; phpdoc must be changed to document this inconsistent behavior. " josk79 Future Releases 43704 pre_option_{$option} filter is case sensitive although options are not. Options, Meta APIs 4.9.5 normal normal Awaiting Review defect (bug) new 2018-04-05T18:38:44Z 2018-04-08T01:53:12Z "I noticed the filter ""pre_option_{$option}"" for myOption wouldn't filter get_option('MYOption') for example, yet get_option(name) and MySql in general does not seem to care what case the option is. Perhaps it should also do pre_option_(strtolower($option)) when necessary? Was there a reason this particular filter is case-sensitive?" programmin Future Releases 34322 set_transient and get_transient don't seem to be working for some users since WP 4.3 Options, Meta APIs 4.3 normal normal Awaiting Review defect (bug) new 2015-10-16T04:07:34Z 2017-04-06T17:08:22Z "I'm the developer of a social media plugin which relies on the WordPress set_transient and get_transient functions to temporarily cache data in the user's database. Since the WordPress 4.3 update, we've had reports of the cache not clearing automatically as it should, meaning that the transients aren't expiring correctly in the database. This seems to only be happening on some servers as I haven't been able to replicate the issue on my own test site, but have confirmed it on user sites, and looks like it could be related to [https://make.wordpress.org/core/2015/07/30/get_transient-is-now-more-strict-in-4-3/ this thread]. The same problem seems to be happening to other developers of similar plugins, and I've had some users report that other unrelated WordPress plugins they're using are also not automatically updating either any more, which I'm assuming is caused by the same issue. I've been able to confirm the problem on user sites by using a page template containing the following basic code. I've commented it to explain what it does and can provide a Facebook Access Token privately if needed, although I included a link on how to obtain your own. The transient set using the script below should expire every 30 minutes and then the script should check the URL again for new data, but it doesn't unless I delete the transient manually. {{{ '; //Show the date the data was last updated from Facebook echo 'Last updated: ' . json_decode( json_encode($transient) )->headers->date; } else { //No transient in the database - get the data from Facebook $facebook_data = wp_remote_get( $url ); //Cache the data in the database set_transient( 'test_transient_expiration', $facebook_data, 1800 ); echo 'Got the data from the URL
    '; //Show the date the data was last updated from Facebook echo 'Last updated: ' . json_decode( json_encode($facebook_data) )->headers->date; } ?> }}} I was in two minds whether to report this as a bug as I've never reported one before, however it definitely seems like this could be a bug as the above code should work, but doesn't on some user's sites. I use code very similar to the above in my plugin and nothing has been changed in that code, but users started reporting an issue shortly after the WordPress 4.3 update was released. Through reading the change logs for the 4.3 update I know some changes were made to transients and so I'm wondering if that's what caused this problem. Sorry for the long post! John" smashballoon Future Releases 22192 update_option() strict checks can cause false negatives joemcgill Options, Meta APIs normal normal Future Release defect (bug) assigned needs-unit-tests 2012-10-15T03:19:23Z 2023-10-16T21:22:18Z "Given this: {{{ add_option( $option_name, 1 ); update_option( $option_name, 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. 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. The new changes need unit tests. Ticket from which this was spun: #22189, saving navigation menus is slow." nacin Future Releases 59361 update_post_meta() strict checks can cause false negatives Options, Meta APIs normal normal Future Release defect (bug) new needs-unit-tests 2023-09-15T07:47:12Z 2023-09-15T07:47:12Z "Follow up: #22192 {{{ 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 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. 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. The new changes need unit tests. Ticket from which this was spun: #22189, saving navigation menus is slow. cc. @flixos90 @spacedmonkey @joemcgill" mukesh27 Future Releases 58693 wordpress posts custom-meta box issue Options, Meta APIs 6.2.2 normal normal Awaiting Review defect (bug) new has-patch 2023-07-01T11:37:35Z 2023-07-02T06:30:37Z "Hello to the WordPress development team! im a wordpress plugin developer and I developed a Custom-Plugin for my customer (www.delbarbash.com) and I found a critical issue with post/products meta_box when i disable custom_meta (checkbox) form the screen-options (top-page) and reload the admin posts page or products page But again, the field was taken by PHP rendered (I saw this from view-page-source) Issue: and when i update some product meta value from database or by ajax or somewhere else and then update the post the post will send the old meta_keys and meta_values to the wpdb and it seems to be a bug or malfunction Of course I disabled entirely the meta_box with the aid of remove_meta_box function (in my plugin) My suggestion: to get rid of this weird issue I suggest a new system that when a user disable this meta_box (or all other boxes) from screen option an JS Confirmation take effect and ask the user (if you dont have un-saved values on this page, we will reload the page again) After page reload the page must-not render that box with PHP again! (instead of hidden that box with just CSS) Thanks a lot! Thank you for considering and checking my request and believe that this can be a big problem!" mdesignfa Future Releases 37702 Accept array of IDs in `delete_metadata_by_mid` Options, Meta APIs normal normal Future Release enhancement new needs-unit-tests 2016-08-18T01:23:21Z 2019-12-13T19:00:51Z "When deleting meta data in bulk (for example when an object is deleted), improve performance of meta deletion by accepting an array for `delete_metadata_by_mid` and related functions. Related #37671." peterwilsoncc Future Releases 39706 Add $unique param to add_{$meta_type}_meta actions Options, Meta APIs normal normal Awaiting Review enhancement new 2017-01-26T17:11:05Z 2017-01-26T17:16:36Z "The hooks `add_{$meta_type}_meta` and similar provide context about `$object_id`, `$meta_key`, `$_meta_value` and such, but do not tell whether the meta data added or updated is supposed to be `$unique`. Adding this information could be helpful. My use case for instance is propagating meta data across posts." barryceelen Future Releases 48478 Allow omitting meta keys from the REST API response if they do not exist Options, Meta APIs 4.7 normal normal Awaiting Review enhancement new 2019-10-31T22:54:18Z 2019-10-31T22:54:18Z "Currently, the REST API will include all `show_in_rest` registered meta keys in a response, even if that meta key has no value. When the meta key has no value, either the empty value or a custom default in `show_in_rest.schema.default` is used. If an API client PUTs back this response, the meta key will be created with this default value. This may be undesirable if a user hasn't actually interacted with that meta key. This could be addressed by allowing the user to specify that the meta key should not be included in the REST API if it does not exist. For instance, `show_in_rest.omit_if_not_exists`. Related Gutenberg ticket: https://github.com/WordPress/gutenberg/issues/17864" TimothyBlynJacobs Future Releases 42012 Do not switch roles and capabilities when accessing options through `*_blog_option()` Options, Meta APIs normal normal Awaiting Review enhancement new dev-feedback 2017-09-27T21:51:32Z 2021-08-03T11:42:38Z "[41625] has outsourced the functionality to switch the current user's capabilities and available roles when sites are being switched, instead this now happens in `wp_switch_roles_and_user()` which is hooked into the `switch_blog` action. When accessing `get_blog_option()`, `add_blog_option()`, `update_blog_option()` or `delete_blog_option()`, it should be safe to always unhook the function temporarily (see `WP_Roles::get_roles_data()` for an example where it already happens manually in core) to improve performance, in some cases significantly. Roles and capabilities are not needed when accessing options, however we need to be careful and think about what plugins are possibly doing here. Let's discuss whether this can happen automatically in core or whether it should be left to developers." flixos90 Future Releases 38734 Dogfood the Settings API Options, Meta APIs 2.7 normal normal Future Release enhancement assigned 2016-11-09T16:56:42Z 2022-03-21T22:34:05Z "WordPress has had a [https://codex.wordpress.org/Settings_API Settings API] for eight years, but the core settings screens in WordPress don't use it. Instead, these screens use hardcoded sections and fields, which means it's impossible for a plugin to remove sections or fields without removing the entire screen. There's a new [https://make.wordpress.org/core/tag/fields-api/ Fields API] in development but this doesn't mean the core settings screens shouldn't be improved in the meantime by switching to the Settings API. I think the best approach for this is to address one screen at a time, starting with General Settings, and go from there. If anyone thinks this change should not be made, speak now or forever hold your peace. Related: #9296, #15691, #18801, #32396" johnbillion Future Releases 48393 Fix from #38903 prevents options autoload parameter update SergeyBiryukov* Options, Meta APIs normal major Future Release enhancement accepted dev-feedback 2019-10-22T07:46:00Z 2023-08-28T21:00:43Z "This is a follow-up to #38903. 3 years ago fix for not * If the new and old values are the same, no need to update. * But this condition does not check if method call intention was to update autoload field of the option. Currently the issue can be resolved by force update options when update_option method is called with autoload != null and check * If the new and old values are the same, no need to update. * should be skipped." anonymized_16833402 Future Releases 56548 Introduce `get_option` action Options, Meta APIs normal normal Awaiting Review enhancement new needs-unit-tests 2022-09-11T19:00:11Z 2022-09-11T20:14:00Z "There has been the `option_{$option}` filter for a long time, and it makes sense that this filter should be used to tweak options when reading them. However, there is sometimes a need for running certain logic for when an option is being read. For example, the WordPress performance team is currently working on a feature to optimize the autoloaded options list. For such purposes, we would like to add a new `get_option` action: * The reasoning for making it an action is to not falsely encourage developers to think they could use this to filter an option value (which would be excessive since it would be running for every option read). * The action would get parameters for the option name, the value, and whether the value is based on the default (rather than being looked up from the database). * The action name would be aligned with the existing actions `add_option`, `update_option`, and `delete_option`. * It would be documented so that it should only be used for special cases (similar to e.g. the `all` filter)." flixos90 Future Releases 38690 Introduce classes for settings Options, Meta APIs normal normal Awaiting Review enhancement new dev-feedback 2016-11-07T08:53:14Z 2019-03-26T13:14:34Z "Let's add classes surrounding settings to provide a better structure for dealing with them. It will also allow us to get rid of some globals if we are in a position to remove them (in terms of BC). Here is what I have in mind: * A `WP_Settings` class should be introduced that contains `get()`, `update()`, `add()` and `delete()` methods. This will mostly be copy-paste from the related functions. The functions themselves will become wrappers. * A `WP_Settings_Registry` will be introduced. It should contain all methods that handle registered settings (mostly introduced in 4.7). Again, the functions would become wrappers. We could get rid of the `$wp_registered_settings` global here and store these in a class property instead. * The `WP_Settings_Registry` instance will be contained by the `WP_Settings` instance as a public property. * A function `wp_settings()` will be introduced to access the `WP_Settings` instance or generate it if it does not exist yet. I'm not sure yet how to store the instance: The easy way is a global, but I was wondering where we're at with plans like a `WP::get( 'settings' )` so that we could do it differently. Anyway, let's assume a global first. I think it would be a good pattern to build the class in a flexible way, so that the registry instance and database instance are passed to the class constructor. The following is how I would envision the `wp_settings()` function: {{{ function wp_settings() { global $wp_settings; if ( ! isset( $wp_settings ) ) { $wp_settings = new WP_Settings( new WP_Settings_Registry(), $GLOBALS['wpdb'] ); } return $wp_settings; } }}} I think once we agree on an approach, we should do something similar for metadata. But let's have the discussion in here first and open the other ticket afterwards." flixos90 Future Releases 43818 Invalidate query caches less aggressively by using a `last_changed` key specific to metadata Options, Meta APIs normal normal Awaiting Review enhancement new needs-unit-tests 2018-04-20T08:13:55Z 2018-04-20T08:13:55Z "Currently, the meta implementations for posts, terms, comments and sites (in multisite) invalidate all respective query caches when any value is changed (via setting the `last_changed` key). This is a really aggressive method of cache invalidation and causes in query caches being too frequently invalidated, resulting in lots of unnecessary cache misses. Most queries (or at least many queries) do not make use of meta queries, and those should stay unaffected by when a meta value changes. Therefore I suggest introducing a specific `meta_last_changed` cache key, and have the meta functions set that one instead of the generic `last_changed`. In the query classes, we can then check if a meta query is present, and only then make use of the `meta_last_changed` key - otherwise we can ignore it and use the regular `last_changed` key. Regarding the initial implementation, we should think about whether we would wanna roll this out to all the above object types immediately, or whether we should rather start with an object type less popular for metadata (i.e. ''not'' posts). Related to this is #43813." flixos90 Future Releases 15865 Make it easy to disable options / user settings Options, Meta APIs normal normal Awaiting Review enhancement reopened has-patch 2010-12-17T17:52:29Z 2023-07-27T18:09:44Z "We have a wonderful option white listing system. The one thing it doesn't support is hiding the ui of core options if you don't want them changed. We should have a generic way of doing this." westi Future Releases 43209 REST API should take settings errors into account Options, Meta APIs normal normal Awaiting Review enhancement new dev-feedback 2018-02-01T23:59:10Z 2018-02-01T23:59:10Z "The `WP_REST_Settings_Controller` should notify the client when updating a setting fails due to an invalid value provided per the setting's `sanitize_callback` (should actually be validation, see related #43208). Currently this goes completely unnoticed. While `update_option()` doesn't return any information like that, it may be possible to use the information passed to `add_settings_error()` in case of a validity issue, and forward that to the client by returning a `WP_Error` with the message." flixos90 Future Releases 55584 Settings API autoload hook Options, Meta APIs normal normal Awaiting Review enhancement new dev-feedback 2022-04-18T04:56:49Z 2023-08-31T17:43:17Z "Currently all settings registered via Settings API is forced to enable autoload, There is no hook to replace this. Lets imagine just for example: 1. all wordpress plugins is using this to register their settings data. but not delete this value during uninstall. 2. Average wodpress admin install then uninstall 50 plugins in their lifetime. 3. Average autoloaded setting is 100kb per plugin there will be 5mb autoloaded options which not used anymore. that event is per pageload. Just imagine that. " hir88en Future Releases 49948 Site Meta: Adding additional useful functions Options, Meta APIs 5.5 normal minor Awaiting Review enhancement new has-patch 2020-04-18T15:01:46Z 2020-08-04T16:34:55Z "There are useful functions for post meta such as `get_post_custom()`, `get_post_custom_keys()` and `get_post_custom_values()`. These functions do not exist for site meta but they would be useful. I've added `get_site_custom()`, `get_site_custom_keys()` and `get_site_custom_values()` to ms-site.php and created a PR to the GitHub repo. " mikeyhoward1977 Future Releases 55969 The function set_transient should have the autoload argument Options, Meta APIs 6.0 normal normal Awaiting Review enhancement new 2022-06-12T14:28:53Z 2023-11-26T23:10:03Z "The function set_transient should have an argument to decide if a specific transient should be autoloaded or not so. At the moment every transient that is set with the function set_transient is autoloaded. Not all the transients have the need to be autoloaded. For example, many times transients that are used only in the backend don't need the autoload, but they slow down the frontend in some cases." giuse Future Releases 56821 meta_query late row lookup for performance improvement Options, Meta APIs normal normal Awaiting Review enhancement new 2022-10-13T20:46:34Z 2022-10-14T11:59:24Z "Is it possible to do a late row lookup for meta_query to make large postmeta sets run much faster? In some benchmarking I've done with load testing, queries that would take 8s to load with the current meta_query ended up loading in 500ms after implementing late row lookup. My suggestion would be to modify the get_posts function in the WP_Query class to have a flag pass through to use late lookup, like passing through `""meta_late_lookup""=>true`: {{{#!php meta_query->queries ) ) { $clauses = $this->meta_query->get_sql( 'post', $wpdb->posts, 'ID', $this ); if(isset($q['meta_query_late_lookup']) && $q['meta_query_late_lookup']){ // perform a late lookup instead of a join $clauses['where'] = ' AND ID in (SELECT post_id FROM '.$wpdb->postmeta.' WHERE 1=1 '.$clauses['where'].')'; } else { $join .= $clauses['join']; } $where .= $clauses['where']; } }}} At the moment, this can be accomplished with a filter like so: {{{#!php ' AND ID in (SELECT post_id FROM '.$meta_table.' WHERE 1=1 '.$sql['where'].')'); return $sql; } }}} " brmoore252 Future Releases 41099 update_option return value ambiguous Options, Meta APIs 4.8 normal normal Awaiting Review enhancement new 2017-06-19T20:58:45Z 2019-04-15T16:37:15Z "WordPress 4.8 The return value 'false' does not allow for differentiating if there was an error saving or if the option value already exists and is the same as the new value. Consider this scenario: a plugin sends option values via AJAX to be updated. The AJAX function returns the return value of 'update_option' which determines the feedback provided to the user, such as a 'success' or 'failure' message. Rather than returning 'false' if an option already exists and is the same as the new option, I suggest returning NULL. In this way the return value of 'update_option' can be checked as follows: {{{#!php if ( is_null( update_option( $option, $value, $autoload) ) ) { ... } // option exists and value is the same as existing option value if ( false === update_option( $option, $value, $autoload) ) { ... } // an error occured when saving the option if ( update_option( $option, $value, $autoload) ) { ... } // option updated successfully }}} The 'update_option' function would need line 308 changed from: {{{#!php return false; }}} to: {{{#!php return NULL; }}} " cloughit Future Releases 41769 Custom function to display all values of a custom field (meta_key) Options, Meta APIs normal normal Awaiting Review feature request new 2017-08-31T13:25:35Z 2017-09-01T16:06:45Z "If possible, add an extra function where we can list all values of a certain custom field (meta_key). All functions I've found so far is only post id related (e.g get_post_custom_values, etc). While any developer can build this themselves, I do think other wp users could benefit from it as well if it's simly part of the core. Thanks." mireillesan Future Releases 43451 Disallow objects as meta values Options, Meta APIs 4.9.2 normal normal Awaiting Review feature request new 2018-03-01T13:01:21Z 2018-03-01T14:13:31Z "OK, I know this is probably going to be closed before anyone even reads it, but I recon it's worth to at least try and spark a discussion. As probably many people know at this point meta functions do not like backslashes. For some reason (probably db related) meta and option add / update functions run all values through `stripslashes_deep`, which means they expect the input values to be slashed. Actually this ""requirement"" seems to be undocumented even though it's here since version 3.something, why, that's beyond me. So, imagine you're a noobie WordPress developer and for some reason you have a backslash in a string you want to persist (happens more often than one might think), so you go ahead and run the following code: {{{#!php $value = 'hello \world'; update_user_meta(get_current_user_id(), '_test', $value); $meta = get_user_meta(get_current_user_id(), '_test', true); var_dump($value, $meta); }}} You save `hello \world` and expect to get `hello \world` back, but surprise surprise, the backslash is gone. So you start scratching your head, dig through stackoverflow or the source and you discover `$meta_value = wp_unslash($meta_value);`. You think this isn't right, but who are you to argue with software that's here for more than 10 years already. So, now, you are a bit more ""experienced"" and know you need to run all your values through `wp_slash` **before** you pass it to the meta functions. Then one day you need to save an array, you read through the docs which doesn't seem to forbid it, so you glance at the source and see `$meta_value = maybe_serialize( $meta_value );` - YES! - you say, you can pass basically anything and WordPress will take care of the serialization, awesome! So, now you run: {{{#!php $value = [ 'hello' => 'again \world' ]; update_user_meta(get_current_user_id(), '_test', wp_slash($value)); $meta = get_user_meta(get_current_user_id(), '_test', true); var_dump($value, $meta); }}} Which results in the same input you gave it, now that you know you need to slash everything. You weren't sure `wp_slash` could actually handle arrays, but it does, so life's good! Later on you mature even more and decide you want to save whole objects now. You know about serialization, so no worries here, right? You adapt your previous code and try to run the following: {{{#!php $value = new \stdClass(); $value->hello = 'world \again'; update_user_meta(get_current_user_id(), '_test', wp_slash($value)); $meta = get_user_meta(get_current_user_id(), '_test', true); var_dump($value, $meta); }}} ...and you get `Warning: addslashes() expects parameter 1 to be string, object given in`. Turns out `wp_slash` can't handle objects :| Alright, maybe you don't need it, so you remove it aaand the slash is gone. Then you look at the code and realize now the slash is gone even from your original object! What the... So trying to store an object as a meta value is not only not gonna work properly, but it's also going to mess with your original object! So, what then? Serialize it into a string before and after? OK, you serialize the object so it's just a string now, then run it through `wp_slash` to fix the slashes issue and then give it to the meta function: {{{#!php $value = new \stdClass(); $value->hello = 'world \again'; update_user_meta(get_current_user_id(), '_test', wp_slash(serialize($value))); $meta = unserialize(get_user_meta(get_current_user_id(), '_test', true)); var_dump($value, $meta); }}} Whew, finally everything works just fine, even though you're not absolutely sure you've covered all possible cases making sure nothing can ever go wrong again. ---- So, can anyone elaborate on this a bit more? Why are slashes such a big problem when it comes to options and meta, shouldn't the value just be converted to a string and then treated as a black box all the way up to when it needs to go in the database? Why does object serialization cause so much trouble? You can't seriously expect users to be aware that their objects are going to be deepslashed to death, values of properties modified to god-knows how deep, and be okay with it. If meta functions can't handle objects, just don't allow objects, shift the responsibility to the user, but be blunt about it. Don't say, //it's okay, we're gonna take care of serialization for you//, then strip the slashes off of properties of deep objects which might not even be part of WordPress whatsoever. This is a debugging nightmare. Lastly I would like to apologize for my tone, but I've dealt with this issue for years now. There are bug reports opened 7 years ago that still haven't been resolved properly. If nothing else it's really surprising to me that we're at 4.9.4 and such a mundane activity (persisting objects in meta) can cause so much trouble. Is it just me having these issues? Does no one else serialize stuff?" tonybogdanov Future Releases 28454 Inconsistent front page option behavior Options, Meta APIs 3.4 normal normal defect (bug) new 2014-06-04T16:44:57Z 2019-06-04T20:47:09Z "'''Correct/expected behaviour:''' If you change your settings in ''Settings'' > ''Reading'' > ''Front page displays'' as follows: ''From:'' A static page (select below) -- Front page: home -- Posts page: blog ''To:'' Your latest posts then the `Show_on_front` setting is correctly changed to `posts` and the `Page_on_front` setting correctly gets reset to `0`. '''Incorrect behaviour:''' If instead you change the same settings from ''Appearance'' > ''Customize'', the `Show_on_front` setting is correctly changed to `posts`, but the `Page_on_front` setting is not reset and remains set to the previous setting's page ID. '''Testing done:''' I replicated this behaviour with several themes, including twenty fourteen, with all plugins deactivated. '''Why this is a problem:''' This is inconsistent and may cause errors--e.g. if a theme or plugin author checks the `Page_on_front` setting without also checking the `Show_on_front` setting. This is how I encountered it, in Polylang; plugin author had to work around it; details here: http://wordpress.org/support/topic/wrong-front-page-showing-in-appearance-customize-with-polylang-loaded). '''Solution (indicative; I'm not an expert):''' Re-use the ""Settings > Reading > Front page displays"" code in the ""Appearance > Customize"" functions. " ElectricFeet Future Releases 36760 Intermittent empty returns from get_post_meta function after 4.5 upgrade Options, Meta APIs 4.5 normal normal defect (bug) new 2016-05-05T02:45:08Z 2019-06-04T20:58:39Z "I've seen this reported several times, but the reporters failed to properly explain the issue and the tickets were closed. Since the 4.5 upgrade I am seeing intermittent issues in my custom plugin (which has worked for years and hasn't changed) where the get_post_meta function is used if the request is made via ajax or by calling a custom endpoint. Rolling back the 4.5 upgrade has resolved these issues. The same function called with exactly the same arguments will return the meta data value one minute and return an empty string the next (with single on). The data in the database is unchanged. Logging shows the post id and meta key are the same, only the return value is different. It always seems to work as part of a regular page request (not ajax, not custom endpoint). Sometimes the function works correctly for 24 hours, then fails several times. I can't identify any pattern but suspect the meta cache / session. I tried doing a meta cache update for the object before calling get_post_meta, but the problem still occurred. In Googling I've found several people reporting issues related to get_post_meta after the 4.5 update. Please take a look!" amberau Future Releases 20853 get_post_custom show directly serialized data from the post_meta arrays. Options, Meta APIs 1.5 normal normal defect (bug) assigned dev-feedback 2012-06-06T05:39:23Z 2019-06-04T20:43:13Z "get_post_custom show directly serialized data from the post_meta arrays. For example: If I save a data with: {{{ update_post_meta( $post_id, 'camp', array( 'some' => $var, 'thing' => $var_2 ) ); }}} When I use get_post_meta(); : {{{ $var_get = get_post_meta($post_id, 'camp', true); echo $var_get['some']; // Fine.. Print: $var content. }}} but, when I use get_post_custom() : {{{ $var = get_post_custom($post_id); echo $var['some']; Metod, (Not work because ""Returns a multidimensional array"" with all values, and 0 is the first or the unique value). echo $var['some'][0]; /* Metod, >:( , Not work. Print: a:2:{i:some;s:4:""this"";i:thing;s:7:""content"";} */ }}} Instead of display ""array"", and can not handle sub arrays." shadowhck Future Releases 36440 get_results break in wp-admin/options.php if thetable is huge Options, Meta APIs 4.4.2 normal minor defect (bug) new 2016-04-07T14:17:47Z 2019-06-04T20:56:39Z "If we try to check all values from wp_options table thanks to the admin page wp-admin/options.php, the page will be broken if the table is huge (on my case more than 100 000 rows). A simple pagination feature should fix the issue instead of trying to get all results. Currently on wp-admin/options.php line 253: {{{#!php get_results( ""SELECT * FROM $wpdb->options ORDER BY option_name"" ); }}} " aoculi Future Releases 26895 Deprecate recently_edited option Options, Meta APIs 3.8 normal minor enhancement new dev-feedback 2014-01-21T08:33:53Z 2019-06-04T20:45:22Z "recently_edited option is being set when a plugin or a theme file is edited by the builtin Editor. A search, in the WordPress 3.8 source code, tells me that the option is never being read. I suggest that we deprecate that option and replace it by an action where plugins can hook and get the value of the edited file." yani.iliev Future Releases 36655 Enhancement: Add datetime column to options table. Options, Meta APIs normal normal enhancement new needs-unit-tests 2016-04-24T15:04:51Z 2019-06-04T20:57:35Z "== Proposal == The options table in WordPress is a great key/value storage option for a wide variety of different data used by core and plugins. One improvement that would increase its utility for faster time based queries on data stored there is to add a DATETIME column. == Some examples where this benefit could be realized: == === Example 1: Transient storage. === Currently, when there is no object-cache in use, transients are stored to the wp_options table. However, for each transient there are two records. One for the actual key/value pair and then one for any timestamp set as the transient expiry. Having a datetime column would allow the transient to always only consist of one record and thus make any queries interacting with transients much simpler. === Example 2: Arbitrary plugin data using the options table for its own scheduled tasks. === A lot of plugins are using the transient system wrong because it's not intended for indicating minimum age. Having a datetime column would provide the database schema in WordPress core that allows for plugins to implement their own ""minimum/maximum age"" apis. === Example 3: Tracking creation/modification times. === Having a datetime column would allow for indicating when a key/value pair was created and/or modified which could be useful for plugins that have need to do so. === Example 4: Scheduled settings/options. === Having a datetime column could allow for scheduled changes with a sites configuration and thus more advanced previews/site preparation, (think adding scheduled changes to site title, or site description via the customizer). Having a datetime column makes such schedules simpler to implement. == Implementation == === Schema === {{{ option_date datetime NOT NULL default '0000-00-00 00:00:00' }}} === Iterations: === 1. Add the column and modify options api to expose the new column to queries (get_option, update_option, site option functions etc). 2. Convert transient API to implement new option_date column for setting expiries when object-cache is not in use. == Who and When == I'd be willing to spearhead putting some patches together and getting the initial code going but before I invest some time in this I'm just testing the waters to see if this is even something that would be considered/welcomed for core. I'm not aware of any potential conflicts this may pose with the purpose for the option table but if there are any I'm sure I'll find out! I definitely don't see this as going in 4.6 but it might have potential for 4.7 if work begins fairly soon. " nerrad Future Releases 33884 Move meta functions to their own files Options, Meta APIs 4.4 normal normal enhancement new 2015-09-15T17:51:10Z 2019-06-04T20:51:37Z "All the meta functions should be in their own file. Like this. post-meta.php comment-meta.php user-meta.php Related tickets: #10142 #28290" spacedmonkey Future Releases 30995 Pass meta_id when retrieving multiple metas Options, Meta APIs 2.9 normal normal enhancement new needs-unit-tests 2015-01-12T20:18:50Z 2019-06-04T20:48:39Z "Hello. In some (edge?) cases we would need a unique identifier when we retrieve metas. For example, `get_post_custom_values( '_yolo', $post->ID )` will return: {{{ Array ( [0] => foo [1] => bar ) }}} while the following, with the `meta_id` as array key, would be helpful imho: {{{ Array ( [1022] => foo [1029] => bar ) }}} The modification is trivial in `update_meta_cache()`, and some other functions would only need something like `metas[0]` => `reset( metas )`." GregLone Future Releases 21546 Site Settings page is a hot mess Options, Meta APIs 3.0 normal normal enhancement reopened 2012-08-10T21:44:07Z 2019-06-04T20:43:21Z "I found out just how bad this page is when debugging an issue related to {{{WPLANG}}}. {{{WPLANG}}} is an option for a blog in your network (overrides {{{WPLANG}}} in {{{wp-config.php}}}), but if you delete the option on purpose or accidentally, there is no way of restoring it in the admin. Site Settings just loads your options table and POSTs back to itself. The only reference to the original options map (the defaults) is in schema, which WP has zero access to outside of upgrade. I have abstracted the default options and the default ""fat"" options into functions in {{{ms.php}}}. Also, when loading your Site Settings options - if a default option is missing, I display it in the admin so you can save it (it is populated with its default value). I have also streamlined and condensed some code that was happening in and around {{{populate_options()}}}" wonderboymusic Future Releases 29786 read_post_meta should be a meta capability Options, Meta APIs normal normal enhancement new 2014-09-29T11:19:31Z 2019-06-04T20:47:44Z "Right now, we have `edit_post_meta`, `delete_post_meta`, and `add_post_meta`. In order to be able to expose metadata publicly, we need to be able to check if we can access individual keys. `is_protected_meta` only controls whether it's prefixed and should default to being protected (by default, prefixed with `_`). This isn't adequate to check for read permission on a key, because it's not filterable." rmccue Future Releases 23616 General Handler for Whitelisted Options' Submissions Options, Meta APIs normal normal feature request new 2013-02-26T03:06:55Z 2019-06-04T20:43:51Z As stated over on #18285 WordPress should move away from posting to options.php. In order to do that, the Settings API needs a general purpose function that can be safely called on all Settings Pages that can handle posts to itself (generally referred to as 'take_action' in various places) and can handle what options.php currently does. WraithKenny Future Releases 27832 All sites automatically marked as archived after upgrade Networks and Sites 3.7 normal normal Awaiting Review defect (bug) new 2014-04-16T10:47:37Z 2018-12-08T15:08:06Z "Strange thing, all sites were automatically marked as archived after automatic upgrade to 3.8.3. Maybe it is not related, but it was the last thing which is time-related to this problem. I checked database tables and all sites had archived = 1 in wp_blogs, but last_update column was not changed. So, it suggests, that it was not done by administrator. Administrator can archive primary site? Then it is not possible to access administration... I repaired it by setting 0 for all sites, but I am not sure, how could it happen? Do you have any ideas? There are no plugins which could cause it. I searched code and did not find any clue. Also hosting company is used for many other Multisite installations without problems. There are also some posts from different forums (usually somehow related to WordPress upgrade), but they are only talking about fixing problem and not about finding why... http://wordpress.org/support/topic/site-automagically-archived-or-suspended-on-multisite http://wordpress.org/support/topic/after-install-site-has-been-suspended-or-archived http://wpgarage.com/tips/unarchive-archived-suspended-site-wordpress-multisite/ Not sure, if it is some kind of bug, incompatibility or security hole..." pavelevap Future Releases 43653 Allow to filter the final message of signup user notification email Networks and Sites 4.9.5 normal normal Awaiting Review defect (bug) new 2018-03-28T14:18:11Z 2023-06-08T08:56:08Z "When a signup user notification is sent, we cannot filter the final message contained in $message. We can only filter one part of the message. This prevent us to send nice formatted emails using HTML (to send a formatted email, we need add include the message inside an HTML template)." benoitchantre Future Releases 39495 Can't navigate to subsite without logging in again. Networks and Sites 4.7 normal normal Awaiting Review defect (bug) new 2017-01-05T23:50:39Z 2017-05-02T04:05:13Z "In a multi-site configuration, as a Super Admin user, log in to the root site. Then navigate to the dashboard of a subsite. Expected result: navigate to the subsite unhindered. Actual result: prompted to log in before navigating to the subsite. Problem occurs when we use WP Core 4.7. Problem does not occur on WP Core 4.6. Problem occurs when all plugins are deactivated and uninstalled. Problem occurs on more than one theme." davidmlentz Future Releases 50119 Dashboard of new subsite won't open Networks and Sites normal major Awaiting Review defect (bug) new reporter-feedback 2020-05-07T18:41:33Z 2020-05-07T21:27:12Z " Hi, There is a Bug with this new version. Where is bug: Multisite Testing on localhost Using WampServer Version 3.1.7 64bit Which comes with His Apache version 2.4.37 and PHP 7.2.14 Please Follow steps so can test it personnaly 1. Install Fresh WordPress and activate Multisite. - Works well 2. Create Subsite (multisites) - Works Well Now, try to access Dashboard of new subsite , bang, it wont open,, Did i configure well? Yes. and recheck. Now, use WP 5.4, using same way of installation, Works ALL FINE. with Same WAMP server, using same installation method so on. After installing 5.4, updating to 5.4.1 WORKS WELL. After doing this tests many time i conclude that there is some problem on latest version 5.4.1 I hope others get some conclusion " cyrusmz Future Releases 40736 Ensure that `get_blog_count()` and `get_user_count()` return an integer Networks and Sites normal normal Future Release defect (bug) new dev-feedback 2017-05-11T18:59:30Z 2021-06-07T09:57:58Z "The documentation for the functions `get_blog_count()` and `get_user_count()` states that the return type is an integer, however the functions only call `get_network_option()` without any typecast. The functions should be adjusted to actually reflect their documentation. While this might theoretically be problematic in terms of backward-compatibility, in #40724 some initial thoughts of this being a viable change were expressed, so let's think about it on this ticket." flixos90 Future Releases 49993 Internal Server Error in response to creating a new site Networks and Sites 5.4 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-04-24T04:53:35Z 2020-04-26T04:50:06Z "When creating a new site, three fields are marked as required Site Address Site Title Admin Email Leave any of these three out and WordPress will return an Internal Server Error. No further error information is logged anywhere even with define DEBUG set to true." mauricev2 Future Releases 42187 Multisite - Wordpress Importer Unavailable Networks and Sites 4.8.2 normal normal Awaiting Review defect (bug) new 2017-10-11T18:57:31Z 2017-10-11T18:57:31Z "I have a multisite installation for wordpress, and I have two users: * admin - Multisite Administrator * commonAdm - An administrator of only one of the sites in the network. Steps to reproduce: 1. When the commonAdm tries to access the Wordpress Importer via Tools -> Importer, no options are shown to him. 2. Then I, as ""admin"", open the same page, click on Wordpress Importer (just opening the url ""/wp-admin/import.php?import=wordpress"" 3. After the ""admin"" access this page, the commonAdm can see and use the Wordpress importer. It seems that it requires this first access on EVERY single site for it to work, somehow it must be setting a flag, but I couldn't find any documentations regarding this behaviour. Other information: * I'm running a Bitnami Wordpress Multisite on AWS EC2, up to date to 4.8.2; * I'm not sure if the bug is related to Network and Sites or the Importer itself (so I chose the first one)" dtiziani Future Releases 40465 Multisite fails to rewrite upload path on main site Networks and Sites 4.7.3 normal normal Awaiting Review defect (bug) new 2017-04-16T13:33:33Z 2017-04-17T18:12:13Z "This is a follow-up to #12002. After removing the /blog/ slug On options-permalink.php, the media filed display the wordpress subdirectory on the urls. '''Steps''': Install wordpress in its own directory Activate multisite with subsites Switch one of thd subsite into becoming main site Everything works smoothly including images However, image urls contain wordpress directory. {{{ Domain.com/wordpress/wp-content/uploads/image-title.jpg }}} Instead of {{{ Domain.com/wp-content/uploads/image-title.jpg }}} Is this the way it is designed to work? Or a bug? Thanks." daniel berhane Future Releases 42280 Multisite: get_blogs_of_user has no useful caching on large installs Networks and Sites 4.7 normal major Awaiting Review defect (bug) new dev-feedback 2017-10-19T16:18:51Z 2023-05-12T19:40:56Z "While thinking about the changes that were happening in #40228 we started to investigate other places where functions had been switched to use `get_sites`. Looking back through ""recent"" changes I found: [38682] / #37061. Previously we would fetch all the user meta for a user and then use get_blog_details (and it’s inherent caching) to populate the list of blogs. Now we fetch all the user meta for a user and then create a query for get_sites which as previously discussed has pointless caching on active multisites inside WP_Site_Query. I'm opening this ticket to ensure that the caching is also reviewed here too." westi Future Releases 39808 My Sites broken in 4.7.2 Networks and Sites 4.7.2 normal normal Awaiting Review defect (bug) new 2017-02-07T21:56:33Z 2017-11-14T18:24:33Z "After upgrading to 4.7.2, My Sites shows an error: You must be a member of at least one site to use this page. This happens for both regular users and administrators. I've fixed it for now by changing one line of code: diff wp-admin/my-sites.php.orig wp-admin/my-sites.php 20c20 < $blogs = get_blogs_of_user( $current_user->ID ); --- > $blogs = get_blogs_of_user( $current_user->ID, 1 ); " earl.fogel Future Releases 50100 Native domain mapping does not handle both WWW and non-WWW versions of a domain - both should work Networks and Sites 5.4.1 normal normal Awaiting Review defect (bug) new has-patch 2020-05-06T10:25:14Z 2023-01-23T18:02:55Z "The native domain mapping only works for the exact domain entered, and does not automatically redirect www to non-www (if a non-www was entered) or non-www to www (if a www domain was entered). == Examples === Example – “WWW” Mapped Domain: * Multisite core domain: `xyz.com` * Subsite original address: `abc.xyz.com` * Subsite once mapped: `www.abc.com` **What happens:** * Visiting `www.abc.com` shows the site (as expected) * Visiting `abc.com` does not show the site – it instead shows the multisite registration page – `xyz.com/wp-signup.php?new=abc.com` **What I expected to happen:** Visiting `abc.com` should automatically redirect to `www.abc.com` because that is the mapped domain === Alternative Example – non-WWW Mapped Domain: * Multisite core domain: `xyz.com` * Subsite original address: `abc.xyz.com` * Subsite once mapped: `abc.com` **What happens:** * Visiting `abc.com` shows the site (as expected) * Visiting `www.abc.com` does not show the site – it instead shows the multisite registration page – `xyz.com/wp-signup.php?new=www.abc.com` **What I expected to happen:** Visiting `www.abc.com` should automatically redirect to `abc.com` because that is the mapped domain. == Possible Arguments === Technical Arguments vs Human Experience One technical argument presented for this is that `abc.com` and `www.abc.com` are two distinct domain entities. Just like `images.google.com` and `fonts.google.com` are two distinct domain entities. While this argument is ''technically'' correct it is not correct ''practically'' as it ignores best practice and the human-user element of how websites have worked for 20 years. While ""www.google.com"" and ""google.com"" are two technically different domains, in reality no website owner should ever point these to two different sites! It would be ridiculous to do so. So while other subdomain entries do not need to be allowed for, there should be an automatic allowance for ""www"" and the root domain to automatically redirect between each other based on whether the mapped domain was entered with www or not. === Should This Be Core? A key question with every enhancement request is whether or not something should actually be part of WordPress core, or be left to a plugin. The official [https://wordpress.org/support/article/wordpress-multisite-domain-mapping/ domain mapping documentation] states: > Before WordPress 4.5, domain mapping requires a domain mapping plugin like WordPress MU Domain Mapping. > In WordPress 4.5+, domain mapping is a native feature. So the official recommendation is that core can take care of the domain mapping on multisite installations. However, there is no mention anywhere on the page that this native domain mapping will not work for the standard behaviour of automatically handling both the www and root versions of the domain. Since this is the way all websites normally work, if it was the intentional behaviour it seems to be a glaring omission from the documentation. I reason that WordPress multisite users would not expect to map abc.com and have www.abc.com fail to load the site, and instead get redirected to the multisite registration page. == Possible Solutions === Could it be solved through htaccess rules? When setting up a multisite the steps include changing the contents in the htaccess file. Redirecting between www and root for domains can be done at an htaccess level, so could a clever htaccess rule be written to handle this for all mapped domains that get added to the site? If this approach was to be used, it would need to handle a wide variety of scenarios: * It would need to exclude the core multisite domain and all its sub-domains from being affected. (Only mapped domains should be affected) * Having a blanket ""redirect root to www"" for all subdomains, or vice versa is not ideal. Some mapped domains might specifically want to be shown with www or without www. A blanket htaccess rule wouldn't know whether the user mapped a www or root domain. So I don't think setting a blanket rule from .htaccess is a good solution. === PHP Redirect I believe the solution needs to be PHP specific. The redirection should apply to mapped domains only, and should assess whether the mapped domain begins with ""www."" or not. If not, then WordPress should redirect www traffic for that domain to the root version of that domain. If it does begin with ""www."" then traffic seeking the root domain should be automatically redirected to the www domain. == Related Tickets **#48197 Add support for assigning multiple domains to a single site in multisite** Ticket 48197 is asking for much more than this ticket of mine is suggesting. While it could be used to solve this problem, it is functionality that extends beyond where core WordPress needs to serve. It is more of a nice-to-have that can be served by plugins. Therefore, although it is related, I see ticket 48197 as having less valid arguments for being included in core, which is why this posted as a separate ticket. == Summary The current domain mapping that is built into core has this enormous problem in usability. Site owners would not expect their site to work for ""www.abc.com"" but send visitors who entered ""abc.com"" to a registration page for the multisite. This is a bad user experience. When using multisite native domain mapping, WordPress should automatically account for www and non-www and redirect between the two, depending on whether the domain entered started with www or not. " jodamo5 Future Releases 15801 Network Admin: Deactivated / Deleted inconsistency Networks and Sites 3.1 normal normal Future Release defect (bug) assigned dev-feedback 2010-12-13T18:12:54Z 2023-06-10T12:03:52Z "Under the Sites screen, there are distinct inline links for Deactivate and Delete. However, when a site is deactivated, it is referred to as deleted in: * Sites screen inline status * Edit Site screen attributes section * Error page for non-admins visiting the site" kawauso Future Releases 42284 Stop invalid query generation in WP_Site_Query Networks and Sites 4.6 normal normal Awaiting Review defect (bug) new 2017-10-19T20:09:44Z 2019-02-05T17:20:30Z "In WP_Site_Query, developers have the ability to query by a single value or by multiple using a `__in` param. An example of which is which is `domain` and `domain__in`. Take for example the following query. ` get_sites(['domain' => 'test.local', 'domain__in' => ['lebowski.local', 'start.test.local']]); ` This query will only results for test.local, completely ignoring the `domain__in`. This is because of the query it generates. That looks like this ` domain = 'test.local' AND domain IN ('lebowski.local', 'start.test.local')` Improved error checking must be implemented on this code to stop invalid queries. " spacedmonkey Future Releases 37822 Text area misaligned on network setting.php Networks and Sites 4.6 normal normal Future Release defect (bug) new 2016-08-25T10:46:27Z 2018-03-05T16:42:51Z "On Network setting page, all text area looks misaligned. Looks zig zag Refer attached screenshots for better view. " Ankit K Gupta Future Releases 39158 Unify site deactivation process Networks and Sites normal normal Future Release defect (bug) new dev-feedback 2016-12-07T19:20:38Z 2017-08-14T17:16:24Z "Currently there are three cases of ""deleting"" a site on a multisite setup: * deleting a site entirely (for example via Sites list table's ""Delete"" link) * deactivating a site from the network admin (for example via Sites list table's ""Deactivate"" link) * deactivating a site from the site admin (admin can click ""Delete Site"" in Tools menu) Note that deactivating a site does not wipe out the site, but rather sets the ""Deleted"" flag for that site (strange legacy naming, can be ignored here). What this ticket should solve is that the latter two processes work differently although they should be doing the same thing: While deactivating a site from the network admin simply sets the site to ""Deleted"", deactivating the current site from the site admin also removes all users from the site (via `wpmu_delete_blog()`). That means if an admin deactivates their site and later asks support (i.e. the network administrator) to restore it, all users will be gone. I'm not sure why this happens, but I certainly don't think the two actions should have a different behavior. My proposal is to move the part of that function where users are removed into the `if ( $drop )` clause to make sure users are only removed when the site is actually being deleted." flixos90 Future Releases 59556 WordPress Multisite issue - Media files presenting on Google with wrong domain Networks and Sites 6.3.1 normal normal Awaiting Review defect (bug) new 2023-10-06T07:32:22Z 2023-10-09T07:52:26Z "Hi WordPress Team, I have a WordPress Multisite set up with 6 sites. Each site has its own domain name. I discovered on a google search, that an uploaded media file is incorrectly referenced and basically ""shared"" between domains. I have google showing a link to a file on site ''#''17, but it is referencing the domain name for site ''#''20. Google shows: {{{ https://site20domain/wp-content/uploads/sites/17/filename.pdf }}} But it should be showing: {{{ https://site17domain/wp-content/uploads/sites/17/filename.pdf }}} See also attached screenshots. Thanks Kind regards, Regine " nutsonshells Future Releases 42557 Wrong Behaviour on get_site_url for multiple sites with different protocol Networks and Sites 4.9 normal normal Awaiting Review defect (bug) new 2017-11-15T14:41:28Z 2017-12-21T23:18:17Z "Hi guys, i think i found something that imho isn't working at all as expected. Let's go with some explaination: * I have a multisite network which has 4 sites * 1 site, the main one, is under HTTPS protocol, the rest are under normal HTTP * I've made a unique theme, customized for all 4 sites * '''I don't want to pass the scheme to get_site_url()''' , this should be created dinamically In theme footer, i'm calling the function {{{ get_site_url() }}} for pointing each site to other ones. Something really bad happens here: * The first site (the https:// one) show all the links with https on top, and it's totally wrong as the remaining sites are all under http * Instead, the remaining sites show all the link with http on top, included the first https one So, after inspecting a while, it seems you're doing something i cannot really explain... * function get_site_url (link-template.php, row 3063) get the siteurl option from database using get_option('siteurl') and then you call set_url_scheme * function set_url_scheme will be blocked from first condition check {{{ if(! $scheme) }}}, so we're going to is_ssl() * and here we are with something misunderstood... function is_ssl() checks if $_SERVER[ 'HTTPS' ] global var is set and return true or false for the current server configuration, not bothering of other sites configuration (!?!?!?!?!?) * so when i interrogate a HTTPS site, all links will be ssl, when i interrogate a HTTP site, all links won't have ahead that protocol. I don't think this is an optimal way to check this thing honestly... Could we discuss about it?" matteowebsolution Future Releases 54086 bloginfo language issue Networks and Sites 3.0 normal normal Awaiting Review defect (bug) new reporter-feedback 2021-09-08T16:50:55Z 2021-09-23T22:06:39Z "hi, the code snippet below only returns the name of the blog well, not the language, it is always the same. even though the language is changed in the site admin settings. {{{#!php blog_id ); echo get_bloginfo( 'name' ); echo get_bloginfo( 'language' ); restore_current_blog(); } }}} " kukac7 Future Releases 45761 consistency between $wpdb->blogid and get_current_blog_id() Networks and Sites 3.0 normal normal Awaiting Review defect (bug) new dev-feedback 2018-12-24T20:52:41Z 2019-03-15T13:31:35Z "On a single install (not multisite), you have $wpdb->blogid => 0 get_current_blog_id() => 1 Must be a very old one !!!" arena Future Releases 43251 editable_roles filter doesn't exclude role on multisite Networks and Sites 4.9.4 normal normal Awaiting Review defect (bug) new 2018-02-07T19:15:54Z 2019-12-06T16:48:21Z "On a multisite installation I am trying to exclude a role using editable_roles filter. The role is removed from the dropdown but if I change the role value in the DOM using the inspector I can successfully add the excluded role. This happens only on multisite installations. On single installations if I try to add an excluded role I get the message “Sorry, you are not allowed to give users that role.” '''How to reproduce the issue:''' 1. Unset a role using editable_roles filter. 2. Login with any role that has the capability create_user. 3. Add a new user changing any role value with the excluded role (using inspector)." eArtboard Future Releases 40682 get_current_blog_id() and get_current_network_id() are loaded before absint() Networks and Sites 3.5 normal normal Awaiting Review defect (bug) new 2017-05-06T06:41:04Z 2019-02-23T15:35:39Z In r21484, these functions were moved to `wp-includes/load.php`. Regardless of when they are *supposed* to be called, they are available to be called by cache plugins before `absint()` exists in the ether. If caching plugins are indeed accessing `global $blog_id` this early, seems like a race condition somewhere. wonderboymusic Future Releases 44461 inconsistent type for global $blog_id Networks and Sites 4.9.6 normal normal Awaiting Review defect (bug) new has-patch 2018-06-25T18:51:00Z 2019-02-01T02:06:06Z "Hi, in a single installation global $blog_id is 1, its type is integer. in a multisite context global $blog_id is a string, this might be a problem considering the fact that operator == && != have been deprecated. There is a function called get_current_blog_id() that basically applies an absint() on this global but I guess this should be an integer whatever happens." jmlapam Future Releases 56909 pre_recurse_dirsize filter cannot be used to fill up dirsize_cache and thus breaks performance Networks and Sites 5.6 normal normal Awaiting Review defect (bug) new dev-feedback 2022-10-26T06:09:29Z 2022-10-26T06:09:29Z "In 5.6.0 a new filter was introduced to the dirsize calculation `pre_recurse_dirsize`. After that filter was introduced the dirsize cache was modified to store each folders size separately for a massive performance increase ( part of https://core.trac.wordpress.org/ticket/19879 ). https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/functions.php#L8287 This second change lead to a state where the `pre_recurse_dirsize` filter is kind of useless. One cannot access or modify the dirsize cache within the filter as the `$dirsize_cache` variable is passed by reference to the recursive calls of `recurse_dirsize()`. https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/functions.php#L8300 Thus using the `pre_recurse_dirsize` filter renders it impossible to use the new, much more efficient dirsize cache based on single folders. I can only fill up the total for the top level folder. If `pre_recurse_dirsize` is used the code would skip these recursive calls to `recurse_dirsize()`. And thus the reference passing of the `$dirsize_cache` and filling it with the subfolder sizes. One would consider that the filter code could set the `$dirsize_cache` or the transient value on its own. This doesn't work as well, as the original code works on an in memory version of the `$dirsize_cache` and will overwrite any changes done within the filter at the end of its code. https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/functions.php#L8323-L8328 This state leads to the bad situation that using the `pre_recurse_dirsize` filter will always lead to worse performance. Although the idea behind introducing it was to open up for performance improvements. I am currently unsure how to fix this in a smart way and am open for any thoughts and suggestions. (Maybe bad) Ideas I had: - Pass the `$dirsize_cache` by the reference to the filter (technically impossible as far as I know) - Add another filter to disable the dirsize cache saving in `recurse_dirsize` to handle everything on our own (would allow full backward compat) - Move the `pre_recurse_dirsize` to another position (don't really know where...) - Make `recurse_dirsize` a pluggable function to replace it completely Thanks a lot! " janthiel Future Releases 43130 Add New Site: admin autocomplete search all users Networks and Sites 4.9.2 normal normal Awaiting Review enhancement new 2018-01-19T09:01:27Z 2021-04-06T17:02:11Z "When adding a new site on multisite WordPress, the ""Admin Email"" field's autocomplete will find only users attached to the first ""site"". If the user is in WordPress network user list but not in first site, it'll not be found." julienlusson Future Releases 55488 Add a filter to array of allow ported number in multisite. Networks and Sites normal normal Awaiting Review enhancement new 2022-03-30T13:39:42Z 2022-03-30T13:39:42Z "The allowed port numbers to setup a multisite are fixed. See this line. {{{#!php if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) { }}} However, a site maintainer may want to change these values to help enable serving their multisite from a custom port. This ticket is a breakout from #21077" spacedmonkey Future Releases 40821 Add filter to `wpmu_delete_blog()` to overwrite ability to drop tables Networks and Sites 4.8 normal normal Future Release enhancement new 2017-05-19T16:53:57Z 2017-05-19T20:45:23Z "The function `wpmu_delete_blog( $blog_id, $drop = false )` includes a flag to add the ability to drop tables. There are some cases where we may want to prevent accidental deletion of tables, even when that flag is set to true. Adding a filter like: `$drop = apply_filters( 'wpmu_allow_drop_tables', $drop );` will allow manual overwriting of the passed value. " mermel Future Releases 29411 Add multi-network helper functionality Networks and Sites normal normal Future Release enhancement new 2014-08-28T06:32:46Z 2017-08-16T09:51:56Z "While WP core supports multi-network, there are some pieces of critical functionality missing. Currently, I'm using JJJ's [http://wordpress.org/plugins/wp-multi-network/ WP Multi Network] plugin to provide this, but the utility functions should probably be included with core. These are: * `network_exists` * `switch_to_network` * `restore_current_network` * `add_network` * `update_network` * `delete_network` * `move_site` * `user_has_networks` Personally, I'd be in favour of integrating the entirety of [https://plugins.trac.wordpress.org/browser/wp-multi-network/trunk/wpmn-functions.php wpmn-functions.php] verbatim." rmccue Future Releases 36940 Break `manage_sites` capability up into more targeted caps johnjamesjacoby Networks and Sites 3.0 normal normal Future Release enhancement assigned 2016-05-25T12:56:16Z 2017-07-17T20:36:26Z "The `manage_sites` capability is currently used as a blanket, to cover all needs when it comes to editing a site in a multisite installation. Started in #15800 (and having chatted with @jeremyfelt at length) we'd like to break `manage_sites` up into new capabilities that more acutely convey what part of a site someone is allowed to edit. The goal is to allow users with `/network` admin access to have more fine-grained control over what parts of a site they can edit. For example: `manage_site_settings = false` so a user can modify site themes & users, but not have access to the raw option data. We are imagining they would look something like: * `manage_site_info` (`site-info.php`) * `manage_site_settings` (`site-settings.php`) * `manage_site_themes` (`site-themes.php`) * `manage_site_users` (`site-users.php`) In addition: * We would pass the site ID through `current_user_can()` to provide additional context * Switch to using `create_sites` in `site-new.php` (vs. `manage_sites` which was likely a copy-paste assumption that the capabilities across these similar files should match) ---- More paraphrasing of our past 4 months of chat in #core-multisite: * Because only WordPress Super Admins can access any of these by default, renaming these capabilities should be considered a backwards compatible change * We /could/ go as far as mapping all of these new caps to `manage_sites` to maintain compatibility, but for plugin authors wishing to take advantage of this, it would require an additional `map_meta_cap` override that we would like to try and avoid * This should not result in much code churn, and will only change multisite files, and a handful of functions that special-case multisite using the `manage_sites` capability check * We would still keep `manage_sites` in a few higher-level places (as a site equivalent to `edit_posts`) to ensure that a user has access to certain UI elements that allow them entry to more detailed site editing" johnjamesjacoby Future Releases 37297 Deprecate get_blogaddress_by_id function spacedmonkey Networks and Sites 3.0 normal normal Future Release enhancement reviewing 2016-07-06T21:06:18Z 2023-03-06T14:30:02Z The get_blogaddress_by_id function is pretty old and should be replaced with get_home_url, as this is filtered. spacedmonkey Future Releases 16853 Error 500 when a user has too many sites Networks and Sites 3.0.1 normal minor Future Release enhancement assigned dev-feedback 2011-03-14T11:15:57Z 2019-04-08T16:52:29Z "'''My installation''' [[BR]] 3.0.1 multi-site installation with more than 7500 blogs, with one user each. I also have one moderation user that can administer each of the blogs. [[BR]] [[BR]] '''The issue''' [[BR]] In the admin interface, when I go to Super-Admin -> Users, and when I display the page that contains my moderation user, I get ""''An error (500 Internal Server Error) has occured in response to this request''"". The page tries to display all the sites administered by him (around 7500 of them), hence the error. [[BR]] [[BR]] Updating to 3.1 didn't resolve the problem. [[BR]] [[BR]] '''Recommended enhancement''' [[BR]] For each user in the list, display only a certain number of sites, with a possibility to see all of that user's sites, if needed." luuzan@… Future Releases 41771 Global configuration table Networks and Sites 4.9 normal normal Awaiting Review enhancement new needs-unit-tests 2017-08-31T22:19:51Z 2017-09-19T16:37:54Z "In multisite, there is no way to have settings or configuration what goes applies to all networks. There are network level settings (Network options) and site levels settings (Options) but nothing global. In #37923 the need for global configuration arose, as storing data the network level ends up with the same data in every network. Also having a global config table, would help rid ourselves of our dependence on PHP defines for configuration. If this config table was installed on single site as well, the following defines, could be moved the config table. - MULTISITE - SUBDOMAIN_INSTALL - WP_CACHE - FORCE_SSL_ADMIN - WP_DEFAULT_THEME This could make the process of installing multisite, much easier. A number of feature flag that are currently store in options / network options could be moved to the global store. Features such as. - link_manager - enabled / disabled - global_terms - enabled / disabled - use blog_versions - enabled / disabled - site meta - enabled / disabled - ms_files_rewriting - enabled / disabled This global table could also store multi network wide settings such as - Global super admin - Global user roles - Global plugins (Not mu plugins) - Global database version - Default Language " spacedmonkey Future Releases 40554 Hide /wp-admin/network/site-settings.php Networks and Sites normal normal Awaiting Review enhancement new 2017-04-24T18:14:25Z 2017-04-25T16:26:43Z "WordPress developers have decided that `/wp-admin/options.php` is inappropriate to be shown to users and so there are no links to it. You can't click on a menu item and stumble across it. The only way to find it is to manually type in the URL. This is great because it prevents inexperienced users from making potentially disastrous changes, or at the very least being a bit confused. `/wp-admin/network/site-settings.php` is pretty much the same as `/wp-admin/options.php` except it hides options beginning with `_` and munges the option names to be slightly more human-readable. As such, I think it should be given the same treatment as `/wp-admin/options.php` - hide it completely so that nobody stumbles across it." tomdxw Future Releases 37958 Improve looping through sites and restoring Networks and Sites normal normal Awaiting Review enhancement new 2016-09-06T17:58:26Z 2017-01-27T08:31:29Z "[https://wordpress.slack.com/archives/core-multisite/p1473179575000111 As discussed] in the recent multisite ~~hours~~ minutes, I would like to propose (and discuss) a better means to looping through a number of (or even all) sites and finally restoring to the state before the loop. The naive approach looks like the following: {{{#!php site_id = get_current_blog_id(); $this->stack = $_wp_switched_stack; $this->switched = $switched; } /** * Returns a new instance representing the current network state. * * @return static Network state object. */ public static function create() { return new static(); } /** * Restores the saved network state. * * @return void */ public function restore() { switch_to_blog( $this->site_id ); $GLOBALS['_wp_switched_stack'] = $this->stack; $GLOBALS['switched'] = $this->switched; } } }}} With this class, the `foreach`-loop code from before can become this: {{{#!php restore(); }}} No matter what happens in the loop (and thus in any called function or method), we restore to the exact same state the network was in before the loop. The above implementation works with the (currently available and used) globals. As soon as there is some other way (see #37699), this can easily be adapted as it's internals only. The naming is just a suggestion, and we can, of course, baptize all the things differently. Core could make use of it, too. For example in the [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/ms.php?rev=38334#L221 `wpmu_delete_user()] function, during [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/network/upgrade.php?rev=38229#L64 Network upgrade], or in the [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/admin-bar.php?rev=38470#L461 wp_admin_bar_my_sites_menu()] function (!), which means: On. Every. Single. Page. Load. I'd be happy to provide a full patch against trunk. I just wanted to propose this first and give opportunity to discuss this." tfrommen Future Releases 17164 More elegant handling of site 'archive' options for MultiSite Networks and Sites 3.1 normal normal Future Release enhancement new 2011-04-18T15:08:50Z 2023-03-22T14:32:22Z "Right now you have a few options with MultiSite blogs 1) Spam 2) Deactivate 3) Archive 4) Delete Spam is easy to understand, and should be marking the admin and site as spam. Delete ditto, hi. Deactivate and Archive are weird though and almost seem backwards. Deactivate means to turn OFF (like deactivating a plugin). Archive implies that you're making a site read-only. Right now, if you change a site to 'deactivated' it actually shows up as DELETED and the front end has the message ""This user has elected to delete their account and the content is no longer available."" Clearly the verbage on the network/sites.php page needs to be updated (and perhaps the front end to 'This site has been deactivated.' to be consistant). If you 'Archive' a site it kicks it to a paler pink in the sites.php page (though the 'Archived' text is white and nigh impossible for me to read) and the front end says ""This site has been archived or suspended."" It's rather illogical there. Archive SOUNDS like it should be making things read-only (and turning off commenting and posting if possible). Otherwise it should just be 'Suspend', and at that point, why have two options that pretty much do the same thing from the front-end perspective?" Ipstenu Future Releases 52188 Move Multisite settings page into tabs Networks and Sites normal normal Awaiting Review enhancement new dev-feedback 2020-12-29T17:27:55Z 2022-02-26T10:25:17Z "Hello all, In a multisite, the network settings page (/wp-admin/network/settings.php) is quiet long as we can see in wp-ms-network-settings.png and may be difficult to find a setting. My idea should be to split each section into tabs. " sebastienserre Future Releases 37687 Multisite - Enormous number of update queries during site creation (user roles) Networks and Sites normal normal Awaiting Review enhancement new 2016-08-17T10:33:27Z 2019-01-23T22:45:54Z "This is mostly because the wp_roles+caps are added one by one causing a very nice overhead. {{{ query: INSERT INTO `wp_86_options` (`option_name`, `option_value`, `autoload`) VALUES ('wp_86_user_roles', 'a:1:{s:13:\""administrator\"";a:2:{s:4:\""name\"";s:13:\""Administrator\"";s:12:\""capabilities\"";a:0:{}}}', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) query: UPDATE `wp_86_options` SET `option_value` = 'a:2:{s:13:\""administrator\"";a:2:{s:4:\""name\"";s:13:\""Administrator\"";s:12:\""capabilities\"";a:0:{}}s:6:\""editor\"";a:2:{s:4:\""name\"";s:6:\""Editor\"";s:12:\""capabilities\"";a:0:{}}}' WHERE `option_name` = 'wp_86_user_roles' query: UPDATE `wp_86_options` SET `option_value` = 'a:3:{s:13:\""administrator\"";a:2:{s:4:\""name\"";s:13:\""Administrator\"";s:12:\""capabilities\"";a:0:{}}s:6:\""editor\"";a:2:{s:4:\""name\"";s:6:\""Editor\"";s:12:\""capabilities\"";a:0:{}}s:6:\""author\"";a:2:{s:4:\""name\"";s:6:\""Author\"";s:12:\""capabilities\"";a:0:{}}}' WHERE `option_name` = 'wp_86_user_roles' query: UPDATE `wp_86_options` SET `option_value` = 'a:5:{s:13:\""administrator\"";a:2:{s:4:\""name\"";s:13:\""Administrator\"";s:12:\""capabilities\"";a:3:{s:13:\""switch_themes\"";b:1;s:11:\""edit_themes\"";b:1;s:16:\""activate_plugins\"";b:1;}}s:6:\""editor\"";a:2:{s:4:\""name\"";s:6:\""Editor\"";s:12:\""capabilities\"";a:0:{}}s:6:\""author\"";a:2:{s:4:\""name\"";s:6:\""Author\"";s:12:\""capabilities\"";a:0:{}}s:11:\""contributor\"";a:2:{s:4:\""name\"";s:11:\""Contributor\"";s:12:\""capabilities\"";a:0:{}}s:10:\""subscriber\"";a:2:{s:4:\""name\"";s:10:\""Subscriber\"";s:12:\""capabilities\"";a:0:{}}}' WHERE `option_name` = 'wp_86_user_roles' [...] One hunder queries later: UPDATE `wp_86_options` SET `option_value` = 'a:5:{s:13:\""administrator\"";a:2:{s:4:\""name\"";s:13:\""Administrator\"";s:12:\""capabilities\"";a:61:{s:13:\""switch_themes\"";b:1;s:11:\""edit_themes\"";b:1;s:16:\""activate_plugins\"";b:1;s:12:\""edit_plugins\"";b:1;s:10:\""edit_users\"";b:1;s:10:\""edit_files\"";b:1;s:14:\""manage_options\"";b:1;s:17:\""moderate_comments\"";b:1;s:17:\""manage_categories\"";b:1;s:12:\""manage_links\"";b:1;s:12:\""upload_files\"";b:1;s:6:\""import\"";b:1;s:15:\""unfiltered_html\"";b:1;s:10:\""edit_posts\"";b:1;s:17:\""edit_others_posts\"";b:1;s:20:\""edit_published_posts\"";b:1;s:13:\""publish_posts\"";b:1;s:10:\""edit_pages\"";b:1;s:4:\""read\"";b:1;s:8:\""level_10\"";b:1;s:7:\""level_9\"";b:1;s:7:\""level_8\"";b:1;s:7:\""level_7\"";b:1;s:7:\""level_6\"";b:1;s:7:\""level_5\"";b:1;s:7:\""level_4\"";b:1;s:7:\""level_3\"";b:1;s:7:\""level_2\"";b:1;s:7:\""level_1\"";b:1;s:7:\""level_0\"";b:1;s:17:\""edit_others_pages\"";b:1;s:20:\""edit_published_pages\"";b:1;s:13:\""publish_pages\"";b:1;s:12:\""delete_pages\"";b:1;s:19:\""delete_others_pages\"";b:1;s:22:\""delete_published_pages\"";b:1;s:12:\""delete_posts\"";b:1;s:19:\""delete_others_posts\"";b:1;s:22:\""delete_published_posts\"";b:1;s:20:\""delete_private_posts\"";b:1;s:18:\""edit_private_posts\"";b:1;s:18:\""read_private_posts\"";b:1;s:20:\""delete_private_pages\"";b:1;s:18:\""edit_private_pages\"";b:1;s:18:\""read_private_pages\"";b:1;s:12:\""delete_users\"";b:1;s:12:\""create_users\"";b:1;s:17:\""unfiltered_upload\"";b:1;s:14:\""edit_dashboard\"";b:1;s:14:\""update_plugins\"";b:1;s:14:\""delete_plugins\"";b:1;s:15:\""install_plugins\"";b:1;s:13:\""update_themes\"";b:1;s:14:\""install_themes\"";b:1;s:11:\""update_core\"";b:1;s:10:\""list_users\"";b:1;s:12:\""remove_users\"";b:1;s:13:\""promote_users\"";b:1;s:18:\""edit_theme_options\"";b:1;s:13:\""delete_themes\"";b:1;s:6:\""export\"";b:1;}}s:6:\""editor\"";a:2:{s:4:\""name\"";s:6:\""Editor\"";s:12:\""capabilities\"";a:34:{s:17:\""moderate_comments\"";b:1;s:17:\""manage_categories\"";b:1;s:12:\""manage_links\"";b:1;s:12:\""upload_files\"";b:1;s:15:\""unfiltered_html\"";b:1;s:10:\""edit_posts\"";b:1;s:17:\""edit_others_posts\"";b:1;s:20:\""edit_published_posts\"";b:1;s:13:\""publish_posts\"";b:1;s:10:\""edit_pages\"";b:1;s:4:\""read\"";b:1;s:7:\""level_7\"";b:1;s:7:\""level_6\"";b:1;s:7:\""level_5\"";b:1;s:7:\""level_4\"";b:1;s:7:\""level_3\"";b:1;s:7:\""level_2\"";b:1;s:7:\""level_1\"";b:1;s:7:\""level_0\"";b:1;s:17:\""edit_others_pages\"";b:1;s:20:\""edit_published_pages\"";b:1;s:13:\""publish_pages\"";b:1;s:12:\""delete_pages\"";b:1;s:19:\""delete_others_pages\"";b:1;s:22:\""delete_published_pages\"";b:1;s:12:\""delete_posts\"";b:1;s:19:\""delete_others_posts\"";b:1;s:22:\""delete_published_posts\"";b:1;s:20:\""delete_private_posts\"";b:1;s:18:\""edit_private_posts\"";b:1;s:18:\""read_private_posts\"";b:1;s:20:\""delete_private_pages\"";b:1;s:18:\""edit_private_pages\"";b:1;s:18:\""read_private_pages\"";b:1;}}s:6:\""author\"";a:2:{s:4:\""name\"";s:6:\""Author\"";s:12:\""capabilities\"";a:10:{s:12:\""upload_files\"";b:1;s:10:\""edit_posts\"";b:1;s:20:\""edit_published_posts\"";b:1;s:13:\""publish_posts\"";b:1;s:4:\""read\"";b:1;s:7:\""level_2\"";b:1;s:7:\""level_1\"";b:1;s:7:\""level_0\"";b:1;s:12:\""delete_posts\"";b:1;s:22:\""delete_published_posts\"";b:1;}}s:11:\""contributor\"";a:2:{s:4:\""name\"";s:11:\""Contributor\"";s:12:\""capabilities\"";a:5:{s:10:\""edit_posts\"";b:1;s:4:\""read\"";b:1;s:7:\""level_1\"";b:1;s:7:\""level_0\"";b:1;s:12:\""delete_posts\"";b:1;}}s:10:\""subscriber\"";a:2:{s:4:\""name\"";s:10:\""Subscriber\"";s:12:\""capabilities\"";a:2:{s:4:\""read\"";b:1;s:7:\""level_0\"";b:1;}}}' WHERE `option_name` = 'wp_86_user_roles' }}} Possible idea: instantiate `wp_roles` with `use_db` false during blog creation and force saving roles data into database after `populate_roles();` function." fliespl Future Releases 54361 Multisite: Confusion for average users when a blog is a mapped domain and requires re-authentication Networks and Sites normal normal Awaiting Review enhancement new dev-feedback 2021-11-02T09:31:05Z 2021-11-15T18:16:49Z "If domain mapping is active for a blog in a network install, users of that blog must re-authenticate when visiting that blog because the domain is likely to be different from the host install domain. Mapped domains appear in the My Sites list. When a user visits their blogs in the list it is confusing for them to be asked to re-authenticate for blog A (mapped domain) and not be asked to re-authenticate for blog B (not a mapped domain). An average user isn't familiar with the cookie authentication mechanism and would find it frustrating to authenticate multiple times which is, to the average user, seemingly unnecessary. How do we make this process clear or easier?" henry.wright Future Releases 41443 Update /wp-admin/network/site-new.php to use wpmu_validate_blog_signup() Networks and Sites 4.8 normal normal Awaiting Review enhancement new 2017-07-25T21:29:37Z 2017-09-27T06:04:28Z Is there a good reason that /wp-admin/network/site-new.php uses it's own hard-coded blogname validation rules? Shouldn't it just call wpmu_validate_blog_signup() for DRY as well as a consistent / universal application of filters across all new site names? It seems crazy to have two different sets of validation for the same thing. And as multisite plugin developers we see network admins confused by the different behavior of site-new.php and sites created through plugins which use wpmu_validate_blog_signup(). neversettle Future Releases 37181 Use metadata api in *_network_options spacedmonkey Networks and Sites 4.4 normal normal Future Release enhancement reopened 2016-06-26T12:44:04Z 2022-12-07T16:46:35Z "The network (site) options are stored in the database as sitemeta. The table is formatted as a meta table. However the CRUD of this data in get_network_option, update_network_option, add_network_option and delete_network_option doesn't use the metadata api. Using the metadata api has many advantages, such as filters and a more consistent caching api. " spacedmonkey Future Releases 44814 User table same schema, single and multisite Networks and Sites 3.3 normal normal Future Release enhancement new dev-feedback 2018-08-19T16:16:33Z 2019-01-25T17:28:07Z Currently, there is a difference between the users table database schema between single and multisite. I think this is problematic, as it is an unnecessary difference between single and multisite. It means conditional logic that is unnecessary and could make issues for developers querying the users table. spacedmonkey Future Releases 40511 get_blogs_of_user should return an array of WP_Site objects Networks and Sites normal normal Awaiting Review enhancement new 2017-04-21T10:24:55Z 2017-04-24T17:09:38Z Currently the get_blogs_of_user uses get_sites to get list of sites. The code loops through the list and creates std objects. However, this is now needed. It is much better to return a list of WP_Sites. spacedmonkey Future Releases 55607 wp-config overrides of WP_HOME and WP_SITEURL are forgotten when installing MultiSite. Networks and Sites 3.0 normal normal Awaiting Review enhancement new dev-feedback 2022-04-22T18:37:42Z 2022-12-03T20:03:10Z "The chain of events I encountered when playing with WordPress on my home server. 1. Installed WP successfully. 2. I changed the two URL settings to the wrong value by accident. 3. Tried logging back into the admin panel, but I kept being redirected to the wrong place, the one I had mis-typed. 4. Google'd for a fix that would avoid my having to reinstall from scratch and found you can override these two settings in wp-config. I added the correct values for WP_HOME and WP_SITEURL. 5. Finding access to my website restored, I forgot about the two settings editable on the setting panel. 6. I switched on Multi-Site by setting WP_ALLOW_MULTISITE in wp-config. 7. I followed the Network-Setup panel, opting for subfolders. (The sample code to paste into wp-config had the correct name for DOMAIN_CURRENT_SITE.) 8. I followed the instructions to update both wp-config and .htaccess. 9. I went to the login page and saw the page layout was all messed up. Investigating, I found the CSS etc links were all to the mistyped URL I had typed back in step 2. Note, after restoring the htaccess and wp-config (but keeping my WP_HOME and WP_SITEURL changes) I found I could not update the wrong settings in the DB, as both text boxes were greyed out. WP multi-site appears to have some reference one of the two URL settings in the database. This should defer to the replacement settings in wp-config." billpg Future Releases 31573 wp_admin_bar_my_sites_menu should check for super admin capabilities Networks and Sites 4.1.1 normal normal Future Release enhancement new 2015-03-09T15:36:35Z 2017-02-02T15:29:57Z "Currently the ""Network Admin"" segment of the admin bar is only added for super admins. This could be done in a more granular way by using the corresponding super admin capabilities. I am currently adding this myself with code similar to this: {{{ if ( current_user_can( 'manage_network_users' ) ) { $groups[] = array( 'parent' => 'network-admin', 'id' => 'network-admin-u', 'title' => __( 'Users' ), 'href' => network_admin_url( 'users.php' ), ); } }}} To make this useful the suggestions in #16860 would also have to be implemented. With BuddyPress now also using more granular checks for super admin capabilities this would allow for a much more refined access control to the network admin area. In my case I need the possibility to allow individual users the activate and edit user accounts, but have no access to other areas of the network admin in a multisite installation. " thomaslhotta Future Releases 38171 A site within a network has no more users when those users are deleted from the network Networks and Sites 3.0 normal normal Awaiting Review feature request new dev-feedback 2016-09-27T14:08:40Z 2020-01-06T17:33:20Z "In a multisite installation, if a site has only one user and you delete this user, the site has no more users. That seams logical, but this is not what super admin expects when he deletes a user from the network. When deleting a user, the following question appears : What should be done with content owned by XXX ? But even if he chooses ""Attribute all content to:"" option, the site in question is left without any user. I don't think this is impacting the site functions, but perhaps we should add a note ? We have several options : * if a user is selected to attribute the content to, it should also be added as a site user * OR, display a warning somewhere that a site will be left without any user before deleting the user * OR, do nothing and be responsible of some heart attacks when a super admin discovers that a site has no more active user. " Fab1en Future Releases 54080 Dashboard > My Sites could use a list table for displaying the list of sites Networks and Sites 3.0 normal normal Awaiting Review feature request new dev-feedback 2021-09-07T07:59:55Z 2021-09-08T09:13:36Z "Dashboard > My Sites uses an unfamiliar display when listing a user's sites if compared with the rest of the pages in the administration area such as Posts > All Posts. For consistency, could My Sites make use of a [https://developer.wordpress.org/reference/classes/wp_list_table/ list table]?" henry.wright Future Releases 14215 MultiSite: Add new > different username from blog title Networks and Sites 3.0 normal normal Future Release feature request new 2010-07-06T18:09:37Z 2018-05-07T16:58:46Z "I would like to request that the current system for adding a new blog site be expanded so that as admins, we can specify a different username that's unrelated to the blog title. That is, in '''Site Admin -> Add New''', at the bottom of the page, add a new field specifically for the username. For that matter, it would be useful to also have a field to be able to specify the password, and perhaps a little checkbox that allows you to optionally prevent an email from being sent. These features are really useful when you're manually adding sites for employees, students, and the such. I had provided a fix for wpmu 2.8.4 at one point (with a better explanation and details), you can see the thread here: http://mu.wordpress.org/forums/topic/12945 An example of the final result: http://img696.imageshack.us/img696/2551/addblogwordpress.png" Person Future Releases 37685 Creating new multisite blog - wpmu_create_blog tries to execute queries on non-existent tables Networks and Sites normal normal defect (bug) new reporter-feedback 2016-08-17T10:04:45Z 2019-06-04T21:03:08Z "I have noticed that while creating new wordpress site in multisite install I get quite a few notices about executed queries while using verbose logging. {{{ query: SELECT option_name, option_value FROM wp_85_options WHERE autoload = 'yes' status: ERR: Table 'wp1.wp_85_options' doesn't exist }}} which is triggered by `wp_roles()->reinit();` during switch_to_blog function Another are from get_blogaddress_by_id (inside install_blog function): {{{ query: SELECT option_name, option_value FROM wp_85_options status: ERR: Table 'wp1.wp_85_options' doesn't exist query: SELECT option_value FROM wp_85_options WHERE option_name = 'home' LIMIT 1 status: ERR: Table 'wp1.wp_85_options' doesn't exist query: SELECT option_value FROM wp_85_options WHERE option_name = 'blogname' LIMIT 1 status: ERR: Table 'wp1.wp_85_options' doesn't exist query: SELECT option_value FROM wp_85_options WHERE option_name = 'siteurl' LIMIT 1 status: ERR: Table 'wp1.wp_85_options' doesn't exist query: SELECT option_value FROM wp_85_options WHERE option_name = 'post_count' LIMIT 1 status: ERR: Table 'wp1.wp_85_options' doesn't exist query: SELECT option_name, option_value FROM wp_85_options WHERE autoload = 'yes' status: ERR: Table 'wp1.wp_85_options' doesn't exist }}} Wouldn't it make sense to skip execution of those queries unless tables has been created? 1. `get_blogaddress_by_id` calls get_blog_details with $get_all as true while it makes no sense since additional fields will either be empty. 2. Do not call reinit of wp_roles if in blog creation mode" fliespl Future Releases 19724 Sites with IDN domains can't be created (bug #15554 continuation) Networks and Sites 3.3 normal normal defect (bug) new 2012-01-03T17:44:08Z 2019-06-04T20:03:05Z "registration of new site with idn domain by unknown/new users themselves is not possible. (though creation of new site in wp-admin/network/site-new.php page is possible, by patch given in bug #15554 , i have just now tested it.) also let i mention that site domain is written (and would be requested to enter, if would be fixed without punycode to unicode conversion) in punicode form in wp-signup.php page, that is not acceptable for wordpress. i have attached differences i made to wp 3.0.4 to make idn domains working and also to show and accept them in human readable format in wp-signup.php page . link to the differences file i attached to/in previous bug report on/to this topic: http://core.trac.wordpress.org/attachment/ticket/15554/diff304-blogo.txt ." qdinar Future Releases 28530 WPMU Creating new user does not use welcome notification template Networks and Sites normal normal defect (bug) reopened dev-feedback 2014-06-13T16:36:27Z 2019-06-04T20:08:14Z "In a multisite setting adding a new user to the network should send a welcome notification to the user with a template defined in '''Settings > 'Welcome User Email''''. But the template is not used. When creating a new user via {{{/network/user-new.php}}} the method {{{wp_new_user_notification}}} gets called. Instead {{{wpmu_welcome_user_notification}}} should get called." jokr Future Releases 32994 invite email from secondary blog does not use network site URL for wp-activate link Networks and Sites 4.2.2 normal normal defect (bug) new reporter-feedback 2015-07-14T14:33:18Z 2019-06-04T20:15:01Z "When inviting a user as an admin from a secondary site, the message uses `site_url('wp-activate.php?key=$key')` to generate the invite link. This is a problem because `wp-activate.php` returns a 404 when accessed outside the network site domain. Instead it should use `network_site_url('wp-activate.php?key=$key')`, as is done elsewhere. Here is the line in question: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/ms-functions.php#L953" leedo Future Releases 27287 siteurl is missing WordPress path when creating a new site Networks and Sites normal normal defect (bug) new needs-unit-tests 2014-03-06T00:03:35Z 2019-06-04T20:06:59Z "Our setup is a single subdomain network. WordPress is installed to `/wp`, and we don't have rewrites configured to mask the subdirectory. On the initial install, `wp_install()` sets the value of `siteurl`based on `wp_guess_url()`. The main site ends up with these expected values: * `siteurl`: domain.com/wp * `home`: domain.com On subsequent creation of a new site, `install_blog()` incorrectly sets the option values for the new site to: * `siteurl`: domain.com * `home`: domain.com This means the admin loads, but CSS and resources are broken, until I update the `siteurl` option value to be ""domain.com/wp"". I'd expect `install_blog()` to follow the same behavior as `wp_install_blog()`. #23221 is related, although this suggested fix doesn't also fix that." danielbachhuber Future Releases 14172 Implement $scheme in site info in ms-sites edit site Networks and Sites 3.0 normal normal enhancement assigned dev-feedback 2010-07-01T22:45:33Z 2021-01-05T16:40:51Z "In WordPress 3.0 with Network enabled, if you were to click: Super Admin -> Sites -> Edit (next to any site) and then change any of the Site Options i.e. wp_2_options the changes don't save. We're running a secure environment and need Siteurl to be HTTPS instead of HTTP. Changing all the parameters to https and clicking Update doesn't save the changes." firmdot Future Releases 34293 Network Admin Email description doesn't really explain what it is. Networks and Sites normal normal enhancement new dev-feedback 2015-10-13T21:18:49Z 2019-06-04T20:52:18Z "On /wp-admin/network/settings.php the field for **Network Admin Email** has this as the description: > This email address will receive notifications. Registration and support emails will also come from this address. By contrast, the per-site has this: > This address is used for admin purposes, like new user notification. I propose we change the Network Admin one to this: > This address is used for admin purposes, like site notifications. Registration and support emails will be sent from this address. That makes for a little more parity, and explains more clearly that emails are sent FROM this address (which has been unclear to some). The attached patch comes in two versions. 1) As I originally proposed 2) Without the 'and support' phrase since I have no idea what we are referring to with that one." Ipstenu Future Releases 30233 Replace or rewrite domain_exists() for more accurate usage Networks and Sites 3.0 normal normal enhancement new dev-feedback 2014-11-02T01:47:25Z 2019-06-04T20:09:42Z "`domain_exists()` was added in [https://mu.trac.wordpress.org/changeset/543 MU:543] in almost its current form. The enforcement of trailing slashes on paths was added in #20589 and a filter was added in #21442. A few notes: * The lookup for a domain and path combination is restricted to one network. This allows the same domain and path combination to be used on multiple networks, which should not be default behavior. * The name, `domain_exists()`, implies a check for domain. It is really checking for a full site URL. * While it is entirely possible to ignore the result by providing your own in the filter, it would be nice to not always require this for multi-network configurations. My **guess** is that the original intent was to ensure a subdomain or path was not present when creating a site on an open network. In thinking of how to address this, these two possibilities came to mind. * Deprecate `domain_exists()` and wrap a new function that does a larger check. `wp_get_site()` could work alongside `wp_get_sites()` and support domain/path lookup. * Allow the current `$site_id` argument to be `null` (for all), or an array (for many), in addition to the current `int` expectation. " jeremyfelt Future Releases 18777 Support filtering of domain validation on Add New Site. Networks and Sites normal normal enhancement new 2011-09-26T11:41:32Z 2020-10-16T18:28:34Z "I've a client who wanted to add subdirectory sites in a multisite install e.g.: example.com/department1/johnjoe example.com/department2/fredbloggs etc. But to do this, they had to add the site without the slash, then go back, and edit the sites URL. So to allow support for this, ( coupled with the obligatory custom sunrise.php ) and to allow error checking ( e.g. not allowing depoortment1, and only allowing a preset number of subfolders ), I added a filter. You'll find attached a small patch to site-new.php adding this filter" TJNowell Future Releases 29536 Toggle excerpt/list view buttons appear on users list page in network admin Networks and Sites 3.0 normal normal enhancement new 2014-09-05T13:22:03Z 2019-06-04T20:09:08Z "The buttons to toggle list/excerpt view show up on the Users list page in the Network admin. I suppose they shouldn't. When you click excerpt view, the registered time appears. I'll submit a patch to remove them from this view. As an alternative, I wonder if it would be useful to show the user bio in excerpt view? [[Image(https://www.evernote.com/shard/s3/sh/b564ac68-b0dc-409c-86df-ad0121b0f3df/ef7c8306fd439a62351a623e26b63259/deep/0/Screenshot-2014-09-05-07.54.53.png)]] " pauldewouters Future Releases 15467 Multisite with separate users table Networks and Sites 3.0.1 normal normal feature request reopened has-patch 2010-11-18T09:09:03Z 2024-03-02T16:55:21Z "Hi, I'm using WP with the network option since 3.0 has been released. I think that is very cool, but I think that the user management is not at a good level. At the moment, every user must register to the first site and the admin should 'bring' them to the wanted site. Some plugins (I use Multisite User Management) have been created to try to resolve this problem. My experience in wp-networks teach me that there are two ways to intend a network: - something like wordpress.com - a bounch of sites that are together only for administration purpose. The actual implementation does not respond to any of the previous cases. In fact to be able to use wp-network for the first case, you have to install a plugin that brings your new users across any site of your network, and for the second purpose the actual implementation of wp-network has huge problems. I think that the best way to resolve this, is to ask the user what he wants. During the creation of the network the system does ask the user if he prefers a sub-domain install rather than a sub-folder install. I think it should also ask the user if he prefers an installation with a single user db or a user db for each site. I was thinking which was the best way to manage the two things: for the first case, I think, the actual way is very good (it only needs to create the new user on all sites instead of delegating this to the admin/plugin). For the second case, I think, the best way is to have an user db for each site, each one with different values (yes, a person could register himself on site 5 and appear only in the wp_5_users table). As soon as a user is made super-admin he is 'replicated' on each user table. When a new site is created, the user table of that website will be populated only by the super-admins. I think this would make WP the best CMS/blogging platform ever seen :)" fale Future Releases 31414 Paginating Themes, Plugins, and Media Networks and Sites 4.1.1 normal normal feature request new has-patch 2015-02-22T16:08:13Z 2019-06-04T20:11:36Z "When building a multisite network the lack of pagination on resource screens such as themes, plugins, and media cause b rowser crashes -- too many thumbs to load. " leedman Future Releases 57313 Adding a menu item without a link URL should not add a broken HTML a tag Menus 6.1.1 normal normal Awaiting Review defect (bug) new dev-feedback 2022-12-11T15:24:27Z 2022-12-13T21:29:41Z I just want a text-only menu item, but this adds an empty/broken tag. See attached screenshot. cliffpaulick Future Releases 50820 Admin side menu items hover doesn't work on version 5.5-RC1-48687 Menus 5.5 normal critical Awaiting Review defect (bug) new reporter-feedback 2020-07-30T16:47:12Z 2020-08-11T19:08:07Z When in admin, the hover doesn't work on the menu items on the main left menu. If I click an item, its floating submenu appears instantly but then disappears as the clicked page loads. theogk Future Releases 55719 Better error message for sites using a FSE supporting theme when visiting the old navigation menus screen Menus 5.9 normal normal Awaiting Review defect (bug) new dev-feedback 2022-05-12T19:46:18Z 2022-05-12T19:46:18Z "When a block theme that supports full site editing is active, the user will see 'Your theme does not support navigation menus or widgets.' when navigating to the old Navigation Menus screen (`wp-admin/nav-menus.php`). This `wp_die()` notice is triggered when `add_theme_support()` is not called for `menus` and `widgets` (which is the case for FSE themes). While this is accurate, it could be misleading for someone who was familiar with WordPress prior to block-based themes. A FSE theme still supports widgets and navigation menus, just through blocks. It's not unreasonable to assume some users will have this page bookmarked or that plugins will continue linking to this page for some time. This ticket is to consider whether a different error message should be displayed when `wp_is_block_theme()` is `true`, potentially including a link back to the admin or a resource about navigation menus and widgets in a block-ified WordPress." desrosj Future Releases 43494 Can't change/delete menu items in Customizer on mobile audrasjb* Menus normal normal Future Release defect (bug) accepted 2018-03-07T23:30:18Z 2023-01-06T12:25:28Z "On mobile/tablet browser (only Android, Chrome browser tested), menu items can be added and reorganized, but the drop-down toggle for further options doesn't work. As a result menu items cannot be removed. To reproduce: 1. Log in to admin in mobile / tablet browser 2. Go to Customizer -> Menus 3. Add menu item to a menu 4. Attempt to edit / delete menu item Originally reported by community user Sue Jenkins on Twitter: https://twitter.com/LuckychairNews/status/969682449176211456" mor10 Future Releases 53449 Child Walker classes change the $args parameter data type and default value signatures for start_el and end_el Menus normal normal Awaiting Review defect (bug) new 2021-06-18T15:54:35Z 2023-08-03T21:38:00Z "The following Walker classes have code smells for changing the data type of the `$args` parameter when extending from the `Walker::start_el` and `end_el`: - `Walker_Nav_Menu` - `Walker_Nav_Menu_Checklist` - `Walker_Nav_Menu_Edit` What is the code smell? The parent defines the `$args` parameter as an `array` data type with a default value of an empty array. The child classes change the parameter's data type to `stdClass` with a default value of `null`. These changes need investigation to determine if these changes are needed and why." hellofromTonya Future Releases 51432 Custom Links in Menu do not get post_parent set Menus 5.5.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-10-01T16:51:31Z 2020-10-15T13:16:26Z "To recreate: 1. Create a menu 2. Add a ""Custom Link"" as a child of one of the menu items 3. In the database, the post_parent for that menu item is set to 0 Expected outcome: The Custom Link should operate like other menu items, where the post_parent is set to the ID of the item it is nested under." ascottme Future Releases 14142 Custom Walker class for navigation menus Menus 3.0 normal normal Future Release defect (bug) reopened 2010-06-29T14:16:18Z 2019-04-19T18:31:41Z "I have tried to extend the Walker_Nav_Menu class, I just needed to overwrite the start_el method. So i added ""walker""=>""My_Walker"" to wp_nav_menu, I've got an error message, that the method ""walk"" could not be accessed statically. After a short look at the code in ""nav-menu-template"", I realized that in the method ""walk_nav_menu_tree"" the object initializer ""new"" is missing. My solution can be found in the attached file. As you can see, I've just added a ""new"" in front of $r->walker And it works" dennis.winter Future Releases 58017 Exception thrown when using array-data in URL query Menus 6.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2023-03-30T05:14:51Z 2023-11-30T05:14:37Z "When using the following URL query: ?mtype=libraryitem&maps-tag%5B0%5D=children Then the following function: /wp-includes/blocks/navigation-link.php(129): block_core_navigation_link_maybe_urldecode will throw the following Error: Uncaught TypeError: rawurldecode(): Argument #1 ($string) must be of type string, array given because the function wp_parse_args (that is used in the function above) will parse the given URL to return query-keys ending with []-characters to be an array and not a plain string, see output from print_r: ( [mtype] => libraryitem [maps-tag] => Array ( [0] => children ) ) But the function rawurldecode that is used below expects the argument to be a string, not an array. This suddenly started happening, I assume after 6.2 got released on March 29, 2023." saemideluxe Future Releases 18282 Issue with admin page hierarchy in Menu admin Menus 3.2.1 normal critical Awaiting Review defect (bug) reopened changes-requested 2011-07-28T14:38:17Z 2023-08-12T10:15:28Z "Under Appearance > Menus in the left column under Pages, if I have more than 50 pages, the hierarchy view gets messed up. The issue seems to be related to paginate. If I change the ""50"" on lines 589 and 809 of wp-admin/includes/nav_menu.php to ""955"" the hierarchal admin menu works with 50+ pages. Attached are two XML files. One contains 50 pages and the other contains 53 pages. I've loaded them into fresh installs of 3.2.1 using the twenty eleven theme and no plugins. Paginate is great if it works right, if it won't work, just increase the number per page to something very high and people can scroll. I'd rather scroll than not have hierarchy work right. Link to 50 page XML -- http://cloud.hcc.me/0g3X3O310s3l3i2N363n Link to 53 page XML -- http://cloud.hcc.me/302e0c391A14193m2V2e Pastebin of wp-admin/includes/nav_menu.php -- http://pastebin.com/0FRAmMkS" hcceast Future Releases 58044 Issue with wp_setup_nav_menu_item Menus 6.2 normal normal Awaiting Review defect (bug) new 2023-04-01T16:20:53Z 2023-04-08T14:55:59Z "`/wp-includes/nav-menu.php` has an issue handling bad `$menu_item`. The problem is with trying to call `get_post_status()`. If a post with type `nav_menu_item` has a problem (I think not having a correct parent or something), the call to `get_post($menu_item->object_id)` returns NULL which then causes an error message from `get_post_states()`. I had to search the site database to find the offending menu item on my theme development site and deleted the bad menu. I think I likely deleted a page or post that had been include in a menu definition, or perhaps it was because I typically use the Parent Page to define the default menu, which is still supported but seldom used. This error only seems to appear when using the Customizer, I'm guessing while it is generating the ''Menus'' option. Didn't get error from Dashboard Menu, nor have I tried this on a block theme. The problem is found around line 833 in `nav-menu.php`. Here's a possible fix which worked with my bad menu definition, but the problem might be deeper. {{{#!php type_label = $object->labels->singular_name; // Denote post states for special pages (only in the admin). if ( function_exists( 'get_post_states' ) ) { $menu_post = get_post( $menu_item->object_id ); /* * Suggested fix for bad nav_menu_item post - likely caused by now missing parent * which can result in $menu_post being NULL at this point * */ if ($menu_post != NULL) { //*** add a NULL check $post_states = get_post_states($menu_post); if ($post_states) { $menu_item->type_label = wp_strip_all_tags(implode(', ', $post_states)); } } // end of added NULL check } } else { $menu_item->type_label = $menu_item->object; $menu_item->_invalid = true; } }}} " wpweaver Future Releases 18271 Item hierarchy should be maintained when adding to menu Menus 3.2.1 normal minor Future Release defect (bug) new 2011-07-27T20:13:35Z 2023-11-17T10:54:16Z "Situation: Create a hierarchy of categories or pages and go to create a custom menu. In the meta boxes on the left hand side, the categories and pages are shown in hierarchical arrangement. Select all categories (for example) and add to menu. Expected behaviour: All links are added to custom menu and the hierarchy is maintained appropriately Actual behaviour: Hierarchy is lost and all menu items are top-level This was originally raised by Jane in #17029 however the changeset in the ticket only applies to showing hierarchy in the meta boxes and doesn't cover maintaining hierarchy when adding to menu." JohnONolan Future Releases 42992 Menu Customizer - Inconsistent use of Tags and Format Menu Items Menus normal normal Awaiting Review defect (bug) new close 2017-12-28T15:03:50Z 2019-01-17T01:28:07Z "When using the standard menu administration it does not display ""Tags"" and ""Format"" to add into menu items. When using the menu controls in the customizer, it display ""Tags"" and ""Format"" options to appear as menu-items." monikarao Future Releases 47436 Menu depth doesn't affect menu-item-has-children Menus 5.2.1 normal trivial Awaiting Review defect (bug) new 2019-05-30T17:19:32Z 2021-08-21T22:47:18Z "Hi, When you add a depth of 1 to wp_nav_menu it removes all the sub menus, but it leaves menu-item-has-children class on the original menu li tags, which means it is styled like it has a dropdown." mikeybinns Future Releases 52558 Menu items need more classes Menus normal normal Awaiting Review defect (bug) new dev-feedback 2021-02-17T15:50:43Z 2021-02-17T17:36:21Z "As a front end engineer I have found that it is a pain to style menus. Especially if there are dropdowns. To target top level menu items you currently need to do nav > ul > li, and even then there can be issues. I would love to see a class on top level menu items. This way we can also style things with :not(.top-level-items) etc... Submenus have classes. Why cant top menu items have some too? Till now I have been able to get around it with filters like this. Unfortunately sometimes I am not given the ability to add this. {{{#!php menu_item_parent == 0 ) { //Count top level menu items $classes[] = 'top-level-item'; } if ( $depth >= 2 ) { //Count top level menu items $classes[] = 'nested-menu-item'; } return $classes; } add_filter( 'nav_menu_css_class', 'ign_nav_menu_css_class', 10, 4 ); }}} At this point though it would be nice to have something like this in core. (I would also love to change the markup of the submenus so they can be easily turned into megamenus but I know thats not happening...) So...Thoughts? " ericgreenfield Future Releases 37971 Menus screen: improve the responsive view Menus normal normal Awaiting Review defect (bug) new 2016-09-07T17:30:27Z 2019-04-05T19:01:01Z "Noticed while working on #37969, the responsive view of the Menus screen needs some improvements. Not sure if there's already a specific ticket (haven't found one). Some CSS rules used in this screen work just in the ""Desktop"" view: 100% widths+margins, some floats, the `13em` spacing between menu item titles and controls and probably more stuff need to be reset/adjusted. Not sure it nesting the menu items can work on very small displays, probably needs a different approach. Any thoughts welcome! [[Image(https://cldup.com/qvBPJULT7f.png)]]" afercia Future Releases 56089 Meta data of menu items not removed from wp_postmeta table after removing the menu item before being saved. Menus 6.0 normal normal Awaiting Review defect (bug) new has-patch 2022-06-28T16:16:22Z 2022-07-12T16:19:05Z "If we add a menu item, the menu item's metadata are added. Don't hit submit button yet. Remove the menu item, the metadata still exist. Add back the menu items, new metadata with a new post_id is added to wp_postmeta table. Hit the Save Menu button. Now, remove the menu item and hit the Save Menu button, the metadata will be removed. It doesn't remove the metadatas only when we add the menu item and remove the menu item without saving the menu. _menu_item_type _menu_item_menu_item_parent _menu_item_object_id _menu_item_object _menu_item_target" alokstha1 Future Releases 57308 Nav menu on Mobile remains open after clicking on an anchor link Menus normal normal Awaiting Review defect (bug) new reporter-feedback 2022-12-10T20:58:46Z 2022-12-13T15:21:26Z "Running WordPress version 6.1 **Steps to reproduce:** * Install WordPress, use the default Twenty twenty-three or Twenty twenty-two theme * Create a page, add some ipsum lorem to give length to the page, add a link to an element at the bottom of the page (#news for example), set this page as the home page from Reading settings * Create a menu item that links to your element on the page (#news in this example) * View the page on your mobile device * Click/tap the mobile menu icon to open the menu overlay * Click/tap on the #news link **Expected behaviour:** the menu overlay closes and the page scrolls to the relevant element (the one with the #news anchor) **What happens instead:** The menu overlay does not close when you click the link, obscuring the page content. Menu needs to be closed manually to view page content. " nickpagz Future Releases 38224 Not enough results in menu-page-add-search Menus 4.6.1 normal normal Awaiting Review defect (bug) new dev-feedback 2016-10-04T09:42:08Z 2017-01-31T20:35:38Z "While editing menu, trying to add a page, searching for the page ""research"" in a database with hundreds! of pages with this word in it, looking for that ONE page with just 'research' as title, the page is not listed admin/includes/nav-menu.php, _wp_ajax_menu_quick_search with type=quick-search-posttype-page the WP_Query lists posts_per_page = 10, but the search does NOT provide a paginator. I call this a bug because it is not working as intended; I assume you intended that the search would allow a page to be found, so the bug would be ""pagination is missing"" I have hard-coded a -1 to avoid the issue for now possible solutions are: - add pagination - add a filter on the arguments so we can set a different page-size without altering the code " clearsite Future Releases 58005 Saving menus is slow Menus 6.1.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2023-03-28T20:06:16Z 2023-04-05T02:30:57Z "It seems the ages old issue, saving Appearance -> Menus is still taking about 40 seconds to process, even if you only have handful of items in the menu. While it seems to be working ok, if one waits long enough - some servers may not tolerate several minutes of waiting. As of 2023, saving a menu with 10 items should not take 40 seconds - it should be instant." iarovuo Future Releases 41351 Searching for a category returns nothing if category is empty Menus normal normal Awaiting Review defect (bug) new 2017-07-17T21:53:56Z 2019-11-22T21:53:08Z "Hi, In the navigation menu creation page, when you are trying to add a category to the menu, if the category is empty, it won't show up in the search results. However, if the category itself is empty but has a child that is not empty, it will still be shown. I have a blog with over 500 categories, and I'm trying to add some of them to the menu but they have no posts yet. Navigating through category list is going to take time, and is also frustrating. Now I've tracked down the issue to `/wp-admin/includes/nav-menu.php`, ( starting at line 588 ) but can't find a filter or hook to do so. This line (109) seems to be responsible for doing the search: {{{ $terms = get_terms( $matches[2], array( 'name__like' => $query, 'number' => 10, )); }}} According to the documentations, this function accepts an argument for showing empty terms 'hide_empty' => false, but I can't see such option in this part of core's code. I've added this option to the core (temporarily) to see if it solves the issue, and it does. The other `get_term()` functions withing this template file mostly use `'hide_empty' => false` so I'm not sure either this one was overlooked or not, I tagged this as a bug though." jackjohansson Future Releases 38801 Terms with the same name indistinguishable in Menu section Menus normal normal Future Release defect (bug) new 2016-11-15T19:10:08Z 2017-08-18T12:52:07Z "== Problem == Let's say we have a WooCommerce site (although likely all taxonomies/terms are liable to this problem) with the following categories: Men, Women. Each of the categories has a subcategory called Shoes. When in Appearance -> Menu and trying to add a link to Shoes (whichever), there's no way to distinguish the 2 Shoes categories, as the parents are not displayed and no indenting is applied. No matter if we use the Latest, All or Search filter. == Solution == Keep in mind that ""All"" uses pagination, so indenting might not be the best solution. An idea is a hover with the parents listed, but this would be tricky on mobile. Maybe just make a ""Show parents"" switch above the field (or in the Screen Options) and if it's checked, show the parents after the taxonomy/term's name? Like: Shoes (Women -> Shoes). Just getting rid of pagination in the ""All"" view could cause problems with a lot of values and would not help the Search function within the menu creator." eclare Future Releases 39056 Twenty Seventeen: No Default Menu option creates extra work Menus 4.7 normal normal Awaiting Review defect (bug) reopened 2016-12-04T17:28:41Z 2018-03-05T13:42:50Z "A new WordPress site is created with a sample post, and sample page. In previous themes, there was a menu with Home and Sample Page listed, which was nice to see where the menu lives, and preview what a page looks like. On Twenty Seventeen there is no default menu. This prevents me from both identifying where those links would be, as well as not allowing me to view the Sample Page." ElfIRL Future Releases 43033 User can not see updated Icon in editing Menu with live preview Menus 4.9.1 normal normal Awaiting Review defect (bug) new 2018-01-06T06:48:54Z 2018-02-05T14:06:38Z "Bug: User can not see updated Icon in editing Menu with live preview Attachment for steps: https://www.screencast.com/t/jOBHlmVeUTdO Steps: 1. Navigate to Appearance->Menus from left rail 2. Select ""Menu with Live preview"" 3. Select Menu and click on 'Add Items"" 4. Sect ""Pages"" and add some page, User can see that ""+"" icon is changed to Tickmark sign 5. User will remove it from menu,Now User can not see previous symbol again to add Thanks" nilamacharya Future Releases 42288 Validation of custom menu link Menus 4.8.2 normal normal Awaiting Review defect (bug) new 2017-10-20T05:38:04Z 2018-06-14T13:40:20Z "1. go to menus page 2. try to add custom menu link with label only. without a URL. expected and actual result: validation failed and link cannot be added. 1. go to menus page 2. add custom menu link with label and URL: '#' 3. save menu 4. edit the custom link from the menu and remove the URL. 5. click save expected result: validation failed and menu won't be saved. actual result: menu saved. no validation." dvirhazout Future Releases 40090 Walker::display_element does not populate $args[0]->has_children when it is cast as an Object Menus 4.7.3 normal normal Awaiting Review defect (bug) new 2017-03-09T23:39:09Z 2017-03-10T00:38:08Z "When using the various hooks in {{{Walker_Nav_Menu}}}, the {{{$args}}} argument is expected to have a {{{has_children}}} object property. Walker::display_element only creates and populates this property if {{{$args[0]}}} exists and is an array. {{{#!php has_children = ! empty( $children_elements[ $id ] ); if ( isset( $args[0] ) && is_array( $args[0] ) ) { $args[0]['has_children'] = $this->has_children; // Back-compat. } }}} But {{{wp_nav_menu()}}} casts $args as an object ensuring that this assignment will always fail. = Suggested Fix = Add an additional check for object type and assign appropriately. {{{#!php has_children = ! empty( $children_elements[ $id ] ); if ( isset( $args[0] ) && is_array( $args[0] ) ) { $args[0]['has_children'] = $this->has_children; // Back-compat. } else if ( isset( $args[0] ) && is_object( $args[0] ) ) { $args[0]->has_children = $this->has_children; } }}} " JoelStransky Future Releases 42566 When I use wp_nav_menu I get a huge update_meta_cache query regardless of theme Menus 4.8.3 normal normal Awaiting Review defect (bug) reopened 2017-11-15T23:53:36Z 2021-01-26T02:32:23Z "Hi there, I've got a wordpress site that's been up and running for a couple of years now. I always keep core+plugins up to date, and although I use a custom theme, I'm pretty happy with how it's working. Recently however it started to crash regularly - and the server guys notified me that it was mysql that was causing it. So I installed Query Monitor and took a look - there was a massive query which looked like this: {{{ SELECT post_id, meta_key, meta_value FROM ajs_postmeta WHERE post_id IN (11178,9677,9060,7417,7354, ) ORDER BY meta_id ASC }}} This was returning 20,000 rows each time the page was loading. This obviously overloaded the server during peak times and it needed rebooting. This is the code that was causing the problem (I know this because I replaced it and the offending query disappeared) {{{#!php 'header-menu', 'container' => 'nav', 'container_class' => 'nav-menu-holder nav-menu-landing nav-new', 'menu_class' => 'nav-menu', 'walker' => new themeslug_walker_nav_menu)); }}} So I replaced wp_nav_menu with static HTML and the query size reduced as it was no longer calling wp_nav_menu. I thought it might have been something I'd done in my theme - so I removed the custom walker, which didn't have any effect, and played about with some settings. I tried using the recommendation here: [https://hitchhackerguide.com/2011/11/01/reducing-postmeta-queries-with-update_meta_cache]/ but that had no effect. So the next step was to try a different menu. So I deleted my menu (which had 70/80 items in it) and added 5 new items to a new menu. That then gave the following query: {{{ SELECT post_id, meta_key, meta_value FROM ajs_postmeta WHERE post_id IN (11178,9677,9060,7417,7354) ORDER BY meta_id ASC }}} which is the same query as above but without the lots of additional ids - as this menu only had 5 items. This returned around 450 rows - so it's not hard to see that a menu with 70/80 items would get up to 20,000. The last thing I tried was to change to the default theme and disable all plugins (bar Query Monitor) and tried again. I associated my test menu (with the 5 items) with the 2017 theme top menu and checked query monitor - it still showed this query: {{{ SELECT post_id, meta_key, meta_value FROM ajs_postmeta WHERE post_id IN (11178,9677,9060,7417,7354) ORDER BY meta_id ASC }}} with the same number of rows. So my question is this - is this something that is a problem in core wordpress, seeing as this update_meta_cache() method seems to be creating massive queries if you have a larger than average menu - even 15/20 items would create a fairly large result set each time. I've been googling like crazy as I really want to get this sorted - but I can't seem to find a solution, and I'm wondering if it's something in the latest release. There's no difference between browser or OS that I can see - its just something wrong (I think) with the update_meta_cache method as it relates to the wp_nav_menu function. Anyway, happy for you to take a look at my config etc - let me know what you need. Best email to get me on is andy@weboptimize.co.uk or you can call my UK mobile on 07791-107755 Thanks Andy" andyseaton83 Future Releases 37920 `the_title` filter called in 2 places inconsistently Menus normal normal Awaiting Review defect (bug) new dev-feedback 2016-09-02T14:20:21Z 2019-04-19T13:22:41Z "This is a follow-up to #35317. When calling `wp_nav_menu()` to build a frontend nav menu, the filter `the_title` ends up being called 2 times on page links, due to the above ticket. It is called here https://github.com/WordPress/WordPress/blob/master/wp-includes/nav-menu.php#L754 and then here https://github.com/WordPress/WordPress/blob/master/wp-includes/class-walker-nav-menu.php#L169. So it is called once when getting the post object title and then again when actually outputting the nav menu. I think this is negative for 2 reasons: 1) Anyone who wants to filter `the_title` for nav menu items will end up having it called 2 different times, which is odd and can provide inconsistency 2) In both cases, an object ID is included, but the first call the object ID is the Post that the menu item links to (where the title comes from) and the second call the object ID is the nav menu item ID. This means, if a developer anticipates the 2 calls, they cannot check against the supplied object ID to confirm operations only happen once." joelworsham Future Releases 44329 current-menu-item class not applied to home link with starter content audrasjb Menus low normal Future Release defect (bug) reviewing 2018-06-08T03:12:20Z 2019-07-09T05:43:31Z "When viewing starter content in the customizer the home link does not get the current-menu-item class applied when you view the home page. The menu-item-object-{$type} class is also missing $type, so it just has the class menu-item-object- applied. When viewing a customizer changeset of the starter content before actually publishing - the home link is not given the current-menu-item class as well. The menu-item-object-{$type} class is still missing $type in this class too. After publishing the starter content the front end appears to have .current-menu-item correctly applied to the menu when navigating. However, when viewing the site in the customizer - the home link now always has the current-menu-item class applied regardless of which page you visit. This results in two links having current-menu-item applied ( the home link and the currently viewed link ). At this point the menu-item-object-{$type} class now has $type === 'custom', so the class menu-item-object-custom is properly applied. Additional notes: - I was only testing with fresh wp installs. - I was using default permalink structure. - I noticed this issue with other themes that provide starter content, but it also happens with twentyseventeen - #43401 does not seem to fix the issues outlined in the steps below. Expected results: I expected for menu items to have the current-menu-item classes properly applied when viewing changesets, the customizer preview would accurately reflect the frontend display, and that current-menu-item would not be applied to two different links when previewing pages in the customizer. Steps to replicate: 1. Use latest trunk (this does also occur on 4.9.6). 2. Have fresh_site option set to 1 to get starter_content. 3. Activate twentyseventeen theme. 4. Go to customizer. 5. Starter content should be populated - inspect the ""Home"" link which doesn't appear to have current-menu-item added, and has the incomplete class menu-item-object- as well. 6. Click on one of the other pages - the link properly reflects the current-menu-item class. 7. Save draft and open the changeset url provided. 8. Click on one of the other pages other than home, and the same issue occurs. 9. Go back into customizer, publish the changeset, and view the site now on the frontend. The home page link is now properly given current-menu-item, and menu-item-object-custom is correct. 10. Click on one of the other links, and the home link no longer has current-menu-item applied, and is applied correctly to the new page you're on. 11. Click on customize - once the customizer loads, the home link AND the link your were looking at both have current-menu-item applied, only the previewed page should have this class." timph Future Releases 47139 function wp_logout_url urlencode causes issues in items wrap nav walker. audrasjb Menus normal normal Awaiting Review defect (bug) reviewing reporter-feedback 2019-05-06T14:42:44Z 2019-08-02T11:09:52Z "Hi The function wp_logout_url returns a encoded logout url. This used to work before without any issues. {{{ string(128) ""http://wprtdev.tst/wp-login.php?action=logout&_wpnonce=72f1be58e4&redirect_to=http%3A%2F%2Fwprtdev.tst%2F%3Floggedout%3Dtrue"" }}} But if you parse this url as a list element in the menu walker you get a warning and error {{{ Warning: sprintf(): Too few arguments in /var/docs/wprtdev.tst/public/wp-includes/nav-menu-template.php on line 261
    }}} because the walker uses %3$s for the items wrap and the encoded url has %3Afor : and %3F for ? It is not possible to add a logout url into the items wrap like this {{{ 'items_wrap'=>'
      %3$s
    • Logout
    • ', }}} How to fix this? Thank you ! " BackuPs Future Releases 40649 parent_file filter seems to be overwritten by get_admin_page_parent call Menus 4.7.4 normal normal Awaiting Review defect (bug) new 2017-05-03T13:37:51Z 2019-06-10T22:21:53Z "In wp-admin/menu-header.php the filter `parent_file` seems to have little to no impact most of the time. This is because the global `$parent_file` variable often gets immediately overwritten by the `get_admin_page_parent` function call. {{{#!php get( 'post_type' ) === 'nav_menu_item' ) { $query->set( 'tax_query', '' ); $query->set( 'meta_key', '' ); $query->set( 'orderby', '' ); } } add_action( 'pre_get_posts', 'fix_nav_menu' ); }}} Here is an example of the menu not showing on the CPT taxonomy page: **Link to production website removed, development example link is below.] There is a bug in 6.0 that when this is in the functions.php file the WP menu adds every menu item and other wp nav menus to each wp nav on both the backend in the menu editor and the frontend of the site. Makes for a very large menu anywhere a wp menu is called. Example of the broken menu: https://acbase.wpengine.com/" joshpaynedesigns Future Releases 60199 update_menu_item_cache appears to load postmeta for all linked posts Menus 6.0 normal normal Awaiting Review defect (bug) new reporter-feedback 2024-01-06T00:17:26Z 2024-02-28T16:27:10Z "Discovered this debugging a memory limit error that was causing a staging site to WSoD on every page. The root cause was that loading the site header menu triggered loads of all postmeta. For context, this site has 35 posts in its menu. If I run the query that killed the site, it returns ~240MB of postmeta (which trips our server's ~512MB memory limit). Yes, 7MB of meta_values per post sounds high; this is because we use a page builder (Beaver Builder) that stores serialized post design configuration in postmeta. While this sounds excessive, it *would* be fine. Except that when WordPress needs to load menu items (via `wp_get_nav_menu_items`), it updates a number of related caches. First we update the menu item cache, then the post cache for any posts that are linked from a menu item, then the postmeta cache for all the postmeta of those linked posts, then we run out of memory and crash. `_prime_post_caches`, the function that updates the post cache, does provide parameters to enable or disable term and postmeta cache priming. `update_menu_item_cache` disables term priming but not postmeta priming. This appears to be an oversight: normal nav menu processing doesn't use any of the postmeta we're priming the cache with, so there's no point in loading any of it into the object cache. The website I diagnosed this problem in is running WordPress 6.4.2 on PHP 8.2. It's hosted on WP Engine which does automatic core and PHP updates. As part of an earlier diagnosis phase, I disabled every plugin that wasn't absolutely necessary for rendering this header. I still got the memory limit error. I was *not* able to disable Beaver Builder or the custom theme we developed for this client as those are responsible for loading the template that calls `wp_nav_menu`. I don't think there's any plugin hooks in Beaver Builder doing anything funny either; I made PHP print out a stacktrace right before the memory error and the trace goes straight from my header code to WPDB: {{{ #0 /wp-includes/class-wpdb.php(2263): wpdb->_do_query('SELECT post_id,...') #1 /wp-includes/class-wpdb.php(3152): wpdb->query('SELECT post_id,...') #2 /wp-includes/meta.php(1177): wpdb->get_results('SELECT post_id,...', 'ARRAY_A') #3 /wp-includes/post.php(7421): update_meta_cache('post', Array) #4 /wp-includes/post.php(7808): update_postmeta_cache(Array) #5 /wp-includes/nav-menu.php(804): _prime_post_caches(Array, false) #6 /wp-includes/class-wp-query.php(3560): update_menu_item_cache(Array) #7 /wp-includes/class-wp-query.php(3824): WP_Query->get_posts() #8 /wp-includes/post.php(2460): WP_Query->query(Array) #9 /wp-includes/nav-menu.php(729): get_posts(Array) #10 /wp-includes/nav-menu-template.php(165): wp_get_nav_menu_items(Object(WP_Term), Array) #11 /wp-content/themes/beaverwarrior/components/CustomHeader/custom-header/includes/frontend.php(19): wp_nav_menu(Object(stdClass)) }}} The way I'm currently fixing this problem is modifying `update_menu_item_cache`. Yes, this is corehacking, and I understand that it will be overwritten and break with the next core update. I specifically changed this line: {{{#!php if ( ! empty( $post_ids ) ) { _prime_post_caches( $post_ids, false ); } }}} to instead be: {{{#!php if ( ! empty( $post_ids ) ) { _prime_post_caches( $post_ids, false, false ); } }}} This disables postmeta cache priming for linked posts in nav menus and fixes the memory limit I was running into. I would like to know if there's any further implications from doing this that I'm not aware of. If not, I can submit a pull request to have this merged in." huemordave Future Releases 55841 wp_get_nav_menu_items doesn't work properly Menus 6.0 normal normal Awaiting Review defect (bug) new reporter-feedback 2022-05-26T09:45:23Z 2022-05-27T21:47:56Z "Function ""wp_get_nav_menu_items"" doesn't work correctly, when you try to retrieve a list of terms for a specific menu using slug returns all pages available. " andreamarrano Future Releases 18842 wp_nav_menu confuses new developers when it falls through to page listing Menus 3.2 normal normal Awaiting Review defect (bug) reopened 2011-10-02T10:54:12Z 2017-09-20T19:42:00Z "It appears that when wp_nav_menu() falls through to a page listing, many menu-specific args are not passed to the page listing, which ultimately confuses new developers. I seem to answer this at least weekly in #wordpress One example is the 'container_class' arg, if it falls through to the fallback_cb, the container_class is not applied. Ideally, template-related arguements should be passed to the fallback (And with pages as the default callback, it should handle these) or wp_nav_menu() should output any extra wrapping divs if appropriate." dd32 Future Releases 39558 A lot of menu classes (and id's) are missing when there's no menu set for a location Menus 4.7 normal normal Awaiting Review enhancement new 2017-01-12T12:45:58Z 2017-01-12T14:02:03Z "When a fallback menu is displayed because no menu is set to a location, a lot of the CSS classes are removed, compared to the same menu when the location is set. Would it be possible for a fallback menu to have the same classes than a menu with a location? It would allow theme developers to use classes instead of tags to style the menu. '''Fallback menu''' {{{ }}} '''Menu with a location''' {{{ }}}" benoitchantre Future Releases 41800 Ability to collapse multi-level menus in the Menu editor Menus 4.9 normal normal Awaiting Review enhancement new 2017-09-05T14:04:37Z 2017-09-07T15:59:19Z "When creating large menu structures in the Appearance > Menu editor, it can be very overwhelming when there's a number of top-level items with child items... almost becoming an eyesore and confusingly difficult to navigate. Could we work to make any menu item within the editor have the ability to be collapsed? Along with the default state upon loading the editor to have them collapsed, with an icon to expand it." atomicjack Future Releases 13273 "Allow ""'non-clickable"" menu items" Menus 3.0 normal normal Future Release enhancement new 2010-05-06T10:58:50Z 2023-11-10T16:19:53Z "In the new menu generator I'm missing the option to create ""non-clickable"" menu items. What I'm after is that I want to create for example a main menu item with the title ""Links"" which is non-clickable (no url attached to it) and basically only acts as an umbrella item for the actual links I want to locate as subitems of the item ""Links"". - Home - Something else - Links (this one should be non-clickable) - external link 1 - external link 2 - etc I think that an optional tickbox in the add link section will do the trick. Basically, all it has to do is to ""disable"" the check whether or not a valid URL format has been submitted and, of course, it has to trigger some modified html output. Hope you guys can add this in the 3.0 release because this would basically complete the menu generator :) Keep up the good work and I'm really looking forward to the 3.0 release!" stgoos Future Releases 35127 Allow wp_nav_menu() function to add container attributes, including Schema.org structured data Menus 4.4 normal normal Awaiting Review enhancement new 2015-12-17T00:06:34Z 2017-03-07T15:29:38Z "I'd like to propose an enhancement that would improve the flexibility of the `wp_nav_menu()` function to allow additional attributes to be added to the `
  • }}} **Remediation Guidance** Turn the form into an actual `
    ` element. Wrap `
    ` tags (with accompanying `` elements) around groups of controls explaining what they are. Use the id on the `` element with the form attribute on the ""Select"" button to designate this as the form's submit button. Add text to the ""Edit"" link that opens in a new window or tab, informing users that this will happen. When the form in the new tab/window is submitted, users should be brought back to the original form. **Recommended Code** {{{
    ...
    Filter media options
    Media options result
    • ...
    ...
    Attachment Details ...
    ...
    ...
    1820 × 1213
    Edit Image Opens in a new window
    ...
    }}} **Relevant standards** * 1.3.1 Info and Relationships (Level A) https://www.w3.org/TR/WCAG20/#content-structure-separation-programmatic * 1.3.3 Sensory Characteristics (Level A) https://www.w3.org/TR/WCAG20/#content-structure-separation-understanding * 3.3.2 Labels or Instructions (Level A) https://www.w3.org/TR/WCAG20/#minimize-error-cues * 4.1.2 Name, Role, Value (Level A) https://www.w3.org/TR/WCAG20/#ensure-compat-rsv **Note**: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-50 in Tenon's report" anevins Future Releases 47148 Insufficient labelling and inappropriate nesting of form controls joedolson* Media normal minor Future Release defect (bug) accepted 2019-05-06T15:16:18Z 2024-02-05T20:03:21Z "Moved from the WPCampus accessibility report issues on GitHub, see: https://github.com/WordPress/gutenberg/issues/15288 * **Severity**: * Low * **Affected Populations**: * Blind * Low-Vision * Cognitively Impaired * **Platform(s)**: * Windows - Screen Reader * Windows - ZoomText * Mac - VoiceOver * Android - TalkBack * iOS - VoiceOver * **Components affected**: * Media Dialog **Issue description** In the ""Featured Image"" modal dialog's ""Media Library"" tab, users can choose an image to be the featured image; this is presented as a series of checkbox elements which, once checked, show a button to uncheck inside the custom checkbox element. This button is in the Tab order, however its only name is ""Deselect"", it doesn't tell the user what is being deselected. Users must infer what this button does from context, and may wonder why it's next to seemingly-ordinary checkboxes which themselves are natively unselectable. The button role of these buttons does not convey that the user is checking or unchecking an item, and their placement inside the checkbox elements is semantically confusing, and may be functionally confusing since one focusable element is nested inside another. Screen reader users hear that a list is present, yet find that they cannot navigate by list-items. **Issue Code** {{{
    • ...
    }}} **Remediation Guidance** Allow the list semantics to remain available by not overriding the `
  • ` elements' native list-item roles. Remove the ` }}} **Remediation Guidance** When users have performed an action, such as clicking another block (or whatever action causes ""No block selected"" to appear in the Block panel), clear the live region so that users who encounter it while manually reading do not hear it. Refill the live region when users change color modes. The hidden file selection button should be hidden from all users with display: none whenever it is not visible nor meant to be used. **Recommended Code** {{{
    }}} **Note**: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-41 in Tenon's report ''**Note**: The a11y-speak live regions are used in core as well. In several places. Thus, clearing the live regions shouldn't depend on a specific user action or scenario. It would require a more generic solution, preferably avoiding setTimeout() which seems to me a very fragile solution by its own nature.''" anevins Future Releases 57488 "The ""Showing X of Y media items"" area in Media Upload screen gives wrong information." Media 6.1.1 normal normal Awaiting Review defect (bug) new has-patch 2023-01-18T05:24:38Z 2023-01-25T03:52:45Z "I followed the following steps and got this error: 1) Freshly created a new WordPress site. [[Image(https://i.paste.pics/L1SUI.png)]] 2) Created a new page and opened it in the block editor [[Image(https://i.paste.pics/L1SW2.png)]] 3) Added a new gallery block [[Image(https://i.paste.pics/L1SY2.png)]] 4) Clicked ""Media Library"" [[Image(https://i.paste.pics/L1SYB.png)]] 5) Uploaded new images [[Image(https://i.paste.pics/L1SYG.png)]] 6) Uploaded 20 images, but the counter showed, ""Showing 20 of 19 media items"" [[Image(https://i.paste.pics/L1SYQ.png)]] It showed the correct number when I closed it and opened it back up. I know it's a minor issue but thought about informing the experts. Here are my setup details: i) OS: Ubuntu 20.04.5 LTS ii) Using Local by Flywheel iii) Web server: Nginx iv) PHP Version: 8.1.9 v) MySQL: 8.0.16 vi) WordPress: 6.1.1 vii) Browser: Opera " shamayel007 Future Releases 58733 The load more button appears even when there is only one image in the feature image selection window. joedolson* Media 6.3 normal normal Awaiting Review defect (bug) accepted 2023-07-06T13:22:35Z 2023-07-21T15:20:00Z "Load more button appears in the popup window for replacing the feature image, even when there is only one image available. Steps to reproduce the issue: 1. Go to the post editor in WordPress. 2. Locate the section where you can edit the feature image for the post. 3. Click on the ""Replace"" button to select a new image. 4. The popup window will open, showing the available images. Despite there being only one image in the selection, the ""Load More"" button is present in the popup window. Video Link: https://www.loom.com/share/c0e9faa4cc86455eb30bdaf2149b5a60 === Environment - WordPress: 6.3-beta3-56143 - PHP: 7.4.21 - Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.21 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 - Database: mysqli (Server: 5.7.34 / Client: mysqlnd 7.4.21) - Browser: Chrome 114.0.0.0 (macOS) - Theme: Twenty Twenty-Three 1.1 - MU-Plugins: None activated - Plugins: * WordPress Beta Tester 3.5.0" aparnajl Future Releases 58483 UI issue in uploasd multiple media in mobile Media 6.2.2 normal normal Awaiting Review defect (bug) new 2023-06-08T07:40:16Z 2023-06-08T07:40:16Z "Hi, We need to add padding on the right side for maintaining alignment on the right side in uploading multiple media on mobile. The more informed nation you can see mentioned screenshot. " sumitsingh Future Releases 48111 Update usage of `multi_resize` to utilize new `wp_create_image_subsizes()` function kirasong Media 5.3 normal normal Future Release defect (bug) assigned 2019-09-23T17:48:40Z 2020-02-21T09:41:15Z "As mentioned in https://core.trac.wordpress.org/ticket/40439#comment:61 There are two uses of `multi_resize()` that will need to be updated to use the new `wp_create_image_subsizes()` function introduced in #40439. - In the [https://github.com/WordPress/WordPress-develop/blob/master/src/wp-admin/includes/image-edit.php#L947 image editor] (`src/wp-admin/includes/image-edit.php`). - In [https://github.com/WordPress/WordPress-develop/blob/master/src/wp-admin/includes/image.php#L583 PDF Thumbnails/Fallback Thumbnail Support] (`src/wp-admin/includes/image.php`). " antpb Future Releases 49900 Updates to Image Processing in WordPress 5.3 - Broken Intrinsic Sizing? Media 5.3 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-04-13T23:24:20Z 2020-05-14T22:46:41Z "Hello WordPress Wizards, I am a bit late to learning about this Update - I am currently on the Latest Version of WordPress however: [https://make.wordpress.org/core/2019/10/11/updates-to-image-processing-in-wordpress-5-3/] For months I have been talking to support teams and Developers before finding this article above. - Unfortunately I have had no luck with any ideas or information from them until finding this Post. Since November 2019 (The first content I have added since the 5.3 Update) I have had an issue with Uploading Images. For example I will upload an image at 250x250 pixels. However when it is displayed on the page the ""Intrinsic Sizing"" will be 624x468. Inside of the Media Library it still says the dimensions are ""250x250"" however Right Clicking the Image > Open Image In New Tab - Displays the image at 624 x 468. - Its creating different sizings and now choosing the wrong one (e.g - not picking Original Dimensions) I want to note. T**his is only for images uploaded SINCE this 5.3 Update**. I can still insert previously uploaded images that are stored in the Media Library and they are the correct Dimensions on the page. Attached Image Below showing: [[Image(https://gmm-downloads.s3.amazonaws.com/WordPress+5.3+Intrinsic+Sizing.JPG)]] I have disabled Themes and Plugins and the Issue still occurs. **Note:** ''I am having this issue only on my LIVE site. My Development site with the same themes and Plugins does not get this error - so it was potentially a problem on Installing the update?'' From the timing and what the 5.3 Update included, I feel as though it is related to this 5.3 update. Thanks! Alex **P.S** This is my first WordPress.org post - So I apologize if I am in the wrong area for posting this kind of question. Have a great day :)" techgmm Future Releases 40175 Upload Validation / MIME Handling Media 4.7.3 high major Future Release defect (bug) assigned early 2017-03-16T21:37:10Z 2023-10-30T16:13:26Z "A security fix implemented in WordPress `4.7.1` relies on a PHP extension (`fileinfo`) with inconsistent reporting behavior. As a result, many users (even after #39550) trying to upload various types of files (office documents, multimedia, fonts, etc.) have received validation errors. In a nutshell, this is because the media types returned by `fileinfo` vary from server to server and file to file. If PHP returns a media type beginning `application/*`, that media type must be whitelisted or the result will fail. Because most incorrect/historical answers from `fileinfo` begin `application/*`, this is resulting in a large number of false-positives. There are three main ways to address this, with a combination approach being preferred: '''1)''' The conditional in `wp_check_filetype_and_ext` could be restricted so that rather than searching `application/*` broadly, it looks only at the narrow file types at the heart of the original security issue. '''This option requires review from the Security Team.''' '''2)''' The WordPress Core could be extended to provide ""MIME alias"" awareness. This would allow WordPress to properly match a given extension/MIME pairing even in cases where the MIME type is historically valid, but not the singular type in the whitelist. See #39963 for related information. '''3)''' WP could be extended to maintain its own `mime.types` file, which can be passed to `fileinfo`, providing more consistent responses. '''This option requires the MIME alias handling to avoid breaking sites or plugins which hook into `upload_mimes`.''' '''Duplicate/related tickets are being collapsed into this thread. Please continue all related discussion here.'''" blobfolio Future Releases 58944 Upload to Media Library not replicating to all pod's 6.2.2 Media 6.2.2 normal normal Awaiting Review defect (bug) new reporter-feedback 2023-07-31T10:18:52Z 2023-10-04T15:34:54Z "Hello, after updating from WP 6.1.1 to 6.2.2 the new uploaded images start to apear ""broken"" on Media Library. If we refresh the page several time's we will see the image ok, but if we refresh it again it will be broken. We are running the WP in kubernetes, so we have several pod's. This behaviour means the uploaded image is no longer been replicated to all pod's. So it only exist's in one pod. After reverting to 6.1.1 all is ok." vitorgandra Future Releases 44765 Uploaded image corrupted after resizing Media 4.9.8 normal normal Awaiting Review defect (bug) new reporter-feedback 2018-08-09T13:49:17Z 2021-04-28T18:00:00Z "When I upload .jpg larger image and turn on resizing, image is corrupted after upload is done. I tried it on two websites on latest version. In v. 4.9.6 its working normally. When i Set in SETTINGS - MEDIA zeroes everywhere, its not resizing and picture is fine. Screenshots are below: [[Image(https://ctrlv.cz/shots/2018/08/09/lnGX.png)]] [[Image(https://ctrlv.cz/shots/2018/08/09/t6CU.png)]] [[Image(https://ctrlv.cz/shots/2018/08/09/bb0t.png)]]" lurbanek Future Releases 34465 Uploader in Media Modal Not Working When Certain Library Arguments Present Media 4.0 normal normal Awaiting Review defect (bug) new 2015-10-27T13:32:55Z 2017-09-18T00:16:15Z "I noticed this bug while working on a plugin that deals with the media modal. I'm using the following code to create a media modal on a button view: {{{ function frame(){ // Destroy the previous collection frame. if ( this._frame ) { this.stopListening( this._frame ); this._frame.dispose(); } this._frame = wp.media( { className: 'media-frame rwmb-media-frame', multiple : true, title : 'Select Media', library : { type : 'image', }, frame: 'select', } ); //Event stuff goes here this._frame.open(); }, }}} The issue is when uploading a file using the upload tab in the media modal. The file uploads but it never appears in the Media Library tab like it does in the core media modal used by the editor. The side Attachment Details panel shows the file information but the file itself doesn't appear on the grid. Attached is a screen cap from a user of the plugin. " Funkatronic Future Releases 40289 Uploading 2 files with the same name but different casing, overwrites existing files Media 4.7.3 normal normal Awaiting Review defect (bug) reopened 2017-03-28T22:23:44Z 2017-06-08T09:36:11Z "Problem: Under normal circumstances, if I upload a file to the media library but a file with a similar name was previously uploaded, wordpress would change the name of the new file (by adding a dash and a number). However, If I upload 2 files with the same name, BUT WITH DIFFERENT CAPITALIZATION, wordpress won't rename the second file and will just reference the older one. So if for example, I already had the file cover.jpg in my library and I've created a new post and uploaded the file COVER.JPG, it will show in the post the older image of (cover.jpg)." quickim Future Releases 23562 Using Speech Recognition Software with the Add Media Panel joedolson* Media 3.5.1 normal normal Future Release defect (bug) accepted reporter-feedback 2013-02-20T16:06:02Z 2023-08-24T13:36:57Z "Linked to #23560 this ticket specifically concerns the speech recognition user's accessibility experience of the Add Media functionality. I'm using Dragon Naturally Speaking with IE9 on Windows 7 - a typical setup as Dragon works best with IE. Within the Edit Post screen I can use Dragon to action the Add Media link successfully. The command in Dragon for such an action is ""Click Add Media"". This works, but then I run into the following problem: * With the exception of Set Featured Image, none of the other links on the panel appear to be directly accessible with Dragon. * If I select Set Featured Image I can't action any of the other links. Dragon users can use voice commands to replicate pressing the tab key. The experience then mirrors that outlined in #23560 - but of course this cannot be used to select the images or other files. It is possible for Dragon users to interact with screens using mouse commands but it is an incredibly laborious and time consuming process - used only as a last resort. If one of the images is selected, the information panel for that images opens to the right. Unfortunately none of the input fields (for title, alt, etc) are directly available to Dragon. Ironically, the Insert Into Post button can be accessed directly with a voice command. Some investigation needs to be done as to why most of the links and input fields cannot be directly accessed by Dragon when the panel is opened. This is a parallel with the situation on the Theme Customizer panel. It is interesting that the Set Featured Image link and the Insert Into Post button '''can''' be directly accessed. What is different about them? " grahamarmfield Future Releases 42484 WP ajax call fail when executing long time 'ERR_SPDY_PROTOCOL_ERROR'. Media 4.8.3 normal normal Awaiting Review defect (bug) new 2017-11-09T12:18:18Z 2017-11-09T12:38:47Z "Hello, I have one ajax script that is uploading 25MB video on server and convert on server. This core process doing by only WordPress ajax file. This process is run successfully but after uploading and conversion ajax automatically fail and give me this error ""ERR_SPDY_PROTOCOL_ERROR"". This error i am facing from last update(4.8.3). so i think there is issue regarding ajax call in WordPress 4.8.3 version. I am WordPress Developer with 6+ years of experience and i have found this bug. Please review this bug. There is attach one image related to error. [[Image(http://webidroid.com/WP_ajax_err.png)]] " gaurangsondagar Future Releases 55057 WebP EXIF data missing and images are not rotated in the same way JPEG images are rotated. adamsilverstein Media 5.8 normal normal Future Release defect (bug) assigned 2022-02-03T01:25:58Z 2022-07-07T18:29:05Z "When a WebP image is uploaded with the rotated exif this exif is ignored and the image is uploaded as it is instead of rotating the image when a JPEG version is uploaded the rotation happens as it should creating a `-rotated.jpeg` version of the original image. **Result when uploading a JPEG version** [[Image(https://user-images.githubusercontent.com/3921289/152251451-201251d2-409f-42d6-a302-a93bfe3aec3c.png)]] **Result when uploading a WebP version** [[Image(https://user-images.githubusercontent.com/3921289/152251458-1f3d98ac-5b40-4728-97a9-a3c05aa7cbb7.png)]] Steps to replicate the problem: - Create a WebP version of the original JPEG image (you can use imagemagick to do this) - Upload the WebP version of the image and observe the image is not rotated the same way it happens with the JPEG version. Original JPEG image used to test this behavior can be found at (and attached as part of this report): - https://www.flickr.com/photos/brevity/6221434141/in/photostream/ Related with the performance ticket: - https://github.com/WordPress/performance/issues/146 **Media handling information from the installation where this is happening: ** Active editor WP_Image_Editor_Imagick ImageMagick version number 1691 ImageMagick version string ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org Imagick version 3.7.0 File uploads Enabled Max size of post data allowed 100M Max size of an uploaded file 100M Max effective file size 100 MB Max number of files allowed 20 Imagick Resource Limits area: 122 MBdisk: 1073741824file: 786432map: 512 MBmemory: 256 MBthread: 1 ImageMagick supported file formats 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV GD version bundled (2.1.0 compatible) GD supported file formats GIF, JPEG, PNG, WebP, BMP Ghostscript version 9.53.3" mitogh Future Releases 53941 When converting images after uploading the original image may not be converted Media 5.8 normal normal Future Release defect (bug) new 2021-08-17T03:12:58Z 2021-11-16T18:57:42Z "This is less noticeable when the original image is larger than the ""big image threshold"" (and not a PNG) as the scaled image is converted. To reproduce: - Set image conversion, for example GIF to JPEG. - Upload image.gif that is smaller than 2560x2560px. - Note that image.gif is listed in the Gallery and present in the uploads directory but it's sub-sizes have been converted to JPEGs like image-150x150.jpg, etc. Expected behavior: the original image should be converted." azaozz Future Releases 40250 When cropping a image right after scaling, the crop selection will show incorrect dimensions adamsilverstein Media 4.7.3 normal normal Future Release defect (bug) reviewing 2017-03-24T11:04:59Z 2021-01-28T19:53:54Z "Steps to reproduce: - Upload any image to the media library. - Press ""Edit Image"" on the uploaded image. - Scale the image up or down by any dimension. - Try to crop the image afterwards with the drag selection on the image. On the screenshot provided you will notice the crop dimensions are actually larger then the image size. The bug only seems to appear when the page is not being refreshed, indicating the correct values are probably not being passed to the javascript handling the cropping after a scaling operation. [[Image(source:http://imgur.com/fEj6uDP)]] (Screenshot: http://imgur.com/fEj6uDP) " level level Future Releases 55345 When uploading image through featured image section, the image item count is wrong. Media normal normal Awaiting Review defect (bug) new 2022-03-08T17:45:56Z 2022-06-08T14:17:41Z "When uploading image through featured image section, the image item count is wrong. === Env * 5.9.1 * Brave, Chromium * Win 10 * Theme : TT2 * Plugins: None === Test Instruction * Open Post Editor and click on 'Set featured image' option. * Notice the total number of existing images * Upload a new image into the featured image section. * Now notice the number of images (+2) * Reload the page, and now the count corrects itself. When uploading image directly to the featured image section of the post editor, the media item count works correctly. " alanjacobmathew Future Releases 45980 WordPress 5.0.3 PDF is opening empty page in Chrome and not showing content Media 5.0.3 normal normal Awaiting Review defect (bug) reopened 2019-01-14T10:34:54Z 2019-01-30T07:38:23Z "Hi, I have some links that open pdf. On firefox or safari, when I clic on the link, the pdf is opend on another page. I can see the pdf. On Chrome, when I clic, anoter page is open but the page is empty. I can see on the url that the pdf is open https://www.....de/wp-content/uploads/2018/07/TEST.pdf but it is empty. And it worked before (not with WordPress 5.0.1) And it doesn't work with new pdf too. MAny thanks for you help" Timama Future Releases 50909 WordPress 5.5 update adds height and width attributes to images Media 5.5 normal normal Awaiting Review defect (bug) new close 2020-08-11T22:02:56Z 2020-10-30T14:33:28Z "It appears that some images added with the gutenberg editor (no updates since June) now have height and width attributes being dynamically added following the new loading attribute. I updated locally only so far. This is the previous img element being displayed in the browser: {{{ }}} This is it now: {{{ }}} These are the new attributes being added: {{{ loading=""lazy"" width=""1000"" height=""448"" }}} " jeslen Future Releases 48988 WordPress Does Not Generate JPG Sizes After 5.3.1 Media 5.3.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2019-12-15T12:23:16Z 2020-03-12T15:32:41Z "I have a strange problem on all my wordpress sites after upgrading to 5.3.1 When uploading an image to the site, it does not create any additional size nor the thumb 375x175 it should create ... I've tried using plugins that generate image sizes and they didn't work either ... The strange thing is that if the image is PNG it does create the other sizes, the error happens only with JPG images. Even if I rename a JPG image to PNG the process doesn't work ... Remembering that wordpress uploads the image normally, it just doesn't generate the extra JPG sizes, absolutely no additional sizes. " kevinbkt10 Future Releases 30402 WordPress does not respect the bit-depth of the original image when resizing Media 3.9.2 normal normal Awaiting Review defect (bug) new 2014-11-19T08:15:02Z 2021-03-04T15:09:12Z "i have uploaded 8 bit depth indexed color png, near 1400x1800 size image in wordpress and inserted it into post , and original image was near 500 kB and the smaller width-height version made by wp is near 1400 kB, because it is 24 or 32 bits per pixel png. (this is useless. i have edited html code to use full version because it is smaller by weight and it is scaled by size so it is ok)." qdinar Future Releases 51908 add_image_size not working with custom plugin code Media normal normal Awaiting Review defect (bug) new reporter-feedback 2020-12-01T17:55:45Z 2020-12-02T12:30:10Z "Hey, add_image_size() not working within the custom plugin code that we can change the the_post_thumbnail() with any custom size. Thanks, Arpit G Shah" arpitgshah Future Releases 56295 filter wp_content_img_tag runs multiple times Media 6.0 normal normal Awaiting Review defect (bug) new has-patch 2022-07-27T23:25:04Z 2022-08-09T17:44:08Z "Filter wp_content_img_tag seem (in a block theme) seem to run 3 times on content images and 2 times on custom logo image. Simple code to expose the problem: add_filter( $hook_name='wp_content_img_tag', function( $filtered_image, $context, $attachment_id ){ return 'a:'.$filtered_image; },$priority=21, $accepted_args=3 );" gigito78 Future Releases 36308 get_attached_file() destroys file paths on Windows Media 4.4.2 normal normal Future Release defect (bug) assigned 2016-03-23T15:45:03Z 2023-05-31T15:30:19Z "While working on ticket #36273 I noticed that ''get_attached_file()'' from ''wp-includes/post.php'' will destroy paths normalized by ''wp_normalize_path()'' on Windows: For example the function starts with {{{#!php $file = get_post_meta( $attachment_id, '_wp_attached_file', true ); // $file = 'C:/WWW/Sites/demo/htdocs/wordpress/wp-content/uploads/2016/03/example.jpg' }}} However this will become {{{#!php $file = 'C:\WWW\Sites\demo\htdocs\wordpress/wp-content/uploads/C:/WWW/Sites/demo/htdocs/wordpress/wp-content/uploads/2016/03/example.jpg' }}} due to {{{#!php if ( $file && 0 !== strpos($file, '/') && !preg_match('|^.:\\\|', $file) && ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) ) $file = $uploads['basedir'] . ""/$file""; }}} This is similar to ticket #24824 however we are dealing will full qualified paths here, not URLs (well, both are URIs...). PS: Yes, `$uploads['basedir']` contains mixed directory separators. That's another thing." Whissi Future Releases 53200 image quality reduction in smaller images Media 5.7.2 normal normal Awaiting Review defect (bug) new 2021-05-13T13:01:43Z 2021-05-13T13:01:43Z "So what happens is you upload a full size image to wordpress in my case project53.co.uk and I am using a goodlayers theme but I have repeated the same process on a stoc install on a different site and have the same issue. On this site for example the easiest one to see it on is the woman and look at the cheeks as full size looks ok and has colour and smaller images looks toned down and grey and it is wordpress changing the image quality with the smaller images. this is the details send from our dev guy For now - I have removed the thumbnails that the site was trying to use (I had set it to 'full', which should have been used, but the theme didn't want to co-operate) and then regenerated the thumbnails - pretty much forcing the site to use the full-size image. It may occur elsewhere in the site - hard to say until I've seen every possible variation of an image on the theme - but as long as we repeat the same steps to remove the thumbnail size and regenerate, it will be fine. You could just remove all regenerated sizes and ensure that sizes are set by the container the image is in; that would definitely stop it. So if you see another image (or multiple images) having the same problem: Inspect that image and see what thumbnail size it is using. (You can generally tell by the suffix on the end of the image name, e.g. blahblah-800x600.jpg) Go into Goodlayers Options > Miscellaneous > Thumbnail sizing Remove the thumbnail size that it's using Go into Tools > Regenerate Thumbnails Ensure that the thumbnail size that you remove is not there Click Advanced Options, and check the box which says ""Delete unselected thumbnails"" - this will remove that size from the server and tell WordPress it doesn't exist If it was me - I'd unregister all of the thumbnails and just limit the size of images which are being uploaded - and use that size globally throughout the theme (if the size doesn't exist it should fallback to the full size image as default). That doesn't necessarily have to be the case - but you just don't want 5MB images on a page - because then you'll have all the page speed problems to deal with! " digitalmountain Future Releases 35390 image_constrain_size_for_editor() should not affect images generated on the front end when `large` size is used. joemcgill* Media 4.4 normal normal Future Release defect (bug) accepted needs-unit-tests 2016-01-10T04:01:24Z 2017-05-31T21:17:47Z "{{{ }}} I am using Twenty Fifteen theme, WordPress version 4.4. `post-thumbnail` size is `825x510`. Original image size is `1600x1200`. But I am not getting expected image. After some testing I found that this problem arises if post thumbnail `large` is used. I could not understand how width and height is set to 680 and 510 respectively. I am not sure this is related to https://core.trac.wordpress.org/ticket/35108" rabmalin Future Releases 46390 image_default_link_type is not seen by Gutenberg Media 5.1.1 normal normal Awaiting Review defect (bug) reopened 2019-03-01T12:34:42Z 2022-04-05T02:26:53Z "I have in option.php the image_default_link_type set to file so that by default the ""link to "" for all media files is by default set to media. Since upgrading to Gutenberg 5.1, this feature appears to be deactive." brianjcameron Future Releases 54205 jqxhr is undefined inside of deferred.done() when using wp.media to add a custom image upload Media 5.8.1 normal major Awaiting Review defect (bug) new 2021-09-30T20:55:42Z 2022-05-31T14:33:33Z "I have done all the usual trouble shooting and found this is being cause by a new block of code added to wp-util.js in 5.8.1. Specifically lines 121-134. The jqXHR property does not exist inside of the done() object and therefor always errors out. This is removing a key functionality of a clients admin that makes it where no new products can be added without a horrible workaround." metawebdevelopment Future Releases 59641 manually setting fetchpriority on image should prevent core from adding fetchpriority attribute Media 6.3 normal normal 6.6 defect (bug) new 2023-10-16T20:44:56Z 2024-02-17T13:44:33Z "When working on testing the automated fetchpriorty attribute core now adds for images, I discovered this bug: If users manually set fetchpriority=""high"" on an image either programmatically or using a plugin, core will not change that setting, however it unexpectedly sets fetchpriority=""high"" on another image. === Steps to reproduce 1. install this plugin to add a manual fetchpriority dropdown: https://github.com/adamsilverstein/wp-fetchpriority-control 2. create a post with several large images 3. select the first image and apply fetchpriority=""high"" (under advanced) 3. publish the post and view its source **Expected results:** Only the first image should have the `fetchpriority=""high""` attribute, setting high fetchpriority on more than one image reduces the effect of adding the attribute. **Actual result:** Core applies `fetchpriority=""high""` to the second image so the first two images contain the attribute. " adamsilverstein Future Releases 45802 media_upload_tabs not supported in 5.0? Media normal normal WordPress.org defect (bug) reopened 2019-01-01T04:37:22Z 2019-06-04T19:16:22Z "I noticed the instructions here are incorrect at least for the latest WordPress 5.0 https://codex.wordpress.org/Inserting_Media_into_Posts_and_Pages At least, I can't seem to find the add media and it appears to be replaced by Gallery and Image, which shows upload/media-library/insert-from-url. Unfortunately it looks like there is no longer a way to get to this dialog and use extra upload-tabs to the left on the dialog shown in the tutorial linked above. In other words [https://developer.wordpress.org/reference/hooks/media_upload_tabs/ media_upload_tabs] doesn't do anything? If so, it should probably note this on that filter page and on the codex page. " programmin Future Releases 46209 mediaelement CSS loading at bottom of body Media 4.9 normal normal Future Release defect (bug) new 2019-02-07T21:55:20Z 2023-01-31T13:55:35Z "The question was asked in #42751 why we are loading mediaelement css in the body. It was agreed in the recent Media meeting that this is better fit for it's own ticket for discussion. ---- Mentioned by @themezly : While we are at it, why are we loading mediaelement CSS files at the bottom of body http://prntscr.com/hh0808 ? CSS files should always be in head. " antpb Future Releases 46544 mp3 file with different file mime type and content type when uploading should not be rejected Media 5.1 normal major Awaiting Review defect (bug) new 2019-03-17T02:51:33Z 2023-01-27T02:33:41Z "{{{#!php ', ':', ';', ',', ""'"", '""', '&', '$', '#', '*', '(', ')', '|', '~', '`', '´', '!', '{', '}', '%', '+', 'ʻ','’', '«', '»', '”', '“', chr( 0 ) ); }}}" jdorner Future Releases 58261 "set_post_thumbnail_size interferes with ""Cover Image Block""" Media 6.2 normal normal Awaiting Review defect (bug) new close 2023-05-05T15:42:51Z 2023-06-28T19:23:01Z "adding a post thumbnail size on the theme level interferes with the Cover Image Block which will use the ""new thumbnail"" as its image, resulting in blurry image displays: add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( xxx, 9999 );" RichWP - Felix Future Releases 43070 srcset attribute can be overridden but not prevented Media 4.4 normal normal Awaiting Review defect (bug) new 2018-01-11T19:07:48Z 2019-04-11T13:48:00Z In `wp_get_attachment_image()`, a `srcset` attribute can be passed to the fourth parameter to override the attribute's contents. There is no way to prevent this attribute from showing, though. An empty `srcset` attribute throws a validation error. desrosj Future Releases 43540 srcset not added when the original image size doesn't exist in the database after regeneration Media normal normal Awaiting Review defect (bug) new 2018-03-14T02:54:09Z 2024-02-27T18:54:22Z "Suppose you have a post where you've inserted a 'large' image size. Any other image sizes of the same proportion are added to the srcset on the front end. Now, change the 'large' image size to something else, and regenerate thumbnails (using the plugin, CLI, etc). The image in the post continues to work (since plugins / CLI tend not to delete non-existing sizes from the file system precisely because they may be embedded in posts). However, it no longer receives any srcset - because the src_matched variable never gets set to true in `wp_calculate_image_srcset`. Can the src_matched logic be adjusted to cover this case?" smerriman Future Releases 40688 there is a bug in deleting a photo and replacing it by the new photo with the same name Media 4.7.4 normal normal Awaiting Review defect (bug) new reporter-feedback 2017-05-07T21:04:41Z 2023-06-06T09:45:05Z there is a bug when you want to permanently delete some photo from library and replace some other one with the same name in library. when you do this the first photo in web page wont be changed i mean the first photo still appears on the web page so you should change the name of the new photo for uploading it and showing it instead of the older one. Navid.abazari Future Releases 39331 unsharpMaskImage in Imagick's thumbnail_image is not compatible with CMYK jpegs. Media 4.5 normal normal Awaiting Review defect (bug) new 2016-12-19T15:31:11Z 2017-05-11T14:40:11Z "This has been split off from #39216. The use of `Imagick::unsharpMaskImage()` in `WP_Image_Editor_Imagick::thumbnail_image()` on jpegs with CMYK color spaces results in mangled images, eg black text becomes fuzzy and over-black, and colors change. The attached patch just doesn't call it if the image has a CMYK color space. The unit test requires the attached ""test_cmyk.jpg"" to be uploaded to the test data images directory (which is actually the ""full"" jpeg produced by `WP_Image_Editor_Imagick` when processing the ""test_cmyk.pdf"" PDF uploaded to #39216). " gitlost Future Releases 36273 update_attached_file() on Windows will result in invalid image path when using native Windows directory separators Media 4.4.2 normal normal Awaiting Review defect (bug) new needs-unit-tests 2016-03-18T10:48:16Z 2018-04-30T23:34:09Z "Calling ''update_attached_file( $image->ID, $file );'' on platforms like Windows can be really bad if ''$file'' was normalized/validated using PHP's ''realpath()'' function: {{{#!php ID ); // Well, in real world you could have created the path manually... // The only important thing to know is, that we call ""realpath()"" which will // convert any directory separator into the native directory separator: // Linux will end with /dir/subdir/basename.jpg // Windows will end with C:\Dir\Subdir\basename.jpg $file = realpath( $file ); // Again, this is just a demo, for real world cases see plugins like ""Force Regenerate Thumbnails"" // But this is a valid API call: update_attached_file( $image->ID, $file ); // On Windows this will result in an update statement like // UPDATE `postmeta` SET `meta_value` = 'C:WWWSitesdemohtdocswordpresswp-contentuploads201603example.jpg' WHERE `post_id` = 123 AND `meta_key` = '_wp_attached_file' // when $file was set to ""C:\WWW\Sites\demo\htdocs\wordpress\wp-content\uploads\2016\03\example.jpg"" // Now imagine a plugin which is re-generating thumbnails :] // The problem is // $meta_value = wp_unslash($meta_value); // in wp-includes/meta.php update_metadata(). }}} When using ''update_attached_file()'' we should make sure that ''update_metadata()'' don't update the path value to an invalid value... PS: After you updated all image paths to an invalid value, the media library won't work anymore: {{{ [18-Mar-2016 07:31:10 UTC] PHP Warning: file_exists() expects parameter 1 to be a valid path, string given in C:\WWW\Sites\demo\htdocs\wordpress\wp-includes\media.php on line 3063 }}} " Whissi Future Releases 39492 upload_post_params and plupload_init filters are not being executed on wp_print_media_templates() Media 4.7 normal normal Awaiting Review defect (bug) new 2017-01-05T20:17:11Z 2018-01-04T18:38:02Z upload_post_params and plupload_init filters are not being executed on the new media upload form located in wp-includes/media-template.php => wp_print_media_templates(). llvasconcellos Future Releases 41372 when no any media. at that time this section is not usable. so Please hide when no any media. Media normal major Awaiting Review defect (bug) reopened 2017-07-20T07:57:16Z 2017-11-06T06:02:03Z When no any media at that time this section is not usable. So please hide when no any media. rushabh4486 Future Releases 50944 wp_calculate_image_srcset can unintentionally include unscaled original image Media 4.4 normal normal Awaiting Review defect (bug) new dev-feedback 2020-08-12T14:08:33Z 2020-08-24T21:33:22Z "In `wp-includes/media.php`, `wp_calculate_image_srcset` seems to add the original image to the srcset string if the width is smaller than `$max_srcset_image_width` and if the image isn't a GIF. This isn't desirable since the original image is uncompressed and I don't even think it's intentional. This behavior seems to have been introduced in this patch: https://core.trac.wordpress.org/changeset/35561. From what I can tell, the if statement should read like this: {{{#!php if ( ! isset( $image_sizes['thumbnail']['mime-type'] ) || 'image/gif' === $image_sizes['thumbnail']['mime-type'] ) { }}} The current code will include the original image whenever the thumbnail IS NOT a GIF. This seems to be opposite to the desired behavior? " fredrikll Future Releases 53187 wp_filter_content_tags added too early Media 5.5 normal normal Awaiting Review defect (bug) new 2021-05-11T19:15:40Z 2021-07-26T16:31:46Z "Currently wp_filter_content_tags filter is added to the_content filters with default priority, this means that if the iframe is outputted by shortcode it will not get the lazy loading attribute. I think that it should be added after do_shortcode has run with priority of 12." maciejmackowiak Future Releases 38906 wp_get_attachment_image_src() sometimes gives incorrect width and height values Media normal normal Future Release defect (bug) reopened dev-feedback 2016-11-22T18:57:34Z 2022-12-21T20:11:42Z "The following is an example of a problem that happens to me regularly across multiple sites. I have an image size registered as follows: {{{#!php add_image_size( 'featured-home', 1600, 600, true ); // width, height, crop }}} When I run wp_get_attachment_image_src() as follows: {{{#!php $image = wp_get_attachment_image_src( $post_id, 'featured-home' ); }}} ...and then print_r() the result, I get this: {{{#!php Array ( [0] => http://localhost:8080/lacoastalservices/wp-content/uploads/2016/09/wetlands-1600x600.jpg [1] => 1080 [2] => 405 [3] => 1 ) }}} The image itself is actually 1600 by 600 pixels wide, but for some reason the width and height values given in the array are ""scaled down"" to the width of the next largest image size on the site (1080px), and the corresponding image height if it were actually that wide (405px). Note that WordPress's ""large"" default image size is still at its default of 1024px, so I don't think that's the problem. You can hopefully reproduce this by running the ""Display All Image Sizes"" plugin on a few sites and looking for images whose larger image sizes have a mismatch between their identified dimensions and their actual urls. ""Display All Image Sizes"" is using wp_get_attachment_image_src() to generate the text strings that describe image sizes, which is how I became aware of this bug." pressupinc Future Releases 32117 wp_get_attachment_metadata sizes array file misses path if using year/month organizing Media 4.2 normal normal Awaiting Review defect (bug) new 2015-04-24T15:58:51Z 2017-08-14T13:15:29Z "wp_get_attachment_metadata returns array like this: {{{ [""metadata""]=> array(5) { [""width""]=> int(3072) [""height""]=> int(2304) [""file""]=> string(25) ""2015/03/GC702D01_high.jpg"" [""sizes""]=> array(4) { [""thumbnail""]=> array(4) { [""file""]=> string(25) ""GC702D01_high-200x150.jpg"" [""width""]=> int(200) [""height""]=> int(150) [""mime-type""]=> string(10) ""image/jpeg"" } }}} as you can see, ""file"" in the first level of the array contains year and month (as i do have turned on organizing in year/month structure for uploads), but ""file"" in the second level for (e.g. in this case) the thumbnail size is only the file name, without the path. This is at least confusing, make it difficult to get the URL of the file - each size need to be then requested separately by wp_get_attachment_image_src function. IMO optimal solution would be to use full path in both `$metadata['file']` and `$metadata['sizes'][$size]['file']` so the same name would have the same structure. But i do not know if it wouldn't have some compatibility issues. Less optimal imo would be to add there also the path - it can be there only once in the top level, as all sizes are currently always in the same folder, but i think this could lock us from possible changes / plugin modifications etc. E.g. I think that it would be great, if it would be possible (and even default) to have size name, as a folder, so that we would have thumbnails in uploads/thumbnail, medium size in uploads/medium ... - this would highly reduce the number of images in one folder in default settings and would reduce the problems with displaying them on most systems. And also if we would want to delete some defined size, we could simply delete one folder and save space. So the second optimal would be to show the path in `sizes[$size]` subarray, e.g. {{{ [""metadata""]=> array(5) { [""sizes""]=> array(4) { [""thumbnail""]=> array(4) { [""file""]=> string(25) ""GC702D01_high-200x150.jpg"" [""path""]=> string(25) ""2015/03/"" } }}}" thomask Future Releases 49841 wp_get_attachment_url does not return a url Media 5.4 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-04-07T17:29:44Z 2020-06-02T16:49:34Z "wp_get_attachment_url returns the base url to the uploads directory suffix with the file path. The file path is not always a valid url. 'fun image.png' is a valid file name. It's url path is 'fun%20image.png' I suggest adding the below straight after line 5859 in wp-includes/post.php {{{ // Convert the file path into a valid URL path $file = implode('/', array_map('rawurlencode', explode(DIRECTORY_SEPARATOR, $file))); }}} " hughie.molloy Future Releases 50264 wp_get_image_editor()->multi_resize() occasionally fails Media 5.4.1 normal normal Awaiting Review defect (bug) new reporter-feedback 2020-05-27T12:26:21Z 2022-03-16T18:56:30Z "I'm using wp_get_image_editor to create different sizes of same image, in 99.9% it works fine, but sometimes happens this: [[Image(http://files.dangerd.org/pub/!PUBLIC//wpbug2.png)]] All images are generated with smallest size in array, any ideas? {{{#!php resize( 1920, 1282, false ); $image->set_quality(65); $image->save( $path ); $sizes = array( array('width'=>640,'height'=>480,'crop'=>false), array('width'=>640,'height'=>480,'crop'=>true), array('width'=>150,'height'=>150,'crop'=>true), ); $mult = $image->multi_resize( $sizes ); }}} " dangerd512 Future Releases 58611 wp_get_missing_image_subsizes can return incorrect subsizes for a rotated image antpb Media 6.2.2 normal normal Future Release defect (bug) assigned 2023-06-23T12:33:44Z 2024-02-05T20:27:49Z "During the upload of a rotated image to the Media Library, the `wp_get_missing_image_subsizes()` function often returns missing subsizes for the non-rotated original image that will never be generated for the rotated image. This means for example, if a plugin is filtering `wp_update_attachment_metadata` and waiting for all thumbnails to have been generated before performing some action, it may be told that there are missing thumbnails for a rotated image, that will not be generated. Therefore it will not be able to perform that action as not all the thumbnails are deemed to be available." ianmjones Future Releases 51421 wp_get_missing_image_subsizes returns thumbnail sizes for animated GIFs Media 5.5.1 normal normal Awaiting Review defect (bug) new 2020-09-30T14:27:32Z 2020-10-01T14:36:20Z "While thumbnails are not created for animated GIFs to avoid the problem of users picking a thumbnail size to insert into their content and unexpectedly getting a static image instead of an animated GIF, they are generated for static GIFs. The `wp_get_missing_image_subsizes` function however recognizes animated GIFs as an image format that can have subsizes generated, and so returns a list of missing thumbnail sizes that will never be created. This causes problems for various plugins when checking whether all required thumbnails exist before commencing processing the GIF etc." ianmjones Future Releases 43413 wp_prepare_attachment_for_js missing image size medium_large Media 4.9.4 normal normal Future Release defect (bug) new 2018-02-25T18:54:29Z 2019-04-15T18:12:50Z "I have a function that creates a media size in case the size is called but is missing in meta. https://gist.github.com/danyj/2edb3d83bae4c363bf839f0dd5f1343f usage {{{ thz_create_missing_attachment_size(13031,'medium_large'); }}} every missing file size is recreated and exists in by wp_prepare_attachment_for_js size key except the media_large because it is missing here. https://github.com/WordPress/WordPress/blob/dfa68397063daf90a8758896693f137f9b981856/wp-includes/media.php#L3297-L3304 Basically if meta has been updated the wp_prepare_attachment_for_js is not checking for sizes but manually goes by that array . Not sure if the missing size key is left out on purpose but when you compare the wp_prepare_attachment_for_js to wp_get_attachment_metadata the data is not same " Themezly Future Releases 58240 wp_read_image_metadata() doesn't handle Exif array values joedolson* Media normal normal Future Release defect (bug) accepted 2023-05-03T06:02:01Z 2024-02-05T20:25:50Z "Some images appear to have multiple values for some headers, which causes `wp_read_image_metadata()` to return `'Array'` for some fields. A real-life example are these images: - https://wordpress.org/photos/photo/3056444e62/ - https://wordpress.org/photos/photo/7716444e53/ - https://wordpress.org/photos/photo/5376444e57/ Looking at the return value from `exif_read_data()` for one of these, you'll see arrays below. However `wp_read_image_metadata()` includes lines like `(string) $exif['FocalLength'];`. It looks like `iPhone 13 mini` might be common between the above examples {{{ [...] 'SectionsFound' => string(19) ""ANY_TAG, IFD0, EXIF"" 'COMPUTED' => array(6) { [...] 'ApertureFNumber' => string(5) ""f/1.6"" } [...] 'Make' => string(5) ""Apple"" 'Model' => string(48) ""iPhone 13 mini back dual wide camera 5.1mm f/1.6"" 'Exif_IFD_Pointer' => int(106) 'ApertureValue' => array(2) { [0] => string(9) ""1356/1000"" [1] => string(9) ""8803/1000"" } [...] 'FocalLength' => array(2) { [0] => string(9) ""5100/1000"" [1] => string(10) ""10884/1000"" } 'ShutterSpeedValue' => array(2) { [0] => string(10) ""10884/1000"" [1] => string(19) ""1124129791/84149760"" } }}} As a result on the above Photo pages you'll see something like this: {{{ Focal Length: Arraymm Shutter Speed: 1/0 }}} This could be related to the image processing application being used, or the sections found in the image. I'd be tempted to just select the first array key in those cases." dd32 Future Releases 60178 wp_video_shortcode() outputs invalid HTML Media normal normal Awaiting Review defect (bug) new 2024-01-02T22:09:17Z 2024-02-15T07:25:42Z "Did an audit of a website and found several invalid HTML for video tags that were output with `wp_video_shortcode()`. The errors: * Bad value `1` for attribute `loop` on element `video` * Bad value `1` for attribute `autoplay` on element `video` * Bad value `1` for attribute `muted` on element `video` Based on documentation from Mozilla, all 3 are boolean attributes. Here is an example of function usage that produced the HTML validation errors: {{{#!php wp_get_attachment_url(9999), 'class' => 'my-custom-video', 'poster' => '', 'loop' => 'true', 'autoplay' => 'true', 'muted' => 'true', 'height' => 1080, 'width' => 1920 ] ); }}} This part in `wp_video_shortcode()` is the culprit: {{{#!php $v ) { $attr_strings[] = $k . '=""' . esc_attr( $v ) . '""'; } }}} Currently, we are using the filter to clean up these attributes like this: {{{#!php ' . /* translators: %s: Asterisk symbol (*). */ sprintf( __( 'Required fields are marked %s' ), '*' ) . '

    ' . '' . $item . '
    '; } }}} The foreach loop that goes through all fields could easily check if any field has the ""required"" attribute and rather use that as a condition to show the message instead of `$item`." webzunft Future Releases 49779 Add a filter that controls the size of the images on the Attachment pages Media normal major Awaiting Review enhancement new reporter-feedback 2020-04-02T11:52:39Z 2022-03-10T16:35:34Z "The images (attachments) on the Attachment pages are hardcoded as ""medium"". On narrow themes, that might be fine, but on wider themes it leads to a tiny-looking image with a lot of awkward whitespace. Many users have wanted to change the size of the image on that page, which has lead to multiple guides suggesting that they replace the hardcoded value in /wp-includes/post-template.php Examples of such guides: * https://zolahost.com/change-wordpress-attachment-page-image-size/ * https://wordpress.org/support/topic/attachment-page-image-size-3/ * https://www.dmuth.org/fixing-image-sizes-on-wordpress-attachment-pages/ The problem with that solution, of course, is that the changes will be overwritten when the next WordPress update is released, leading to a lot of confused and frustrated users. To fix that, we could apply a filter to the attachment size. **Original /wp-includes/post-template.php code:** {{{ $p .= wp_get_attachment_link( 0, 'medium', false ); $p .= '

    '; }}} **Modified code:** {{{ $attachment_size = apply_filters( 'prepend_attachment_size', 'medium' ); $p .= wp_get_attachment_link( 0, $attachment_size, false ); $p .= '

    '; }}} After that, it's very easy for users to change the attachment image's size in their child theme's functions.php file. **Example:** {{{ add_filter('prepend_attachment_size', 'set_attachment_image_size_to_large'); function set_attachment_image_size_to_large() { return 'large'; } }}} " pikamander2 Future Releases 60345 Add duplicate checking for uploaded attachments Media normal normal Awaiting Review enhancement new 2024-01-25T16:39:34Z 2024-01-25T16:39:34Z "It can be very difficult to tell whether you've already added a given document or image to your media library if it's no longer in recent items. The lack of sorting or filtering makes specific difficult to locate. Based on a [https://wordpress.slack.com/archives/C02SX62S6/p1706115251959409 conversation on duplicate detection in #core-media], we think that a starting point for this is to hash the meta data for an attachment at the time of upload and store that as attachment meta. We could then check for that hash value before uploading a new document, and prompt the user to use the old attachment if it already exists. The specific meta data would probably need to vary depending on the type of attachment." joedolson Future Releases 33468 Add image caption hook SergeyBiryukov Media normal normal Future Release enhancement reviewing dev-feedback 2015-08-20T17:05:05Z 2020-03-04T22:34:29Z "There is currently no proper way to hook into image captions. Image captions are stored into the excerpt of attachments posts but when the caption is retrieved it doesn't go threw any specific filter. I think it would be nice to have a `add_filter ( 'image_caption', 'your_filter' );` or something similar. This was already discussed here : [https://wordpress.org/ideas/topic/add-image-caption-hook#post-28710] Captions are used by multiple themes and plugins. They are fully supported and showed in twenty-fifteen so I think we should be able to properly hook/filter them. " guillaumemolter Future Releases 39626 Add video poster in media browser Media normal normal Awaiting Review enhancement new 2017-01-18T15:07:26Z 2020-03-02T16:17:23Z "When you upload images you get to see amazing thumbnails in the browser. This unfortunately isn't the case for videos. Could we somehow have this? This is what we currently have: [[Image(https://cldup.com/yK6Hu9pZgw.png, 50%)]]" karmatosed Future Releases 31139 Allow editing of video embed parameters in the media modal wonderboymusic Media normal normal Future Release enhancement reopened 2015-01-26T18:53:55Z 2017-07-10T17:33:41Z Unsure if this is possible, but it would be pretty sweet if you could adjust available video embed parameters, such as height/width, straight from the media modal. It could fit pretty well on this screen: https://cloudup.com/caoYOVuWM41 melchoyce Future Releases 36270 Allow filtering of the final HTML output of media related shortcodes Media 4.7.2 normal normal Awaiting Review enhancement new 2016-03-18T02:33:02Z 2020-04-09T09:00:28Z "Sometimes it is required to further process the final HTML output of the media related shortcodes, eg {{{caption}}} or {{{gallery}}}, so as to add extra HTML code such as enclosing div or span elements or just modify the existing HTML code during run time. For instance the final output of {{{img_caption_shortcode}}} could be filtered: https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/media.php#L1537 Passing all relevant image attachment data, like ID and size, would also be very useful. I hope that I am not missing anything but right now the only way to insert code inside the {{{
    }}} or {{{
    }}} block seems to be the complete override of the {{{img_caption_shortcode}}} function. " gnotaras Future Releases 41854 Allow filters to be added for the Media Library in Grid Mode & Insert Media Media 4.8.1 normal normal Awaiting Review enhancement new 2017-09-11T08:02:45Z 2017-09-17T14:41:55Z "Hello, I would like to suggest the action '''restrict_manage_posts''' and '''pre_get_posts''' to be used by the Media Library in Grid Mode. It would also be great to have this available in Insert Media or when picking a Featured Image. That will allow many developers to add useful filters and avoid users to look desperately for their images/photos :) Many users have been asking this and most of them believed it was a bug (List Mode and Grid mode look very similar so the absence of filters for the Grid Mode is actually not logical). Thanks a lot :)" TigrouMeow Future Releases 42487 Avoid redundant crops for all Customizer media controls. Media normal normal Future Release enhancement new needs-unit-tests 2017-11-09T17:09:17Z 2019-02-07T21:45:56Z "In WordPress 4.9, we made use of context metadata to keep from producing redundant crops in the media library for custom headers (see #21819). We should extend this behavior to all other media controls in the Customizer (e.g., custom logos, site icon, etc.). There are a few parts to the implementation to keep in mind: 1. We should only create one cropped attachment per context for a given site/theme option. So for instance, if a custom logo has already been cropped from an attachment for the theme being customized, we should replace that attachment instead of creating a new one. However, we ''should'' create a new attachment if the crop was created for a different theme (this may not apply to site-level settings). 2. The context of an attachment should be included in the JSON model returned by `wp_prepare_attachment_for_js()` and used to filter contextual crops out of the main media attachment library. However, it would be great if those were ''not'' filtered when you've opened the media library from the context which those attachments are created/selected." joemcgill Future Releases 33054 Better featured image/attachment sanity checks Media 4.2.2 normal normal Awaiting Review enhancement new 2015-07-20T22:19:09Z 2017-06-27T16:16:22Z "Use case: Add a post: If a user uploads a featured image and the file fails to write to disk, the post record contains the url to the image but of course the image is broken. The end state is one where the featured image is simply broken, but the post record references the image. Possible solutions: 1. Do an extra sanity check after write to disk that the image was actually created. If there was a failure alert the user. This is probably the easiest. 2. Or reverse the order of operations, making it transactional in nature. That is, create the image(s) first, check if successful, and then update the post record. If there is a failure show an alert to the page, and don't write the image path to the post record as the file doesn't exist. It is alot cleaner to not have an image than having a broken one. It is also better if the image was successfully written to disk but the post url failed to update for some reason; we can always re choose from the media library. a. Going above and beyond, the sanity check would keep track of thumbnail sizes to be created and make sure they all were successful. If not, don't update the post record and remove the thumbnail sizes that did write to disk. Once again treat as a transaction; all or nothing. Extended impact: Many folks use image compression plugins or tools that compress the images before writing to disk. Currently if those items fail usually by timeout you are left with a broken image and the url is in the meta. I propose that there be a pre-check as to the thumbnails to be created before the image write even occurs (add a new action hook that keeps track of the thumbnails we expect from add_image_size) and then check on the backside to make sure we have the image(s) we expect. After that all sanity check rules proposed above would apply." ShawnLunny Future Releases 57003 Compress original image upload to avoid uncompressed images Media normal normal Future Release enhancement new needs-unit-tests 2022-11-04T20:01:53Z 2023-03-15T15:12:46Z "When an image is uploaded to WordPress today, WordPress will generate the sub-sized versions using compression with the default quality (e.g. 82 for JPEG). The point of this is to offer smaller versions to achieve better performance with different viewport sizes. The compression here is a significant part of it, as we would not want those smaller sized images to be badly compressed and thus overly large in file size. A problem (and I would argue oversight) in that approach is that the originally uploaded image is still used as is in many cases, even in the frontend. #47873 introduced the feature to compress ""big"" images in a smaller version, which makes sense, however that is only part of the potential problem here: It can also happen that the original image upload is simply an overly large file, even if the dimensions of the image are smaller than what makes it qualify for a ""big"" image. This ticket proposes the following: * Always generate a new image from the originally uploaded image, even when it is not a ""big"" image (potential exception could be PNGs as currently the case, see #48736). * Once the image has been generated, compare the file size of the new image with the original image: * If the new image is smaller, use that one going forward, backing up the original image in the same way it already happens as part of the ""big"" image feature. * If the new image is larger (i.e. the original was already well compressed), delete the new image again and simply keep the original as is. Given that we already generate an additional image file for ""big"" image uploads, this enhancement would not introduce any concerning overhead. It also does not make any assumptions on the original image quality, it simply compares the results to make a decision which image to keep. In any case, the original image will be kept so it would not be a destructive action either." flixos90 Future Releases 40373 Conditionally initialize Playlist Media Element Media 4.7.3 normal normal Future Release enhancement new dev-feedback 2017-04-05T15:54:22Z 2019-01-24T21:48:32Z "The single element media player (https://develop.svn.wordpress.org/trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js) uses a special jQuery filter to remove already initialized media elements from the initialization process: Source: https://develop.svn.wordpress.org/trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js Lines: 43~49 {{{ // Only initialize new media elements. $( '.wp-audio-shortcode, .wp-video-shortcode' ) .not( '.mejs-container' ) .filter(function () { return ! $( this ).parent().hasClass( 'mejs-mediaelement' ); }) .mediaelementplayer( settings ); }}} However, a similar approach is not implemented for the Playlist element and might be needed. Source: https://develop.svn.wordpress.org/trunk/src/wp-includes/js/mediaelement/wp-playlist.js Lines: 167~171 Original Code: {{{ $(document).ready(function () { $('.wp-playlist').each( function() { return new WPPlaylistView({ el: this }); } ); }); }}} Should probably be (my suggestion): {{{ // Only initialize new media elements. $(document).ready(function () { $('.wp-playlist') .not(':has(.mejs-mediaelement)') // <-- Filter out already initialized playlist media elements .each( function() { return new WPPlaylistView({ el: this }); } ); }); }}} I have tested both media elements (single player and playlist player) on an Ajax-based WordPress theme, and I've noticed that an already initialized playlist media element stops playing when the wp-playlist.js file is reloaded on a new page load. When the conditional (patch above) is placed in the code, the playlist element continues playing without problem on subsequent page loads. Awaiting feedback." kostasx Future Releases 50169 Consistency in Gallery and Image block settings Media 5.4.1 normal normal Future Release enhancement reopened 2020-05-14T14:24:11Z 2020-07-21T22:10:08Z "In the Gutenberg repo we have been tracking an issue focused on unifying the Gallery and Image editing experience. Currently, it's a bit disconnected from image settings and this ticket aims to change the Gallery block to create instances of image blocks rather than raw markup https://github.com/WordPress/gutenberg/issues/11436 From the issue: Is your feature request related to a problem? Please describe. Single and gallery options should be similar to each other. I added one image to a gallery and want to resize it in a similar way to how I resize single images. Not possible. I want to add images by clicking the standard add image media library screen but it only says upload an image. It should be identical to the single image media selection options. Describe the solution you'd like I would like to see much more consistency between single image and gallery options. It should be very easy to go from one to the other with similar options. As one begins working with images an expectation is created that image options should be similar between various blocks that handle images. Single image options [[Image(http://user-images.githubusercontent.com/5323259/47937002-c17bf600-dedf-11e8-9823-ad596ce22764.png)]] Gallery image options [[Image(https://user-images.githubusercontent.com/5323259/47937047-dfe1f180-dedf-11e8-8b08-0db18edc2eb2.png)]] Single image upload media options: [[Image(https://user-images.githubusercontent.com/5323259/47937075-ee300d80-dedf-11e8-8bb1-44a47574e2ac.png)]] Gallery upload media options: [[Image(https://user-images.githubusercontent.com/5323259/47937095-fbe59300-dedf-11e8-88d9-6dbea7190f78.png)]] Captions are also different from single images to the gallery. Top example shows the Gallery and bottom a single image. [[Image(https://user-images.githubusercontent.com/5323259/47940629-8e3f6400-deeb-11e8-9ff6-cfa71c5daccf.png)]] Btw It would also be very helpful to be able to rearrange the gallery images by using drag and drop. " antpb Future Releases 53645 Convert heic to a web safe image format. Media normal normal Awaiting Review enhancement new 2021-07-12T17:07:39Z 2024-02-08T08:58:08Z "[https://support.apple.com/en-gb/HT207022 As of ios 11], Apple start using the HEIF format to save images. Sadly HEIF files can not be viewed in web browsers. For those taking images on their iPhone, this would mean to embed a raw iPhone photo, would require them to use a third party tool to convert that image into a web safe format like jpeg. WordPress core should convert this image to a web safe format while keeping the original for reference. " spacedmonkey Future Releases 48485 Custom image size not generated if identical to original size joedolson* Media 5.2.4 normal minor Future Release enhancement accepted 2019-11-03T09:31:22Z 2024-01-29T20:19:18Z "When defining a custom image size using `add_image_size` and uploading an image that has exactly the same dimensions of that image size, the new image size is not added. This also means that -- when adding the newly defined image size -- to the Insert Media screen using the `image_size_names_choose`-filter, the custom image size does not appear in the dropdown menu. Even though I can understand why this happens from a server load / storage point of view, I feel the unexpected behaviour (to end users) is a bigger problem. An even prettier fix would be to detect the custom image size is identical to the original size and map the custom image size URL to the original file URL (e.g. through a symbolic link). {{{#!php __( 'Project-foto' ), ) ); } add_filter( 'image_size_names_choose', 'custom_media_sizes' ); }}} " brampeerlings Future Releases 42829 Debugging image uploads with wp_generate_attachment_metadata Media normal normal Awaiting Review enhancement new 2017-12-07T14:24:22Z 2019-02-14T21:28:56Z "Because of the if statement declared in image.php on line 181 ([https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/image.php#L181]) it seems impossible to retrieve the error message, what is supplied by the wp_upload_bits() function. Please return this message or implement a new function what verifies what the error messages are trying to inform the user about." Fleuv Future Releases 39346 Display Error if GD library ins't installed/enabled Media 4.7 normal normal Awaiting Review enhancement new 2016-12-20T18:47:03Z 2018-01-04T18:55:29Z "I recently moved a website to a new server and ran the Regenerate Thumbnails plugin which ended up breaking my site because it couldn't generate the image sizes. Looking at their reviews there are a number of people bashing the plugin for breaking their sites because they do not have the GD library installed. I was very confused for awhile and I couldn't google the issue I was having but then remembered it required the GD library. This isn't an issue only directed at the plugin because when you upload an image it will only show the full size available which left me puzzled for awhile. I think if we could display an error in the media library after uploading an image that it failed to create the image sizes because of the missing PHP library that would be very helpful." stormrockwell Future Releases 43608 Display missing module error for GD when on Media Settings Media 4.6 normal normal Future Release enhancement new 2018-03-22T06:16:06Z 2019-04-15T18:22:33Z "When WordPress is installed on a server is [http://php.net/manual/en/book.image.php missing the GD PHP image library], there should be an admin level warning displayed on the Media Settings admin page. Without the GD module there will be '''no intermediate image sizes created when images are uploaded in the media library''' (the media gallery just uses the full image size by default) [https://pasteboard.co/Hd2hc9L.jpg Without Admin Notice] The Media Settings page should display an admin warning / error that tells the user that they're missing that module and without it no intermediate images will be created. The whole page talks about the various images size and without GD none of these settings will be used for anything. I've created a simple gist that displays an admin notice if the '''GD library isn't loaded''' and the current user is on the '''Media Settings''' page. [https://pasteboard.co/Hd2hVdk.jpg With Admin Level Notice] [https://gist.github.com/simonrcodrington/be60b6daae0b966a559878c4ba16d9d0] This has come up a few times now where images haven't been created in the media library and no one has known why. Sometimes hosting providers don't include this extension or they are just not loaded. Having an admin level notice here would make sense. " simonrcodrington Future Releases 40427 Expose a JavaScript API to extend the Media Manager Media 4.8 normal normal Awaiting Review enhancement new 2017-04-12T17:30:38Z 2021-05-20T20:29:03Z "After talking with @mikeschroder as Pressnomics about how hard it was to extend the media manager, I wanted to open the discussion here for ways we could improve that. One way I made it work for the Stock Photo plugins at GoDaddy was to override core bindHandlers (see https://github.com/godaddy/wp-stock-photos/blob/master/assets/js/stock-photos.manifest.js#L13) and register my new view. One problem with that approach is that it makes it hard for anyone else to extend it for themselves. I'm turning out to the community so we can discuss ways we could expose hooks that would let anyone extend any part of the media manager experience. This could pave the way for awesome new plugins." jonathanbardo Future Releases 39262 Fall back to ImageMagick command line when the pecl imagic is not available on the server Media 4.7 normal normal Awaiting Review enhancement new 2016-12-13T11:59:23Z 2019-05-16T13:22:06Z The patch allows WordPress to fall back to the ImageMagick command line when the imagic pecl is not available on the server. Patch attached. Hristo Sg Future Releases 40441 High server resource usage and timeouts during image uploads Media normal normal Awaiting Review enhancement new 2017-04-13T18:53:52Z 2017-04-14T14:25:12Z "When uploading an image, server resource usage can run high and the resize process can easily timeout causing the upload to fail. This is often down the creation of intermediate image sizes and is especially noticeable when plugins/themes have custom image sizes defined. This issue has been mentioned before in both #37840 and #36534. #40439 proposes saving the progress of intermediate image creation so resizing can be resumed on retry. This ticket is mainly for discussion around ways to reduce potential server implications when uploading an image and creating intermediate image sizes." enshrined Future Releases 54452 Image Aspect Ratio on resize Media 5.8.2 normal trivial Awaiting Review enhancement new 2021-11-16T10:54:08Z 2021-11-16T10:54:08Z "With the picture block the css resize the picture width but never the height so it break is aspect ratio. Just need to add a height: auto to .wp-block-image img ." edgarwes Future Releases 34367 Image Editing: Orientation-aware rotation icons Media normal normal Future Release enhancement reviewing 2015-10-20T05:38:51Z 2019-06-04T20:17:04Z "Having just processed a massive set of images and needing to rotate several of them, I noticed a small issue with the way the WordPress image editor's rotation icons work. They're generally much better than the standard rotation arrows you'd normally see, providing a visual of an image being rotated one way or another from portrait to landscape. But if you're looking at a landscape image that needs to rotate one way or the other, it's somewhat disorienting trying to decide which button to push, since you're essentially rotating it one more time past the orientation indicated in the icon. By contextually adjusting these icons to reflect the orientation of the image in the editor, we could eliminate an extra cognitive step during the image editing process (see proposed screenshots). Probably the easiest way to go about fixing this would be to add a class for the image's orientation somewhere in a container div, then add some css to rotate these buttons when the image is already landscape, so that they indicate that clicking would make them rotate into portrait orientation." celloexpressions Future Releases 50061 Image_meta original_image as valid image_size antpb* Media 5.3 normal normal Future Release enhancement accepted dev-feedback 2020-05-02T23:31:58Z 2022-04-12T05:57:58Z "Since the introduction of the ""Big Image Threshold"" in Version 5.3 it is no longer possible to get the width and height of the original image. The name of the original file is stored as string in the image metadata (tested with wp_get_attachment_metadata) and functions {{{ wp_get_original_image_path }}} and {{{ wp_get_original_image_url }}} will only provide the path and url of the original image. It would be more developer friendly to implement it as a valid image size in the ""sizes"" array with name ""original"" or similar. This way functions like wp_get_attachment_image_src could be used to get extended original image information, without breaking existing configurations." tomcent Future Releases 53013 Improve media library grid management tools joedolson* Media normal normal Future Release enhancement accepted 2021-04-09T19:07:03Z 2023-10-18T16:18:07Z "The list view & the media modal both support bulk selection tools that aren't available in the media library's grid view. We should explore ways of moving the media grid view towards greater feature equivalence with these other views, including options such as: - One-click deletion - Select multiple items - View attachment titles (helps differentiate between two versions of an image) - Copy URL for attachment Prompted by #51363. While a custom context menu is not something we consider to be viable for accessibility reasons, the intent of that ticket is definitely worthwhile. " joedolson Future Releases 40123 Improve media uploading flow Media normal normal Awaiting Review enhancement new 2017-03-12T12:30:16Z 2019-01-14T17:54:02Z "Currently once you upload an image it just leaves you back at screen. We should consider on success offering next steps. We could use this as a chance to add encouragement: [[Image(https://cldup.com/sS6jT02xtn.PNG, 50%)]]" karmatosed Future Releases 39618 Insert PDF Thumbnail into Editor Media 4.7 normal normal Future Release enhancement new 2017-01-17T22:00:29Z 2019-12-09T15:38:51Z "[38949] is awesome, but the next logical move is to allow content editors to easily insert the PDF thumbnail into the Editor upon Insert Media. There will need to be a UI for allowing the content editor to choose whether to insert the image or the textual link. The easiest place for this to live without a major UI overhaul would be in the Insert Media workflow itself. In fact the ""Size"" pull-down menu doesn't really do anything right now for PDFs, so it would be a good place to add an option ""Document Link Only"", and then honour the other sizes when selected and actually insert the image. " tomauger Future Releases 42986 Insert default filters to wp_delete_file to don't delete core files. Media 4.9.1 normal normal Awaiting Review enhancement reopened 2017-12-27T11:57:51Z 2019-03-22T13:34:35Z " I am see many plugins that don't use wordpress method to delete files ( are using unink ) and exist wp_delete_file. Really you can insert filter, but I think that if didn't have filter by default you can use method to remove anything, including core files. If all agree and approve this ticket I can implement." lenon Future Releases 55840 Internationalization support for sizes added by 'edit_custom_thumbnail_sizes' filter antpb Media 6.0 normal normal Future Release enhancement assigned dev-feedback 2022-05-26T08:33:48Z 2024-01-29T20:35:15Z "The image size labels added by the edit_custom_thumbnail_sizes filter are not internationalized. {{{ }}} In a Japanese environment, there will be a mixture of translated and untranslated text. To solve this problem, the following size of translated text is prepared before the loop process. {{{ $size_names = array( 'thumbnail' => __( 'Thumbnail' ), 'medium' => __( 'Medium' ), 'medium_large' => __( 'Medium Large' ), 'large' => __( 'Large' ), 'full' => __( 'Full Size' ), ); }}} Change the following where labels are output. {{{ }}} Since image size labels are also used in the ""image_size_input_fields"" function, etc., it may be better to make them a function rather than an array. In addition, the translated text for ""Medium-Large size image height"" and ""Medium-Large size image width"" exists, but the translated text for ""Medium Large (or Medium-Large)"" does not. If you are conscious of word commonality, ""Medium-Large"" may be better than ""Medium Large"". " tmatsuur Future Releases 43023 Make Core Image Handling More Extensible Media 4.9.1 normal normal Awaiting Review enhancement new 2018-01-04T21:35:41Z 2020-08-21T03:34:07Z "As we are beginning to see many new and promising formats such as WebP (#35725), APNG, and HEIF/HEVC (#42775), it is probably time to revisit all of the image-related code in the Core, providing filters and hooks so that plugins and themes can choose to support them. Based on the work in #35725, it is clear there are a number of areas with insufficient extensibility, making it impossible for such work to be done by third-party code. [[BR]] '''WRAPPERS''' `getimagesize()`: Due to various bugs and inconsistencies within PHP, direct calls to this function should be replaced with a wrapper function capable of providing filtered responses. #35725 includes this in its patch. [[BR]] '''FILTERS''' Many functions include hard-coded datasets or conditions. By wrapping those in filters, third-party code can alter behavior accordingly. * `wp_stream_image()` * `wp_save_image_file()` * `wp_generate_attachment_metadata()` - The extensions-by-type need to be filterable. * `load_image_to_edit()` - The $mime_type switch needs a filterable default. * getid3.lib.php `ImageTypesLookup()` - Types need to be filterable. * class-phpmailer.php `_mime_types()` - Types need to be filterable. * image classes `supports_mime_type()` * class-wp-theme `get_screenshot()` - Filterable types. * `gd_edit_image_support()` - Filterable responses for both conditions. * `translate_smiley()` - Needs filterable types. * `wp_get_image_mime()` * `wp_attachment_is()` - Filterable extensions. * `wp_mime_type_icon()` - Filterable test for image files. [[BR]] '''OTHER''' There are additional areas that require more complicated solutions. * `file_is_displayable_image()` - Relies on constants which may not be defined, even in cases where an image type is actually supported. Haha. * wp-admin/includes/schema.php - $misc_exts needs to be filterable. * class-wp-image-editor-gd `load()` - Needs a filter around the resource creation. `imagecreatefromstring()` does not work consistently depending on the GD version installed. * class-wp-image-editor-gd `_save()` - Needs a filter to handle alternative MIME types. * class-wp-image-editor-gd `stream()` - Needs some means of specifying alternative headers and callbacks. * class-wp-image-editor-imagick `thumbnail_image()` - Needs some means of specifying options for different image types. * class-wp-image-editor-imagick `stream()` - Needs a shortcut filter to allow for completely different handling. (This is a quirk of the PHP extension not always properly communicating with the system binary, leading to segfaults, etc.) * class-wp-customize-media-control `to_json()` - Needs some method of altering the $type matching. [[BR]] '''ROADBLOCKS''' Additional requirements, such as defining missing PHP constants, might not be possible by the time plugin or theme code is executed. However by the time official PHP support lands, we can probably consider adding such values to the `compat.php` file (without necessarily providing a full blessing for the filetype within the Core)." blobfolio Future Releases 32622 Make the text of the Image delete AYS dialog clearer Media 4.3 normal normal Awaiting Review enhancement new 2015-06-12T02:30:01Z 2017-06-15T09:53:56Z "When you delete Images from the Media Library, the warning dialog currently reads: ""You are about to permanently delete the selected items."" This text could be a little clearer, and indicate that, once deleted: - Attached Images will not be visible in any Posts or Pages they are attached to. - Both Attached and Unattached Images will not be available online at all." lastnode Future Releases 40120 Media on mobile action links missable Media normal normal Awaiting Review enhancement new 2017-03-12T12:19:47Z 2017-03-16T19:45:14Z "The following is how on an iPhone 7 Plus the media interaction links look: [[Image(https://cldup.com/TLmN2U_8fW.PNG, 50%)]] They are smaller than the body text and also very missable at the bottom. Can we at least increase their size and see about moving to top?" karmatosed Future Releases 40124 Media on uploading only gives me edit options Media normal normal Future Release enhancement new 2017-03-12T12:32:20Z 2023-09-05T15:07:41Z "This shows on mobile but is also desktop issue. [[Image(https://cldup.com/_ZB6QmO5gZ.PNG, 50%)]] Says 'edit' but doesn't give me option to view or delete." karmatosed Future Releases 43227 Media uploaded to post should remove underscores and hyphens from text inserted into title attribute Media normal normal Future Release enhancement new 2018-02-05T11:04:43Z 2023-02-02T16:29:19Z "When adding a new image into a post my file name will typically be called something like: descriptive-name-of-image.jpg Once this image is uploaded wp will automatically set the title and will default to the name of the image ""descriptive-name-of-image"" if no title meta data is available in the image. I think a better default action would be to replace the hyphens/underscores with spaces and possibly capitalising the first letter making the title ""Descriptive name of image""." mrmadhat Future Releases 40403 Media: Allow disabling of auto-save for attachment changes in Media Library Media normal normal Awaiting Review enhancement new 2017-04-10T18:57:38Z 2017-10-16T06:45:09Z "When in the select frame of the media library and the user has selected an attachment, the fields for that attachment including the title, caption, and description can all be modified. The user may very well be expecting that the changes they are making to be ''localized'' to the current context for which they are inserting the image. For example, a user may want to provide a unique caption for an image when selecting it into one post vs the caption for the image when it is inserted into another post. Nevertheless, when the user does make a change to the caption, it will get written into the underlying `attachment` post and will thus change the caption on the `attachment` single template and any galleries in which the image appears. These are the fields in question: [[Image(attachment-fields-in-media-library-select-frame.png, width=400px)]] All of this to say that the behavior to auto-save back changes to an attachment as changes are made in the media library should be able to be disabled, or should perhaps be disabled by default if not in a management context on the Media admin screen. Also, when the media library is opened in the customizer, a user should expect all changes to be previewable without impacting the site before hitting Save & Publish. The customizer is supposed to guard against the “save and surprise” experience. In the case of the Media Library, it can be even worse because it is “auto-save and surprise” and the auto-save behavior isn't even stated. So if auto-save isn't disabled by default in the media library across WordPress in a non-management context, then at least it seems it should be disabled in the context of the customizer. The conversation for this started in the context of the image widget, and unexpected behavior for when modifying fields in the select frame versus modifying fields in the edit frame (which, as in the edit post screen, do not auto-save but are local to the post being edited). See https://wordpress.slack.com/archives/C0381N237/p1491845195064777 See also #37887, which would still allow for changes to be made in the media library, but for the changes to defer to being published until the user hits Save & Publish in the Customizer. " westonruter Future Releases 41409 No point in storing empty EXIF/IPTC data on post meta table Media 4.9 normal normal Awaiting Review enhancement new 2017-07-22T15:37:02Z 2019-01-31T21:49:00Z "- Post meta tables are bloated with often not used EXIF/IPTC data for each image attachments. - `wp_read_image_metadata()` generates `aperture`, `credit`, `camera`, `caption`, `created_timestamp`, `copyright`, `focal_length`, `iso`, `shutter_speed`, `title`, `orientation`, `keywords`. and the data often stored as empty key/value pairs on each attachment metadata. - I see no problem on filling default/empty values upon retrieving the data. - and mentioning the core currently has no way of using ''stored'' `image_meta`." geminorum Future Releases 30876 Paste an image into the Media Library Media normal normal Future Release enhancement new 2015-01-01T00:12:16Z 2018-03-30T22:44:19Z Github has some nice UX where you can paste an image into a comment. It would be nice if the Media Library supported something similar. danielbachhuber Future Releases 55535 Pre-populate Image Alt Text field with IPTC Photo Metadata Standard Alt Text joedolson* Media normal minor Future Release enhancement accepted dev-feedback 2022-04-05T21:45:25Z 2024-02-05T20:52:37Z "The IPTC Photo Metadata Standard includes the ability to embed Alt Text with a photo. Seems like it would be helpful if WordPress would check for this data when an image is uploaded, and, if it exists, pre-populate the Alt Text field with it. I could see this being especially useful for site owners who purchase stock photography; if the alt text is embedded with those images, it would save the site owner time, and it would also help ensure that an Alt Text itself is added -- and is an accurate description of the image (assuming the photographer or stock photo site actually enters a good description!). http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#alt-text-accessibility" eatingrules Future Releases 22938 Presentation of hierarchical taxonomy in Media modal should be checkboxes rather than comma-separated tag list wonderboymusic Media 3.5 normal normal Future Release enhancement assigned 2012-12-14T14:10:16Z 2018-09-24T08:07:27Z Since 3.5, using register_taxonomy_for_object_type on attachments, if the taxonomy used is hierarchical, whereas in the edit attachment UI you see the normal list of checkboxes, in the corresponding modal it is presented as a comma-separated list of slugs, as if it were a non-hierarchical taxonomy (tags rather than categories). I'm sure this is not a bug / mistake / oversight, but at best it's a little unintuitive (you need to have memorised the category slugs to add new ones) and worst a bit dangerous (risk of adding unwanted categories), and it would be great if in future it was presented here too as a list of checkboxes. yeswework Future Releases 41462 Promote media details admin page to full post page Media 4.9 normal normal Future Release enhancement new 2017-07-27T17:43:26Z 2023-10-18T16:01:34Z "Currently when editing media metadata, you either get the modern library modal with the image on the left and various fields on the right. When you click ""Edit more details"" you get a blast from the past with an old-school version of WordPress admin where everything looks uninspired and, for new users, broken. Based on user feedback it turns out some site owners use the Attachment Page feature to provide contextual info, commenting, etc for media items. One example was a teacher who uploaded student images to a gallery, then had each image link to the attachment page where further information and images were provided in the ""description"" field (so the post content) and parents could leave comments. Since media items in reality are full fledged posts with their own post content, the media details admin view should be upgraded to a full post page with proper WYSIWYG editing for the Description field, custom fields, and ability to control things like commenting. This would also be an ideal place to visualize in what posts a media item is in use across the site." mor10 Future Releases 49490 Proposal: New wrapper function and hook for creating attachments Media normal normal Future Release enhancement new dev-feedback 2020-02-21T22:44:38Z 2020-10-07T05:28:16Z "Everywhere you look for the code related to inserting a new attachment you find 3 steps are needed: 1. wp_insert_attachment 2. wp_generate_attachment_metadata 3. wp_update_attachment_metadata I see no reason not to have a wrapper function instead of having these 3 functions being repeated all over core files + 3rd party themes and plugins. Plus, as people commit changes in core mistakes are occurring [ticket:49449]. The most important reason to create this new wrapper function is to improve interoperability by adding a real hook to know when an attachment has been totally processed by core. This is needed by many plugins that work with images or caching. Right now the hook most used to know of a new attachment is `add_attachment` found in `wp_insert_post()`, but this is run before step 2 and 3, therefore attachment metadata has not been created yet. Developers are having to create a custom wrapper function to add this hook (my company included) in their projects and that means attachments inserted via WP Dashboard wont be taken into action. `media_handle_upload()` is a good example of the wrapper function I am talking about, but sadly it goes out of scope by assuming the file will be located in `$_FILES` variable instead of receiving the file by a parameter, therefore is not friendly or future proof. When that function was created I guess it wasn't taken into consideration that files can be uploaded to the server in many ways. Plus is lacking the appropriate hooks too. Even the `WP_REST_Attachments_Controller` had to create custom methods to fulfill a scenario where attachment data is being sent in the body of the request. A fast search in core for `wp_insert_attachment` will illustrate how this function is followed by `wp_generate_attachment_metadata()` and `wp_update_attachment_metadata()` in most cases: * `media_handle_sideload()` * `media_handle_upload()` * `wp_ajax_crop_image()` * `Custom_Background::handle_upload()` * `WP_Site_Icon::insert_attachment()` * `wp_xmlrpc_server::mw_newMediaObject()` * `WP_REST_Attachments_Controller` I wont even mention third party implementations I’ve found. A quick boilerplate... {{{#!php ` element to allow theme authors to define what Thumbnail, Small, Medium, and Large means. This creates Dynamic Image Sizes that change and adapt when a site owner switches from one theme to the next. === Practical Implementation === - Create new theme feature for dynamic-images - When an image size is selected (eg. ""medium""), the a class formatted as `size-[selected-size]`, (eg. `size-medium`) is added to the `` tag. - Theme developers add CSS rules for `.size-thumbnail`, `.size-small`, `.size-medium`, and `.size-large`. These rules can define whatever parameters the theme developer desires, but must include either `width`, `max-width` or both. Theme developers are also free to use media queries to change this behavior depending on viewport width. - '''Ideal, optional:''' Remove the `width` and `height` attributes from `` markup as they serve no practical purpose once RICG and class-based sizing is implemented. == Rationale == With Responsive Images in core, the modality of the image size selector no longer makes sense. The image size selector hard-codes pixel sizes to images added in posts and pages based on the physical width and height of the image file, but with the new srcset + sizes markup, these image sizes no longer have a real world rationale as the browser selects the image source dynamically. I propose a change in what happens when an image size (thumbnail, small, medium, large, original) is selected from a pre-defined pixel size to a dynamic size defined by the current active theme. This would allow theme designers and developers to add image sizes as part of their art direction and design, and displayed image sizes would change depending on the current active theme without the site owner having to make changes to individual images to make them fit. In simple terms, move from this: [[Image(http://mor10.com/wp-content/uploads/2015/06/Slide1-700x394.png)]] to this: [[Image(http://mor10.com/wp-content/uploads/2015/06/Slide2-700x394.png)]] == Backwards Compatibility == This has the potential of being a breaking change. The most obvious solution would be to make dynamic image sizes a `theme feature` along the lines of html5 comments and title-tag: {{{ add_theme_support( 'dynamic-images' ); }}} == Practical Application == This change would work within the existing framework of how WordPress adds images because the only practical change in the actual post/page is the addition of a new class in the `` tag. To apply to existing posts and pages, the classes could be added by piggybacking off the dynamic rewriting of the `` element done by Responsive Images. == Challenges == - Some authors physically resize images to fit a specific display. This in itself is a problem because it counteracts the responsive nature of the web, but it is a fact that must be considered. An implementation of Dynamic Image Sizes could cause some authors to be frustrated that their carefully sized images suddenly change display. This would likely only happen on old static-width sites as properly built themes with RWD would already override such forced sizing except for the full-width versions of images. - Currently an author can use click-and-drag behaviors to resize an image in the editor. This would be hard to replicate using the proposed CSS model, but is not impossible: One solution could be generating inline CSS for custom image sizes, and possibly adding a .size-custom class to the `` tag. Another clearner option could be to remove the click-and-drag resizing option and instead provide percentage-based options. When discussing this it is important to note that such forced click-and-drag resizing goes against the natural behavior of images in a mobile-first RWD environments." mor10 Future Releases 40869 Replacing an image in content editor Media 4.7.5 normal normal Awaiting Review enhancement new 2017-05-26T10:42:10Z 2017-05-26T13:36:33Z "Hello, I noticed a strange behaviour in WordPress User Experience while dealing with images. Let's say for example you want to replace an existing image in the content editor while creating or editing a post/page. Right now this is only possible when this 'existing' image is part of your Media Library and probably has an attachment post_id. What about people that have added images from external urls or maybe even placeholder images that have been adding to their content via custom TinyMCE buttons. When you press Edit on those images you can't easily replace them for an image inside your Media Library. I think this is a little odd and we should be able to replace any image in our editor for one inside our library so I made this little change what will make the 'Replace' button always show up in the Image Details modal. /wp-includes/media-template.php :line: 885 {{{
    <# if ( data.attachment && window.imageEdit ) { #>
    "" /> "" />
    <# else if ( data.attachment && window.imageEdit ) { #>
    "" />
    <# } #>
    }}} **Todo. While adding a new image to the editor we get a small JavaScript error. " MacPresss Future Releases 13372 Separate Image sizes for different post types Media 4.6.1 normal normal Awaiting Review enhancement reopened close 2010-05-13T07:59:07Z 2020-04-18T04:45:23Z Would be nice, especially moving forward with custom post types to have the ability to set different image sizes using an additional parameter of `add_image_size()` for different post types: Page, Post, and Custom. brandondove Future Releases 29795 Set JPEG quality for individual image_size Media normal normal Awaiting Review enhancement new dev-feedback 2014-09-29T14:20:54Z 2017-11-10T12:24:43Z "Based on this idea I would like to work on this topic: https://wordpress.org/ideas/topic/jpeg-compression-factor-for-different-image_size Usecase: If a theme use an image as a full screen background image the image quality doesn't need to be as high as for a featured image or thumbnail. The difference in file-size would benefit the webspace and the speed on page load. I can think of two ways to solve it: 1. Add a argument to add_image_size: {{{ add_image_size( $name, $width, $height, $crop, $quality ); }}} 2. Add filter for it: {{{ apply_filters( 'jpeg_quality_for_image_size', $quality, $size ); }}} In both cases the information about the current image size needs to be added to the set_quality or get_quality functions to be available." Drivingralle Future Releases 55036 Sharpen thumbnails with Imagick adaptiveSharpenImage() antpb Media 5.9 normal normal Future Release enhancement assigned close 2022-02-02T04:58:14Z 2023-05-10T15:13:27Z "The Imagick function `resizeImage()` often produces thumbnails with a low visual quality (blurry/grainy). The world is moving to small high-resolution devices, where visual quality makes a difference, and we need something better. Fortunately, `adaptiveSharpenImage()` (see https://www.php.net/manual/en/imagick.adaptivesharpenimage.php) sharpens the subject/foreground of the image, while not sharpening the background (as much). I've tested it with various `sigma` values, and `1` got me a nice enough result (`radius` was `0` == auto). However, it would be good to test ranges of image sizes and ranges of scaling ratios (original size / thumbnail size) to find out more. For even more flexibility, there should be filters on the default values of `radius` and `sigma`. This will allow developers to have finer control on specific sites that need a bit more. Alternatively, `add_media_size()` can be extended to accept `radius` and `sigma`, which can then be used during thumbnail generation. This will also be a convenient way for developers to update the sharpening settings of existing media sizes. Option: when Imagick is used, add `radius` and `sigma` fields to the definition of image sizes in Settings > Media -OR- in the customizer for site-specific control without coding. See also: #40415" galbaras Future Releases 22966 Show admin-cropped thumbnails instead of WordPress-cropped thumbnails Media normal normal Awaiting Review enhancement new 2012-12-16T22:22:59Z 2023-08-29T15:35:39Z "Used to be able to see which images have been cropped (and which ones haven't) in image search results. Now have to click 'edit image' and check the image individually. It's valuable for the publisher to see what his/her readers will see on the front end of the site when the 'thumbnail' function is called (either publisher's hard-cropped image or full un-cropped image). Useful especially for publishers that are pulling images from a time before 'thumbnails' existed in WP. Main reason this is an issue is that when an un-cropped thumbnail is selected as the featured image, it will be stretched/distorted to dimensions of thumbnail settings in function.php." beerpulse Future Releases 49830 Store rotation data for uploaded videos Media normal normal Future Release enhancement new 2020-04-06T17:44:17Z 2022-03-10T15:57:25Z If the video format supports and the data is found in the exif data, store the rotation angle in video metadata. spacedmonkey Future Releases 37255 Update attachment functions to accept a post object in addition to ID johnbillion* Media 4.6 normal normal Future Release enhancement accepted close 2016-07-02T09:26:02Z 2023-04-26T21:37:20Z "Some WordPress functions accept the $post object as parameter instead only the $post_id. Since most of the time we write our code within the loop or we use the $post object, could be an improvement to standardize the functions that require a post id even support the $post object? For the wp_get_attachment_caption for example, could be like this: {{{ /** * Retrieves the caption for an attachment. * * @since 4.6.0 * * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. * @return string|false False on failure. Attachment caption on success. */ function wp_get_attachment_caption( $post = null ) { if ( ! $post instanceof WP_Post ) { if ( ! $post = get_post( $post ) ) { return false; } } if ( 'attachment' !== $post->post_type ) { return false; } $caption = $post->post_excerpt; /** * Filters the attachment caption. * * @since 4.6.0 * * @param string $caption Caption for the given attachment. * @param WP_Post $post Attachment object. */ return apply_filters( 'wp_get_attachment_caption', $caption, $post ); } }}} The get_the_post_thumbnail_caption that use the wp_get_attachment_caption accept the $post object. Also, instead of passing the $post->ID to the wp_get_attachment_caption, use the $post object, so we can work directly with the object instead of calling again the get_post function to retrieve it." wido Future Releases 46554 Uploaded images goes to wrong folder/date structure antpb Media 5.1 normal normal 6.6 enhancement assigned 2019-03-18T11:24:37Z 2024-02-12T09:21:41Z "Hello Team All test are from fresh install, default theme, no settings change, no plugin… ""Organize my uploads into month- and year-based folders” option checked. Images upload date: 17/03/2019 Single “Test Page” published date: 27/11/2018 In WordPress 4.7 – 4.7.13 – 4.8 – 4.8.9: images uploaded from Media Library goes to …/2019/03 folder… RIGHT images uploaded from single “Test Page” goes to …/2018/11 folder… RIGHT In WordPress 4.9 – 4.9.10 – 5.0.4 – 5.1.1: images uploaded from Media Library goes to …/2019/03 folder… RIGHT images uploaded from single “Test Page” goes to …/2019/03 folder… WRONG!!! From 4.9 version has anything changed in the way WordPress handles image uploads? If YES, how to go back to the old way (thus images uploaded from single “Test Page” goes to “published date” folder… and not to “upload date” folder)? Thanks!" kartiks16 Future Releases 39330 WP_Image_Editor_Imagick: get pdf from url Media 4.8 normal normal Awaiting Review enhancement new 2016-12-19T13:59:58Z 2024-01-16T13:00:28Z It is not possible to use the class, if an url is passed as filepath. With this little patch it is possible (I know it's not perfect. Maybe someone can make it better) wordpressrene Future Releases 49746 Widening WordPress Limits and Compatibility Media 5.4 normal normal Awaiting Review enhancement new reporter-feedback 2020-04-01T00:23:21Z 2022-03-10T15:39:24Z "Version: A wish that to be in some WordPress 5.4 future minor version. Problem: WordPress ""Select image"" Dialog doesn't support inserting image from URL in all cases and if, in the case it supports, when there is an image(or any file type) inserted from a URL(specifically with dynamic-protocol URL that starts with just couple of slashes), WordPress won't save and|or implement that dynamic-protocol URL in all cases what shortens its compatibility of being compatible with browsers like Firefox security compliance and shortens its compatibility of offering the writer the freedom of making his|her blogs URLs protocols dynamic for a pitfall situation during, for example, an SSL renewing process what may stops or misbehaves his|her website. Solution: Let WordPress supports dynamic-protocol URLs anyway, let WordPress ""Select image"" Dialog supports Insert any file type from a URL anyway, and make sure they all function well and securely. Result: Widening WordPress Limits and Compatibility. - - Regards, Al bunyan, a WordPress User since WordPress first publication. I was the first Arab required to translate WordPress. http://ulike123.com/ - - " ulike123 Future Releases 59421 "loading=""lazy"" attribute is not applied at all" Media 6.3.1 normal minor Awaiting Review enhancement new 2023-09-21T06:54:52Z 2023-09-27T13:46:58Z "Steps to reproduce: Start new WordPress 6.3.1 instance. Use default twenty-twenty-three theme. Create new post. Insert some images. None of the images (including below the fold ones) get loading attribute. It is expected that below the fold images get loading=""lazy"" attribute." lovor Future Releases 39791 sanitize_file_name() optimizations Media 4.8 normal normal Awaiting Review enhancement new 2017-02-05T23:24:33Z 2018-01-20T13:49:47Z "This changeset: [29290] added this line: {{{#!php $filename = str_replace( array( '%20', '+' ), '-', $filename ); }}} But because of this changeset it can be removed as those chars aren't present anymore: [35122] '''Additional proposals''' 1.) After many years new special characters are added step-by-step to sanitize_file_name(). Now almost all characters of the reserved file system, reserved URI and unsafe URL characters lists are part of it, except of: reserved file system chars (https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words) {{{ chr(0), ..., chr(32) }}} the reserved URI char (https://tools.ietf.org/html/rfc3986#section-2.2): {{{ @ }}} the unsafe URL char (https://www.ietf.org/rfc/rfc1738.txt): {{{ ^ }}} non-printing DEL: {{{ chr(127) }}} Finally you should add all these chars to avoid future bug reports: {{{#!php $special_chars = array( // file system reserved https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words '<', '>', ':', '""', '/', '\\', '|', '?', '*', // control characters http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx // note: \t, \n and \r are chr(9), chr(10) and chr(13) chr(0), chr(1), chr(2), chr(3), chr(4), chr(5), chr(6), chr(7), chr(8), chr(9), chr(10), chr(11), chr(12), chr(13), chr(14), chr(15), chr(16), chr(17), chr(18), chr(19), chr(20), chr(21), chr(22), chr(23), chr(24), chr(25), chr(26), chr(27), chr(28), chr(29), chr(30), chr(31), // non-printing character chr(127), // non-breaking space chr(160), // URI reserved https://tools.ietf.org/html/rfc3986#section-2.2 '#', '[', ']', '@', '!', '$', '&', ""'"", '(', ')', '+', ',', ';', '=', // URL unsafe characters https://www.ietf.org/rfc/rfc1738.txt '{', '}', '^', '~', '`' ); }}} If you do that, do not forget to change this line: {{{#!php $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename ); }}} to that (because we replaced the other chars already): {{{#!php $filename = preg_replace( '/[ -]+/', '-', $filename ); }}} and remove this line because we cover it already through chr(160): {{{#!php $filename = preg_replace( ""#\x{00a0}#siu"", ' ', $filename ); }}} Source: https://en.wikipedia.org/wiki/Whitespace_character#Unicode 2.) mb_strtolower() could be used to raise windows/unix interoperability (when downloading ftp backups or moving the host) because of their different behaviour in case-sensitivity. " mgutt Future Releases 40915 wordpress should issue a warning if no graphic library is installed Media 4.7.5 normal normal Awaiting Review enhancement new 2017-06-03T14:58:23Z 2017-06-10T07:07:59Z "Hi people! I've installed wordpress on my site, and I had no library for image manipulation installed. Iin that case, I got no thumbnails. Due to css of my site, I was not initially aware of my site, cause the layout was right. So, I think that a warning on admin to the ones that don't have GD or imagick installed could be a good thing. I know that this is a strange corner case :)" waltercruz Future Releases 43263 wp_audio_shortcode() preload default: should it be metadata or none? Media 3.6 normal normal Awaiting Review enhancement new 2018-02-08T19:17:59Z 2018-02-08T19:45:50Z "Using this ticket to open a discussion about the `audio` tag’s `preload` attribute defaulting to `none` in `wp_audio_shortcode()`. `none` won’t display the audio’s total time in the player (until the user hits play). So the effect of this default is millions of sites’ players display total times of “00:00”. (You can specify preload as a shortcode attr, but most sites don’t. ) Setting the `preload` attribute to `metadata` does extract and display total time upon page-load. Also `metadata` is both the `wp_video_shortcode()` default and the HTML-spec suggested default (to browser makers): https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-preload Bandwidth might be the valid concern, tho, as some browsers preload an excessive amount of metadata (I'm looking at you, Chrome) . See results of tests by @blobfolio: https://wordpress.slack.com/archives/C02SX62S6/p1518116191000138 FYI, the default `'preload' => 'none'` is here: https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/media.php#L2223 FYI-2, you can change that with the `wp_audio_shortcode` filter (via regex on the HTML output): https://gist.github.com/hearvox/098774e9887442d39ddc6e34bedb10b1" hearvox Future Releases 41895 wp_calculate_image_srcset filter: Improve the documentation for, or rename, this filter so it's clear it should work on an array. Media 4.9 normal normal Awaiting Review enhancement new 2017-09-16T18:29:18Z 2017-09-16T20:25:06Z "= The Problem = Despite having the same name as the `wp_calculate_image_srcset()` function and being inside of that function the `wp_calculate_image_srcset` filter, [https://core.trac.wordpress.org/browser/tags/4.8.1/src/wp-includes/media.php#L1203 here in the current release], does not directly modify the output of the function as convention would dictate. This leads to confusion, so theme and plugin developers do things that lead to bugs. The `wp_calculate_image_srcset` filter filters the `$sources` variable, which is an array of arrays, each containing information about one of the image sources that WP has decided to add to the srcset. However the `wp_calculate_image_srcset()` ''function'' returns either a string HTML [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img srcset attribute for use on an img tag] or false if there's only one source or some other failure. Because the `wp_calculate_image_srcset()` ''function'' can return false, developers assume that `wp_calculate_image_srcset` filters can return false as well, thus converting the `$sources` array into a boolean `false`. This causes a problem when a second plugin or theme also tries to filter `wp_calculate_image_srcset` and tries to loop over the values in `$sources`, (`foreach( false)` causes a PHP warning). = Real-World Examples= This is happening in the real world: If you're hosted on WPEngine, and use Themeco's X or Pro theme, the PHP warning pops up in some of your pages, (especially in WPEngine's staging environment). This is because X and Pro use `wp_calculate_image_srcset` to change `$sources` to false, then WPEngine's Must-Use plugin tries to iterate over `$sources`. When contacted about the problem, (with the suggestion they return an empty array), Themeco's response was ""In looking over WordPress' official documentation for that function/hook, I believe that boolean false should be the correct value to return"" with a link to the documentation for the ''function''. When the issue was raised in the the [https://www.facebook.com/groups/advancedwp/ Advanced WP Facebook Group] a prominent member of the WP community [https://www.facebook.com/groups/advancedwp/permalink/1624922314236643/?comment_id=1625126477549560&reply_comment_id=1625763707485837¬if_t=group_comment_reply¬if_id=1505579798429304 appears to have made the same logical jump], that the filter filters the output of the function, and wouldn't listen to any further discussion. = Possible suggestions to improve the situation = 1. If we're ok with setting `$sources` to false, the docblock for the `wp_calculate_image_srcset` filter should be changed to indicate that the `$sources` variable being passed to a filter may not be a variable. 2. If we're not ok with setting `$sources` to false, maybe we should add a `_doing_it_wrong()` if `$sources` type is changed from an array. 3. Whatever we do, we should document an expected return type in the docblock for the filter. 3. Since the filter doesn't actually filter the output of the function, the filter name could be changed to something like `wp_calculate_image_srcset_sources`. I know this is a breaking change, which may never happen because it's a breaking change, but it would be the best fix, if breaking changes can be dealt with." johnnyb Future Releases 30377 wp_check_filetype is broken when checking urls with parameters audrasjb Media 4.0 normal normal Future Release enhancement reopened 2014-11-18T05:05:03Z 2022-04-08T04:24:45Z "The function in ./wp-includes/media.php named wp_check_filetype has a bug. It works properly when checking a url such as http://example.org/coolfile.mp4 but as soon as you add parameters to it (a common practice when attempting to embed un-cached or amazon pre-signed urls) like so: http://example.org/coolfile.mp4?extra=true¶ms=true ... it fails to return the extension / content type. The fix for this should be *very* easy. The preg_match in this function that looks like this currently: {{{ $ext_preg = '!\.(' . $ext_preg . ')$!i'; }}} could be adjusted to ignore the query string (if there is one) and just return the true extension like so: {{{ $ext_preg = '!\.(' . $ext_preg . ')(\?.*)?$!i'; }}} I've tested this change in my local environment and it works great. " supercleanse Future Releases 30180 wp_get_attachment_image_src does not return alt or meta antpb Media normal normal Future Release enhancement assigned 2014-10-29T18:42:55Z 2023-07-21T15:37:32Z "In practical use,wp_get_attachment_image_src is very useful for displaying an attached image - but requires a separate call to get any other image meta or the alt attribute. In addition to making any application that needs alt attr or meta data for display simpler, having the alt attribute present in this function increases the likelihood that developers will use the alt attribute in their ultimate output. " joedolson Future Releases 38560 Add support for uploading arrayed $_FILES Media normal normal Future Release feature request new needs-unit-tests 2016-10-29T13:11:24Z 2017-08-10T17:33:05Z "When you have form code that references [several file uploads](http://php.net/manual/en/features.file-upload.multiple.php) as array, the media_handle_upload() function fails to handle this. For example this: {{{ }}} Will result in a $_FILES array that's creates subarrays shaped like so: {{{ $_FILES['userfile']['name'][0] $_FILES['userfile']['name'][1] $_FILES['userfile']['tmp_name'][0] $_FILES['userfile']['tmp_name'][1] $_FILES['userfile']['size'][0] $_FILES['userfile']['size'][1] $_FILES['userfile']['type'][0] $_FILES['userfile']['type'][1] }}} This will fail when passed to media_handle_upload, since [https://core.trac.wordpress.org/browser/tags/4.5.3/src/wp-admin/includes/media.php#L281 the implementation does not handle this array structure] nor is this documented." kontur Future Releases 48488 Easier disabling of PDF thumbnail creation Media 4.7 normal normal Future Release feature request new dev-feedback 2019-11-03T20:14:48Z 2019-12-03T16:49:09Z "Since #31050 wordpress automatically creates thumbnails for uploaded PDF Files by creating a second attachment post object with the extracted image. While this may be useful for many use cases, in some like ours it is not. Furthermore, it is possible to turn of thumbnail creation for audio and video by using the following simple code ( {{{#!php everything is previewed properly in thumbnails as well as all files are properly uploaded when checked via ftp. 3. Now check the ""Organize my uploads into month- and year-based folders"" checkbox. 4. Drag and drop a new image to upload inside the library. 5. The thumbnails for the images aren't shown in the library. You only see questionmark placeholders. 6. But if you check via ftp the source files are actually there inside the designated yearly and monthy subfolders but as mentioned not shown in the library. 7. if you uncheck the checkbox in the media preferences again and upload a new image everything works out again and the previews are shown again. Cheers r. " rkoller Future Releases 35085 "Image editor not cropping correctly when image size is the same as ""Large Size"" in media settings" Media 4.4 normal normal defect (bug) new 2015-12-14T22:49:02Z 2019-06-04T20:19:52Z "This issue was reported as an issue for the plugin Imsanity here: https://wordpress.org/support/topic/imsanity-breaks-the-image-editor?replies=10 However, after research, it appears this behavior happens regardless of the plugin. A video demonstrating the error is at: https://www.youtube.com/watch?v=3a6UbuPrlmU&feature=youtu.be To reproduce: 1. Ensure media settings for ""Large Size"" are set to 1024px 2. Upload a landscape image with a width of exactly 1024px to the media library 3. Click the ""Edit"" button to edit the image, and use the crop tool to make an obvious change. The image will appear to have been cropped at this point 4. Click the ""Save"" button and now the image will no longer appear to be cropped The image now seems to be in an unknown state where the preview shows the un-cropped version, but in the editor the crop shows correctly. " verysimple Future Releases 26848 Image thumbnail on large images with ratio of 4:1 markoheijnen Media 3.8 normal minor defect (bug) assigned 2014-01-16T16:12:43Z 2019-06-04T20:06:26Z "I have been running into this issue on WordPress 3.7.1 and 3.8. I haven't tested it in older versions. I'm uploading an image that's 2000px x 500px. The theme uses add_image_size for a variety of different thumbnail sizes but the only one that's an issue is 480px. The URL to the thumbnail is being retrieved with wp_get_attachment_image_src( $thumbnail_id, 'mobile' ) for use with some CSS. Chrome is recognising it as a 1px x 1px image with a MIME type of image/png. When you open the image URL it appears correctly. '''Steps to reproduce:''' add_image_size( 'mobile', 480, 0, true ); in functions.php Upload a blank image at 2000px x 500px I also found in Chrome that when going to my uploads folder and selecting the image that's 480px x 120px I can't save the image with CMD SHIFT S yet I can with any of the other images. I have tried removing all plugins and using the default theme. The only modification I made was to add the image size. I changed the image library from libgd to imagemagick. Changing the image size from 480px to 479px works." nathan_dawson Future Releases 24888 In image editor, cropping scale gets applied off by 0.4% Media 3.5 normal normal defect (bug) new 2013-07-30T13:55:51Z 2019-06-04T20:05:48Z "When you scale the crop preview, the editor does not keep the right ratio. To reproduce this error: - Upload an image with 4608 x 3072 - On the crop feature, create an selection with 1680 x 560 - Hold shift and scale to fit all image width (4608px) - The height result was 1544px, that is wrong, the correct is 1536px. " diegomarangoni Future Releases 22869 Large Image Uploads Don't Error Well Media 3.4 normal normal defect (bug) assigned 2012-12-12T05:10:10Z 2019-06-04T20:04:18Z "Related to #22849 but not restricted to the new uploader. Happens on 3.4 and 3.5 in different ways. To Reproduce: Upload https://objects.dreamhost.com/ipstenu-images/sunset_2_22_11_by_kenshinkyo-d3a6slk.jpeg to your WP install in the media-new.php page Note: Image is 12600x9450 and 4.9MB Expected Outcomes: * Shared hosted without a lot of memory: Failure, not enough memory, no image uploaded. * VPS/Dedicated with tons of memory: Success Actual outcomes: * VPS as expected. * Shared not so much. You get the errors as expected however the failure is not correct. The image actually does upload, contrary to the errors, however no thumbnails are made, which then causes a memory problem as the full size image shows when you go to any media library view (in lieu of actual thumbnails). This crashed Chrome (as @markjaquith saw when we were testing Monday night) until I deleted the large images. The actual issue is on thumbnail creation, so the best 'fix' I can think of is if on failed thumbnail gen, it nukes the master image, but I don't know if that would make sense since some of the thumbnail gen might be on extra image sizes set by themes/plugins. Then again, do you want those if all fail? " Ipstenu Future Releases 29904 Make images viewable while editing a gallery Media normal normal defect (bug) new 2014-10-09T14:37:07Z 2019-06-04T20:09:33Z "Ordering images in a gallery can be very difficult when you are limited to thumbnails. Users must switch back and forth between their post and their camera roll to identify each image and make sure each is in the proper place. Click/tap to view an image is a common pattern that is missing here. Some use it elsewhere to reassure themselves that they uploaded the right images and put them in the right order. First reported in: https://make.wordpress.org/flow/2014/06/02/kibble-viewing-images-while-editing-a-gallery/" obenland Future Releases 34467 Media Library after removing bulk removing all images on page Media 4.3.1 normal normal defect (bug) new 2015-10-27T15:13:52Z 2019-06-04T20:17:20Z In the Media Library if you go to say the last page and bulk delete all the images, you will be 'stuck' on that page - pagination is removed despite there still being previous pages in the library that I could be brought back to. sorensenss Future Releases 30243 Media Library cached, does not update when other users add images Media 3.5 normal normal defect (bug) new 2014-11-03T22:28:26Z 2019-06-04T20:09:47Z "When you open a post or page in the editor, and you click Add New, the media library pops up a grid with the n most recent images. If you upload something new, it's added to the list. However, if a colleague uploads something new (via another computer or browser), then you don't see the image the colleague uploaded in the media library — unless you search for it. " paulschreiber Future Releases 47529 Media manager doesn't display cropped images Media 4.9 normal normal defect (bug) reopened dev-feedback 2019-06-12T09:19:59Z 2019-06-14T14:59:22Z "Media manager doesn't display cropped images We should change the display to list mode to view cropped images " dedidata Future Releases 20057 Media upload for multi-webserver setups introduces a nasty race condition that could corrupt uploaded files Media 3.3.1 normal normal defect (bug) new 2012-02-17T05:46:40Z 2020-02-26T20:25:24Z "I am in the process of scaling a Wordpress blog with several million monthly pageviews, and I have designed a plan to scale it in the highest availability manner possible. '''The setup''' Each web server that hosts HTML/PHP, static files, and uploads will be replicated via rsync from time to time and sitting behind a load balancer. Rsync will run every 5min to 1 hour, and to mitigate the 404s in the uploads, I put together an nginx setup that automatically tries a different upstream server in its configuration when it encounters 404s. This allows any web server to go down at any time, and the system to run as if nothing happened. This also gives me freedom for rsyncing periodically rather than immediately and avoids 404s completely. '''The problem''' Now, the bug (note, I'm using Windows Live Writer which automatically names uploads image.png, but I could see this potentially happen without WLW too since WP seems to automatically name files on disk in case of collisions). Let's say we have server A and B. The site name is foo.com. Let's also say B is out of date by an hour and a bunch of files got uploaded to A that aren't on B. Say, A has image.png and image2.png and B has only image.png. Now, the issue is that if the load balancer directs the new post uploader (the new post contains a single image) to server B, the file that it will create on disk will be named image2.png rather than image3.png. So now B will have a file that's different from A's but is named the same way. The main problem is that the file name is given based on what's available on the disk rather than according to the database. It's easy for this race condition (between rsyncs) to destroy the integrity of the files. Furthermore, and I've experienced this first hand), if you delete the attachment from the Wordpress UI, it could actually delete the wrong file from the wrong server as a result. Seeing this, I can't continue with my scaling plan until file names are assigned by the database rather than the file system or I figure out how to mitigate that. I don't want to force all writers to use only server A for uploads using its direct IP, as I want HA (high availability). Thank you." archon810 Future Releases 29458 No longer able to catch click event of dashicons edit/delete Media 3.9 normal normal defect (bug) new reporter-feedback 2014-09-01T19:55:53Z 2019-06-04T20:08:56Z "In WP4 RC it's no longer possible to catch the dashicons edit button click through the tinyMCE onclick event. For example: {{{ tinymce.activeEditor.on('click', function() {alert('clicked')} ) }}} Never alerts. Is there a reason something's doing preventdefault or preventBubble? 3.9 was not affected by this. Are all shortcodes now '''required''' to do wp.mce.views.register(shortcodename, object) and include edit: function in the object? Related: (#28169)" programmin Future Releases 35077 Post featured image: image attributes not updated on the fly Media 4.4 normal normal defect (bug) new 2015-12-14T15:31:40Z 2019-06-04T20:19:41Z "Noticed while investigating on #35076. When a post has a featured image, users can click the image to set a new featured image or edit the current one. When editing the current image attributes, changes are not reflected live in the UI after the image is inserted again. To reproduce: - edit a post with a featured image - click on the featured image - in the media dialog, update the current featured image alt attribute - click the button ""Set featured image"" - check the featured image in your console inspector: the alt attribute is not updated Looks like the AJAX action `wp_ajax_set_post_thumbnail` takes into account only the ""set"" and ""delete"" cases, there's nothing to handle an update. Additionally, when removing a featured image '''and''' there's some error and the response is `0`, `WPRemoveThumbnail` should trigger an alert with a message but `setPostThumbnailL10n` is undefined (the related `set-post-thumbnail` script is not enqueued at all, I'm guessing it was used in the old media uploader)." afercia Future Releases 31258 SVG replaced by default image in media library Media 4.1 normal normal defect (bug) reopened 2015-02-07T16:47:13Z 2019-06-04T20:11:11Z "I have enabled svg support for the media library. In Wordpress 3.9 I could nicely upload an svg file and it would show a thumbnail of the svg image in the media library. Now I've updated to Wordpress 4.1 and now all the svg files are replaced with a default image and a text stating the title of the svg file. Although, everything still works (I can still add the svg file and so on), it was very handy to see what the svg file looked like. Is there are reason why this is changed? Is there something I can do to change it back? By the way, I've tried this in a fresh new Wordpress install without any other plugins and using a default theme. " Automatic-rock Future Releases 35837 The auto-update in media editor rewrites user inputs Media 4.4.2 normal normal defect (bug) new reporter-feedback 2016-02-15T13:04:34Z 2019-06-04T20:22:32Z "Hello while the media editor is opened in ""lightbox"" where the auto-upade is applied the input fields loose their focus on each autoupade making the editing really uncomfortable. see this video https://youtu.be/ULmiAf2N6kA all the fields that you can see in this video were hooked up like so: https://gist.github.com/twentyfortysix/d7dcdc931aed3f2529a9#file-register_media_field-php" o----o Future Releases 36789 Upload Folder Bug Media 4.5 normal normal defect (bug) new reporter-feedback 2016-05-09T10:46:03Z 2019-06-04T20:24:40Z "Affected Version 4.5.x If changing the upload folder path in wp-config.php (define( 'UPLOADS', 'media' );) - no image will work after update to 4.5.x, because the url path structure changes in the sourcecode. for example: " netzilicious Future Releases 33337 WordPress crashes in Chrome when trying to upload images too quickly into Media Library Media 4.3 normal major defect (bug) new reporter-feedback 2015-08-11T10:30:58Z 2019-06-04T20:15:30Z "Steps to reproduce 1) Use Chrome and a wordpress installation with at least few images, the more images, the easier to reproduce. 2) Create new post 3) Click Add Media 4) Whilst the Media Library is loading all of the images, try to drag new images into the window to upload. The result is that Chrome crashes. It seems as though the trying to drag images into the window before the ""Drag to upload"" function is loaded kills it. " tstania Future Releases 29634 gallery bulk upload Media 4.0 normal normal defect (bug) new 2014-09-11T22:38:24Z 2019-06-04T20:09:10Z when i am uploading alot 500 images, and then some error happens... i don't have any way to retry uploads on queue , showing a list with numbers would help to verify how many elements are loaded and if are the same that we have selected. joxxxe Future Releases 31252 grid view in media library malfunctioning in Simplified Chinese install Media 4.1 normal normal defect (bug) new 2015-02-06T21:22:33Z 2019-06-04T20:11:07Z "Media library grid breaks in Simplified Chinese install. https://wordpress.org/support/topic/the-grid-view-of-media-gallery-is-malfunctioning-in-simplified-chinese-install?replies=1" kidsguide Future Releases 17061 media_sideload_image() allows upload of 301-redirected non-images chriscct7* Media 3.1.1 normal normal defect (bug) accepted 2011-04-06T14:39:09Z 2019-06-04T20:02:39Z "When you give {{{media_sideload_image()}}} URLs that are not images, an error is raised. If for example I do: {{{ media_sideload_image(""http://google.com"", $post_id, $img_desc); }}} then I get this error: {{{ Sorry, this file type is not permitted for security reasons. }}} And this is absolutely normal and expected. But there is a case when {{{media_sideload_image()}}} do not detect non-images. This case is when the URL given to the function looks like an image but is redirected by Apache to another place. For example, on my server, this URL: {{{ http://coolcavemen.com/e107_plugins/autogallery/Gallery/default.jpg }}} redirects to: {{{ http://coolcavemen.com/photos/ }}} Now if in some PHP code I do: {{{ media_sideload_image(""http://coolcavemen.com/e107_plugins/autogallery/Gallery/default.jpg"", $post_id, $img_desc); }}} then no error is raised and I end up with the HTML served at {{{http://coolcavemen.com/photos/}}} being uploaded to my WordPress site as-is: {{{ kevin@kev-laptop$ file ./wp-content/uploads/2011/04/default.jpg ./wp-content/uploads/2011/04/default.jpg: HTML document text }}} Of course this upload appears broken in the media manager, as you can see in this screenshot: http://twitpic.com/4hlyks" anonymized_154007 Future Releases 36803 ms-files.php: inconsistent behaviour for upload visibility on archived sites Media 4.5.2 normal normal defect (bug) new 2016-05-10T15:14:11Z 2019-06-04T20:24:50Z "Hey, i just ran into an odd issue on one of our clients Multisites. I archived the said site and – as you know – it remains accessible for network admins. The matching files however don't. I followed this down to ms-files.php::21ff. {{{#!php archived == '1' || $current_blog->spam == '1' || $current_blog->deleted == '1' ) { status_header( 404 ); die( '404 — File not found.' ); } }}} You see that ms-files.php checks, if the blog is archived (or spam or deleted) and than throws out a 404. Shouldn't this include a check for network admin users to see the files? Or, if that's not desirable, couldn't we make this check accessible for filters? Thanks for the good work! Christian " antwortzeit Future Releases 35648 the_post_thumbnail sets srcset with http protocol Media 4.4 normal normal defect (bug) new reporter-feedback 2016-01-28T16:28:48Z 2019-06-04T20:21:48Z "We have a wordpress site that uses https always, when we use the_post_thumbnail, it returns HTTPS for the SRC attribute but it returns HTTP values for the SRCSET attribute. This is not a duplicate of #28261 or #15928 because this only happens on the srcset attribute. We had to do this filter in order to do a quick patch: {{{#!php \n""; }}} 2. L1820 in wp-includes/media.php (https://github.com/WordPress/WordPress/blob/3.9.1/wp-includes/media.php#L1820) {{{ if ( 'mediaelement' === $library ) $html .= wp_mediaelement_fallback( $fileurl ); }}} Plugin author should be able to add arbitrary HTML code before and inside the `