in the file which is pretty confusing. It probably makes more sense to set the `post_author` as 0 or set it to the site owner.",wecanwang
Needs Patch,37597,served oEmbed from cache even when expired,,Embeds,4.0,normal,normal,Awaiting Review,defect (bug),reopened,,2016-08-08T11:37:17Z,2018-03-05T15:26:53Z,"There is wrong condition in wp-includes/class-wp-embed.php
Embeds are pulled from cache even if $cached_recently is false = expired.
This condition:
{{{#!php
usecache || $cached_recently ) {
}}}
should be changed to:
{{{#!php
usecache && $cached_recently ) {
}}}",zabatonni
Needs Patch,58840,Add Canva as an oEmbed provider,,Embeds,,normal,normal,Future Release,enhancement,new,,2023-07-18T15:06:41Z,2023-08-24T14:38:34Z,"**Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”**
It is quite popular with over 100 million users according to Wikipedia.
**If similar services are already supported, how does this service compare in terms of size, features, and backing?
**
Not sure.
**Does this service have an established social media presence?**
Almost 300k followers on Twitter: https://twitter.com/canva
**Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)**
Only found https://www.canva.com/embeds/ and https://www.canva.dev/blog/engineering/how-canva-makes-content-embeddable-and-why-you-should-too/ about this
**Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being added to the allow-list?
**
oEmbed discovery does not work for Canva because the meta tag is very far down in the page source and WP only parses the first few KB of the response.
**Does the service make an effort to build relationships with developers, such as through robust APIs?**
Not sure. They do seem to have good dev docs and an engineering blog.
**How old is the service?**
Over 10 years old.
**Does it have a well-established Wikipedia article? (Seriously.)**
Yes. https://en.wikipedia.org/wiki/Canva
**Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?**
Years ago they had their own official WordPress plugin but it has been abandoned: https://wordpress.org/plugins/canva/
**Is the provider frequently proposed?**
First time AFAIK.",swissspidy
Needs Patch,59299,Add Felt.com to the list of oEmbed providers,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2023-09-06T15:45:40Z,2023-10-08T23:10:54Z,"I'd like to request whitelisting the Felt.com's oEmbeds. Their mapping platform is both robust and user-friendly, and would be a great addition to WordPress users interested in sharing maps online.
Here's an example URL: https://felt.com/map/Learn-to-Use-Felt-Tutorial-0xljGYVlRzGfxNgRV9A6akC?loc=40.7849,-73.97533,13.94z&share=1
**Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”**
It's probably not mainstream yet, but it's a very well-known service in the GIS community.
**If similar services are already supported, how does this service compare in terms of size, features, and backing?**
As far as I know, core doesn't whitelist embeds for other mapping platforms. To embed maps from other providers (OpenStreetMaps, Google, Mapbox, etc.), a map block is required.
**Does this service have an established social media presence?**
Yes.
https://twitter.com/felt
http://threads.net/@feltmaps
http://mas.to/@felt
https://www.youtube.com/@feltmaps
**Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)
**
It's supported, but as far as I know, it's not documented in their dev documents https://feltmaps.notion.site/Getting-Started-With-The-Felt-API-69c8b02b7d8e436daa657a04a2dbaffa
**Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being added to the allow-list?**
Yes, the embed is discoverable.
**Does the service make an effort to build relationships with developers, such as through robust APIs?**
**How old is the service?**
The company was founded in 2021, the platform was launched at the beginning of 2022.
**Does it have a well-established Wikipedia article? (Seriously.)**
No, but they are contributors to several big open-source projects. More information https://felt.com/open-source, https://felt.com/blog/felt-flagship-member-of-qgis, and https://blog.qgis.org/2023/03/21/felt-is-our-first-sustaining-member
**Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?**
No, as far as I know.
**Is the provider frequently proposed?**
No, this would be the first time.",javiarce
Needs Patch,54434,Add Zoomable as an oEmbed provider,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2021-11-13T03:11:21Z,2021-11-18T14:21:39Z,"We would like to apply to become an embed provider on WordPress.com.
As requested, here are the answers based on the questions from the WordPress Documentation site.
https://developer.wordpress.com/docs/embedding-on-wordpress-com/
**1. How many active monthly users does your service have?**
It fluctuates between 3.1K to 17K, depending on the contents and how the creators promote their work.
Case in point: Twitch Atlas Vol. 2. Work like this typically draws a lot of traffic with the help of social media.
https://www.reddit.com/r/LivestreamFail/comments/m3r9o6/twitch_atlas_vol_2/
**2. Do you have a WordPress.org plugin?**
We do have a plugin for WordPress but not on WordPress.org.
https://zoomable.ca/zoomable_for_wordpress.html
**3. How many self-hosted WordPress sites currently embed your service?**
Regrettably, we don't have this information at hand. However, we do have a non-exhaustive list of public sites that embed to our service available on our website.
https://zoomable.ca/sites_using_zoomable.html
**4. Does your service already support oEmbed?**
Yes as we are one of the providers on embed.ly https://embed.ly/provider/zoomable
Our service can be embedded on the following sites:
- Medium (oEmbed)
- Matterport (oEmbed)
- Squarespace (oEmbed)
- Wix (oEmbed)
- Shopify (iframe)
- Weebly (iframe)
**5. What are the URL scheme and oEmbed API endpoint for your service?**
URL 1 (Free Account): !https://srv2.zoomable.ca/*
oembed_url: !https://srv2.zoomable.ca/oembed
oembed_scheme: !https://srv2.zoomable.ca/viewer.php*
example_url_1: https://srv2.zoomable.ca/viewer.php?i=imgecf402ea70b2e191_Spain_and_Portugal_rail_WM_6000px
example_url_2: https://srv2.zoomable.ca/viewer.php?i=img3f3680be627ab64b_Dulle_griet_resto
example_url_3: https://srv2.zoomable.ca/viewer.php?i=imgca0e93b71726ba80_BaffinBay
URL 2 (Paid Account): !https://community.zoomable.ca/*
oembed_url: !https://community.zoomable.ca/oembed
oembed_scheme: !https://community.zoomable.ca/image/*
example_url_1: https://community.zoomable.ca/image/iiCh
example_url_2: https://community.zoomable.ca/image/iBx0
example_url_3: https://community.zoomable.ca/image/iV26
**6. What is an example valid URL that we can use to test embedding your service?**
See 5.
**[What We Do]**
Zoomable is an image conversion service that turns high-resolution image (3000 x 3000 px and beyond) into a zoomable image. The zoomable experience invites users to examine the image in greater details.
Our service is mentioned in a few wiki entries such as Deep Zoom (the technology that our service is based on), Seadragon Sofware, and Image Composite Editor. Although we don't have a designated page on Wiki, we have an entry on Crunchbase.
https://www.crunchbase.com/organization/zoomable
**[Our User Base]**
Our service caters to a variety of sectors, with strong user base in the creative and cultural sector. We have showcased some of our users on our website. https://zoomable.ca/sites_using_zoomable.html
Here are some highlights:
**1. 200 Panel Orion Mosaic by Matt Harbison**
http://spaceforeverybody.com/Orion/
The above work was featured on Petapixel
https://petapixel.com/2020/10/23/this-insane-2-5-gigapixel-image-of-the-orion-constellation-took-five-years-to-complete/
**2. An article on Stuff.co.nz, New Zealand’s leading news website (the zoomable image is at the end of the article).**
https://www.stuff.co.nz/environment/300283917/taniwha-in-the-valley-hutt-river-is-both-threatened-and-threatening--but-is-it-just-misunderstood
**3. British Library: Hebrew Manuscripts exhibition (Virtual Tour on Matterport platform)**
https://t.co/H0mo8Q7hbf?amp=1
**4. National Lottery Heritage Fund: Shared purpose and a clear direction — building our first roadmap (Medium article)**
https://medium.com/doing-service-design-at-the-national-lottery/shared-purpose-and-a-clear-direction-building-our-first-roadmap-4795e605a3dd
**5. A Dystopian City in a Box (Squarespace site, the zoomable image is at the end of the article)**
https://www.ruchikanambiar.com/the-lilliput-proletariat
**6. Mike Hall (Shopify store)**
https://shop.thisismikehall.com/products/a-panorama-of-london-original-version-giclee-print
**7. Ohio County Public Library: Map of the City of Wheeling and Suburbs Ohio Co. Virginia, 1853**
https://www.ohiocountylibrary.org/archives/map-of-the-city-of-wheeling-and-suburbs-ohio-co.-virginia-1853/7408
We believe our service will provide an additional tool for the creators to showcase their work easily on WordPress.com.
We look forward to hearing from you. Please let us know if there are areas that we need to work on to make this request feasible.
Thank you for your time.
Zoomable Team",zoomable
Needs Patch,51738,Adding Adventr as an oEmbed provider,,Embeds,,normal,normal,Future Release,enhancement,new,,2020-11-09T22:13:12Z,2023-05-30T17:12:26Z,"This ticket is a request to have *.adventr.io added to the list of whitelisted oEmbed providers.
Adventr.io is a popular smart video creation tool that allows any creator to make and publish branching videos with personalized choose-your-own-adventure outcomes. It also allows creators to make parts of their videos into clickable links, so that viewers can learn more about things they see in the video.
**Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”**
Adventr is being used by major brands and has been covered in mainstream press such as TechCrunch, Rolling Stone, and more.
https://techcrunch.com/2014/05/13/adventr-launch/
https://www.rollingstone.com/music/music-country/texas-gentlemen-floor-it-movie-1076359/
**If similar services are already supported, how does this service compare in terms of size, features, and backing?**
Adventr would be the **only** white-listed provider of interactive video experiences. Adventr is the most feature-rich and robust platform for creating and publishing smart videos.
**Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?**
Adventr is not very active on social media (handle is adventrhq), but its founder & CEO has a verified Twitter account: https://twitter.com/springsteezy
**Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)**
We have oembed API documentation:
https://help.adventr.io/en/articles/4613290-adventr-oembed-api
Adventr is also supported by Embedly: https://embed.ly/provider/adventr
**Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being whitelisted?**
It only partially works. WordPress's sandbox settings disable links and sharing within the embed, resulting in making some interaction elements and all share options non-responsive. Wordpress also prevents full-screen playback.
In the Rolling Stone article (which is powered by Wordpress) where they embedded an Adventr, clicking any share option fails, fullscreen fails, and links outside of the video also fail: https://www.rollingstone.com/music/music-country/texas-gentlemen-floor-it-movie-1076359/
**Does the service make an effort to build relationships with developers, such as through robust APIs?**
Adventr currently offers a realtime javascript API that our creators can use to make in-video interactions affect other parts their page. Details on this API are available here: https://help.adventr.io/en/articles/4467154-using-the-adventr-realtime-player-api
This API will be developed over time and allow creators to do more and more interesting things in the future.
**How old is the service?**
Adventr was originally founded in 2014 and rebranded with a new look and a brand-new HTML5 player in 2020.
**Does it have a well-established Wikipedia article? (Seriously.)**
Adventr's founder has a well-established Wikipedia article: https://en.wikipedia.org/wiki/Devo_Springsteen
**Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?**
Not yet, but there is plugin potential if someone wants to take advantage of the realtime player API and integrate it with other Wordpress plugins like WooCommerce etc.
**Is the provider frequently proposed?**
I believe this is the first time it is being proposed here.
Our own users have written multiple support requests due to issues with Wordpress embeds, leading us to write a support article explaining how to use Custom HTML instead of Wordpress Embeds. However, this adds complexity to the use of Wordpress and makes it harder to take advantage of Wordpress's responsive sizing. For Wordpress users who are posting content created by other Adventr users (as in the Rolling Stone example above), we believe they expect the content to work correctly when embedded on their Wordpress site.",adventrpeter
Needs Patch,60727,Allow fine-grained control of when to use oEmbed for providers outside the explicit list,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2024-03-07T18:30:45Z,2024-03-07T18:30:45Z,"WordPress maintains a list of appvoed oEmbed providers. Developers are able to add or remove providers from this list.
WordPress also attempts to see if URLs, outside the provider list, support oEmbed - and if they do, it uses oEmbed for them. Unfortunately, this is currently an ""all or nothing"" appraoch. You can either agree to use all these random sites oEmbed, or none. I'd love to see a filter added to control whether or not a specific URL, outside the provider list, should use oEmbed.
For reference, our specific use case is we want to continue supporting oEmbed for the vast majority of sites that support it - but we've identified some specific domains that do a poor job of oEmbed, and we'd like to only turn it off for those domains.",MadtownLems
Needs Patch,57076,Allow fullscreen in oembed videos,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2022-11-11T15:27:50Z,2022-11-15T11:32:51Z,"Hi!
We're trying to enable fullscreen from a video loaded through oembed (and not by copying directly the iframe) from PeerTube.
Here is the link to the video: https://video.davduf.net/w/4V6DMLcQDGQHnZ9wf6h4KH
And to the oembed: https://video.davduf.net/services/oembed/?url=https://video.davduf.net/w/4V6DMLcQDGQHnZ9wf6h4KH
I tried to understand why it was not working and found this piece of code: https://github.com/WordPress/WordPress/blob/82f3535083c0d8859bd3b8333fe006394978c09e/wp-includes/embed.php#L926
I guess it's because allowed attributes do not include `allowfullscreen` but I am not confident enough with WP code to be sure it's bound to this part.
Anyway, would it be possible to allow the allowfullscreen attribute in `iframe` loaded through oembed?
Thanks.",booteille
Needs Patch,49352,Allow get_proxy_item to be filtered/altered before a response is sent to the editor.,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2020-02-03T16:13:40Z,2020-02-03T16:13:40Z,"**tl;dr:** Add a filter in {{{\WP_oEmbed_Controller::get_proxy_item}}} so certain non-oembed sites can still be embeded using a custom handler from a plugin.
**Scenario:** I would like to create a generic oEmbed provider on my own site similar to iframely.com. So when a user posts a link in the editor that isn't a oembed provider, I would like to be able to filter the response from {{{\WP_oEmbed_Controller::get_proxy_item}}} and not having it reply with {{{return new WP_Error( 'oembed_invalid_url', get_status_header_desc( 404 ), array( 'status' => 404 ) );}}}. In my ideal case I could catch this and pipe the URL in question through my own proxy endpoint and create a custom oEmbed result from meta and open graph tags generated from the original HTML of the link to be embeded.
Currently it seems, that I can only replace the all embeds through a custom handler, similar to what iframely does: https://github.com/itteco/iframely-wordpress/blob/master/iframely/iframely.php#L19-L23
",neverything
Needs Patch,56489,An extra post lookup in WP_Embed::shortcode for known post,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2022-09-01T16:34:26Z,2022-09-01T16:37:10Z,"`WP_Embed::shortcode` caches embeds into post_meta for known posts (ie.: embed in a post_content) or into a post of the `oembed_cache` post type in case the global post is not set (ie.: outside the loop).
However, [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-embed.php?rev=53269#L251 the code] always tries to lookup the `oembed_cache` post, even in case the global post is set, which results in an extra SQL query, since the `oembed_cache` post is never created, if there is a known global post.
The `$cached_post_id` variable populated by the `WP_Embed::find_oembed_post_id` function call is really only used in case there is no global post set, and thus, IMHO, should be only populated in such case.",david.binda
Needs Patch,54468,Apply aspect ratio classes to wp_oembed_get when theme_supports('responsive-embeds') is added,,Embeds,5.9,normal,normal,Awaiting Review,enhancement,new,,2021-11-18T19:37:38Z,2021-11-18T19:37:38Z,"The Gutenberg embed block supports [adding responsive wrappers around embeds that are cognizant of the embed's aspect ratio](https://github.com/WordPress/gutenberg/blob/v11.9.1/packages/block-library/src/embed/util.js#L185). Without creating fixed-width columns, the embed will fill its container at the interpreted aspect ratio.
If you're still writing PHP templates, you're using wp_oembed_get, which does not support this. [This ticket](https://core.trac.wordpress.org/ticket/34928) suggests that some JS fires to adjust the height on iframes on window resize, but that's a somewhat different issue, becoming important after the embed has been rendered. That ticket also suggests that an embed expanding to fill its container is undesirable and not in-line with oEmbed's specification, but whoever designed the Gutenberg block must have had a different interpretation of that spec.
Would be great if WordPress oEmbeds behaved the same however you create them.",eclev91
Needs Patch,49910,Embed: resizable iframes,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2020-04-15T16:24:05Z,2020-04-15T16:24:05Z,"Hi,
I am a developer at Weezevent (https://www.weezevent.com/en-gb), a ticketing solution.
I am currently developing an oEmbed provider to embed our registration widget in WordPress, that returns a ""rich"" embed containing an iframe with a fixed height.
It technically works but our content height changes as the user progresses through the registration steps, so when our content is small it leaves a big gap between the end and the next paragraph in Wordpress; and when our content is big the iframe becomes scrollable. In both cases it's not looking good and not mobile friendly.
Our default integration uses a js script to monitor the content size and dynamically resize the iframe.
You can check an integration using our js script here https://cabaretvert.com/billets/
Scroll down to the ""Déjà commandé"" part and fold the categories or select a quantity and click ""Suite"" to trigger the resizing.
\\
\\
I was wondering if you'd be willing to integrate such a script in Wordpress and enable it for iframe embeds ?
I'm sure it would also be useful for other oEmbed providers.
\\
\\
I know we could write a plugin to allow unfiltered embeds, but the vast majority of ours users are not technical and asking them to install a plugin will scare them off.
(I'd also take being added to the official embed whitelist, but we don't fit the ""globally well-known"" requirement.)
Cheers
Florent",fthevenetweez
Needs Patch,40776,"Feature request : Need class parameter for ""Twitter"" embed share",,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2017-05-16T06:47:48Z,2019-04-25T13:08:46Z,"'''Note:''' Twitter embedded share already working nicely. This is an only feature request.
I want to update twitter embed share, but I can't edit or modify that default twitter embed share because it's an iframe.
''For example'', I want to make twitter share as a 'center aligned' within my content area when writing blog posts.
(There are number of possibilities as well.)
Yes, I found the solution for twitter share center alignment. We need to add one class with iframe - '''''tw-align-center''''' but there is no input box/area available in popup where I can write down my custom classes.
Please check this screenshot for more detail - https://d.pr/f32E0",sanjaydabhoya
Needs Patch,30720,"In editor, add a button to refresh/invalidate (oEmbed) embeds cache",,Embeds,4.0,normal,normal,Future Release,enhancement,new,,2014-12-15T15:53:31Z,2017-10-20T13:29:18Z,"The inline embeds previews in WP4.0 are great, however have one major flaw:
One user enters the URL, and preview is generated via oEmbed, the embed code is cached for a day for that URL. There is no way for the author to invalidate it.
It generally works well, but not when user wants to experiment with different oEmbed-related plugins or settings. To keep great function, yet make it more straightforward for the user to control the flow, I'd suggest the following.
'''Shall we add a button ""reload"" to the inline previews of the embeds? And/or ""reload"" button in the Edit Embed dialog?'''
I trust it is a great answer to the problem and fits the user experience well.
We are the authors of [https://wordpress.org/plugins/iframely Iframely] plugin. The supports issues we get since WP4.0 mostly relate to oEmbed cache. But such approach will also answer the needs of other devs and users, for example #30282.",ivanp
Needs Patch,43713,Privacy: Add a UI to allow administrators to disable individual embeds / oembeds,,Embeds,5.1,normal,normal,Future Release,enhancement,new,,2018-04-06T16:28:33Z,2019-09-27T16:20:25Z,"Builds on protecting our users from tracking that was introduced in https://core.trac.wordpress.org/ticket/41784
Embedded iframes allow 3rd parties to collect user's IP addresses and User Agents, to store and retrieve cookies on their browsers, to embed additional third party tracking, and monitor their interaction with that embedded content, including correlating your interaction with the content with their account with that service, if they are logged in to that service.
That means, especially when EU residents are visitors, that all that needs to be disclosed in the site's privacy policy.
To further improve site's users privacy, and give site owners more control over how their user's privacy is impacted (and how many 3rd party services they would need to disclose in their site's privacy policy) we should allow administrators to disable any/all embeds on their site.
This UI could live alongside the privacy page setting controls recently added to core.",allendav
Needs Patch,54414,Support embedding Mobile Twitter URLs,,Embeds,5.0,normal,normal,Awaiting Review,enhancement,new,,2021-11-10T16:04:55Z,2021-11-10T16:47:18Z,"When embedding a mobile variant of a Tweet URL, the Gutenberg Embed block considers the URL to be an invalid embed.
== Steps to Reproduce
1. Add an Embed block via the web or native mobile Gutenberg block editor.
2. Set the Embed block URL to a mobile Twitter URL: https://mobile.twitter.com/rauchg/status/807626710350839808
3. Save the Embed block settings, persisting the URL.
== Expected Result
The Embed block displays a preview of the Tweet as an embed.
== Actual Result
The Embed block marks the URL as invalid, resulting in a error message or a plain text URL.
== Related
* [https://github.com/WordPress/gutenberg/issues/35357 Gutenberg Issue]
* [https://github.com/WordPress/wordpress-develop/blob/f2d146d3f1ebd5661af2efd3099b0c988df538c8/src/wp-includes/class-wp-oembed.php#L67-L72 Relevant oembed code]
* oEmbed API response message:
{{{
{
""code"": ""oembed_invalid_url"",
""message"": ""Not Found"",
""data"": {
""status"": 404
}
}
}}}
== Environment
* **WordPress:** 5.8.1
* **Theme:** Twenty Twenty-One
* **Plugins:** none
* **Browser:** macOS Safari 15.1",dpcalhoun
Needs Patch,38128,Twitter Embed - Enhancement change theme,,Embeds,,lowest,normal,Future Release,enhancement,new,,2016-09-22T13:34:18Z,2023-05-30T08:59:36Z,"I would like to suggest to add a option to set the twitter embed theme.
Currently you only can use the standard White Theme, some possibility to customize it to dark as example for dark sites would be great.",Deexgnome
Needs Patch,39918,Whitelist audioBoom oEmbeds,,Embeds,4.8,normal,normal,Awaiting Review,enhancement,new,,2017-02-20T11:00:33Z,2023-05-30T09:50:56Z,"{{{
sandbox=""allow-scripts""
}}}
is disabling links within our iframe player on some wp sites, try the social icons on the audioBoom player in this article http://www.niemanlab.org/2017/02/in-a-chaotic-presidency-civics-101-is-giving-listeners-a-reintroduction-to-how-the-u-s-government-works/.
What are the steps to getting audioBoom whitelisted so that no changes are made to the oEmbed codes?
",arunaudioboom
Needs Patch,39850,WordPress embedded links drop query vars from URL,,Embeds,,normal,normal,Awaiting Review,enhancement,new,,2017-02-11T23:02:51Z,2017-02-11T23:29:04Z,"When embedding a WordPress page within another post, any query strings that are passed in the URL get dropped.
For example, if embedding http://example.com/page-name/?foo=bar, the actual URL that gets passed to the oEmbed function (and later on to the template files) is http://example.com/page-name/embed/ (foo=bar gets dropped).
The link inside the blockquote also drops the url query variable and links to http://example.com/page-name/ instead of http://example.com/page-name/?foo=bar
As I see, this occurs because the `wp_filter_pre_oembed_result` function in `embed.php` uses `url_to_postid` to get the embeded post's ID, and later `get_post_embed_url` uses that ID to create the embed permalink. So naturally any url query vars are not preserved in the final URL construction.
Similarly in `get_post_embed_html`, the function uses `esc_url( get_permalink( $post ) )`, thus reconstructing the permalink without knowledge of the initial url.
I encountered this when embedded a specific photo gallery (from nextcellent plugin), but I assume some other plugins such as language/translation ones may also be affected.
I don't think the URL's should be dropping any of the query variables.
However, if that is a requirement, it would be good to also pass on the original url in the `post_embed_url` hook to allow plugin developers to make sure to add any parameters from the original url that got dropped off in the embedded url.",charleslf
Needs Patch,58120,oEmbed Mastodon,,Embeds,,normal,normal,Awaiting Review,feature request,new,,2023-04-12T14:31:06Z,2023-04-22T23:53:00Z,"Porting [https://github.com/WordPress/gutenberg/issues/49687 this issue] here for discussion.
> If I put a link to a Mastodon toot in the embed block, it embeds, but it has no style applied and looks bad:
>[[Image(https://user-images.githubusercontent.com/1994311/230915699-45480012-7db9-4eff-93cd-f64dd4e46a09.png)]]
As I mentioned there Since [https://joinmastodon.org/servers Mastodon is not 1 single website], but software that can be deployed to any url, we might need a different approach than the provider whitelist.",mediaformat
Needs Patch,46537,Can't use Emoji in the Custom HTML widget,SergeyBiryukov,Emoji,4.8.1,normal,normal,Future Release,defect (bug),reopened,,2019-03-16T07:21:54Z,2019-10-09T17:15:11Z,Type emoji. Then the cursor does not move.,hirofumi2012
Needs Patch,46404,Emoji detection not working on Android 8.1/Chrome 72,,Emoji,5.1,normal,normal,Future Release,defect (bug),assigned,,2019-03-03T08:49:30Z,2021-01-14T20:24:22Z,"On my phone with Android 8.1, emoji detection script doesn't seem to work.
I have created this site based on wp-themes.com for demo:
https://output.jsbin.com/teyocehaci
Here's how it displays.
[[Image(https://i.imgur.com/K8n0WU3.png)]]
The two emoji are: Man Facepalming: Light Skin Tone and Woman: Medium-Light Skin Tone, Red Hair
The first emoji displayed is native, implying that the test thinks that the browser supports Unicode 11.
",superpoincare
Needs Patch,56784,Optimization in wp_staticize_emoji function,,Emoji,6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-10-10T17:26:32Z,2022-12-05T19:16:19Z,"In the `wp_staticize_emoji` function there is a piece of code which seems to be there to optimize the process, but in fact does the opposite.
The piece i'm writing about:
{{{
// Quickly narrow down the list of emoji that might be in the text and need replacing.
$possible_emoji = array();
foreach ( $emoji as $emojum ) {
if ( false !== strpos( $text, $emojum ) ) {
$possible_emoji[ $emojum ] = html_entity_decode( $emojum );
}
}
}}}
Feeding all of 3575 emoji enitities into `strpos` function generates much more overhead than passing all existing emojis for further processing. This can be easily observed by entirely skipping the `false !== strpos( $text, $emojum )` check and adding all entities to `$possible_emoji` array – the whole execution of the `wp_staticize_emoji` function becomes nearly 10x faster. This effect happened to me every time I tested it no matter the content or length of the passed text.",kac1per
Needs Patch,49730,WordPress-generated RSS feeds replace unicode symbols with images.,,Emoji,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-30T20:46:03Z,2021-02-04T14:22:14Z,"Which rather misses the point of having them as part of Unicode. This causes trouble for feed readers because the images have to be handled specially in order for them to format with the text, e.g. https://github.com/Ranchero-Software/NetNewsWire/issues/1958",jralls
Needs Patch,42428,wp-emoji pops up privacy hanger in Firefox with privacy.resistFingerprinting turned on,,Emoji,4.1.2,normal,normal,Future Release,defect (bug),new,,2017-11-03T09:56:10Z,2018-06-14T18:31:33Z,"This isn’t really a bug, but worth reporting anyway.
wp-emoji uses a technique that’s often used by trackers for fingerprinting clients: reading canvas pixel data. For them, differences in OS and graphics drivers can lead to subtle differences when text is rendered to a canvas. This means that when they hash data read out of the canvas with text on they have another datapoint to identify a client.
To work around this, Firefox has recently uplifted a technique from TOR Browser. If you visit a site that tries to do this it’ll pop open a hanger asking for the user’s permission. You can test this by downloading a copy of Firefox Nightly, going to about:config and setting privacy.resistFingerprinting to true. Which brings us on to WordPress…
Unfortunately the default wp-emoji package also uses this technnique, which triggers a browser warning on a large number of sites I visit on a daily basis. While I doubt that WordPress is using this for user tracking, it means that sites that are being nefarious get lost in the WordPress noise. This is a shame, but also I would imagine that it would be hard for Firefox to turn this on by default given the number of sites out there using Wordpress.
What I’d like to suggest is that:
1) wp-emoji is reviewed to see whether this technique is necessary for its functionlity. Can it be updated to use some other technique?
2) wp-emoji is considered for removal by default. According to the docs wp-emoji ‘will convert the often greyscale Emoji characters to colored image files.‘ Is this really a problem with the current set of browsers?
",robinwhittleton
Needs Patch,37788,dns-prefetch s.w.org conditionally via javascript,,Emoji,4.6,normal,normal,Awaiting Review,enhancement,new,,2016-08-23T10:31:12Z,2023-06-07T05:54:00Z,"For many users, dns-prefetch to s.w.org is not needed if they aren't using Jetpack or any plugin which connects to it. It's because:
1. A page may not have an emoji
2. Even if the page has it, the browser may support emojis. Going forward the support will increase.
Hence I propose the dns-prefetch to s.w.org be made only if the feature detection detects wp-emoji-release needs to be loaded or if possible page needs an emoji svg.
",superpoincare
Needs Patch,59716,Deprecated messages exporting post meta with meta_value null from PHP 8.1,,Export,,normal,normal,Awaiting Review,defect (bug),new,,2023-10-24T13:55:00Z,2023-10-30T18:20:11Z,"Today I attempted to export some products from one database to import into another.
I encountered several Deprecated messages emanating from code within `wxr_cdata()`
It appears that the export code doesn't specifically cater for meta data with null values.
Prior to PHP 8.1 the null values were treated as empty strings.
There are several plugins that are ''guilty'' of producing post meta data containing nulls. Two of them are in the top 12 plugins by total downloads: All-In-One-SEO-Pack and WooCommerce.
=== Actual output
Here's the exported post meta for WooCommerce's `_stock` field.
{{{
Deprecated : strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\apache\htdocs\gardenvista\wp-includes\formatting.php on line 885
Deprecated : str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\apache\htdocs\gardenvista\wp-admin\includes\export.php on line 207
}}}
Both of these Deprecated messages can be avoided by a simple change as the first line of `wxr_cdata()`
{{{
if ( null === $str ) {
$str = '';
}
}}}
=== Expected output:
- The export should complete without producing the Deprecated message output in the post meta value.
- Null values should continue to be treated as empty strings
=== Environment:
- PHP 8.1.23 or PHP 8.2.10
- WordPress 6.4-RC1
- Plugins: WooCommerce and/or All-In-One-SEO
",bobbingwide
Needs Patch,57166,Export theme,,Export,6.0.1,normal,normal,Awaiting Review,defect (bug),new,,2022-11-21T13:17:02Z,2022-11-21T13:17:02Z,"When I export Twenty Twenty Two from the FSE there is an error in the link to font files. The path to the files ought to point to a relative file path, but this is what I get:
{{{
{
""fontDisplay"": ""fallback"",
""fontFamily"": ""Source Serif Pro"",
""fontStretch"": ""normal"",
""fontStyle"": ""italic"",
""fontWeight"": ""200 900"",
""origin"": ""gutenberg_wp_webfonts_api"",
""provider"": ""local"",
""src"": [
""**http://localhost:8888/wpux/wp-content/themes/twentytwentytwo/**assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2""
]
}
],
}}}
",perthykjaerjensen
Needs Patch,55135,Media URLs break when migrating WordPress content to different domains,,Export,5.9,normal,normal,Awaiting Review,defect (bug),new,,2022-02-10T08:28:16Z,2022-02-10T10:58:10Z,"All media assets use absolute URLs when exporting WordPress content, including the domain name and port if present.
When importing the content on a new WordPress installation located at a different domain or port, page/post media fail to render since they point to the previous domain/port.
https://github.com/creativecommons/project_creativecommons.org/issues/225
The hard-coded links require post-processing the XML file for the content to be portable across domains and environments (e.g., development, staging, and production).
Ideally, media URLs in the export file would be relative to the WordPress root, such as described in the following issue from 11 years ago: #17048.",brylie
Needs Patch,25872,WXR export tool generates XML which is not well-formed,,Export,3.7.1,normal,normal,,defect (bug),new,,2013-11-07T21:41:11Z,2019-06-04T19:45:08Z,"1. Paste a form feed character (aka \f or U+000C) into a post
2. Tools > Export > Download Export File
3. Validate the exported file (i.e. xmlstarlet validate --well-formed ~/Downloads/test.wordpress.2013-11-07.xml)
The resulting file is not well-formed XML because WordPress has failed to strip characters which are not allowed by the XML specification ( http://www.w3.org/TR/REC-xml/#charsets ).",tomdxw
Needs Patch,58195,WordPress Exporter includes trashed posts when the author filter is enabled,,Export,,normal,normal,Awaiting Review,defect (bug),new,,2023-04-26T07:31:27Z,2023-04-26T15:14:53Z,"The wordpress exporter has a bug where it will export all posts except trashed posts when using the default options but will export all posts including trashed posts when the author filter is enabled (to export posts by a specific author). Exporting by a specific user is the only way to export a specific portion of the posts and avoid exporting all of files.
This is a problem because 99% of people do not want trashed items to be in included in an export file as these are already designated as unwanted/ unnecessary. The exporter function does not make it obvious to users that it will include trashed items in the created export file. This problem is only obvious if someone tries to incorporate the exported posts into another site which already has posts of a similar name.
You might ask how is it possible to have duplicate posts (1 post published, 1 post trashed with exactly the same name) You couuld get this by accidentally creating two posts with exactly the same slug or by deleting a post and creating a new one with exactly the same name.
After importing the xml file into another site WordPress gives a warning that the imported post already exists but does not make it clear that the new duplicate is actually located in the trash section of the new site and is not published like a normal post.
With this unexpected behaviour and confusing warning message users will not necessarily understand how to solve the issue and this warning message witll continue to pop up EVERYTIME they export/import posts because the site of origin will continue to include all trash files in the exported xml until the user empties their trash or the trash files expire.
Some users like myself use the export function multiple times a day and export 100s of posts a week. Correcting this ""bug"" would avoid confusion, save time and would ensure the behaviour of the exporter matches the expectations of the user.",shtv
Needs Patch,52815,Wrap long Category name drop down when export post on export.php screen,,Export,5.7,normal,normal,Awaiting Review,defect (bug),new,,2021-03-15T06:24:12Z,2021-03-15T15:55:18Z,"Hi
When our category name long then getting UI issue. You can see mentioned screenshot.
Thank you.",sumitsingh
Needs Patch,19864,Abstract export_wp() for use by CLI scripts,,Export,3.3.1,normal,normal,,enhancement,reopened,,2012-01-20T18:16:17Z,2019-06-04T19:43:40Z,"Need to be able to execute an export from the PHP CLI for the purpose of running cron / maintenance scripts that write out exports.
This would include writing additional hooks that allow the arguments to be pulled from the cli as well as hooks that allow the output to redirected from the output buffer to a file.
Related ticket: #19863, extra hooks for manipulating content and arguments of an export",scottconnerly
Needs Patch,39298,Add filters for the exporter,,Export,,normal,normal,Awaiting Review,enhancement,new,,2016-12-15T15:25:36Z,2019-03-15T01:06:47Z,"I think being able to enhance the exporter with plugins would be very helpful. If there was a filter for the export options where custom export queries could be made to possibly return the $post_ids to be exported I think that would be a great addition because I recently had to edit the core export file to build a custom export query. I noticed one plugin attempted this but resorted to completely replacing the export.php file.
",stormrockwell
Patch Needs Refresh,33461,Allow filtering of meta_value in exporter,,Export,,normal,normal,,enhancement,new,,2015-08-20T08:46:22Z,2020-07-02T15:50:40Z,"Hi,
There are some filters in the exporter code that allow developers to modify the exported XML data
according to their needs. One filter that is missing is the ability to filter the
{{{
meta_value
}}}
field. This can be very helpful ie. to filter out urls or any other data that's being stored there. I'm attaching a patch to be applied to the core.
",newkind
Needs Patch,31084,Export capabilities should allow the current user to export their own posts,,Export,,normal,normal,,enhancement,new,,2015-01-21T09:30:53Z,2019-06-04T19:47:38Z,"Currently, exporting is restricted to users with the 'export' capability (Admins, Network Admins), which effectively locks Editors, Authors, and Contributors out of the the process. I am proposing that an implicit capability in the exporter be created whereby users without the 'export' capability can choose to export their own posts.
The functionality to select a single user's posts for exporting is already built-in for those with the capability, so there is no underlying exporter code that needs to change. Front-facing modifications would include adding a message to the Export screen for non-Admins explaining that they can only download their own posts, specifying the proper single-user form parameters by default, and a few checks on the back-end to avoid any forgery.
Functionally, this enhancement would free users to own and control their content, and may help prevent site owners from holding their contributors' content hostage.",rileypaulsen
Needs Patch,32130,Export tool should manage users,,Export,3.1,normal,normal,,enhancement,new,,2015-04-25T10:26:12Z,2020-07-06T14:50:40Z,"I'm migrating a site from a server to another with the export/import tool.
Users are not imported but new users are created, consequently users informations (including password) are lost.
Export tool shoud export/import users as well as pages, articles, ...",jerome.martin
Needs Patch,48366,Export valid paragraphs HTML with wpautop applied,,Export,,normal,normal,Awaiting Review,enhancement,new,,2019-10-18T12:26:13Z,2021-05-25T18:23:11Z,"WordPress exports post content mostly as is from database. It runs through `the_content_export` filter, which does not by default have any of the typical `the_content` filters added.
The most visible impact is that `wpautop()` is not applied and paragraphs have no `` tags around them.
Effectively this makes exported content corrupted for systems other than WordPress itself.
In spirit of ""own your data"" I suggest this is reconsidered, in favor of exporting valid platform-agnostic HTML markup.
From a quick look on implementation levels it seems just adding `wpautop()` might not be sufficient due to a special blocks-related logic in WP 5+ ? Or can that be ignored for export purposes?",Rarst
Needs Patch,39021,Import Export Attachments,,Export,4.6.1,normal,normal,Awaiting Review,enhancement,new,,2016-12-02T02:52:10Z,2019-03-19T02:01:50Z,"Currently when we export a post type, it seems that the post thumbnails are exported as id's. It would be fantastic if these could be exported as url's to the images as otherwise there is no way for a separate install to import the post data.
currently, for posts with a thumbnail the below or similar is added to the `- `
{{{
}}}
I propose this is moved to `` or `` and the specific postmeta for `_thumbnail_id` removed from postmeta and re-created on each import.
Problems with my suggestion that I've considered
* Re-importing (w|c)ould create duplicate media. As the post has to exist for post-meta to be added. Maybe using the basename function we could check for existing media, maybe it's an edge case... I think this is unlikely to be a large problem and it potentially empowers less technical users.
* Some plugins would see no benefit as they use either custom metadata keys or multiple attached images (like WooCommerce). I'd suggest this could be mitigated by adding a filter of an array of strings that on import / export treats a list of fields as keys to treat as thumbnails)
",LewisCowles
Needs Patch,19307,"Need ability to export ""All content"" but limited to date range",,Export,3.1,normal,normal,,enhancement,new,,2011-11-20T23:19:43Z,2019-06-04T19:43:35Z,"Need ability to export ""All content"" but limited to date range
==== ENV ====
WP 3.3-beta3-19254 (trunk r19367)
==== Additional Details ====
For a larger site is a common scenario to need to export all content, but because of resource limitations or time constraints it cannot be done in a single export.
Exporting individual post types is not a work around, further you lose attachments on posts when exporting just ""posts"", and that breaks features including Featured Images.
==== Also Consider ====
Another common scenario for media and enterprise customer is wanting to export a period of time to further analysis that content, or stage it in their development environment for debugging an issue, or developing new designs and features.",lloydbudd
Needs Patch,36340,Other options ignored when using a custom post type with export_wp(),,Export,,normal,normal,Future Release,enhancement,new,,2016-03-25T22:17:35Z,2020-07-06T14:09:01Z,"While writing the improved docblock for `export_wp()`, I noticed something that may be an issue when a custom post type is supplied.
For the built-in post types you can filter the exported content by start date, end date and/or author. But not with a custom post type: with them it's everything. Is this by design?
The fix could be to modify line 113 to include the custom post type option because by that point we know that it's both valid and `can_export` is true thanks to the stuff starting on line 88.
I don't use this code myself but it did jump out at me. Thoughts?",theMikeD
Needs Patch,47446,Tools > Export does not include term meta data for a custom post type,,Export,5.2.1,normal,normal,Awaiting Review,enhancement,assigned,,2019-05-31T15:38:54Z,2019-05-31T15:38:54Z,"Steps:
# Register a public custom post type
# Register a custom taxonomy with a custom term_meta
# populate with dummy posts, terms and term meta values
# go to tools > export and select your custom post type
# The resulting XML is perfectly valid and includes all posts along with the terms of the taxonomy. Observe that none of the terms have their corresponding term_meta
Expected:
When exporting content of one custom post type, the term_meta should be included.
Solution:
I have not found one. Looking at wp-admin/includes/export.php:148 I can see that $terms is only populated when $args['content'] is set to all (""All Content""). Here the source I am referring to: https://github.com/WordPress/WordPress/blob/5.2.1/wp-admin/includes/export.php#L148
Environment: WP 5.2.1, WAMP, PHP7.2
",mclaurent
Needs Patch,58982,Tools > Export does not include termmeta data for post categories,,Export,6.3,normal,normal,Awaiting Review,enhancement,new,,2023-08-04T12:44:38Z,2023-08-04T18:07:11Z,"Steps to reproduce
* Populate some posts and categories on a clean WordPress installation.
* Add some term meta fields to those categories.
* Go to Tools > Export and export Posts, then All categories.
* The export file contains no `wp:category` entry for any categories, hence categories term meta fields are not included.
* Go back to Tools > Export and export Posts, then a single category.
* The new export file contains no `wp:category` entry for the selected category, hence its term meta fields are not included either.
",jadpm
Patch Needs Refresh,26311,Updated (responsive) Tools -> Export admin screen,,Export,3.8,normal,normal,Awaiting Review,enhancement,new,,2013-11-29T05:02:40Z,2019-02-26T02:25:27Z,"Updated Tools -> Export admin screen
Switched from un-ordered lists based html to tables based HTML based on Permalinks admin screen.
''No javascript was harmed in this patch...''
",netweb
Needs Patch,28375,export posts/pages query,chriscct7,Export,3.1,normal,normal,,enhancement,assigned,,2014-05-27T14:11:42Z,2019-06-04T19:45:51Z,"In wp-admin/includes/export.php on line 75 the following check has been done:
{{{
if ( 'post' == $args['content'] || 'page' == $args['content'] ) {
}
}}}
This can be removed so the check can be done foreach post?
",alcowink
Needs Patch,48180,extend export with filter for join and where clause,,Export,5.2.3,normal,normal,Awaiting Review,enhancement,new,,2019-09-30T10:29:31Z,2019-09-30T11:37:29Z,"In attachment I send a patch to add two lines for filters to change external the join and where clause to make it possible to export only the right posts.
**I hope your can take it into the core.**
Background: I have an user defined post type ""bp-blog"", which extends the default blog with buddypress group functionality. Therefor I save the buddy press group id in postmeta.
Now I want export only the ""bp-blog"" posts for a specific group. Without the filter I cannot modify the request query and all ""bp-blog"" posts are exported.
Here my usage of the the new filter:
{{{#!php
postmeta} ON ({$wpdb->posts}.ID = {$wpdb->postmeta}.post_id)"";
return $join;
}
}}}
and
{{{#!php
array(
'LT' => get_option( 'time_format', __( 'g:i a', 'default' ) ),
'LTS' => null,
'L' => null,
'LL' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),
'LLL' => __( 'F j, Y g:i a', 'default' ),
'LLLL' => null,
)
}}}
**1.2**
WP currently updates 'week' with 1 parameter instead of 2 (https://momentjs.com/docs/#/customization/dow-doy/).
**Missing parameter: 'doy'**
{{{
'week' => array(
'dow' => (int) get_option( 'start_of_week', 0 ),
),
}}}
----
**2. Existing data**
Before calling updateLocale, WP should check if the locale data exists (with moment.localeData( 'en' ) - [docs](https://momentjs.com/docs/#/i18n/locale-data/)).
I suggest to replace only the missing data, and keep the existing one as is.",yoancutillas
Needs Patch,40158,Plupload bug with Firefox and Mac OS where the user can't select .jpeg files,azaozz,External Libraries,,normal,normal,Future Release,defect (bug),reviewing,,2017-03-15T10:32:54Z,2017-09-01T12:13:28Z,"NOTE: Core currently uses Plupload version 2.1.8, this bug is solved in version 2.2.1 + (latest stable is 2.3.1).
'''The bug'''
If plupload is limited to jpg/jpeg images and a user using FireFox and Mac OS tries to select images, all the .jpeg images are grayed out and not selectable, a user can select .jpg files but not .jpeg ones.
'''Bug Example'''
(You need to be running FireFox on Mac OS to recreate)
http://jsfiddle.net/sr8jarsc/1/
'''Solution'''
Update the Plupload version to 2.2.1 or greater
Example: http://jsfiddle.net/mr31zw6L/1/",stiofansisland
Needs Patch,48457,Requests library depends on PHP zlib,,External Libraries,4.6,normal,normal,Awaiting Review,defect (bug),new,close,2019-10-29T10:56:23Z,2022-10-05T13:36:34Z,"Currently the Requests library checks for zlib in some locations, but not others, before using it.
This means it's possible to get a fatal error because `gzinflate()` is undefined, for example when trying to fetch content from the WordPress.org API.
Specifically noticed in `compatible_gzinflate()`, at line 947.",Clorith
Needs Patch,32597,mediaelement.js high CPU usage triggered by the buffering CSS animation,,External Libraries,,normal,normal,Awaiting Review,defect (bug),new,,2015-06-09T15:37:08Z,2020-09-17T14:14:30Z,"Noticed by @iseulde, see discussion here:
https://wordpress.slack.com/archives/core-editor/p1433862939000659
Also reproduced on my (very old) machine that makes things very evident. Looks like mediaelement.js audio uses a linear gradient animation on the `mejs-time-buffering` element which triggers a Firefox bug. I remember similiar issues in Firefox reported years ago and probably never fully fixed. Should probably be reported upstream. See screenshot:
[[Image(https://cldup.com/tAifYTyqQw.png)]]
Removing that element from the DOM makes the CPU usage go down to 0.",afercia
Needs Patch,52926,mobile compatibility library sortable list input field ignores touch event,,External Libraries,5.7,normal,normal,Awaiting Review,defect (bug),new,,2021-03-27T03:54:44Z,2021-05-26T02:22:35Z,"The ability to edit a WP backend menu item custom url input field has not worked on my iPad iOS 14.4.1 using Safari and Chrome. Any text input field simply doesn't respond. Select choice list controls recognize touch.
I am using Admin Menu Editor Version 1.9.9 plugin.
On Mar 26, 2021, at 08:56, Janis Elsts wrote:
Unfortunately, it looks like it's currently not feasible to fix this issue.
It appears that problem is in one of the JS libraries that is part of WordPress itself. It's a mobile compatibility library that's supposed to translate touch events into simulated mouse events. It doesn't seem to work correctly when you tap an input field that's inside a sortable list, like the menu item list in Admin Menu Editor.
I don't have enough mobile development experience to replace the existing JS library with something better, so this bug may remain unfixed until/unless WordPress core developers fix the underlying issue.",edtorrey
Needs Patch,60207,regarding WP 6.4.2 - masonry 4.2.2 and imagesloaded 5.0.0 js not compatible,,External Libraries,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2024-01-07T14:06:52Z,2024-01-15T22:06:48Z,"Hi,
The following combination is running on WP 6.4.2:
imagesloaded 5.0.0
masonry 4.2.2
When running imagesloaded function on a masonry object, imagesloaded throws following error:
""obj is not iterable""
see: https://github.com/desandro/imagesloaded/issues/308
It seems version 5.0.0 is the most recent verion of imagesloaded.
Right now we have to fix that problem manually after every WP Upgrade, which is a real problem for us. Is it possible a patch your version of imagesloaded for WP 6.4.3?
Kind Regards, Reza Anwar
",ranwar
Needs Patch,18909,Bundled jQuery UI should have CSS,,External Libraries,3.3,normal,normal,Future Release,enhancement,assigned,close,2011-10-11T18:53:57Z,2022-10-04T06:37:42Z,"Now that all of jQuery UI is in core, matching CSS should also be included for use in the admin in both color schemes.
Related: #17952",helen
Needs Patch,42780,Code Editor: Linter (HTMLHint) should show error if checkbox doesn't have associated ,,External Libraries,4.9,normal,normal,Future Release,enhancement,new,,2017-12-03T17:32:45Z,2020-12-04T16:34:45Z,"The Custom HTML Linter should show an error if an checkbox field does not have an associated label element. This would be a good improvement for accessibility.
To reproduce:
1. Create a custom HTML widget
2. Enter the following code:
{{{
Checkbox Label
}}}
3. No warning/error appears. ",shooper
Needs Patch,59580,Test_Diff: sync with upstream,,External Libraries,,normal,normal,6.6,enhancement,new,,2023-10-10T11:11:54Z,2024-02-17T14:23:27Z,"Follow up on ticket #58298.
The `Text_Diff` library, as included in WP, is an external dependency, which hasn't been kept up to date with the original source - i.e. with ""upstream"".
The WP local version has also received some WP-only patches, typically for issues related to compatibility with new PHP versions.
It should be investigated if there are changes upstream which need to be included in the WP version of the library and if the WP version of the library contains any fixes which aren't included yet upstream and should be (and don't have an open pull request upstream).
Relevant parts from the conversation in #58298:
@SergeyBiryukov in https://core.trac.wordpress.org/ticket/58298#comment:3:
> > The `Text_Diff` library is an external dependency, however, AFAIK it is no longer externally maintained.
>
> The [https://github.com/pear/Text_Diff pear/Text_Diff] project on GitHub had a release in 2019 and appears to have [https://github.com/pear/Text_Diff/commit/14a70077f643739639845cebaea36a58d647b8c7 recent commits], though is indeed no longer actively maintained, as it has been deprecated and superseded by [https://github.com/horde/Text_Diff Horde_Text_Diff].
>
> We could probably consider switching to the newer package. On at least one occasion though, we encountered a bug in the upstream version, see comment:5:ticket:41526, that was patched using a different approach in [42028] / #41526. As far as I can tell, there were [https://github.com/horde/Text_Diff/commits/master/lib/Horde/Text/Diff/Engine/Native.php no further changes] upstream after the [comment:12:ticket:41526 commits in question], so the issue still exists there.
>
> I have not yet checked whether a [https://github.com/pear/Text_Diff/pull/7 similar fix for pear/Text_Diff] has the same issue.
>
> > I wonder if it may be prudent to create a repo to maintain this code as a package within the WP organisation ?
>
> Would it be worth comparing the current code in core with the [https://github.com/pear/Text_Diff pear/Text_Diff] version and checking if a switch would be possible? Otherwise, it looks like we may indeed have to continue maintaining this package for the time being, either in core or separately, to ensure compatibility with newer PHP versions.
@jrf in https://core.trac.wordpress.org/ticket/58298#comment:6:
> Yes, I think it would be very good if we could take the following actions (probably in a separate ticket though):
> * Compare the current version of the package in WP Core with the upstream version of `pear/Text_Diff`.
> * Compare the current version of the package in WP Core with the upstream `horde/Text_Diff` package.
>
> Based on the findings, discuss follow-up steps.
>
> If we'd decide to upgrade to either the newer version of `pear/Text_Diff` or to `horde/Text_Diff`, I do still think adding at least _some_ tests to safeguard the integration would be a good thing. That way we can also safeguard that the upgrade does not cause any avoidable problems (at least for those situations which we are testing for).
@oglekler in https://core.trac.wordpress.org/ticket/58298#comment:10:
> This open PR is addressing the issue we had fixed from our side: https://github.com/pear/Text_Diff/pull/8/files",jrf
Needs Patch,60478,Upgrade to JQuery 4,,External Libraries,,normal,normal,Future Release,enhancement,new,,2024-02-08T20:52:50Z,2024-03-04T09:07:43Z,"JQuery just released a beta version of jQuery v4. Is this something that wp core will be looking to implement?
https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/",nickchomey
Needs Patch,48499,request: bundle unminified jQuery,,External Libraries,5.2.4,normal,normal,Awaiting Review,enhancement,new,,2019-11-05T10:24:47Z,2019-11-05T15:53:15Z,"This is a follow-up to #47020.
WordPress is including a patched jQuery 1.12.4 now as we require this version but need to patch in security related fixes; whereas jQuery is supporting only newer versions. However we do not include an unminified jQuery. As a result this makes this makes it very hard to verify certain which patches are included, as the source code is not available, and the minification process differs from jQuery's therefore an online diff contains a lot of false positives.
To have verifiable patches I'd like to request that we please keep a list of fixes somewhere (whether it's ticket numbers or full documentation), start including an unmodified jQuery, and verify the bundled jQuery contains all patches post 1.12.4.
",pacifika
Needs Patch,52012,Bundle jQuery plugin temporarily to encourage adoption of auto-updates,,External Libraries,5.5,normal,normal,Awaiting Review,feature request,new,,2020-12-10T10:48:30Z,2020-12-19T17:53:52Z,"**Some background:
**
I wanted to include some comments here that I see as representative of the user experiences I have read about across the interwebs when they upgraded to to WordPress 5.6:
{{{
Hello Wordfence team,
Thank you for this very interesting post.
Every update of WP makes me worried,
especially lately because of all the plugin and themes update needed after...
and the risk of big bug...
For the security, Wordfence is installed in all my websites
for many years now and it really help me to sleep well ;)
Merry christmas time for all
Cécile
}}}
{{{
Thank you for this useful rundown of the newest WordPress update.
While it does sound exciting,
I'm going to hold off for the time being
and make sure all my plugins have caught up.
}}}
{{{
Do you think I should postpone the WordPress update to the latest?
And I have to test the latest WordPress first on my local site?
And is there no problem if I delay updating WordPress
to the latest version?
Are there no security holes or other bugs if I delay updating
WordPress to the latest version?
}}}
{{{
i had upgraded my website to latest version of wordpress from 5.5 to 5.6.
after few hours from upgrade my site started showing blank popup on screen
which was not removeable even this have a cancel icon at top.
my whole structure of [readacted] was disturbed.
so I've downgraded back to 5.5 now it's working fine.
so if you want to upgrade your version. do it at your own risk.
}}}
The above comments are from the WordFence blog:
https://www.wordfence.com/blog/2020/12/wordpress-5-6-introduces-a-new-risk-to-your-site-what-to-do/
**The Problem:
**
There were a large number of questions on the Forums during 5.5. and 5.6. where sites experienced fatal errors or other unexpected behaviour.
While plugins that have not updated to the latest version of jQuery libraries are certainly not the only reason for fatal errors or unexpected behaviour - and while the number of active installations of the jQuery Helper plugin are probably inflated at this point - the number of downloads for the plugin and trends regarding questions on the Forums and other WordPress-related Help sites, in combination with other indicators like the number of plugins in the repository that make reference to outdated jQuery libraries suggest that the problem is not trivial.
When sites break, non-technical users tend to want to roll back.
This breaks trust in auto-updates and is highly likely to lead to users staying on older Core versions for longer and not trying to update again for years.
**The Proposed Solution:**
Please note that this solution on its own won't magically solve all update problems. However, it is one part that seems like it can be mitigated to reduce the ""noise"" (not suggesting that the concerns are not valid - suggesting that word of mouth is highly effective) / friction in the ecosystem.
Bundle the jQuery Helper into Core (like Hello Dolly).
Strongly consider running a cron job to disable (and possibly delete) the plugin after a certain number of admin logins (say 20).
Have a prominent message (possibly redirect to a ""landing page"") to show the admin user how many logins they have left before the plugin is automatically disabled / deleted.
Consider allowing the admin to extend the number of admin logins (perhaps to 200), or to enable the plugin until disabled (for sites that use plugins reliant on the outdated jQuery libraries).
If possible, consider making use of Site Health to give an indication to the admin user as to whether or not the plugin is needed on their current setup or not.
A bundled plugin approach could potentially be used for other breaking changes in the future - as one of the main constraints .org has always had to contend with was that there hasn't really been a good way to communicate these to a large number of site owners / admins.
The goal here is **not** to let people use insecure libraries indefinitely - the goal is to get them **off** those libraries as soon as possible by facilitating communication and by not leaving them with a broken site (potentially during the middle of the night without them even being aware that the auto-update is happening) and scaring them off updating at all.",carike
Needs Patch,29187,.notdef glyph (when copying text from a PDF in the excerpt) breaks the /feed,,Feeds,1.0,normal,normal,,defect (bug),new,,2014-08-12T00:14:44Z,2019-06-04T19:46:17Z,"I created a post where the excerpt was copy&pasted from a pdf document.
When pasting the text, the ""fi"" glyph disappears (e.g. ""specification"" is copied over as ""specication"", this is a common problem, see for instance: [http://superuser.com/questions/375449/why-does-the-text-fi-get-cut-when-i-copy-from-a-pdf-or-print-a-document]).
To be more precise, the ""fi"" glyph is replaced with the .notdef glyph. The .notdef glyph is not visible in the Edit Post screen nor when viewing the post but it is stored in the database (rendered as a white square, the most common representation for this glyph).
The problem is that, while the glyph is properly filtered when viewing the post, it is not when creating the RSS feed so it breaks it.
For instance, when trying to access it with Google Chrome I get: This page contains the following errors:
error on line 29 at column 25: Input is not proper UTF-8, indicate encoding !
Bytes: 0x0C 0x66 0x69 0x63
I've been able to reproduce the problem on several sites. ",softmodeling
Needs Patch,59945,About the feed name specified in the add_feed(),,Feeds,1.5,normal,normal,6.6,defect (bug),new,,2023-11-22T02:51:18Z,2024-02-17T13:49:13Z,"There is no restriction on the first parameter of the add_feed function, but if it starts with ""_"" it will not function properly.
{{{
function feed2_callback( $is_comment_feed, $feed ) {
header( 'Content-Type: application/xml; charset=UTF-8', true );
echo '';
?>
Test
wp_die
404
}}}
This is not a problem with the code I tried, but because the ""_"" at the beginning of the feed name is removed in the do_feed function.
{{{
function do_feed() {
global $wp_query;
$feed = get_query_var( 'feed' );
// Remove the pad, if present.
$feed = preg_replace( '/^_+/', '', $feed );
}}}
This process results in an action name of 'do_feed_' . **'feed2'** when $feed is '_feed2'.
Since this is not done in the add_feed function and the action name specified in the add_action function is 'do_feed_' . **'_feed2'**, it appears that the two action names do not match, resulting in the error indicated in the response.
Should I remove the leading '_' in the feed name in the add_feed function or not remove the '_' in the do_feed function?
In any case, I would like to see consistency in the handling of feed names.
",tmatsuur
Needs Patch,51306,Add inline documentation for atomlib.php,,Feeds,5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-09-14T08:09:30Z,2021-06-29T17:34:38Z,Doc: Add $msg parameter entry for _p($msg) function,anonymized_18274256
Needs Patch,56883,Feeds of non-existent tags and categories displays an empty feed instead of 404,,Feeds,6.0.3,normal,normal,Awaiting Review,defect (bug),new,,2022-10-21T19:27:09Z,2022-10-21T19:27:09Z,"I noticed in Google Search Console that Google often visits feeds of tags that no longer exist. It turns out that the RSS feeds still work instead of returning a 404.
Recreating the issue is simple:
Go to the page of the non-existent tag, e.g. `/tag/asdsdsad/` and append `feed/` to the end of the address, eg. `/tag/asdsdsad/feed/`. An empty feed will be displayed instead of a 404.
This should return a 404 so that search engine bots can forget about it instead of fetching it every so often.
I have thousands of such deleted tags on my site. It would be better for the environment if the bots didn't waste resources on this.",rafaucau
Needs Patch,58798,Fix possible PHP warning in /wp-includes/feed.php,,Feeds,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-07-13T10:12:27Z,2023-11-27T12:36:13Z,"If some plugins or themes use ""enclosure"" meta field as a one-line string, it results in PHP warnings:
PHP Warning: Undefined array key 2 in /wp-includes/feed.php on line 484
PHP Warning: Undefined array key 1 in /wp-includes/feed.php on line 494
It happens because there is no check of string content there:
{{{
foreach ( (array) get_post_custom() as $key => $val ) {
if ( 'enclosure' === $key && is_array( $val ) ) {
foreach ( (array) $val as $enc ) {
$enclosure = explode( ""\n"", $enc );
/ Only get the first element, e.g. 'audio/mpeg' from 'audio/mpeg mpga mp2 mp3'.
$t = preg_split( '/[ \t]/', trim( $enclosure[2] ) );
$type = $t[0];
/**
* Filters the RSS enclosure HTML link tag for the current post.
*
* @since 2.2.0
*
* @param string $html_link_tag The HTML link tag with a URI and other attributes.
*/
echo apply_filters( 'rss_enclosure', ' ' . ""\n"" );
}
}
}
}}}
**Proposal:**
Add checks if the enclosure is an array, and each item can be exploded into exactly 3 items:
{{{
if ( 'enclosure' === $key && is_array( $val ) ) {}
}}}
And this:
{{{
$enclosure = explode( ""\n"", $enc );
if ( 3 !== count( $enclosure ) ) {
continue;
}
}}}
",zahardoc
Needs Patch,28816,HTML entities in post titles break feeds,,Feeds,3.9.1,normal,normal,,defect (bug),new,,2014-07-10T17:08:55Z,2019-06-04T19:46:09Z,"If the title of a blog post contains escaped HTML entities, like – or › the feed containing that title becomes invalid XML. To repro:
1. Start a new post
2. Use a title of Broken – Escaping
3. Publish the post
4. Load up the /feed/ url for the blog, notice the feed is invalid due to an unknown entity reference.
It appears the culprit is calling ent2ncr followed by esc_html as part of the the_title_rss filter. esc_html turns the & into an actual &, which in the replaced string appears as an entity reference. Reversing the calling order of those two filter calls outputs the entity as an XML-style numeric reference, which fixes the feed, but is also wrong.
The title should be output as ""Broken – Escaping"". Had the title been ""Broken – Escaping"" it should be output as ""Broken – Escaping"".",blowery
Needs Patch,55846,RSS VALIDATION ERROR,,Feeds,,normal,normal,Awaiting Review,defect (bug),new,,2022-05-26T13:41:38Z,2022-05-26T15:04:33Z,"Need help with my feed validation error
https://dimokratiki.gr/feed/
I am getting this for no obvious reason:
{{{
Sorry
This feed does not validate.
line 8, column 44: XML parsing error: :8:44: not well-formed (invalid token) [help]
xmlns:media=""http://search.yahoo.com/mrss/""xmlns:media=""http://search.yahoo ...
^
Source: https://dimokratiki.gr/feed/
do_action() /Users/me/root/wp-includes/plugin.php:478
6. WP_Hook->apply_filters() /Users/me/root/wp-includes/class-wp-hook.php:312
7. redirect_canonical() /Users/me/root/wp-includes/class-wp-hook.php:288
8. is_front_page() /Users/me/root/wp-includes/canonical.php:498
9. WP_Query->is_front_page() /Users/me/root/wp-includes/query.php:456
10. WP_Query->is_page() /Users/me/root/wp-includes/class-wp-query.php:3879
PHP Notice: Trying to get property 'post_type' of non-object in /Users/me/root/wp-includes/link-template.php on line 682
A variant (same sort of problem) throws an error in class-wp-query.php with the following:
https://your.site.com/news2020/feed/
",ronald2020
Needs Patch,55215,Unknown file in WordPress core: wp-includes/SimplePie/Cache/adf416701234bb74c7b67e4f1dc6eede.spc Type: File,,Feeds,,normal,normal,Awaiting Review,defect (bug),new,,2022-02-21T14:18:11Z,2022-02-21T16:03:28Z,"Hi,
Just got three notices as above. Is it an issue or a leftover file causing a problem?
Thanks",marian57
Needs Patch,47470,XML parsing error: undefined entity (revisited),,Feeds,5.2.1,normal,normal,Awaiting Review,defect (bug),new,,2019-06-03T18:55:49Z,2019-06-03T23:45:13Z,"After 10 years, bug #8464 seems to be back in 5.2.1
On a completely fresh install (no plugins, default theme) I added a tag with a ' (single quote) in the title. This converts to ’ in the feed title. This in turn, generates
{{{
This feed does not validate.
line 11, column 9: XML parsing error: :11:9: undefined entity
}}}
for the tag's feed on https://validator.w3.org/feed/
See https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2F2607.fr%2Ftag%2Flapostrophe%2Ffeed%2F for example",RavanH
Needs Patch,43604,Add option to completely disable syndication feeds,,Feeds,,normal,normal,Awaiting Review,enhancement,reopened,,2018-03-21T21:04:46Z,2019-01-16T06:50:09Z,"Some site owners do not want to provide RSS/Atom/whatever feeds, for various reasons. Right now, there is no way to globally disable feeds. The current way to disable feeds involves:
- hiding feed URLs from the end user (by removing the ""Meta"" widget from the sidebar and removing the feed links from the header)
- filtering the functions that write the feed URLs
- disabling feed endpoints by deleting the array containing the feed types in WordPress core
- hooking in to the `do_feed_x` actions to redirect the user to a 404
See for example the instructions for disabling feeds one user provides [https://wordpress.stackexchange.com/questions/33072/how-to-remove-feeds-from-wordpress-totally here].
It would be nice if there was a setting in `options-reading.php` to disable syndication feeds altogether, which disables display and generation of the feeds across the whole site.",seanleavey
Needs Patch,50441,Allow CORS for RSS feed,,Feeds,,normal,normal,Awaiting Review,enhancement,new,,2020-06-20T18:22:19Z,2021-10-08T06:59:23Z,"I'm developing an in-browser RSS reader and want to get an RSS feed from my blog on WP.com but browser (both Chrome and FF) shows me the error:
{{{
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wordpress.com/blog/feed/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
}}}
Here is a small example to reproduce:
{{{
}}}
This is quite popular thing that a lot of peoples tries to do:
https://www.google.com/search?q=wordpress+feed+cors
That's one of the main reasons why most browser JS RSS readers requires to use a dedicated proxy server that will make a server to sever call to retrieve the RSS:
* https://github.com/sdepold/jquery-rss proxies RSS fetch via Feedr.
* https://github.com/enginkizil/FeedEk proxies RSS fetch via Feed API
* https://github.com/rbren/rss-parser uses https://cors-anywhere.herokuapp.com
The fix is easy:
{{{
add_action( 'pre_get_posts', 'add_header_origin' );
function add_header_origin() {
if (is_feed()){
header( 'Access-Control-Allow-Origin: *' );
}
}
}}}
But I wan't the fix to be added into WP trunk because my reader will mostly consume RSS from wordpress.com or many other WP blogs.
It should be fine to allow CORS requests to feed. The only one problem is a security concern. Hacker can make a DDoS by pasting on some popular site an tag with src to WP feed and this will produce a big load to WP instance.
But here we can add a simple check: when browser requests an image it sends the header `Accept: image/webp,image/apng,image/*,*/*;q=0.8` while JS RSS headers can set the `Accept` header manually to `application/rss+xml`.
Actually the rss-parser already sends the `Accept: application/rss+xml`. So on the server side we can just check that client requested exactly the feed and only then try to generate it.
As far I see this is something really important (because already used workarounds) and it should be easy to implement and safe to enable by default. So I'll set Major severity.
",stokito
Needs Patch,55909,Do WordPress feeds need pagination query SQL_CALC_FOUND_ROWS?,,Feeds,6.0,normal,normal,Awaiting Review,enhancement,new,,2022-06-03T07:40:59Z,2022-06-03T15:20:46Z,"It seems that by default, WordPress feeds endpoints generate an extra SQL_CALC_FOUND_ROWS query, because the `no_found_rows` query parameter [https://github.com/WordPress/wordpress-develop/blob/2c06c9afd5ba32a0f55a9f8313e636fbcb698cab/src/wp-includes/class-wp-query.php#L1943 defaults] to false.
On large sites with ten of thousands of posts, this can create slow queries which overall can affect the database performance.
While checking the docs and expected functionality of feeds https://wordpress.org/support/article/wordpress-feeds/ , I don't see any mention for pagination, so my question is:
Are feeds supposed to have pagination enabled and if NOT, does it make sense to set the `no_found_rows => true` for the default WP_Query when feeds are triggered?
So far, I've managed to fix it with
{{{#!php
is_feed && $query->is_main_query() )
{
$query->set('no_found_rows', true);
}
}
add_action( 'pre_get_posts', 'feed_filter' );
}}}
but curious if there might be other implications to this?",ovidiul
Needs Patch,48414,Enhancement: feed_links_extra needs filter to remove a feed from pages,,Feeds,,normal,normal,Awaiting Review,enhancement,new,,2019-10-23T19:40:25Z,2019-10-23T19:40:25Z,"Use case: If your site doesn't have comments, or uses a service like disqus, the singletitle feed is useless and always empty (since comments are open, just not using wordpress native commenting). I'd like to be able to remove it from the header. Other use cases are if people do not want to provide an RSS feed for a tags or authors.
Suggestion: allow a filter on feed_links_extra to eliminate the echoing of that feed into the header. This ticket proposes filtering the default values: https://core.trac.wordpress.org/ticket/43225 Perhaps modify that to accept null or false values for things like 'singletitle' and if false, skip the creation of that item.
",sgatz
Patch Needs Refresh,6425,Support for RTL in feeds,,Feeds,,normal,normal,Awaiting Review,enhancement,assigned,close,2008-03-27T20:56:51Z,2023-02-02T13:42:09Z,"In the current state of most Feed readers, the only surefire way to make RTL content display properly is to have directionality enforced inside the content - that is, either with {{}}} tags inside CDATA or with Unicode directionality characters (for e.g., RLE and PDF, or and , or U+202B and U+202C.) for excerpts or titles.
While we currently have pretty good support for RTL languages, there is no support for RTL in feeds - all is left up up to the feed reader.
I suggest adding a mechanism to automatically insert these tags/characters for blogs that have text_direction set to RTL - much in the same way RTL css style sheets are loaded for these blogs.
I have attached a patch that modifies the feed templates to insert these tags/characters. Note that there is no checking of blog directionality here - this is just an example of how to enforce RTL in feeds, not how to enforce it conditionally.
This relate to a previous ticket I submitted (#5517), regarding adding an option to set the feed language - which currently just defaults to EN. Certain feed readers know to display RTL text in proper directionality according to feed language (for e.g., feeds that have their feed language set to HE (Hebrew), will get displayed from Right to Left). While setting feed language is not a comprehensive solution, it is a step in the right direction.",RanYanivHartstein
Needs Patch,14493,"do_enclose() can ping the same URL many times, can't filter URLs to ping",nacin*,Feeds,3.0.1,normal,normal,,enhancement,accepted,,2010-07-31T18:52:01Z,2019-06-04T19:43:08Z,"If the same URL is included in a post several times, do_enclose() can check that URL for inclusion as a possible enclosure several times.
Additionally, there's no way to filter what URLs do_enclose() should ping for possible inclusion as enclosures.
Attached adds an array_unique() call to do_enclose().
Attached adds a {{{do_action_ref_array( 'pre_enclose', array( &$post_links, &$pung ) )}}} hook to allow filtration of URLs to ping. (Matches the pre_ping hook.)
do_enclose() has several more problems this patch addresses.
1. Correct non-functional DELETE FROM postmeta query (bad use of wpdb::prepare()).
2. Use like_escape() in several LIKE queries.
3. Add an {{{apply_filters( 'enclosure_mime_types', array( 'video', 'audio' ) )}}} hook.
4. Currently do_enclose() doesn't allow root URLs as enclosures (e.g. http://example.com/), only URLs with a non-trivial path or query. Move that functionality to the new pre_enclose filter.
5. Efficiency improvements in conditional logic.
6. Clean up code by reducing control structure nesting depth.",mdawaffe
Needs Patch,49321,provide standard pagination links in RSS/Atom feeds,,Feeds,5.4,normal,normal,Awaiting Review,enhancement,new,,2020-01-29T17:09:52Z,2022-06-03T15:21:16Z,"Since feeds use the same query parameters as the rest of WordPress, it's already possible to get RSS/Atom-format lists of older posts in addition to the newest 10 (or whatever `posts_per_rss` is set to). However, a client has to know it's looking at a WordPress-generated feed, and manually construct the right paginated feed URLs.
I'd like WordPress to implement the Atom pagination links standardized in 2007 by [https://tools.ietf.org/html/rfc5005 RFC 5005], which also has an appendix on using them in RSS.
I've written a plugin demonstrating how to do this in a spec-conformant way (https://github.com/jameysharp/wp-fullhistory). The spec requirements that enable aggressive caching in feed readers make the ""obvious"" ways to do this not work, but the plugin is still quite simple. I've included extensive comments if you're interested in the details, and the plugin passes WordPress coding standards 2.2.0. But PHP isn't one of the languages I normally use, so I'd certainly appreciate code review.
I brought this up in the forums a while back ([https://wordpress.org/support/topic/add-rfc5005-support-to-wordpress-generated-rss-feeds/ post]) and got very helpful starting points from Samuel Wood, but my current implementation is much simpler than I had thought it would be.
I've considered just encouraging people to use the plugin, rather than trying to get this standard supported in core. But there already aren't very many WordPress users who know what RSS is, let alone understand extensions. (I surveyed several dozen webcomic creators, in particular.)
So for the same reasons that it's good for the open web that WordPress just automatically provides feeds, I hope you'll automatically provide standard pagination in those feeds too.",jameysharp
Needs Patch,25741,Broken WP_Filesystem methods,,Filesystem API,,normal,normal,,defect (bug),new,,2013-10-28T03:18:03Z,2019-06-04T19:44:55Z,"The following methods of WP_Filesystem do not work as intended, as they're called with absolute paths, and fail to find those absolute paths within the relative paths returned from the listing functions:
* WP_Filesystem_FTPext
* owner()
* getchmod()
* group()
* WP_Filesystem_ftpsockets
* owner()
* getchmod()
* group()
It's worth noting that the following FTP methods are available but don't actually hit the filesystem, and are just there to match the `WP_Filesystem_Direct` methods:
* is_readable()
* is_writable()
* atime()
* touch()
Attached is a patch I had locally from during 3.7 development, not thoughly tested, I believe WP_Filesystem_FTPext::owner() at least needs extra work.
The patch also removes the above methods from the FTP classes and relies upon the `WP_Filesystem_Base` versions - as a result, the is_writable() and is_readable() methods changed to assume things are readable/writable.",dd32
Needs Patch,34327,Check for filesystem write permissions done based on ownership instead of actual filesystem permissions,,Filesystem API,4.3.1,normal,normal,,defect (bug),new,,2015-10-16T16:34:57Z,2019-06-04T19:52:31Z,"For security reasons, I don't run my httpd/fpm processes as the same user that owns my web content. This gives problems when trying to do various things in Wordpress such as updating themes/plugins/translations etc.
It all comes down to the function get_filesystem_method in wp-admin/includes/file.php, which bases the choice for direct filesystem access on the ownership of the filesystem resource(s) it's trying to access. Of course user ownership is not the only thing that can grant write permissions in the filesystem, the group owner and even things like ACL's can influence this.
I see that for WP updates there has already been a 'hack' made which is $allow_relaxed_file_ownership but there seems to be no way to use the same criteria for all other actions.
The core issue is that Wordpress bases its ""Can I actually write files $here"" decision not on the actual outcome of a filesystem action, but on assumptions about the file/directory owner being the sole factor in being able to write.
Please either
- allow a global 'allow_relaxed_file_ownership' setting, or
- actually perform a filesystem write check
so that people configuring their filesystem permissions properly don't need to lower their security in order to run Wordpress.
Thanks!",Sling1
Needs Patch,23845,Install new theme via FTP failed,,Filesystem API,3.5.1,normal,normal,,defect (bug),new,,2013-03-22T12:19:03Z,2019-06-04T19:44:34Z,"New theme installation via FTP has failed when we specified custom FTP_BASE folder. If we try this theme installation , wordpress shows error message: ""Unable to locate WordPress theme directory"". This was because search_for_folder method do not respect FTP_BASE setting and allows to walking on parent directories. All solutions I found in google is ugly hacks who only mask the problem but does not resolved it
I attached patch example who resolve this problem. I hope is useful and will help to repair this bug.",Przemyslaw Plewa
Needs Patch,20652,"Install plugins with FTP upload, virtual subdomain, bad base dir?",dd32,Filesystem API,3.3,normal,normal,,defect (bug),reopened,,2012-05-10T12:02:48Z,2019-06-04T19:43:46Z,"Hi anybody!
I have problem with install plugins with FTP module in WP.
Everything show as OK, but plugin directory is bad. I have subdomain
sub.something.com - this is virtual subdomain from mod_rewrite
dirs are
/www/something.com/something.com[[BR]]
/www/something.com/sub.something.com - here is WP installation, subdomain is virtual from rewrite in httpd.conf
After install - WP say everything OK - but one thing is bad.[[BR]]
Upload is in bad directory - plugin I can found in[[BR]]
/www/something.com/something.com/plugins[[BR]]
no in /www/something.com/sub.something.com/plugins[[BR]]
Is here some way to fix it automatticaly or I can must edit config and basedir of ftp? Why is here this bug?
Thank you !
Pavel
",rajcz
Needs Patch,40195,No provision to set paths for sftp (ssh2),,Filesystem API,4.7.2,normal,normal,Awaiting Review,defect (bug),new,,2017-03-18T13:36:00Z,2017-03-18T13:36:00Z,"I have a server which has different paths for the web server verses when accessed via sftp and consequently updates fail with ""Unable to locate WordPress content directory (wp-content).""
According to this page [https://codex.wordpress.org/Editing%20wp-config.php#Enabling_SSH_Upgrade_Access] there are 3 options for this exact purpose: FTP_BASE, FTP_CONTENT_DIR, FTP_PLUGIN_DIR.
Setting these has no affect.
This is confirmed by turning on debug and the following error is generated:
""Installation failed: Looking for /usr/local/www/+++++/www/wp-content/plugins in /""
The ""wp-admin/includes/class-wp-filesystem-base.php"" file reveals the find_folder function only processes the overrides for ftp services.
{{{
public function find_folder( $folder ) {
if ( isset( $this->cache[ $folder ] ) )
return $this->cache[ $folder ];
if ( stripos($this->method, 'ftp') !== false ) {
$constant_overrides = array(
'FTP_BASE' => ABSPATH,
'FTP_CONTENT_DIR' => WP_CONTENT_DIR,
'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR,
'FTP_LANG_DIR' => WP_LANG_DIR
);
}}}
Seems to be a strange requirement on the ssh2 method that the paths must align exactly with the web server so I consider this a bug. Others may consider it an enhancement in which case it would be a good idea if the codex entry made it clear only ftp access methods support configurable paths (ssh must align with the webserver).",fsrs
Needs Patch,59917,"On windows host using ftp, Undefined array key ""islink""",,Filesystem API,,normal,normal,6.6,defect (bug),new,,2023-11-16T18:02:27Z,2024-02-17T13:48:42Z,"Fresh install of wordpress 6.4.1
On windows host using ftp
steps to recreate:
1. Going to ""sitehealth"" page gives critical warning ftp credentials are missing for updates.
2. Google search suggested adding the following to the user added section of `wp-config.php`
{{{
define('FTP_USER', 'USERNAME');
define('FTP_PASS', 'PASSWORD');
define('FTP_HOST', 'FTP.EXAMPLE.COM');
}}}
3. After this, go back to site health page. It is giving the following warnings repeatedly:
{{{
Warning: Undefined array key 3 in C:\...\wp-admin\includes\class-ftp.php on line 457
Warning: Undefined array key ""islink"" in C:\...\wp-admin\includes\class-wp-filesystem-ftpsockets.php on line 695
Warning: Undefined array key ""perms"" in C:\...\wp-admin\includes\class-wp-filesystem-ftpsockets.php on line 700
Warning: Undefined array key ""islink"" in C:\...\wp-admin\includes\class-wp-filesystem-ftpsockets.php on line 695
}}}",antonmo
Needs Patch,36936,Plugin update does not works via web with proper filesystem permissions.,,Filesystem API,4.5.2,normal,normal,,defect (bug),new,,2016-05-24T21:09:30Z,2019-06-04T19:58:39Z,"Hello all,
I run Wordpress 4.5.2 on Ext4 file system with POSIX ACL.
Web server is Nginx, PHP runs as FPM daemon. Both under www-data user and group (for now).
When I try to update some plugin, Wordpress ask me to enter FTP credentials instead of doing update.
All output below was gathered under '''www-data''' account (PHP-FPM runs under it).
Here is my file system permissions:
'''Document root:'''
{{{
$ getfacl /var/www/html/
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/
# owner: root
# group: root
user::rwx
user:www-data:r-x
group::---
group:SA:rwx
group:webdesigner:rwx
mask::rwx
other::---
default:user::rwx
default:user:www-data:r-x
default:group::---
default:group:SA:rwx
default:group:webdesigner:rwx
default:mask::rwx
default:other::---
}}}
'''wp-content'''
{{{
$ getfacl /var/www/html/wp-content/
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/wp-content/
# owner: root
# group: root
user::rwx
user:www-data:rwx
group::---
group:SA:rwx
group:webdesigner:rwx
mask::rwx
other::---
default:user::rwx
default:user:www-data:rwx
default:group::---
default:group:SA:rwx
default:group:webdesigner:rwx
default:mask::rwx
default:other::---
}}}
'''Plugins'''
{{{
$ getfacl /var/www/html/wp-content/plugins/
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/wp-content/plugins/
# owner: root
# group: root
user::rwx
user:www-data:rwx
group::---
group:SA:rwx
group:webdesigner:rwx
mask::rwx
other::---
default:user::rwx
default:user:www-data:rwx
default:group::---
default:group:SA:rwx
default:group:webdesigner:rwx
default:mask::rwx
default:other::---
}}}
'''Plugin to be updated:'''
{{{
$ getfacl /var/www/html/wp-content/plugins/postmatic/
getfacl: Removing leading '/' from absolute path names
# file: var/www/html/wp-content/plugins/postmatic/
# owner: root
# group: root
user::rwx
user:www-data:rwx
group::---
group:SA:rwx
group:webdesigner:rwx
mask::rwx
other::---
default:user::rwx
default:user:www-data:rwx
default:group::---
default:group:SA:rwx
default:group:webdesigner:rwx
default:mask::rwx
default:other::---
}}}
Despite user www-data is explicitly granted to have write permissions to all required directories, Wordpress fails to start upgrade from web and asks for FTP credentials.
I believe PHP works well enough with POSIX ACL, here is simply proof script:
{{{
$ php -r 'if (posix_access( ""/var/www/html/wp-content/"", POSIX_R_OK | POSIX_W_OK)) {
echo ""The file is readable and writable!\n"";
} else {
$error = posix_get_last_error();
echo ""Error $error: "" . posix_strerror($error);
}'
The file is readable and writable!
}}}
If there are some reason to keep current filesystem permission check method intact - please, issue spcecial technical note regarding required permissions and how does Wordpress checking it.
System information:
{{{
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
$ php -v
PHP 5.5.9-1ubuntu4.16 (cli) (built: Apr 20 2016 14:31:27)
}}}
There are no SuPHP, Suhosin or any suspicious extensions.
This issue could be related to [https://core.trac.wordpress.org/ticket/34327]
Thank you.
",brudas
Needs Patch,51368,Remove windows path check from validate_file,,Filesystem API,,normal,normal,Awaiting Review,defect (bug),new,,2020-09-21T12:38:21Z,2020-09-22T21:51:05Z,"Let's talk about `validate_file` function, and specifically about this fragment here:
https://github.com/WordPress/wordpress-develop/blob/b984a64c987ae259109bcb08776b1ed22f1dc98f/src/wp-includes/functions.php#L5373-L5376
It checks whether or not the path is a Windows drive path. Why is this logic needed? It doesn't seem to play any role or even make sense - why allow arbitrary unix paths, but not windows paths? It was introduced 16 years ago when the function was first created, and even then there was no clear explanation why is it even being checked: [2019].",zieladam
Needs Patch,26135,Running get_space_used() on multisite can be dangerously slow on large installs,,Filesystem API,3.5,normal,normal,,defect (bug),new,,2013-11-21T03:23:17Z,2019-06-04T19:45:09Z,"We're finally upgraded off 3.4 after a few frustrating attempts at an upgrade. You see, we have almost an exact replica staging environment — database, caching, etc. — and everything worked fine when we tested the upgrade on it. But then, trying to push the upgrade live things kept timing out inexplicably. We got a few false flag errors, and were pulling our hair out, until we finally realized the one thing that isn't replicated on staging: our media.
Turns out, running get_dirsize() on a few hundred gigs worth of media can take a little while. Starting in 3.4, that function is called anytime the media options are included, and even with caching it could read the assets as often as once an hour.
I understand why this is done, but I also think running filesize() on every file in a WordPress install can cause some scary situations. The filter added in #21181 is a great enhancement, but I still think WordPress could be more proactive to avoid some potentially crippling scenarios. A few options:
* For new installs, make upload usage tracking opt-in for network admins rather than opt-out. I'd be interested to see stats from the WordPress survey, but anecdotally most of the people using networks are more enterprise than creating open hosting networks. The option to turn off tracking requires serious digging and may not be apparent to admins if the scanning causes problems.
* Run a timer in recurse_dirsize() and kill the function if time > x seconds, then disable size checks and alert the network admin. Could be helpful for network admins to track inefficient file systems.
* Do an initial size scan and store it in the options table, then increment the option during file upload (or delete). WordPress already stores term counts in the term_taxonomy table, and it's worth discussing how precise the storage scan really needs to be. And, you could always revert using a filter.
Related: #19879",wpdavis
Needs Patch,14401,Unable to locate WordPress Content directory (wp-content).,,Filesystem API,3.0,normal,normal,,defect (bug),reopened,,2010-07-23T15:56:19Z,2019-06-04T19:43:05Z,"Hi, I encounter this message on one server during plugin install: ""Unable to locate WordPress Content directory (wp-content).""
PHP Version 5.2.0-8+etch1
Another info from Core Control plugin:
Direct Not Available
SSH2 Not Available
PHP FTP Extension Available
PHP FTP Sockets Available
ABSPATH: /home/www/domain.eu/subdomains/www/
WP_CONTENT_DIR /home/www/domain.eu/subdomains/www/wp-content
WP_PLUGIN_DIR /home/www/domain.eu/subdomains/www/wp-content/plugins
DOCUMENT_ROOT (from phpinfo) /home/www/domain.eu/subdomains/www
I tried some hacks in wp-config.php, but I was not successfull.
When I tried ftpsockets, following error appears:
Warning: socket_last_error() expects parameter 1 to be resource, null given in /home/www/domain.eu/subdomains/www/wp-admin/includes/class-ftp-sockets.php on line 59
When I tried direct, following error appears:
Downloading install package from http://downloads.wordpress.org/plugin/wp-memory-usage.zip…
Unpacking the package
Could not create directory. /home/www/domain.eu/subdomains/www/wp-content/upgrade/wp-memory-usage.tmp",pavelevap
Needs Patch,24780,Use error handlers rather than the error suppression operator,,Filesystem API,,normal,normal,Future Release,defect (bug),new,,2013-07-17T01:14:56Z,2023-09-07T09:39:17Z,"In various places in core (and included libraries, such as pclzip, FTP and phpass), the error suppression operator is used to suppress warnings and notices. However, this also suppresses fatal errors, which makes it a huge pain for debugging.
The big one here is `fopen`, where it is used to suppress warnings when opening a handle fails. For normal files, this is fine since the only errors generated are warnings. When using streams and custom stream handlers, these can generate errors which are really hard to find with this.
(I ran into this with the App Engine plugin, where the SDK method generates a fatal error if the mode is `a`, which is used with error suppression in `win_is_writable()`.)",rmccue
Needs Patch,28013,WP_Filesystem_FTPext::exists($filename) returns false when file exists on FTP Service ( IIS/6.0 Microsoft & Linux/vsftp ),dd32,Filesystem API,3.9.2,normal,normal,Future Release,defect (bug),reopened,close,2014-04-24T15:33:56Z,2024-01-04T21:18:58Z,"I'm having trouble using the update/upgrade functions of WordPress on a Windows IIS/6.0 server.
The .maintenance file is never deleted.
I have to use the FTPext method of updating and I've found that `WP_Filesystem_FTPext::exists('.maintenance')` returns false even though the file exists.
Since the fix for #10060 that function uses `ftp_nlist()` which returns invalid results on the IIS/6.0 Microsoft FTP Service.
I did some more testing and it turns out that the current function has issues with ""dotfiles""
'''Work correctly'''
`WP_Filesystem_FTPext::exists('index.php')`
`WP_Filesystem_FTPext::exists('wp-content/debug.log')`
'''Fail'''
`WP_Filesystem_FTPext::exists('.maintenance')`
`WP_Filesystem_FTPext::exists('wp-content/.maintenance')`
(yes, I made sure those files actually existed ;-)
For this particular purpose, couldend `WP_Upgrader::maintenance_mode()` be modified to test for the existence of .maintenance using `is_file( ABSPATH . $file )` and if so execute `$wp_filesystem->delete($file, false, 'f');` (setting the f bypases all the tests)?",joostdekeijzer
Needs Patch,49403,WordPress prompts for FTP credentials to perform updates,,Filesystem API,5.3.2,normal,normal,,defect (bug),reopened,,2020-02-11T11:58:50Z,2020-03-03T06:04:02Z,"For some reason WordPress believes it does not have write permissions when in fact it does.
My configuration: Lighttpd running as www-data with PHP as fcgi.
Directory permissions are set to 770:user:www-data. During first time installation WordPress successfully creates wp-config.php, so there are no issues with permissions.
I have to add define(‘FS_METHOD’,’direct’); to wp-config.php to workaround this bug. But I cannot do this for all people I am providing hosting to. I keep getting asked why WP cannot update itself even when permissions are set to 777. It is also leaves people with non-updating WP installations and puts my server under risk of being turned into malware bot.
So, can you guys please fix the way WP detects if it has write access?",shadowlmd
Needs Patch,34064,Filter the file type error message,,Filesystem API,,normal,normal,,enhancement,new,,2015-09-28T20:42:56Z,2021-06-03T14:54:59Z,"When uploading a file type that is not permitted, the error `Sorry, this file type is not permitted for security reasons.` is returned.
By adding a filter, a plugin/site admin can add a customized message.
An example use case: A plugin that allows a front-end post submission system that allow file add-ons. By filtering the response, the author/admin can give more detailed specifications including allowable file types, if desired.
Example function of the filter in psudocode:
{{{
add_filter( 'upload_filetype_error', 'bk_test_error' );
function bk_test_error() {
$allowed = get_allowed_mime_types();
$message = ""This type of file is not allowed! Please use one of the following: "" . implode( ', ', array_keys( $allowed ) );
return $message;
}
}}}
",kraftbj
Needs Patch,22772,Introduce HOMEPATH,,Filesystem API,3.5,normal,normal,,enhancement,new,,2012-12-06T03:05:42Z,2019-06-04T19:44:19Z,"I was poking around with get_home_path() and wondering if there's any reason to not set a constant HOMEPATH (like ABSPATH) in the root index.php
I'd seem to be more reliable then get_home_path() and that function could simply return the new constant.
get_home_path has it's origins 8 years ago when the code was very different: [1567]",WraithKenny
Needs Patch,59158,Altering Details block styles doubling .wp-block-details class in the output,,Formatting,6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-21T12:32:34Z,2023-08-21T13:47:23Z,"By defaut Details block styles outputs styles for inner paragraph like:
{{{
.wp-block-details>:not(summary) {
margin-block-end: 0;
margin-block-start: var(--wp--style--block-gap);
}}}
----
If I want to change margin-block-start on the block level styles I use:
{{{
.wp-block-details>:not(summary) {
margin-block-start: 0;}
}}}
BUT it outputs:
{{{
.wp-block-details.wp-block-details>:not(summary) {
margin-block-start: 0;}
}}}
----
HOWEVER,
If I use the same in the Additional CSS section of Styles Editor it produce expected:
{{{
.wp-block-details>:not(summary) {
margin-block-start: 0;}
}}}
",randewoo
Needs Patch,60191,Ampersand in non-entities such as &a; is not escaped,,Formatting,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-04T10:55:42Z,2024-02-27T11:53:02Z,"Wordpress escapes ampersand as {{{&}}} in many places.
It checks if the ampersand is part of any entity before conversion, as the ampersand in an entity shouldn't be escaped. However the regex also passes things such as {{{&a;}}} which is not an entity, and wrongly doesn't convert the ampersand there.
To correct that it has to be checked if the pattern matched is really an entity. Which can be done by using something like html_entity_decode and the decode for an entity would be different from the original string.
The block editor somehow right checks and prevents strings such as {{{&a;}}} to pass but older posts and something inserted by plugins will have this bug. ",superpoincare
Needs Patch,43810,Apostrophe issue,,Formatting,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-04-19T13:31:05Z,2022-02-18T21:17:15Z,"Take a look. Instead of to have normal apostrophe, we have open and close if is between tags
[[Image(https://i.imgur.com/c6QDmR5.png)]]
[[Image(https://i.imgur.com/1F1zfWj.png)]]",colomet
Needs Patch,41304,Bad protocol sanitization in KSES for URLs NOT RFC 3986 compliant,,Formatting,4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-07-13T10:41:29Z,2017-07-13T14:10:32Z,"For URL's that are passed through the kses sanitizer.
As specified in RFC 3986, Section 3.3
The path component contains data, usually organized in hierarchical form, that, along with data in the non-hierarchical query component (Section 3.4), serves to identify a resource within the scope of the URI's scheme and naming authority (if any). The path is terminated by the first question mark (""?"") or number sign (""#"") character, or by the end of the URI.
If a URI contains an authority component, then the path component must either be empty or begin with a slash (""/"") character. If a URI does not contain an authority component, then the path cannot begin with two slash characters (""//""). In addition, a URI reference (Section 4.1) may be a relative-path reference, in which case the first path segment cannot contain a colon ("":"") character. The ABNF requires five separate rules to disambiguate these cases, only one of which will match the path substring within a given URI reference. We use the generic term ""path component"" to describe the URI substring matched by the parser to one of these rules.
So colon(':') is allowed inside URL's. When trying to split the URL like this:
{{{#!php
in the WYSIWYG editor on edit pages.
A fix for #25646 was applied in commit 1842c2b on 13 Mar 2104 - Change set was [27527].
This was then reverted to make a fix for #29219 but the dev then caused the original bug to reappear. The commit is 6b84df3 on 16 Jan 2015 - Change set [31186].
A fix for the orignal bug is now needed again.",hughie.molloy
Needs Patch,48873,CSS Selectors in style tags containing greater than signs are escaped,,Formatting,5.3,normal,normal,Awaiting Review,defect (bug),new,,2019-12-04T09:25:20Z,2019-12-04T09:45:03Z,"If you have unfiltered html disallowed, and you have in your content a style tag with a `>` selector, the selector will be escaped into `>` preventing the CSS from working.
I've used the `wp_kses_allowed_html` filter to allow `style` tags in wp_kses.
I also have this defined to disallow unfiltered html:
{{{
define( 'DISALLOW_UNFILTERED_HTML', true );
}}}
Sample content:
{{{
}}}
Saving this with unfiltered html disallowed would result in:
{{{
}}}
Since it's escaped, the CSS stops working.
I don't think there's a way to allow allow `>` signs in `\r\n""
. ""\r\n""
. ""\r\n""
. ""
This is a red paragraph
\r\n""
. ""\r\n""
. ""\r\n""
. ""--$multipart_boundary--"";
wp_mail( 'whoever@example.com', 'Multipart email test', $body, $headers );
}}}
The email sent by this code should show either the text part or the html part, depending on the email client. I use Thunderbird and it shows no content at all.
The source of the problem is in the Wordpress file /includes/pluggable.php, function wp_mail().
The function argument $headers array/string supplied by the user is assigned to a variable $tempheaders and then $headers is set to an empty array. $tempheaders is then processed in a switch statement block starting at line 251 to extract the header fields From, Content_Type, Cc, Bcc and Reply-To. Any other header fields are considered 'custom headers' and are added back into the $headers array by the default case of the switch block. At the end of processing $tempheaders, if there are no 'custom header' fields present, then the $headers variable remains an empty array.
At line 441, the $headers variable is tested to see if any 'custom headers' need setting.
{{{#!php
$content ) {
$phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
}
if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) )
$phpmailer->AddCustomHeader( sprintf( ""Content-Type: %s;\n\t boundary=\""%s\"""", $content_type, $boundary ) );
}
}}}
Strangely, not only does this if statement block set the 'custom headers' ($headers) when they exist, it also sets the Content-Type: multipart/...; boundary=... Hence, if $headers is empty, as is the case for my example above, the multipart boundary is not set.
The question is: why is setting the multipart boundary dependent on there being these so called 'custom headers'?
I have only noticed this problem since Wordpress 4.6+. Since version 4.6, the header field Reply-To was added to Wordpress' list of 'non-custom headers'. Prior to version 4.6, Reply-To was considered a 'custom header' and so, $headers was not empty and my code worked.
As a work-around, if I add Return-Path: ... to my headers, then everything works and my emails are readable again. However, I shouldn't need to do this.
I think this problem needs some serious attention.
Tony
",drtonyb
Needs Patch,50374,Improve PHPMailer usage,,Mail,,normal,normal,Awaiting Review,defect (bug),new,,2020-06-12T15:59:55Z,2020-06-12T18:56:39Z,"Related to the ticket #41750
We finally have PHPMailer 6 in WordPress core. The PHPMailer author noticed that there are some improvements in the way we use PHPMailer.
if you're setting content-type headers and boundaries via addCustomHeader, you're using PHPMailer wrong! (https://core.trac.wordpress.org/ticket/41750#comment:41)
I would like to request comments and thoughts on taking a good look at how we use PHPMailer. I suspect these outdated patterns were used when WordPress had PHPMailer 5.x series. Now that we use PHPMailer 6, we can review and improve how we use it.
PHPMailer 6 upgrade milestone is WordPress 5.5. It would be great if we ship these changes with same version. ",ayeshrajans
Needs Patch,53393,Latest version of PHPMailer no longer attaches files to emails,,Mail,5.7.2,normal,normal,Future Release,defect (bug),new,,2021-06-14T01:18:07Z,2021-11-01T17:35:53Z,"I've been trying to track down why my s3 bucket files are no longer being attached to automated emails being sent out by WordPress (using the Gravity Forms Entry Automation plugin).
I've been able to identify the latest version of PHPMailer being the reason why the attachments no longer get added. From the author:
----
''This is due to a bug fix that also closed a major security hole. PHPMailer deliberately avoids being a client for HTTP or other protocols for file attachments because it is far too risky. The solution is to take on responsibility for fetching remote files yourself. Instead of :''
{{{
$mail->addAttachment('s3://file.txt', 'file.txt');
}}}
''Do this:''
{{{
$mail->addStringAttachment(file_get_contents('s3://file.txt'), 'file.txt');
}}}
https://github.com/PHPMailer/PHPMailer/issues/2355#issuecomment-858373284
----
I reached out to the Gravity Forms authors as well as the Entry Automation authors and they both have said their plugins just generate raw notification objects and then use wp_mail() to pass the generated mail object off to the rest of my server to actually handle the sending.
Is there a way to get this working again without having to roll my WP version back? Or do y'all know how others are handling this issue?
",threeatetwo
Needs Patch,56115,Prevent default from email to use a subdomain when the siteurl is a subdomain,,Mail,2.1,normal,normal,Awaiting Review,defect (bug),new,,2022-06-30T15:28:24Z,2022-07-01T22:18:46Z,"When the site url uses a top-level domain or the www subdomain, the default from email is `wordpress@mydomain.com`
When the site url uses a sub-domain (not www), then the default from email is `wordpress@mysubdomain.mydomain.com`. In this case, the email will be tagged as spam because the from header domain doesn't the top-level domain.
Would it be possible de force (rewrite) the siteurl variable to remove the subdomain, in order to reduce the chance to have emails marked as spam?
Related: #5007",benoitchantre
Needs Patch,40081,Remove wp-admin links from all Core emails,,Mail,,normal,normal,Awaiting Review,defect (bug),new,,2017-03-09T14:56:40Z,2017-03-09T18:32:07Z,"SpamAssassin has an undocumented rule called `URI_WPADMIN`, which is triggered when it sees a wp-admin URL in a message. If the rule is triggered, the message's spam score is bumped by `2.6` points (by default), which gets the message `50%` of the way to being flagged as spam. This can be reproduced easily with [http://spamcheck.postmarkapp.com/ Postmark's spam-checker API].
SpamAssassin also has a `PHP_ORIG_SCRIPT` rule that is assigned to all messages that are sent with the default PHP `mail()` agent. It has a score of `1.5`, which brings the vast majority of Core emails sent by WordPress installations up to a score of `4.1`, which is `80%` of the way to being flagged. That's not counting any other rules that may be triggered based on message content, server configuration, etc.
From a UX perspective, it's very helpful to include links in messages that take the user directly to any actions that we can reasonably assume they'll want to perform on a message. However, from a security perspective, I think the best practice is to not include those links, because doing so trains users to expect and trust them, which makes them vulnerable to phishing attacks.
So, I think we should consider removing all links to wp-admin, and replace them with a message asking users to log in to their site instead. We can give them navigation breadcrumbs like, `To disable these notifications, log in to WordPress at example.org and navigate to: My Sites > Network Admin > Settings.`
Related #39709",iandunn
Needs Patch,54416,Some WordPress generated emails escape special chars in the email address while other emails do not.,,Mail,5.8,normal,normal,Awaiting Review,defect (bug),new,,2021-11-10T22:28:51Z,2021-11-10T22:28:51Z,"When a user's email address contains an apostrophe, WordPress will escape the apostrophe in the email address for some WordPress generated emails, while it will not for other WordPress generated emails.
For example o'connor@domain.com will be escaped to o\'connor@domain.com for the 'Email Changed' and 'Password Changed' emails that are sent to the user.
For other emails, such as the 'User Lost Password' email, the email address is not escaped and is sent properly. ",ltuspe
Needs Patch,43425,WP_Mail BCC and CC - RCPT TO Errors,,Mail,4.9.4,normal,normal,Awaiting Review,defect (bug),new,,2018-02-26T22:15:08Z,2018-02-26T22:15:08Z,"Adding BCC and CC Fields are having inconsistent results. Undeliverable emails, incorrect ""RCPT TO"" Addresses in SMTP Communication etc. ""RCPT TO"" is being set to ""Message-ID"".
See Tests Below - I tested with standard PHP Mail and wp_mail
If anyone has any pointers that would be great.
Windows Server 2012R2
IIS: 8.5
PHP: 7.0.9
WP: 4.9.4
No special plugins or code.
Test 1: Standard PHP Mail with CC Field
{{{
$headers = 'From: Test
' . ""\r\n"" . 'cc: myotheremail@myname.com';
$to = ""myemail@gmail.com"";
$subject = ""TEST SUBJECT"";
$body = ""Test"";
if (mail($to, $subject, $body, $headers)) {
echo(""Message successfully sent"");
} else {
echo(""Message sending failed"");
}
}}}
Results
Both emails received. Content looks ok
----
Test 2: Standard PHP Mail with BCC Field
{{{
$headers = 'From: Test ' . ""\r\n"" . 'bcc: myotheremail@myname.com';
$to = ""myemail@gmail.com"";
$subject = ""TEST SUBJECT"";
$body = ""Test"";
if (mail($to, $subject, $body, $headers)) {
echo(""Message successfully sent"");
} else {
echo(""Message sending failed"");
}
}}}
Results: Both emails were received
However. The body of each email now has the letter ""b"" appended to the content.
Body Content
{{{
b
Test
}}}
Is something in WP causing this or is this an issue in Windows PHP??
----
Test 3: WordPress wp_mail with CC Field
{{{
$headers = 'From: Test ' . ""\r\n"" . 'cc: myotheremail@myname.com';
$to = ""myemail@gmail.com"";
$subject = ""TEST SUBJECT"";
$body = ""Test"";
if (wp_mail($to, $subject, $body, $headers)) {
echo(""Message successfully sent"");
} else {
echo(""Message sending failed"");
}
}}}
Results
CC never received - SMTP Log file shows: [2018.02.26] 16:46:04 [55583] CMD: RCPT TO:<945dc26bed6e74aeec984fc4ae828e32@myname.com>
Why did the CC field get changed? It looks like the ""CC"" Field is now the ""Message-ID"" as they are the same now.
Gmail received the copy as expected.
----
Test 4: WordPress wp_mail with BCC Field
{{{
$headers = 'From: Test ' . ""\r\n"" . 'bcc: myotheremail@myname.com';
$to = ""myemail@gmail.com"";
$subject = ""TEST SUBJECT"";
$body = ""Test"";
if (wp_mail($to, $subject, $body, $headers)) {
echo(""Message successfully sent"");
} else {
echo(""Message sending failed"");
}
}}}
Results
Same as Test 3 -- The BCC Field ""RCPT TO"" command became the ""Message-ID""??
Gmail received the copy but still had the letter ""b"" appended into the message body.
Any ideas, pointers etc? Suspecting Bug in WordPress or Windows PHP.
",JWGarber1725
Needs Patch,40390,Wrong time (and date) in mail header send by phpmailer,,Mail,4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-04-07T12:47:41Z,2017-05-02T11:59:04Z,"I noticed that some mail clients show wrong time and sometimes date (around midnight) while forwarding or otherwise dealing with emails. For ex. MS Outlook gets it wrong.
The offset is the same as my local timeoffset to UTC.
Tracking it down this is because the {{{rfcDate()}}} within ''wp-includes/class-phpmailer.php'' uses {{{date_default_timezone_get()}}} to add the date and time into the mail header. This value is forced by WP to be UTC.
Debugging rfcDate() with:
{{{
error_log( var_export( date_default_timezone_get(), true ) );
error_log( var_export( date('D, j M Y H:i:s O'), true ) );
error_log( var_export( current_time( 'D, j M Y H:i:s O' ), true ) );
}}}
I get:
{{{
[07-Apr-2017 12:01:02 UTC] 'UTC'
[07-Apr-2017 12:01:02 UTC] 'Fri, 7 Apr 2017 12:01:02 +0000'
[07-Apr-2017 12:01:02 UTC] 'Fri, 7 Apr 2017 14:01:02 +0000'
}}}
I read this ticket #39595 and I guess it will not be changed.
The ticket also says there is no WP function using the native timezone getter. This shows there is. Or at least a lib within core.
Can we modify the phpmailer class to use {{{current_time()}}} or do we need to set and reset the timezone before and after every phpmailer call?
",Drivingralle
Needs Patch,33972,static use of PHPMailer class results in stale state between calls to wp_mail(),,Mail,4.3,normal,normal,,defect (bug),new,,2015-09-23T09:57:09Z,2019-06-04T20:16:28Z,"I've just been chasing down a problem since upgrading to WordPress 4.3 with mails sent via wp_mail() being sent with:
Content-Transfer-Encoding: quoted-printable
Auto switching to quoted-printable was added in the PHPMailer class which was upgraded in 4.3. The issue is that the internal state in $phpmailer is not properly cleared between calls to wp_mail(). There is an attempt to do this via:
// Empty out the values that may be set
$phpmailer->ClearAllRecipients();
$phpmailer->ClearAttachments();
$phpmailer->ClearCustomHeaders();
$phpmailer->ClearReplyTos();
But non of these methods reset the value of $this->Encoding. So if I make two calls to wp_mail() and the first one gets switched to quoted-printable the second one will be sent as quoted-printable even if it doesn't need to be.
Would it not be better to just create a new instance of PHPMailer for each invocation of wp_mail() and let the constructor take care of it?
",codebuddy
Needs Patch,39775,wp_mail miss send Content-Type with boundary when array header does not have other custom headers,,Mail,,normal,normal,Awaiting Review,defect (bug),new,,2017-02-03T07:42:43Z,2017-04-14T09:46:47Z,"It's a PR send in github. https://github.com/WordPress/WordPress/pull/273
Fix empty charset in line 436.
Before:
`Content-Type: multipart/alternative; charset=`
After:
`Content-Type: multipart/alternative; charset=UTF-8`
-------------
fix `$headers[] = ""Content-Type: multipart/alternative; boundary=\""$boundary\"""";` not send when not other headers.
Test Code:
{{{#!php
"";
$headers[] = ""Content-Type: multipart/alternative; boundary=\""$boundary\"""";
$body = ""--$boundary\r\n"" .
""Content-Type: text/plain; charset=UTF-8\r\n"";
$body .= 'test';
$body .= ""--$boundary\r\n"" .
""Content-Type: text/html; charset=UTF-8\r\n"";
$body .= 'test
';
wp_mail( $to, $subject, $body, $headers );
}}}
Before:
[[Image(https://cloud.githubusercontent.com/assets/6196903/22583305/a84c5f1c-ea26-11e6-8718-2bde99d20484.png)]]
After:
[[Image(https://cloud.githubusercontent.com/assets/6196903/22583326/c4055362-ea26-11e6-8890-1da8fac8552e.png)]]
I could search some issue for this, like
http://wordpress.stackexchange.com/questions/191923/sending-multipart-text-html-emails-via-wp-mail-will-likely-get-your-domain-b
https://wordpress.org/support/topic/using-wp_mail-with-php-generated-attachments/
but still have same problem here.",kn007
Needs Patch,52504,wp_mail() not able to send/deliver emails to domain with hyphens in it?,,Mail,5.7,normal,normal,,defect (bug),reopened,,2021-02-12T01:40:30Z,2021-02-12T01:54:03Z,"I tested many plugins and all of them, who uses wp_mail(), are not sending/delivering emails to domain with hyphens in it.
I tested on 3 different hosts, with 4 different domain names. When an email is sent to a domain with hyphens in it, it's not delivered. Seems like the ""sanitizing"" process is causing an issue maybe?",verya.ca
Needs Patch,47827,wp_notify_moderator email error when Site Language is fr_CA,,Mail,,normal,normal,Awaiting Review,defect (bug),new,,2019-08-04T02:31:38Z,2019-10-03T16:32:18Z,"WordPress version: 5.2.2
PHP version: 5.6.27
Hosting: GoDaddy
""Please moderate:"" email is sent without issue when Site Language is en_US.
However, when Site Language is fr_CA, the following error occurs:
{{{
[04-Aug-2019 01:51:40 UTC] WP_Error Object
(
[errors] => Array
(
[wp_mail_failed] => Array
(
[0] => Could not instantiate mail function.
)
)
[error_data] => Array
(
[wp_mail_failed] => Array
(
[to] => Array
(
[0] => wpadmin@example.com
)
[subject] => [WPSite] Demande de modération pour « Foo »
[message] => Un nouveau commentaire sur l’article « Foo » attend votre approbation
http://blog.example.com/foo/
Auteur : JoeUser (adresse IP : xx.xx.xxx.xxx, joe.example.com)
Adresse courriel : joe_user@example.com
Adresse web :
Commentaire :
Commentaire en français
L’approuver : http://blog.example.com/wp-admin/comment.php?action=approve&c=12#wpbody-content
Le mettre dans la corbeille : http://blog.example.com/wp-admin/comment.php?action=trash&c=12#wpbody-content
Le marquer comme indésirable : http://blog.example.com/wp-admin/comment.php?action=spam&c=12#wpbody-content
En ce moment, 4 commentaires attendent vos approbations. Veuillez vous rendre sur le panneau de modération :
http://blog.example.com/wp-admin/edit-comments.php?comment_status=moderated#wpbody-content
[headers] => Array
(
)
[attachments] => Array
(
)
[phpmailer_exception_code] => 2
)
)
)
}}}
",zzzz4
Needs Patch,39709,Add filler content to New Site Registration email to avoid space ratio spam rule,,Mail,,normal,normal,Awaiting Review,enhancement,new,,2017-01-26T19:57:08Z,2017-03-09T15:03:08Z,"I noticed SpamAssassin on helpscout.net is coming very close to flagging the `New Site Registration` emails as spam.
The biggest rule being triggered is [https://wiki.apache.org/spamassassin/Rules/TVD_SPACE_RATIO `TVD_SPACE_RATIO_MINFP`], with a weight of `2.5`, getting the message 50% of the way to the the default threshold of `5`. That rule looks for excessive whitespace in the message body, and I'm guessing it's being triggered by the high ratio of newlines to paragraph text. I uploaded [http://pastebin.com/tDyEfShL a pastebin with the full headers and body].
I don't have time right now to verify whether or not helpscout.net is using the default SpamAssassin configuration, or if they've weighted this rule more heavily for some reason, but even if they have, it seems likely that others will as well. Additionally, the current message text seems like poor UX, and I think the fix for the spam issue would also fix that.
I think the fix would be to add some filler text to the message body, to decrease the ratio of newlines to paragraph text. e.g.:
> Howdy, this is your WordPress multisite installation at {example.org}. I thought you'd like to know that a new site was created. The details are below:
It doesn't really matter what the text is, as long as it's a normal sentence or two, so whatever makes the most sense from a UX point of view will probably be fine.
If the new text does include the domain name, I think we should avoid entering a full URL, because that could trigger other spam rules. (As an aside, I think it's generally a bad idea to include URLs in emails, since it trains users to expect and click them, which makes them more vulnerable to phishing. That's another ticket, though.)
I think the next steps for this ticket would be:
1. Reproduce the issue with a local SpamAssassin instance, to verify that `2.5` is the default score for this message (rather than something Help Scout modified)
1. Test that adding some filler text will prevent the rule from being triggered. I don't think it'll really matter what the text is, for the purposes of testing.
1. Decide on what the best text would be from a UX perspective",iandunn
Needs Patch,53829,Add unique keywords for wp_mail calls to categorize it,,Mail,,normal,normal,Awaiting Review,enhancement,new,,2021-07-29T16:22:09Z,2023-08-15T13:58:39Z,"Here's a suggestion to add unique keywords (handles) for {{{wp_mail()}}} calls to better categorize it, like: {{{namespace:component/to/subject}}}, if we simulate the block names structure, just to mention one possibility.
Examples: {{{wp:login/user/retrieve_password}}} or {{{wp:login/site_admin/new_user}}} where {{{wp}}} is the namespace for WordPress core and plugins could use their own.
These might also be in separate array arguments, instead of a single string.
This would help targeting a single email or group of emails.
It might be easier to implement if {{{wp_mail()}}} would support a single array of arguments: {{{wp_mail( $args )}}}
ps: Helpful list of core emails:
https://github.com/johnbillion/wp_mail
",birgire
Needs Patch,54465,Error message with invalid receipent,,Mail,5.8,normal,normal,Awaiting Review,enhancement,new,,2021-11-18T09:46:41Z,2021-11-18T09:46:41Z,"When sending an email with:
{{{
wp_mail( 'nameSurname.@gmail.com', 'Subject', 'Message' );
}}}
we get the error message: ""You must provide at least one recipient email address"".
Though the recipient is invalid, it's provided.
Related to: https://core.trac.wordpress.org/ticket/47467 but it does not seem to be fixed.",sanzeeb3
Needs Patch,50049,PHPMailer and OAuth,,Mail,,normal,normal,Awaiting Review,enhancement,new,,2020-05-01T18:45:23Z,2020-11-10T16:46:51Z,"I noticed that in the PHPMailer class provided with WordPress, AuthType is limited to CRAM-MD5, LOGIN, or PLAIN. But I noticed [https://github.com/PHPMailer/PHPMailer/wiki/Using-Gmail-with-XOAUTH2 this] page in their wiki which says that support for XOAUTH2 was added in version 5.2.11.
I also took a look at the SMTP class provided with WordPress, and there is a OAuth variable, but it's not used for anything (at least as far as I could tell).
I think it would be nice if this functionality was included with WordPress.
Let me know what you think, thanks.",nicegamer7
Needs Patch,31775,wp_mail attachments support only ascii symbols,,Mail,4.1.1,normal,normal,,enhancement,new,,2015-03-26T12:31:01Z,2021-04-06T11:15:43Z,"Hi.
Currently `wp_mail()` passes it's attachments directly to PHPMailer, and that results in taking file basename as attachment name. Basename seems to behave not normal on non-ascii symbols, for example `/сontacts.png` (the first 'c' is russian) will be truncated as `ontacts.png`. Apart from that, even if it would be basename'd correctly, it won't be utf8-encoded as required by standard (`=?utf-8?B?base64?=`), and that will probably result in broken mails and/or rejected mails.
So i'm proposing to implement functionality for manual attachment naming and/or automatic basenaming filenames and encoding attachment names according to [http://tools.ietf.org/html/rfc2047 standard].
#28407 is tightly bound to this request.",Fike
Needs Patch,56779,wp_mail header ignores multiple headers with same name,,Mail,,normal,normal,Awaiting Review,enhancement,new,,2022-10-10T10:07:49Z,2022-10-10T10:07:49Z,"Context:
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/pluggable.php#L344
Snippet `wp_mail`
{{{#!php
default:
// Add it to our grand headers array.
$headers[ trim( $name ) ] = trim( $content );
break;
}}}
Passing headers this way:
{{{#!php
$headers[] = 'x-my-things: thing1';
$headers[] = 'x-my-things: thing2';
}}}
Will resulting headers only generated one ( the last one )
{{{#!php
$headers['x-my-things'] = 'thing2';
}}}
Expectation, it should retain the headers index, should behave similarly with `phpmaailer::addCustomHeader`, headers indexed by numeric, and each item contains name and value.
Example use case Mailgun `x-mailgun-tag`, https://documentation.mailgun.com/en/latest/user_manual.html?highlight=x-mailgun-tag",pentatonicfunk
Needs Patch,51717,Emails in WordPress (Templating and Sending methodology),,Mail,,normal,normal,Awaiting Review,feature request,new,,2020-11-05T20:50:48Z,2020-11-08T10:39:51Z,"Hello,
One issue that has come up with clients and the ability to apply branding to emails consistently across website generated emails. Because plugin developers need to implement their own templating for emails.
Some Woo-commerce extensions use the Woo-commerce system, which is great, but some don't. Between contact forms (not WooCommerce related), Orders and WordPress emails etc, its quite problematic to implement a consistent presentation for emails across the system.
Another item I've noted - is with my custom apps built previously we have used a scheduling system to send system generated emails, this excludes delays for very important items like forgotten passwords. But essentially all it is, is a database table for to be sent emails, that are sent after that point in time. This could also be used as a log.
I understand this could be setup as a plugin, but if implemented well and inline with the desired future functionality of WordPress could be a nice addition to the system and could have some small performance improvements for requests that generate emails (this is was observed by myself moving to this setup with custom apps/sites/software in the past it is now my standard in any application of quality).
",Nate1
Needs Patch,60082,"""Copied"" tooltip should be hidden when another attachment URL is copied (in list mode)",,Media,6.0,normal,normal,Awaiting Review,defect (bug),new,,2023-12-15T13:05:00Z,2024-03-12T15:39:27Z,"In the media list view, clicking the ""Copy URL"" action link displays previously clicked ""Copy URL"". The previously clicked row showing ""Copied!"" when hover the media again.
=== Environment
- WordPress: 6.4.2
- PHP: 8.2.0
- Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2u PHP/8.2.0 mod_wsgi/3.5 Python/2.7.18 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.39 / Client: 8.2.0)
- Browser: Firefox 119.0 (macOS)
- Theme: Twenty Twenty-Four 1.0
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.5
=== Steps to Reproduce
1. Go to media library
2. Click ""Copy URL"" of one of the media.
3. Click ""Copy URL"" of another media.
4. The previously clicked row showing ""Copied!"" when hover the media again.
=== Expected Results
1. The previously ""Copied!"" tooltip should be close after clicking the next one.
=== Actual Results
1. The previously clicked row showing ""Copied!"" when hover the media again.",jayadevankbh
Needs Patch,43531,$content_width and Add Media (+ twentyseverteen?),,Media,4.9.4,normal,normal,Awaiting Review,defect (bug),new,,2018-03-12T20:07:38Z,2019-01-21T22:04:59Z,"I apologize in advance if this isn't a bug. However, I couldn't seem to find any documentation on the expected behavior (e.g., there's nothing on the codex page for the image_size_names_choose filter). None the less, it certainly feels odd / awkward.
When adding an image (to a post / page), the size setting select (Add Media > Attachment Display Setting > Size) doesn't feel quite right. I understand the relationship between (global) $content_width and this setting. That is, the tag's width= is forced / maxed to the $content_width (if the image is wider than the $content_width).
I see this happening for the size = large images, as well as any image sizes I've added via add_image_size() that are too wide. However, it (i.e., the forced max width=) doesn't happen to the size Medium when the Medium width is set wider than the content width.
Perhaps this is intentional?
Theme was twentyseventeen. Unfortunately, I've haven't had time to try to reproduce this on another theme. The size Medium was set to 800 x 800.
I'd like to suggest the Settings > Media page display the current $content_width, as well as explain a bit, as well as link to a deeper explanation. As it is, a user can select a theme, blindly set the image sizes (not realizing who they actually map to the theme), and then be hit with the experience (?) described above, AND have no idea why.
Truth be told, it took me too long to figure this out. Somehow I've managed to avoid $content_width. Too many custom themes maybe? :)
Or am I just missing something about the intent of what otherwise feels like a sloppy experience?
I hope this helps. TIA
",ChiefAlchemist
Needs Patch,48974,-1 being added to image uploads since version 5.3.1,,Media,5.3.1,normal,normal,,defect (bug),reopened,,2019-12-14T19:52:09Z,2020-10-01T18:12:06Z,"Hi, as of the Friday update my image uploads are geting '-1' added to each image
e.g.,
19-1216-iskysoft-christmas19-696x522-1.jpg
19-1216-jla-special-needs-696x522-1.jpg",neotrope
Needs Patch,28989,AJAX in the media library sometimes fails to load data,,Media,3.5,normal,normal,,defect (bug),new,,2014-07-22T20:23:57Z,2019-06-04T20:08:35Z,"I added video and want to replace it now and since AJAX failed (only on this single page, there are no errors when I hit F12 and go to ""Console"" though) I have no other option then to refresh entire page:
[[Image(http://i.gyazo.com/6379480b489e206bfe0b06b06288579b.png)]]
I'm using 4.0-beta2-20140722. I think it wasn't happening that often in 3.9.1 but I may be wrong.",Looimaster
Needs Patch,54433,ALLOW_UNFILTERED_UPLOADS does not work anymore,,Media,5.8.2,normal,normal,Awaiting Review,defect (bug),assigned,,2021-11-13T01:02:25Z,2022-11-30T20:15:35Z,"I previously added
define( 'ALLOW_UNFILTERED_UPLOADS', true );
to wp-config.php so that I could upload binary executable into the media library. These executable files are installers for the software my lab develops and which is used by thousands of users around the world.
As I am trying to release a new version I tried to upload the new installers and no matter what I do I get ""Sorry, this file type is not permitted for security reasons"".
I really see no reason why the site admin should be prevented to upload something into his own site.
I am using version 5.8.2 of wordpress which does not appear in the Version pull down below, and Avada and a multisite installation.
",mssd19
Needs Patch,30052,Add New Media Drag and Drop Hangs on Crunching,,Media,4.0,low,normal,,defect (bug),reopened,,2014-10-20T19:28:52Z,2019-06-04T20:27:30Z,"When using the drag-and-drop feature of ""Media -> Add New"" the upload hangs at ""Crunching..."".
After extensive testing, I have determined this occurs when the auto_increment primary key (ID field) on the ""wp_posts"" table reaches 1000. If I delete content and reset the key to 999 or below ""Add New"" works but, when the key hits 1000 ""Add New"" get stuck at ""Crunching..."". I can find no errors in any logs or by using the ""backtrace-errors.php"" debugging file.
I have been able to duplicate this issue on multiple WordPress servers.
Note - Images do get uploaded and processed and the entries are placed correctly in the database. The problem is that the upload screen gets stuck displaying ""Crunching..."" along side the primary key number.",Gregory_Lang
Needs Patch,49587,Add error handling for the media manager Ajax response,,Media,3.5,normal,normal,Future Release,defect (bug),new,,2020-03-06T11:00:27Z,2021-03-02T21:47:47Z,"When the media manager modal performs an Ajax request to query attachments, if the Ajax call responds with an error then the user is presented with an eternal loading spinner and no indication there has been a problem.
I think there are two places which need a `fail()` handler for the Ajax promise:
* `wp.media.model.Attachments.more()`
* `wp.media.model.Query.more()`
I haven't done any testing yet though to confirm this.
Needs a decision around how best to present an error to a user. Probably needs UI work; maybe one of the UI pieces such as the upload failure message can be reused.",johnbillion
Needs Patch,35887,Adding multiple media to post - selecting image size,,Media,4.4.2,normal,normal,Awaiting Review,defect (bug),new,,2016-02-20T12:03:10Z,2023-10-25T04:35:24Z,"When clicking ""Add Media"" to add images to a post, you can select multiple images. With all images selected, logic follows that if you change the ""ATTACHMENT DISPLAY SETTINGS"" size from default ""Medium"" to ""Full Size"", that all selected images would have the same setting changed, but when you add them, only the one image that was highlighted is actually ""Full Size"" and the rest which were selected, but not highlighted, are still ""Medium"".
I think when adding multiple media, all should be changed to size that is selected in ""ATTACHMENT DISPLAY SETTINGS"".",myburgh.bernard@…
Needs Patch,22940,Adding term checklist to Media modal has undesired results,,Media,3.5,normal,normal,,defect (bug),new,,2012-12-14T14:59:27Z,2019-06-04T20:04:30Z,"If you use '''attachment_fields_to_edit''' to add a term checklist to the media modal, there is no way to know when a term is unchecked. I propose that when a checkbox is clicked in the compat section, all the checked boxes of the same name are passed in the POST request.",jfarthing84
Needs Patch,48026,Always show selected image even if it doesn't match search string,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-09-12T06:35:43Z,2019-11-04T01:25:45Z,"When embedding an image in a post, if there is a pattern in the search box and an image is uploaded that doesn't match it, the new image details are not shown until the search pattern is cleared.
Steps:
1. Click ""Add Media""
2. Enter search pattern, e.g. ""abc""
3. Switch to ""Upload Files"" tab and upload a file, e.g. ""xyz""
4. Once the file is uploaded, you see the ""Media Library"" tab again, but no details are showing in the ""Attachment Details"" area, although the newly-uploaded file is selected
5. Clear the search pattern
6. Selected image details appear
The correct behavior is to always show the details of the selected file, even if it doesn't match the search pattern, at least immediately after it's been uploaded.",galbaras
Needs Patch,58051,Attachment custom fields not rendered after upload,antpb,Media,6.2,normal,normal,6.6,defect (bug),assigned,,2023-04-02T02:23:40Z,2024-03-06T16:20:39Z,"This is a follow-up to #40909.
Attachment custom fields added via `attachment_fields_to_edit` are no longer rendered just after an image is uploaded.
Clicking away and back will restore the custom field markup, but is quite inconvenient.",trepmal
Needs Patch,59308,Attachment custom fields not rendered in some cases,,Media,6.3.1,normal,normal,Future Release,defect (bug),new,,2023-09-07T09:50:21Z,2024-02-14T17:05:47Z,"This is a follow-up to #58051.
I've noticed that in some cases custom fields added via `attachment_fields_to_edit` do not show up when the ""Featured Image"" modal is opened after clicking a ""featured image"". I then need to first click on another attachment and then back to have the custom fields show up.
It seems that this bug only happens when you have a lot of images (more than 1 page) and the featured image you're looking at is not on the first page. It's easy to reproduce.
If absolutely necessary I can set up a clean WordPress and make a screen recording of this bug, as I rather not share the images and data in our WordPress installation.",SeBsZ
Needs Patch,43736,Audio continues to play in Media Modal after close,,Media,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-04-11T03:21:00Z,2021-04-01T15:24:25Z,"When previewing an audio file in the Media Library modal, if you click Close or Escape, the audio continues to play.
I haven't tested with Video, but I am assuming audio continues as well.",bahia0019
Needs Patch,36680,"Audio player with preload=""metadata"" shows incorrect duration for audio files 1 hour or longer",,Media,4.5.1,normal,normal,Awaiting Review,defect (bug),new,,2016-04-27T04:29:12Z,2017-09-20T21:29:57Z,"For an audio file that's longer than one hour, using the audio player shortcode with preload=""metadata"" shows an incorrect duration for the audio when the page loads. The hours are chopped off. So an audio that is 1:07:45 in duration will erroneously display 07:45 upon loading.
Then when the audio file is played, the correct duration pops in, but this causes the volume control to disappear, so the volume can no longer be adjusted while the clip is playing.
Many podcasts are longer than an hour in duration.
For a demonstration of the bug, see audio 16 on this page, which is 1:07:45 in duration:
http://www.stevepavlina.com/audio/",Dexterity
Needs Patch,42978,Automatically clear file upload error messages,,Media,,normal,normal,Future Release,defect (bug),new,,2017-12-25T15:50:20Z,2020-08-31T10:09:33Z,"When an error occurs on file upload in the media uploader while drafting a post, the error message persists after both a) another file is successfully uploaded, b) the media manager is closed and re-opened.
In both of these cases, it is my opinion that the user is best served by having the error message automatically dismissed, as
1. Its positioning is not typical of a ""historic/cumulative"" error log,
2. It may be assumed that by successfully uploading another file the error first encountered is no longer relevant, and
3. An indefinite amount of time may have passed since the error was first encountered and the media manager subsequently closed and the next time the media manager/upload div was re-opened such that the user may have completely forgotten about the error and may be confused to see a red error box and mistakenly think it is associated with some action he/she just took,
4. As a dialog, nothing about the media manager suggests that its state should persist after being closed and re-opened.
(see attachment as an example of an error)",ComputerGuru
Needs Patch,34296,Autoplay for more than one self-hosted video fails,,Media,4.3.1,normal,normal,Awaiting Review,defect (bug),reopened,,2015-10-14T10:05:48Z,2017-07-05T20:12:26Z,"Hi,
When adding more than one self-hosted video to a page (using the [video] shortcode or media browser to insert), if you set more than one to autoplay, then none of them autoplay.
This might be a mediaelementjs problem.
Stock 4.3.1 install with TwentyFifteen:
http://test.10degrees.uk/one-video-autoplay/ - one video set to autplay, works fine.
http://test.10degrees.uk/two-videos-autoplay/ - both videos set to autoplay, neither plays.
These are both mp4 files.
Jonny",jonnyvaughan
Needs Patch,29931,"Broken attachment page links for files attached to ""Auto Draft"" posts",,Media,3.4.2,normal,normal,,defect (bug),new,,2014-10-11T18:06:08Z,2019-06-04T20:09:34Z,"'''Steps to Replicate'''
1. Create a new post without a title.
2. Use the Add Media button within the post editor to upload files, but do not insert the files into the post.
3. Close the post editor without saving the draft.
4. Go to the Media Library
5. Notice the files show as being uploaded to a post called Auto Draft.
6. Try to view the attachment page, but get a “404 Page Not Found” error.
'''Recommended fix:'''
Do not attach files to a post that has a blank title and body. Leave the files unattached until text has been entered into the title or body of the post.",dcoleonline
Needs Patch,42751,Can we please enqueue media-views independently ?,,Media,4.9,normal,normal,Awaiting Review,defect (bug),new,,2017-11-29T22:14:11Z,2023-10-18T16:16:58Z,"Many of theme developers are styling mediaelement to their preference and this is a first step when they do so;
{{{
/*
* use theme mediaelement CSS
*/
wp_deregister_style('mediaelement');
wp_deregister_style('wp-mediaelement');
}}}
that disables the default CSS and lets us use our own. Issue with this is that
buttons, imgareaselect and media-views CSS files depend on these and if anyone is using a frontend page builder or anything that needs media library in frontend, these 3 CSS files are not present.
My first tought was
{{{
/*
* since we have deregistered medialement style
* make sure media dependencies are loaded
* in case of frontend editros
*/
if( is_user_logged_in() ){
wp_enqueue_style( 'buttons' );
wp_enqueue_style( 'imgareaselect' );
wp_enqueue_style( 'media-views' ) ;
}
}}}
but to my surprise media-views which is a key CSS file for media library is not loading since it is a dependent.
I know that I can do the direct enque but since we have a handle we should be able to use it independently from other styles.
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. ",Themezly
Needs Patch,18275,Can't get perfect thumbnail sizes with image editor,,Media,3.2.1,normal,normal,Future Release,defect (bug),new,,2011-07-28T02:37:16Z,2017-06-27T16:14:27Z,"In the media settings, I have the thumbnail set to a fixed size (218x145), and set to crop to these exact dimensions.
Sometimes the automatic thumbnail crops off people's heads, etc, so I use the Image Editor to manually adjust the thumbnail. I select a rectangle, set the aspect ratio to 218x145, click crop, apply to thumbnail only, and save.
However, sometimes that results in an image slightly off in dimensions - for example, 215x145.
I expect this is a rounding error. However, it happens even if I select an area much bigger than this when cropping in the Image Editor - eg 300x200. After I click crop and see the 300x200 image, I would expect the thumbnail to be automatically be created at 218x145 like it does normally based on this adjusted image - however, it appears the checkbox for using exact dimensions doesn't apply here. (In fact, if I select, say 300x300, it will make my thumbnail 145x145).
This feels like a bug to me, and makes it very hard to generate thumbnails at the size I want.",smerriman
Needs Patch,55200,Cannot add caption to images on mobile,,Media,5.9,normal,normal,Awaiting Review,defect (bug),new,,2022-02-19T01:05:50Z,2023-06-14T11:45:43Z,"On the mobile view of the admin section you cannot add ally text, captions, or descriptions to media uploads ",vincepettit
Needs Patch,31177,Captions video not saved with the post and are lost on attachment page,postphotos,Media,4.1,normal,normal,Future Release,defect (bug),assigned,,2015-01-29T16:13:09Z,2024-01-24T17:36:59Z,"At the moment you can add srt-captions and a poster image to a video, entering them while embedding a video in a post.
When you add a video via Add Media in a post the output will be something like:
{{{[video poster=""url-here/image.jpg"" width=""400"" height=""224"" mp4=""url-here/video.mp4""] [/video]}}}
This means that the poster and the captions are not stored with the attachment itself, so on attachment this data is lost pages and it is impossible to add a caption or a poster image via the image library.
It would be useful to save srt-captions and the poster with the attachment data itself, like the description and the caption now are.
",rianrietveld
Needs Patch,53800,Color of WebP image thumbnail changes on media library list and grid view,,Media,5.8,normal,normal,Awaiting Review,defect (bug),new,,2021-07-27T15:40:23Z,2022-11-04T12:20:55Z,"Hello friends,
Probably this issue is already being tracked. If so please close the ticket.
WordPress 5.8 supports WebP image upload, which works well. But in media library the original color of the image changes completely to a yellow hue. Please see attached screenshots.
**Development Environment**
OS: Ubuntu 16.04
WordPress version: 5.8
Installed and Active Plugins: Akismet Anti Spam
Installed and Active Themes: 2021",subrataemfluence
Needs Patch,59339,Conversion to webp causes fatal error when original image is a palette image (as opposed to truecolor),,Media,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-09-13T13:41:52Z,2023-09-13T13:41:52Z,"I am working on an image conversion plugin. I've run into a bug when the original image is a ""paletter image""[https://www.thecoderscamp.com/paletter-image-not-supported-by-webp/]"", or in other words, an image that has an indexed palette rather than being truecolor. I believe it's a png.
The error I get is:
{{{
Fatal error: Paletter image not supported by webp in /home/username/public_html/wp-includes/class-wp-image-editor.php on line 584
}}}
And how I'm using it:
{{{#!php
image_path );
$new_file_info = $this->get_editor()->save( $this->image_path, 'image/webp' );
}}}
This method worked fine on hundreds of images of png, jpg, and tiff until I ran into this one that has a ""palette"".
In `wp-includes/class-wp-image-editor-gd.php:487`, if the image loaded into WP_Image_Editor is a png, we check for a palette and convert to true color before saving. I believe that we need to also check in the webp conditional and, just like for png, convert to truecolor first.
",jakeparis
Needs Patch,42953,Created images have a larger filesize than the original,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-12-21T12:34:42Z,2020-11-30T03:14:16Z,"Images uploaded in the media library get resized to the defined sizes. However, if the image has been optimized beforehand the result can be that the generated images have a filesize larger than the originally uploaded image.
It can happen due to a very high `jpeg_quality` value for example..
This should not happen under any circumstances. Uploading optimized images is something a lot of people do for SEO purposes, and larger generated images affect that negatively.
Sometimes even if the image-size is smaller, the generated file's filesize is bigger.
One solution would be to save the image in a temp location and have its filesize checked against the original image. If the image is smaller than the original one then move to its final location. If not, then some other solution has to be found.",aristath
Needs Patch,32012,Crunching doesn't work on some grayscale images,,Media,4.1.1,normal,normal,,defect (bug),new,,2015-04-18T13:46:09Z,2019-06-04T20:12:44Z,"No error message, just no thumbnail/smaller sizes crunched on upload of a grayscale image.
Some images work, others not. All are similar sizes, 32-bit grayscale, under 2MB with varying dimensions.
I have followed the relevant steps at: https://wordpress.org/support/topic/25-imagemedia-uploader-problems?replies=1",nifwlseirff
Needs Patch,53895,"Default Audio Player Bug, mejs-container wp-audio-shortcode mejs-audio",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2021-08-08T22:33:28Z,2021-08-08T22:38:59Z,"The default code has a problem in this zone mejs-container wp-audio-shortcode mejs-audio. The width is set and this causes viewing problems after changing browser window size. The width is hard coded and should not be set. To reproduce the bug add a audio file with wp customizer, in a theme with a header, save. View code and the width is set. This would be fine if the width is a percentage or not set at all. I personally think the width should be removed.",akissz
Needs Patch,51038,Default height when using add_theme_support( 'custom-header') in GD.,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-08-17T06:17:21Z,2021-06-01T03:21:54Z,"`add_theme_support( 'custom-header')` defaults to 0 for width and height.
if you are using GD, the height will be set to 0 and the cropping will fail and you will get the error message “There has been an error cropping your image.“.
If the height is set to 0 in GD, how about getting and using the height of the source file?",munyagu
Needs Patch,25748,Delay when sending many images to the editor,,Media,3.7,normal,normal,,defect (bug),new,,2013-10-28T17:04:23Z,2019-06-04T20:06:13Z,"Clicking the ""insert into post"" button after uploading many images can result in a really long delay before the image markup is added to the editor. Here is an example on my local installation:
http://screencast.com/t/ja8cqXyHSw
So you can imagine that the same issue on a remote server could result in a painfully long delay (I've seen it take 30+ seconds).
It looks like the cause of the delay is in the individual post request that happens for each image when sending them to the editor. What is the purpose of these requests? Isn't all the data needed to send the image markup to the editor available to the javascript when the button is clicked?
If not, and those requests have to happen in their current form, there should be some sort of ""loading..."" indicator on the editor screen letting the user know something is happening, because currently the assumption would be that the insertion failed.
And regarding the likelihood of someone inserting that number of images into a single post, photographers will regularly upload 30, 40, 50 or more images to a post after a shoot.",matthewdietsche
Needs Patch,47130,Drop files to upload is also available except Upload Media tab,,Media,5.1.1,normal,normal,Future Release,defect (bug),reopened,,2019-05-06T10:31:46Z,2021-08-12T14:38:08Z,"Howdy Developers,
As per my understanding, `Drop files to upload` feature should be enabled during `Upload media` only.
Instead of that, I have noticed that whenever Crop Image or any other popup for media is open, then `Drop files to upload` is still there.
",malavvasita
Needs Patch,50011,Edge case in image lazy-loading,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-04-25T20:40:32Z,2020-05-20T21:42:52Z,"In #44427 the feature to lazy load images by default was added.
The code uses regex and hence there are some edge cases which can complicate.
One such case is adding
{{{
loading=lazy
}}}
with space before 'loading' in the alt value.
This can be done in the block-editor by selecting the image and adding the above in:
Image settings > Alt text (alternative text) box
This is allowed in HTML.
When this is done, the regex thinks that the image tag has a lazy loading attribute and doesn't add it. ",superpoincare
Needs Patch,27427,Edit Gallery view does not display images in original aspect ratio,,Media,3.5,normal,normal,,defect (bug),new,,2014-03-15T18:38:26Z,2019-06-04T20:07:06Z,"Тhe new gallery preview does display thumbnails in their original aspect ratios, although the modal for creating and editing the gallery does not.
The goal is to show the thumbnails in their original ratio which happens when the thumbnails are not square. This happens, for example, if the thumbnail size in Media Settings is 200 (W) x 400 (H), ""Crop thumbnail to exact dimensions"" is not checked. Placement of a certain thumbnail within the gallery often depends on the orientation, and it is very difficult if we show a square shape instead of the real shape.
More details:
https://core.trac.wordpress.org/ticket/26959
http://wordpress.org/support/topic/edit-gallery-square-thumbnails-vs-portrait-and-lanscape?replies=2",Greybox
Needs Patch,43816,Editing Image Can Lead to Mixed Metadata,,Media,4.9.5,normal,normal,Future Release,defect (bug),new,,2018-04-20T00:04:30Z,2022-11-23T16:09:37Z,"== Summary
If an image is uploaded at a size allowing the creation of a defined image size (ie, ""large"", ""twentyseventeen-featured-image"", etc.) and the image is then edited to a size which doesn't allow that defined size to be created, the non-supported size can still be placed and will display the original image.
== Steps to Reproduce
1. Upload an image which is slightly larger than a defined image size in a particular theme (for example, if using the WordPress default definition for ""large"" images, 1,024 pixels, upload an image 1,100 pixels wide)
1. Edit the image, and scale or crop it to be 1,000 pixels wide
1. Save edit
1. Within the post editor, ""add media"", select the ""large"" image size, and place within body of post
=== Expected Behavior
* //Developer//: The ""large"" image should not be able to be selected within the ""Place Media"" dialog
* //Regular user//: The ""large"" image placed should reflect the image edit
=== Result
The ""large"" size is selectable and the **original** image is placed within the page.
=== Other Effects
In this particular example, if the Media Library is in ""grid"" view, and our edited image is selected, the dialog which opens will display the incorrect original image, as the dialog preferentially uses the ""large"" image size.
== Source of Behavior
I believe the problem stems from line 880 of https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-admin/includes/image-edit.php :
{{{
$meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) );
}}}
* `$meta['sizes']` contains all of the sizes which were able to be created when the image was uploaded
* The return from `$img->multi_resize()` only has keys set for those sizes that can be created from the edited image
* Using `array_merge` keeps the original values not returned by `$img->multi_resize()`, despite the fact they are no longer valid for this edit
== Fix
I believe the fix may be as simple as simply returning the result of `$img->multi_resize()` without merging it into the existing `$meta['sizes']`, which are mainly used in this context to create the `_wp_attachment_backup_sizes` array.
{{{
$meta['sizes'] = $img->multi_resize( $_sizes );
}}}",rogerlos
Needs Patch,52509,Error generating Thumbnails of PDF-Files,,Media,5.6.1,normal,normal,Awaiting Review,defect (bug),new,,2021-02-12T12:46:26Z,2023-07-02T13:37:05Z,"This is a follow-up to #48853.
This issue seems to be still present in Version 5.6.1
Some PDF-Files cause an internal server error, some do not. (The server's error log tells something about missing headers)
Here's what i did to isolate the error:
- I examined the PDF-Files. The affected files had a PDF-Version 1.7 an were created with non-Adobe-Tools (e.g. Office365). PDFs with Version 1.4 and 1.5 (created with Acrobat) worked well.
- tried it with a local copy of the site on XAMPP: No Problems
- used a little code-snippet to prevent thumbnail-generation in general: Upload works
This is the snippet:
{{{#!php
Set featured image in the sidebar
- the ""Featured Image"" media modal opens
- depending if your initial device orientation is landscape or portrait, click once or twice on the Chrome dev tool ""Rotate"" button to change device orientation
- once the orientation is ""portrait"", the whole content of the modal disappears
- ie: the content container becomes totally empty: `
`
- change orientation again: still empty
See attached screenshots.",afercia
Needs Patch,32302,Filename policy of IMAGE_EDIT_OVERWRITE==true seems to create CDN and browser cache issues,,Media,2.9,normal,normal,,defect (bug),new,,2015-05-08T03:22:59Z,2019-06-04T20:13:12Z,"Just something to check, as discussed over at https://deliciousbrains.com/undefined-define-image_edit_overwrite/
It states the behaviour:
""When you add define( 'IMAGE_EDIT_OVERWRITE', true ); to your wp-config.php the behaviour changes. When you edit an image, it still creates a new image and leaves the original image alone. '''But when you edit again, it overwrites the first set of images rather than create a new set.'''""
My comment: ""what about CDN and browser caching? If the ""unique appendage"" didn't change, then readers won't see the updated image until the cache expires, which for our site at least is 'forever'. If the first edit were to be deleted, wouldn't it be more sensible to still generate a new ""unique appendage"", rather than using the same one? But then again, that could break existing references to the first edit... oh my it becomes messy quickly!""
Brad's reply: ""Excellent point! I think you're right. When IMAGE_EDIT_OVERWRITE is set to true, it should create a new unique appendage instead of reusing the old one. You should open up a Trac ticket for this to be looked at and discussed.""
Are you able to provide any clarification?
Many thanks,
Aidan",aidanlane
Needs Patch,48712,"For large images, wp_generate_attachment_metadata is breaking WordPress",,Media,5.3,normal,normal,Awaiting Review,defect (bug),new,,2019-11-18T21:33:48Z,2020-01-16T15:19:46Z,"I have this code in a custom plugin of mine:
{{{
$screens_attach_id = wp_insert_attachment( $attachment, $file );
require_once( ABSPATH . 'wp-admin/includes/image.php' );
$attach_data = wp_generate_attachment_metadata( $screens_attach_id, $file );
wp_update_attachment_metadata( $screens_attach_id, $attach_data );
}}}
It worked until now, however, in the current version, wp_generate_attachment_metadata is breaking execution without any error in any log, when called for some (large?) images. Example image: https://i.ibb.co/k1FVrCh/apex-jpg5dd30be89f32b-1024x603.jpg
",coderevolution
Needs Patch,33896,Gallery linking to Attachment page,,Media,,normal,normal,,defect (bug),new,,2015-09-16T13:52:16Z,2019-06-04T20:16:05Z,"I have received some user reports recently, that they are using internal WordPress gallery (which was improved) and there is some strange problem.
- Create new post
- Create new gallery with existing images from Media library (do not upload new images).
- Link gallery to Attachment page.
- See post on website, click on first image in gallery.
- You will see links to next/previous image, but not related to user created gallery. Instead of created gallery you can see all images attached (uploaded) to some other post.
Users do not understand that this is how it works (gallery shortcode x attachments uploaded to post), they are only asking what is wrong. Maybe we should disable possibility to link to Attachment page when all images from gallery are not uploaded to current post?",pavelevap
Needs Patch,43310,"Generic ""HTTP Error"" when uploading PDFs via Media area",,Media,4.9.4,normal,normal,Awaiting Review,defect (bug),new,,2018-02-14T01:58:49Z,2018-08-19T11:13:16Z,"This might be tied in with Ticket #41973. This may also be [https://make.wordpress.org/core/2016/11/15/enhanced-pdf-support-4-7/ tied into this issue], which was previously fixed for 4.7x.
Currently using the following code to handle image processing:
{{{
// Fix image processing
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
}}}
I've done all the digging around I can. File upload max size is 140 megs (the test PDF I used is only 13 megs). I've done the .htaccess and php.ini tweaks needed to allow plenty of upload time. Images no longer return the arbitrary ""HTTP Error"" after adding the above function.
PHP 7.0.27-0+deb9u1 (cli) - This is the latest stable release, [https://packages.debian.org/search?keywords=php7.0 per Debian].
This is what I passed along to our customer:
""You’ll have to “tough your way” into the PDF uploads… after you upload a PDF, give it a few minutes… then do a power refresh on the media gallery (I would recommend you upload it through the media gallery first, rather than using the “Add Media” feature on posts and pages).""",BearlyDoug
Needs Patch,47531,Handling WP embed (native) Audioplayer's Volume Slider with keyboard defective,,Media,5.2.1,normal,normal,Future Release,defect (bug),new,,2019-06-12T12:05:25Z,2019-08-29T14:35:16Z,"
As I underestand, handling audioplayers with Tab/Arrows/Enter should be universal with all browsers. I have built a test-webpage from my main web page, consisting some audio-books for children. There are several single WP embed (native) players: https://midripai.ee/s3/pai/pai-kuulata-yksiti-wpn/.
Moving with Tab-key onto volume slider, it should be increasing volume by Right Arrow, and decrease by Left Arrow (at least Screenreader Orca in Linux tells to do so). Instead of that, the Down Arrow decreases volume, and ''the Up Arrow does nothing''.
Of course, the volume can be handled by Up/Down arrow, being either on Time Slider; or on Mute Button (it seems not to depend of web browser: at least Chrome and Firefox do work similarly.) Yet bringing volume down, being on Volume Slider by Down Arrow could be annoying for visually impaired, as one needs to move back onto Mute Button or Time Slider of the same player to increase volume again. Being on the Play/Pause button, the Down Arrow also decreases volume; and Up Arrow does nothing.
The same problem occurs also with WP embed (native) Playlist Player.
Tested: Win7-64 bit: Both Chrome (74; 75.0.3770.80 = the latest) and Firefox (67.02); and
Linux Mint Mate 18.3 64 bit: Chromium 73.0.3683.86 and Firefox (67.0)
Laptops: Fujitsu E8420 and Lenovo w500 internal keyboards and also external ps2 and USB-keyboard.
Both with Blocks and blocks switched off (with plugin Classic editor); and also disabled all plugins for test). I did not use special Audio-blocks though.",Juhan108
Needs Patch,52495,"Hard cropped images do not crop specified dimension, causing lack of adaptive images",joedolson*,Media,5.6.1,normal,normal,Future Release,defect (bug),accepted,,2021-02-11T05:30:26Z,2022-06-08T15:51:48Z,"If an image is less than the size of a specified image size, it will be cropped only on the dimension that is greater than the specified dimension. The result is an image that is not the same aspect ratio as other images with specified image sizes that have the same aspect ratio. So it won't output those other images in an srcset and your site may be loading much larger images than needed for mobile.
For example, I might have defined image sizes of 1000x500, 750x375 and 500x250 and use those images in my theme. Normally, I'd insert that largest image and then the other two would be in an srcset. But, if I were to upload and 960x600 image, I'll get a 960x500 image, as well as the normal 750x375 and 500x250. Because these aren't the same aspect ratio, when I insert the larger image, there is no srcset. Now visitors are stuck loading the largest image.
It would make sense to me for hard crop to scale the image up to meet the minimum size for both dimensions, then crop.",larssg
Needs Patch,30759,"If Featured Image is selected, but not saved, editing the image will drop the selection after a save",,Media,4.0.1,normal,normal,,defect (bug),new,,2014-12-18T07:56:17Z,2019-06-04T20:10:14Z,"To reproduce:
Create a new post.
Click on an image to select it.
Click on Edit Image link, edit image, and save.
Image selection menu has changed dimensions, and the selection state has returned to its prior state.
If a featured image has already been assigned to the article, selecting another image, and editing it will return the user to an image selection screen with the prior featured image selected.",DavidTheMachine
Needs Patch,35489,Im having an issue with WP_Image_Editor_Imagick,,Media,4.4.1,normal,normal,,defect (bug),new,,2016-01-16T20:39:07Z,2019-06-04T20:21:12Z,"Im using this following to set up an editor to create thumbs for an image I am uploading:
$editor = wp_get_image_editor( $file );
Some images are crashing my script causing a 500 error.
I tracked the issue down to the WP_Image_Editor_Imagick class specifically within the crop_image function.
From what I could tell this is the line causing my 500 error
at line 349 of class-wp-image-editor-imagick.php
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
I fixed the issue in a band-aid class I am temporarily using removing the WP class and using my own with the wp_image_editors filter
within my added class I am using I added the following line
$this->image->setResourceLimit(6, 1); // set max threads to 1
I added it just before
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );
",stoi2m1
Needs Patch,42922,Image Scaling using get_the_post_thumbnail issue in WordPress,,Media,4.9.1,normal,normal,Awaiting Review,defect (bug),new,,2017-12-17T08:22:37Z,2020-11-19T15:56:40Z,"Issue URL - http://www.creativescripters.com/clients/testwp/uncategorized/image-resized/
I am using wordpress (self hosted) latest version, The problem is I am looking to get a thumbnail from the resized/scaled image, and when I do that wordpress returns the test-150x150.jpg i.e. Thumbnail from the original image and not the resized image which should have been test-e1513229707262-150x150.jpg
Step to reproduce the issue
1. Upload an image , Scale it (click edit on uploaded image and change width and click scale). Wordpress will rename the image and add an Suffix Id to the name so you can confirm the image have been scaled. for eg if you uploaded test.jpg after scaling image name will become test-randomstring.jpg
[![enter image description here][1]][1]
2. When I call get_the_post_thumbnail($post, 'full') I get the correct image The resized one i.e. test-randomstring.jpg
[![enter image description here][2]][2]
3. When I try to get a different size of the scaled image for eg I need thumbnail generated from the image size and I call function get_the_post_thumbnail($post, 'thumbnail') wordpress return the THUMBNAIL from actual image (the one I uploaded initially test.jpg and not the resized one test-randomstring.jpg)
Screenshot - https://i.imgur.com/sQKoZcF.png
[1]: https://i.stack.imgur.com/TTIaG.png
[2]: https://i.stack.imgur.com/T3vPE.png",rigids.php
Needs Patch,40785,Image caption in WYSIWYG is not displaying in post page,,Media,4.7.5,normal,normal,Awaiting Review,defect (bug),new,,2017-05-17T13:53:07Z,2017-05-19T11:15:53Z,"I have uploaded an image to my post via Media upload utility of WYSIWYG editor and added a caption to it. When I go the post page, the image is there but the caption is not showing up anywhere, which ideally should be underneath the image.
In wp_posts table the content was saved as:
{{{
Nestled among ski slopes in the Garhwal Himalayas, this secluded hotel is 23 km from Panch Prayag temple and 25 km from Nanda Devi National Park. In winter, the property is only accessible by cable car.
Ranging from studios to 2-bedroom suites, the cosy lodgings come with cable TV and kitchenettes with minifridges, microwaves and stoves. Suites add living rooms and dining areas.
Breakfast is free. There's also a relaxed restaurant, a game room and a bonfire area with regular entertainment. Ski equipment rentals and lessons are available, as are guided hikes and in-room massages. The property has a generator.
[caption id=""attachment_713"" align=""alignnone"" width=""1600""]
Cliff Top Restaurant at 10000ft[/caption]
}}}",subrataemfluence
Needs Patch,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
Needs Patch,60548,Image editor: improve the browsePopup function,joedolson*,Media,6.3,normal,normal,6.6,defect (bug),accepted,,2024-02-15T14:10:11Z,2024-03-06T16:59:58Z,"While auditing all the remaining jQuery deprecations still to address in core, I noticed a couple things that offer room for improvements in the `browsePopup` function of the core image editor.
1. The `browsePopup` function uses the `window.event` property, which is deprecated and should not be used. This is the `global` event. Instead, the event should be passed as a function parameter. Aside: instead of using inline events, it could have been better to consider a more modern approach.
2. When using the keyboard to navigate the items in the 'Image rotation' dropdown menu, the page scrolls. See attached animated GIF. There's some code in place to prevent page scrolling you may need to reduce your viewport height.
See [55919] / #50523
",afercia
Needs Patch,60354,Image filter functions strip query string from image src,joemcgill,Media,,normal,normal,Awaiting Review,defect (bug),reviewing,,2024-01-26T15:14:35Z,2024-01-27T00:07:47Z,"The following 2 functions strip the query string from the image src found in the content but it's not clear why this is done.
- wp_image_add_srcset_and_sizes: https://github.com/WordPress/WordPress/blob/master/wp-includes/media.php#L1708-L1715
- wp_img_tag_add_width_and_height_attr: https://github.com/WordPress/WordPress/blob/master/wp-includes/media.php#L2092-L2094
When using an external image service like Photon, Tachyon, or some other integration that provides resizing via a query string this breaks the generated srcset & sizes calculation, and can make the width and height attributes use the original image dimensions when the same image file name is used up to the start of the query string.
Take the following 2 image URL examples:
- https://example.com/images/kitten.jpg
- https://example.com/images/kitten.jpg?resize=300,200
The query string means these are 2 different images but those functions will treat them both as the original.",sanchothefat
Needs Patch,32215,Image hard crop no longer working as expected,,Media,4.2.1,normal,normal,,defect (bug),new,,2015-04-30T20:37:21Z,2019-06-04T20:12:58Z,"Since I upgraded to 4.2.1, hard cropping of images no longer seems to work (resizing always occurs using soft-crop mode, resizing the larger dimension first, then cropping the smaller to size). I am regenerating them using the regenerate thumbnails plugin (which works fine), and am looking at the images directly on the server (FTP) to eliminate the possibility that any CSS might be producing strange results. It is a custom theme that I built, but I switched the site over to Twenty Fourteen to rule out my code and got the same results. I also tried disabling plugins, to no avail.
I am running my production site on the same server (which is running 3.8.7) and the crop works fine.",WorldWideWebb
Needs Patch,59331,Image optimizations fail to apply when using Timber,,Media,6.3,normal,normal,Future Release,defect (bug),new,,2023-09-12T17:46:01Z,2023-09-12T21:45:19Z,"A user [https://mastodon.social/@grigs@front-end.social/111052735378137214 reported] hero images were getting `loading=lazy` on their site. After inquiring, I found they were using Timber for templating. It makes sense that the logic in `wp_get_loading_optimization_attributes()` wouldn't work properly in this case since it is tightly bound to WordPress's templating system(s). This may actually be an issue better fixed in Timber itself, but ideally WordPress core should be able to do the right thing with alternate templating systems (or even complex templates written in the WordPress way). Ultimately, this may require the use of output buffering and HTML Tag Processor as [https://github.com/WordPress/performance/issues/805 proposed] for a module in the Performance Lab plugin. See #59331 for adding output buffering for template renders with a filter for post-processing.
Here's how to reproduce the issue with Timber:
1. Install and activate the [https://wordpress.org/plugins/timber-library/ Timber plugin] from WordPress.org.
2. Install and activate the [https://github.com/timber/starter-theme Timber Starter Theme] from GitHub (i.e. download the ZIP).
3. Add a new post with an initial large image or a featured image.
4. See the image has `loading=lazy` and is missing `fetchpriority=high` on the frontend.
Initial image block:
{{{
}}}
Featured image markup:
{{{
}}}",westonruter
Needs Patch,43152,Image remains in page after deleting from Media Library,,Media,4.9.2,normal,normal,Future Release,defect (bug),new,,2018-01-24T00:31:39Z,2019-04-15T15:21:13Z,"Whilst editing your page, if you open the Media Library (using the Add Media button), and then delete an image that is currently added to the page, the image remains on the page after closing the pop-up window.
To Reproduce:
- Insert Image on Page
- Click Add Media button to display the Media Library popup Window
- Select the image that you previously inserted on the page and delete the image
- Close the media pop-up window
- Image that was deleted remains on page
Here's a gif to show an example - https://cl.ly/1I2r3q3H301J
I originally raised this as an [https://github.com/WordPress/gutenberg/issues/4610 issue with Gutenberg], but it was suggested to raise it here since it's also an issue with the classic editor.",ahortin
Needs Patch,59740,Image scaling being applied inconsistently,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2023-10-26T00:31:09Z,2023-10-26T16:33:56Z,"My understanding was that images over 2560px would be scaled and a ""-scaled"" named version created.
This doesn't happen every time, though. What exactly are the criteria?
It doesn't happen for me on some larger images over 8000px wide. But does then happen on smaller 5000px images.
I have created many test images of different sizes, and I cannot figure out what is causing this discrepancy. Some get scaled, and some do not. And it doesn't appear to be related to pixel dimension.
If there is something more than the pixel dimension being used to determine whether a scaled version is created, where is the documentation to explain this?",whistlerdan
Needs Patch,46470,Image srcset and sizes not output in classic block. Image attachment removed,,Media,5.1,normal,normal,Awaiting Review,defect (bug),new,,2019-03-12T03:16:28Z,2019-04-04T13:56:29Z,"I installed the Gutenberg plugin on one of my sites, which was eventually updated to WP 5.0.3 and then WP 5.1. In all that time, most of the content remained unchanged.
Looking at it now, most of the images in the library are unattached and embedded images produce the old/simple ""IMG"" tag, with no ""srcset"" or ""sizes"" attributes.
I've tried attaching images in the media library. No change.
I've tried setting $content_width. No change.
Than only thing that makes any difference is editing the post/page, removing the embedded image and simply embedding it again. In the editor's HTML view, the respective ""IMG"" tag looks almost identical, except possibly the order of attributes.
When converting tinyMCE content to blocks, WordPress should convert all of the required metadata, but seems like it doesn't.",galbaras
Needs Patch,54839,Image upload after dirty filter requires filter change before it can be inserted to page,,Media,,normal,normal,Future Release,defect (bug),new,,2022-01-17T08:15:54Z,2024-02-05T20:14:53Z,"Steps:
1. Open media library popup.
2. Change date filter.
3. Upload new image.
4. See uploaded image is not visible in list nor selectable. (Select button is disabled)
5. Change filter to match the new image uploaded, See image is visible.
Expected behavior:
1. Uploaded image should be selectable if it matches filter (or should reset filter on tab change).
Current behavior:
1. Uploaded image after dirty filter is not selectable.",utkarshpatel
Needs Patch,59577,Images in block templates or patterns do not have loading optimization attributes,flixos90,Media,,normal,normal,6.6,defect (bug),assigned,,2023-10-09T19:12:23Z,2024-03-13T15:41:15Z,"This ticket is created as a break out from #59464: While that ticket was also initially pointing out the lack of loading optimization attributes in TT4, it has been primarily focused on the lack of the dimension attributes `width` and `height` from images that are hard-coded in the theme (e.g. in a `core/image` block within the theme's block templates, template parts, or patterns).
As noted in https://core.trac.wordpress.org/ticket/59464#comment:16 however, there is another arguably more severe problem: Even if that bug was fixed for TT4, most of those images ''still'' wouldn't receive the loading optimization attributes. That is because TT4 includes most of its images directly in block templates, or in patterns, outside of template parts, post content, or widget content.
Currently, any images that aren't covered by more specific contexts than `template` (which is for the overall block template) are not handled at all by `wp_filter_content_tags()`, impacting TT4 and likely several other block themes. This ticket is focused on that problem, trying to identify a solution to also consider images in the overall block template, while avoiding duplicate processing of images that were already processed with a more specific context.",flixos90
Needs Patch,59764,Imagick squashes image for cropped size,,Media,6.3.3,normal,normal,Awaiting Review,defect (bug),new,,2023-10-29T12:02:00Z,2023-10-29T12:02:00Z,"I have an image sub-size that uses crop instead of scale, and when the resulting image should upscale, GD does it OK-ish, Imagick is squashing the content.
In both cases, the resulting image has the expected width and height, but the content in the image generated with Imagick is not squashed. This happens for a portrait ratio of the original image.
How I replicate this:
- sub-size: 1440x760 px + crop
- original file: 1152x2048 px
- using the `image_resize_dimensions` filter that returns the upscaled computation
- upload file using GD
- upload the same file using Imagick
GD result - OK
https://imgur.com/EQTesQT
Imagick result - not OK
https://imgur.com/G0hjmo0
",Iulia Cazan
Needs Patch,55302,Improve media library upload progress indicator,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-03-03T04:56:51Z,2022-07-06T16:47:18Z,"When uploading in the media library, the progress bar shows the ''upload progress'' of the image.
Once the image is fully uploaded WordPress creates the sub-sized images used to serve images on the front end. Depending on your configuration (theme, plugins, server), and the upload size this can take quite a while to complete. During sub-sized image creation, the progress bar for the image shows as ""full"". Finally, when the image sub size generation completes, the image changes from a gray box to the thumbnail of the uploaded image and if multiple images have been uploaded, the uploader moves on to the next image. Screencast attached.
The problem here is that no progress is shown for the image regeneration phase.
Uploading in the block editor works a bit differently: as soon as the image is dropped onto the editor to upload, a grayed out version of the image is shown with a spinner. The spinner spins during the upload and continues spinning during sub-size creation. Finally, when all sub sizes are created, the image becomes fully saturated and the spinner goes away. **Looks like this is changing to a progress bar though**, see https://github.com/WordPress/gutenberg/issues/13984 & https://github.com/WordPress/gutenberg/tree/trunk/packages/block-editor/src/components/media-upload-progress
Two potential improvements we could make in the media library:
1. immediately show the thumbnail of the dropped image instead of the gray box
2. switch to a spinner entirely, or for the image regeneration phase or try to show actual progress. The challenge with showing progress is we don't know how long the request will take on the server.",adamsilverstein
Needs Patch,47456,Improve the user interface to ensure correct usage of the image alt text,joedolson*,Media,,high,normal,Future Release,defect (bug),accepted,,2019-06-01T11:15:23Z,2024-03-12T11:15:33Z,"Splitting this out from the [https://github.com/WordPress/gutenberg/issues/created_by/karlgroves WPCampus accessibility report issues on the Gutenberg GitHub], see https://github.com/WordPress/gutenberg/issues/15309 as part of the reported issue applies to the Media Views in core.
Related: #41467
== Problem
A common misconception is that the image alt text should always be a ""description of the image"". In most of the cases, this is misleading. Actually, the image alt text needs to describe the purpose of the image in its specific context. For more details, see the W3C Alt Text Decision Tree tutorial (https://www.w3.org/WAI/tutorials/images/decision-tree/).
WordPress stores a ""default"" alt text in the media object. While storing a default value may help users when they build their content, it also promotes a misunderstanding of the purpose of the alt text.
In the accessibility team, we think this is more an user interface problem rather than a data model problem. The user interface should ensure users clearly understand that alt attributes are context sensitive and that the ""default"" alt value needs to be changed (or even removed) based on the specific usage.
== Data model problem:
The alt text is not constant: it needs to describe the image purpose on a case by case basis.
== User interface problem:
The alt text from the media library is automatically assigned as the alt text within the post: this is not always correct. Actually, in most of the cases it produces wrong alt text.
== Improvements to evaluate
Credits: Some of the following points come from @carlseibert and @joedolson comments on #41467, and from the Gutenberg GitHub issue.
1. allow saving multiple alt attributes for a given media object: a default attribute and a set of alternates users can select from
2. have something in the editor UI that would let users know whether the alt text was filled, and what it says
3. modifications on the Media views side to differentiate between the alt text describing the image and the alt text for a specific usage, which might override the normal alt text without changing it
4. all linked images must have alternative text if the image is the sole content of the link, and the action should be blocked if this is not true
5. any guidance given should inform users that the text provided needs to inform the user of the link action
6. include a warning about linking directly to the image file: linking directly to images is inadvisable, because the resulting image view in the browser does not include alternate text
7. when the image is linked to the image file itself, the alt text can remain the normal alternative text for that image, with an appended indicator that the link is to view the image
8. worth considering plugins that add ""lightbox"" modals, sliders and the like often use the alt text value to add contextual text within their UI
9. images used to link to other resources should offer a field to add dedicated link text separate from the image's own description; in this case the alt text should be empty. Example markup (simplified):",afercia
Needs Patch,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
Needs Patch,43930,Inaccurate width and height returned when using wp_get_attachment_image_src on the backend.,,Media,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-05-02T14:56:44Z,2018-05-08T18:30:23Z,"I'm using wp_get_attachment_image_src on the backend to do image validation for a custom image selector meta box. When the image is large enough for the requested image size the source of the original image is returned but the dimensions are smaller.
This is my call:
{{{#!php
string(70) ""http://localhost:8888/wp-content/uploads/2018/05/image.jpg""
[1]=>
int(400)
[2]=>
int(400)
[3]=>
bool(false)
}
}}}
The actual image dimensions are 1200x1200.
The image_constrain_size_for_editor call in the image_downsize function seems to be where the problem lies. I can comment out that line and it works as expected.",jwoolsch
Needs Patch,36285,Inconsistency between the filters that can be used to override the default shortcode output for images/videos/audio,,Media,,normal,normal,Future Release,defect (bug),new,,2016-03-21T18:15:59Z,2017-07-27T16:13:03Z,"Currently, in order to override the default output of the {{{caption}}}, {{{video}}} and {{{audio}}} shortcodes, you have to use the following respectively:
{{{
apply_filters( 'img_caption_shortcode', '', $attr, $content );
apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );
apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instance );
}}}
Imho, there should be some consistency between these regarding the following:
* hook name.
* arguments passed to the filtering function.
Also, it would be very useful if the attachment ID was also passed to the filtering function.
Right now, the attachment ID of images can be obtained from {{{$attr['id']}}}, which gives {{{attachment_IDNUMBER}}}, while the ID of video and audio attachments can only be obtained by using the media file URL found in the {{{$attr}}} array and directly querying the database in order to get the post ID based on the {{{guid}}} field.
",gnotaras
Needs Patch,37632,Incorrect Image Previews for SVG,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2016-08-11T01:52:35Z,2021-06-03T15:02:06Z,"Hi guys,
When using the `upload_mimes` filter to add new mime types for the media uploader, it handles SVG uploads strangely.
Here is my code to add SVG support
{{{#!php
'ids' ) );
foreach ( $posts as $post_id ) :
$thumb = get_the_post_thumbnail( $post_id );
endforeach;
}}}
The **update_post_thumbnail_cache()** used in **get_the_post_thumbnail()** assumes **$wp_query->posts** always contains an array of **$posts objects**, while it can be an array of $posts IDs.
To prevent the warning it would be appropriate to check that $post is actually a post object.
The patched code:
{{{#!php
posts as $post ) {
$post = get_post( $post ); // Add this or check if is_integer( $post )
$id = get_post_thumbnail_id( $post->ID );
}}}
Thanks
Kind Regards",Xendo
Needs Patch,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
Needs Patch,55289,Large image fails to create a `scaled` version and subsizes,,Media,5.9.1,normal,normal,Awaiting Review,defect (bug),new,,2022-03-01T21:41:41Z,2022-03-03T02:27:17Z,"When uploading a large image into WordPress it fails to create the `scaled` version, due to the usage of too many resources, because the `-scaled` resized version can't be created, no additional subsize is created.
The resize fails with the following error message:
> cache resources exhausted
Even with the resized failure, only the full-size image is uploaded and no additional image sizes are generated.
Steps to recreate the problem:
1. Upload the provided image.
2. Inspect the metadata of the image and observe no `-scaled` version was created and no subsizes was created either.
Observe how only the full image size is uploaded, no `-scaled` version can't be found.
== Problems
1. As described before the full size image is uploaded and no `scaled` version is created.
2. When loading the media library the full image size is loaded due no subsizes were created.
3. No subsizes are created for this image due to the resized image failing to be created.
== Setup
Sharing the details of my current setup:
{{{
### wp-core ###
version: 5.9.1
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%day%/%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: /app
wordpress_size: 152.90 MB (160327567 bytes)
uploads_path: /app/wp-content/uploads
uploads_size: 22.75 MB (23851112 bytes)
themes_path: /app/wp-content/themes
themes_size: 6.47 MB (6780262 bytes)
plugins_path: /app/wp-content/plugins
plugins_size: 208.42 MB (218539593 bytes)
database_size: 3.96 MB (4149380 bytes)
total_size: 394.49 MB (413647914 bytes)
### wp-active-theme ###
name: Twenty Twenty-Two (twentytwentytwo)
version: 1.0 (latest version: 1.1)
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, block-templates, widgets-block-editor, wp-block-styles, editor-style
theme_path: /app/wp-content/themes/twentytwentytwo
auto_update: Disabled
### wp-themes-inactive (3) ###
Twenty Nineteen: version: 2.2, author: the WordPress team, Auto-updates disabled
Twenty Twenty: version: 1.9, author: the WordPress team, Auto-updates disabled
Twenty Twenty-One: version: 1.5, author: the WordPress team, Auto-updates disabled
### wp-plugins-inactive (1) ###
Performance Lab: version: 1.0.0-beta.1, author: WordPress Performance Group, Auto-updates disabled
### wp-media ###
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1691
imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 100M
upload_max_filesize: 100M
max_effective_size: 100 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 122 MB
imagick::RESOURCETYPE_DISK: 1073741824
imagick::RESOURCETYPE_FILE: 786432
imagick::RESOURCETYPE_MAP: 512 MB
imagick::RESOURCETYPE_MEMORY: 256 MB
imagick::RESOURCETYPE_THREAD: 1
imagemagick_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_formats: GIF, JPEG, PNG, WebP, BMP
ghostscript_version: 9.53.3
### wp-server ###
server_architecture: Linux 5.15.12-1-MANJARO x86_64
httpd_software: nginx/1.17.10
php_version: 7.4.28 64bit
php_sapi: fpm-fcgi
max_input_variables: 10000
time_limit: 3
memory_limit: 1G
max_input_time: 900
upload_max_filesize: 100M
php_post_max_size: 100M
curl_version: 7.74.0 OpenSSL/1.1.1k
suhosin: false
imagick_availability: true
pretty_permalinks: true
### wp-database ###
extension: mysqli
server_version: 10.3.27-MariaDB
client_version: mysqlnd 7.4.28
max_allowed_packet: 33554432
max_connections: 151
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /app/wp-content
WP_PLUGIN_DIR: /app/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 1G
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: true
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
}}}
",mitogh
Needs Patch,58979,"Layout breaking while editing an Image from ""Image Details Edit"" screen.",,Media,6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-04T04:57:06Z,2023-08-07T16:13:03Z,"== Bug Report
=== Description
The layout is breaking while editing an Image from ""Image Details Edit"" screen.
=== Environment
- WordPress: 6.3-RC3
- PHP: 7.4.12
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 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.32 / Client: mysqlnd 7.4.12)
- Browser: Chrome 114.0.0.0 (macOS)
- Theme: Twenty Twenty-Three 1.2
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.2
=== Steps to Reproduce
1. Open Media -> Library
2. Select an Image
3. Click the ""Edit Image"" button below the Image
4. Click ""Crop Image"". Crop settings are visible to the right of the Image
5. Now Click ""Scale Image"". Layout breaks.
x. 🐞 Bug occurs.
=== Expected Results
1. ✅ Layout Should not break. At the very least, it should be consistent for scale and crop.
=== Actual Results
1. ❌ Layout breaks and lack of consistency.
I am attaching Screenshots for reference.",deepakvijayan
Needs Patch,49966,Load smaller images when in a gallery,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-04-21T06:42:48Z,2021-02-18T15:24:16Z,"Originally reported in https://github.com/WordPress/gutenberg/issues/9620. Since `sizes` is set by `wp_calculate_image_sizes`, this issue belongs in Core Trac.
----
I noticed that when creating a gallery block, with the 3 default columns, the images used as thumbnails on the front end are the original, full size version. Not the thumbnail, not medium, not even large size version. There is the srcset attribute but that does not help much because 100vw is set so it will generally only affect screen sizes smaller than the Large or Medium sizes set on WordPress Settings > Media.
Let's take for a theme that uses a maximum content width of 700px. On Settings > Media the sizes Thumbnail 150px - Medium 300px - Large 1024px are set.
Images in the Media Library are all 1600px wide. Now take a gallery with three columns, which will have a source code like this for each image:
` `
Now visit that page on a browser with a screen width of around 1390px. The content width will be 700px which means a max width for each thumbnail of around 220px (due to margins between the images). A source size of 300px would suffice for normal 1x screen resolutions but instead the full 1600px size sources are fetched for each image by the browser.
When instead of `sizes=""(max-width: 1600px) 100vw, 1600px` something more in correspondance with the gallery column size could be set to address this. Like `sizes=""(max-width: 1600px) 30vw, 1600px""` so that a 30% image slot is assumed.
This leaves 50vw for two column galleries, and 100vw for 1 column galleries...
Thoughts ?",noisysocks
Needs Patch,48992,MP3 artwork issue in WordPress 5.3.1,,Media,5.3.1,normal,normal,Awaiting Review,defect (bug),new,,2019-12-15T21:01:49Z,2020-04-12T21:13:27Z,"Hello!
I've had an issue with WordPress ever since I installed it where MP3 files would lose their artwork, which split into a separate file. This might sound familiar to some, as it was the core of the following closed issues: #40085 / #40075
The problem: This has never stopped happening for me. I've disabled add-ons related to the uploader and media library to no avail once I found out that this was apparently a solved issue. I have a test-site which I am going to try disabling all add-ons.
Any other",mattgcn
Needs Patch,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
Needs Patch,48513,Maximum execution time of 600 seconds exceeded in /var/www/html/releases/20191106150212/wp-includes/class-wp-image-editor-imagick.php on line 155,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-11-06T15:52:03Z,2020-01-16T15:14:49Z,"When running wp media regenerate --only-missing --image_size=lazy it fails after 6490 entries.
It fails with the following error:
{{{
6490/15784 No ""lazy"" thumbnail regeneration needed for ""model13-32"" (ID 35894).
PHP Fatal error: Maximum execution time of 600 seconds exceeded in /var/www/html/releases/20191106150212/wp-includes/class-wp-image-editor-imagick.php on line 155
Fatal error: Maximum execution time of 600 seconds exceeded in /var/www/html/releases/20191106150212/wp-includes/class-wp-image-editor-imagick.php on line 155
}}}
If I go to the specific image (that I THINK is failing, model13-32) and then click ""rebuild thumbnail"" inside WordPress it works just fine.
Hmmm..",mattiasf
Needs Patch,60098,Media Library Image Upload Issue,,Media,6.1,normal,normal,Awaiting Review,defect (bug),new,,2023-12-18T20:16:07Z,2024-02-15T16:26:31Z,"I hope this message finds you well. I am writing to report an issue encountered on my website, https://sanaalnaseemcs.com/. When attempting to upload images to the WordPress Media Library, the upload is successful, but the thumbnail is not generated. This makes it challenging to select and use the uploaded images appropriately.
Steps to Reproduce:
Log in to the WordPress admin panel.
Navigate to ""Media"" and then ""Add New.""
Choose an image file for upload.
Observe that the image uploads successfully, but the thumbnail is not generated.
Expected Result:
The image should upload successfully, and a thumbnail should be generated for easy identification in the Media Library.
Actual Result:
The image uploads, but the thumbnail is not generated, causing difficulty in identifying and utilizing the uploaded image.
Additional Information:
The issue seems to be inconsistent.
It is not limited to specific file types or sizes.
Various browsers and operating systems are affected.
I appreciate your prompt attention to this matter and look forward to a resolution. If you need any additional information.",gesabeja
Needs Patch,58741,Media Library Popup Showing Blank Popup on Window Resize Below Mobile Viewport,,Media,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-07-06T18:18:08Z,2023-07-06T18:18:08Z,"== Bug Report
=== Description
The media library popup in WordPress is encountering a problem where it displays a blank popup when the window is resized below the mobile viewport. This issue prevents users from accessing the media library and selecting files on smaller screens, negatively impacting the overall user experience.
=== Environment
- WordPress: 6.2.2
- PHP: 7.4.33
- Server: Apache
- Database: mysqli (Server: 5.7.42 / Client: mysqlnd 7.4.33)
- Browser: Chrome 114.0.0.0 (macOS)
- Theme: Upshift 1.0
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.1
=== Steps to Reproduce
1. Access the WordPress admin dashboard.
2. Navigate to add new post.
3. Click on set featured image button.
4. Resize the window below mobile viewport, you will get a blank screen.
=== Expected Results
1. Users should see media window even after window resize.
2. This scenarios is not there in media library popup of image block on block editor.
=== Actual Results
1. Users gets blank popup when window is resized.
Video Link : https://www.loom.com/share/efad2f97064f441596d69cc9a354a658
",adhun
Needs Patch,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
Needs Patch,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
Needs Patch,52857,Media Library defaults to Medium 300x,,Media,5.7,normal,normal,Awaiting Review,defect (bug),new,,2021-03-18T20:44:58Z,2021-11-29T15:17:19Z,"With WordPress 5.7 the default when Add media insert image always defaults to Medium 300px wide.
Why does WordPress 5.7 not remember the preferred default or last used?
Every time I upload an image I have to remember to check & change this setting.
It was never a problem before 5.7",subbasshead
Needs Patch,41349,Media Library insert from URL doesn't give a message when a URL fails check,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-07-17T20:32:53Z,2020-12-03T18:39:48Z,"There is a check to see if something is a valid URL. This is awesome, but it doesn't give a message when fails. This is a weird user experience as you are left wondering what happened.
There is some strange behaviour, it sometimes has 'link text' vanishing, other times doesn't. It also can appear to flash as a block and then vanish. The logic of when the link text input shows or doesn't, seems a little confusing to work out.
What would be better would be to have a message when it's not a correct URL and check for inconsistencies in the link text input showing.
[[Image(https://cldup.com/bnlQYzjP04.gif)]]",karmatosed
Needs Patch,23127,Media Upload hangs on Crunching on too big image sizes.,,Media,2.7,normal,normal,Future Release,defect (bug),new,,2013-01-05T22:56:14Z,2023-12-26T12:46:32Z,"If the uploaded file is too big for the Max Memory Limit Setting, then the upload is executed, but the image isn't resized to the set image sizes and the frontend gets stuck on ""Crunching"". I tracked the error down into the core and found out, that the main problem is in the GD library class ( wp-includes/class-wp-image-editor-gd.php ) in the load() function.
Everything works fine before line 91:
{{{
$this->image = @imagecreatefromstring( file_get_contents( $this->file ) );
}}}
So imagecreatefromstring fails because of a lack of memory. But as a chain reaction everything else fails afterwards. The library is not loaded and sent back, and so on. As a result no id is sent back to the frontend and the Loader hangs.
Maybe there should be any error catching and sending back before this GD function, that the frontend receives any error messages and that the upload is deleted in case of error.
Just my thoughts: As this error is a Fatal one, you can`t use any Exception stuff, cause there will not be any memory left to execute it. Maybe some checking if the id is present before sending the image back to crunching?",clubdesign
Needs Patch,43658,Media attachment filter drop-down mime types in grid mode is not properly filtered by available mime types,,Media,4.9.4,normal,normal,Future Release,defect (bug),assigned,,2018-03-29T07:07:42Z,2023-10-18T16:51:19Z,"In '''Gird''' mode media attachment filter is not properly filtered by available mime types, it shows all mime types by default via -
{{{
get_post_mime_types()
}}}
But in '''List mode''' its already filtered by checking
{{{
if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) {
continue;
}
}}}
",itzmekhokan
Needs Patch,43641,Media controls in the media grid are too wide,,Media,4.9,normal,normal,Awaiting Review,defect (bug),new,,2018-03-27T11:14:37Z,2018-10-02T16:56:31Z,"The audio and video player that's shown when viewing an individual media item in the media grid displays a control bar which is too wide for its container.
Tested in latest Chrome, Firefox, and Safari on macOS.",johnbillion
Needs Patch,40129,Media deleting selected on mobile does not work,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-03-12T12:47:13Z,2017-03-16T19:42:35Z,"Steps to reproduce:
- Select a month in bulk select.
- Click image.
- Click delete selected.
- It doesn't delete.
[[Image(https://cldup.com/IHq3IPurbV.PNG, 50%)]]
Discovered on iPhone 7 Plus.",karmatosed
Needs Patch,40121,Media edit screen on mobile has visual issues,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-03-12T12:23:38Z,2017-05-03T21:10:17Z,"This screen unfortunately on an iPhone 7 Plus is pretty unusable.
[[Image(https://cldup.com/ANkhsYmH_F.PNG, 50%)]]
I would at the least suggest we don't have 2 panes and move the right below the left. Then we can iterate.",karmatosed
Needs Patch,58594,Media file changes no longer trigger updated/modified statuses.,,Media,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-06-21T19:54:38Z,2023-06-21T19:54:38Z,"In older versions of WP, when media files like PDFs were updated it would trigger an event that could be listened to and acted upon by plugins.
In the current version of WP (6.2.2) if a user changes the uploaded date or otherwise modifies a media file's properties, the change is no longer picked up by audit trail plugins like WP Activity Log, nor is it seen as an update to a ""post"".
Plugins that have ""Clear cache whenever a post or page is updated"" functionality are now broken when it comes to media file changes.
For instance, if a site is using Sucuri's WAF and caching plugin as well as the Enable Media Replace plugin, when a user replaces a media file with a new one it doesn't trigger Sucuri's cache clearing functionality anymore. I have reviewed both Enable Media Replace and Sucuri's plugins to make sure neither of them are at fault for breaking this functionality. Additionally, neither Sucuri nor WP Activity Log pick up the changes to display in their activity logs.
I do not know if media file post types were explicitly excluded from using the process pages and posts use to broadcast changes, but this new behavior is only present in the most recent version(s) of WP and is a bug if this wasn't a planned change.",sbeaney
Needs Patch,41352,Media library - applying image and date filter redirects to homepage,,Media,4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-07-18T00:12:31Z,2017-09-17T06:43:48Z,"When in the media library, select LIST view > select IMAGES in the 'All media items' dropdown, select a month from the dropdown and click FILTER. I am being redirected to the websites homepage rather than the filter results.
3 people have replicated this bug, I personally have replicated it across 3 of our Wordpress websites. I tried disabling media related plugins and it had no affect. ",mikedtv
Needs Patch,57821,Media library badly autopopulates image caption if Windows image metadata exists,,Media,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-02-28T13:01:38Z,2023-03-11T08:05:36Z,"If you upload an image which has specific metadata (Properties → Comments filled out on a Windows computer, with the Properties → Title field blank), the caption on the image in WP Admin autopopulates with a string of question marks.
------------------
=== Steps to reproduce
1. On Windows, edit an image's properties in the file explorer so that the Comments field is populated, but the Title field is not.
2. Upload the image to any site
=== What you expected to happen
The caption field in the Media library should either stay blank, or contain the actual ""Comments"" field contents.
=== What actually happened
The caption field for that file contains a string of question marks as long as your original comment text.
",properlypurple
Needs Patch,40593,Media library replace image popup not displaying completely below 641px width,,Media,4.7.4,normal,normal,Awaiting Review,defect (bug),new,,2017-04-28T10:04:38Z,2018-10-02T14:31:15Z,"When trying to Replace Media with screen width below 641px the right panel of the popup gets hidden and there is no way to update image information like description and title.
Tested in Chrome (Version 58.0.3029.81 64-bit) and Firefox (53.0 - 64 bit).
Screenshots attached.",subrataemfluence
Needs Patch,59742,Media library should display the number of pages/posts/urls a particular media file is being used in.,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2023-10-26T08:19:37Z,2024-03-10T12:50:48Z,"For managing media files, WordPress requires you to navigate from the Media Library. However, selecting a file doesn't offer any information on the published pages/posts that are actively using the file.
This information is necessary to effectively manage storage and replacing media without losing essential files or causing dependency issues.
Selecting a file from the media library should ideally, at minimum show the number of published pages/posts it's in use. Best case would be to make the number a clickable item, that shows a list of all URLs using the file.",rsiddiqe
Needs Patch,50200,Media library thumbnails broken for certain aspect ratio images in Firefox,,Media,5.4.1,normal,normal,Awaiting Review,defect (bug),new,,2020-05-18T08:11:50Z,2020-05-21T14:50:47Z,"Recently a client reached out to me about broken images in WordPress dashboard.
Turns out media library can't load thumbnails for certain aspect ratio images.
The images are generated though and exist on the server (I looked up the image source with dev tools and checked if the image actually was generated and yes there it was).
So I made a few tests on live and test environments. These are the image sizes that cause the thumbnails to break:
236x591
237x591
238x591
239x591
Both 235x591 and 240x591 work fine as expected. My client was uploading images using the size 236x591.
Now the issue is not only with those pixel sizes as I tried doubling the image size as well. Doubling 237x591 to 474x1182 also breaks the thumbnail so it's more like aspect ratio bug than just the image size.
The images load fine on frontend but there is a problem in the admin panel when editing posts and adding these media files to a post (only shows white box and doesn't load image).
I have tried this on fresh install of WordPress with Twenty Twenty and no plugins installed. Bug happens on stable 5.4.1 as well as alpha version of 5.4.2 and 5.5
All of my tests were done through HTTPS protocol.
Happens on PHP version 7.2 and 7.3
Bug appears on Firefox version 76 but it does not appear on Chrome version 81 or Microsoft Edge version 44
I have not tested any other aspect ratios.",jussitrival
Needs Patch,45886,Media modal .edit-attachment link opens in new tab rather than in modal,antpb,Media,5.0.2,normal,normal,Future Release,defect (bug),assigned,,2019-01-09T19:52:31Z,2020-09-05T12:12:37Z,"Using the `wp.media` JavaScript API creates a link ""Edit Image"" (`.edit-attachment`) in the right sidebar of the Media modal. Expected behavior would be to open the ""Edit Image"" modal, as does the Featured Image media modal.
However, the custom Media modal does not behave consistently with the Featured Image modal - the `.edit-attachment` link opens in a new tab instead of the modal - which is both unintuitive and frustrating to end-users.
The console does not display any warnings or errors.
Custom media modal as documented: [https://codex.wordpress.org/Javascript_Reference/wp.media]
As a side note, I have noticed similar behavior in the WordPress Media page:
Media (Admin Sidebar) -> Click a picture -> Edit more Details
This also fails to open the modal - and opens in the current page instead.
",statelessstudio
Needs Patch,50273,Media modal uses incorrect 'checkbox' role for list items,joedolson,Media,,normal,normal,Future Release,defect (bug),assigned,,2020-05-28T04:40:11Z,2021-01-26T16:37:37Z,"The media modal uses the role of 'checkbox' on list items (``) when selecting media (e.g. to add to a gallery.)
The specification of a role here is overriding the list item element's implicit `listitem` role.
The list item elements in this case should ideally have no `role` specified. The element with a checkbox role should be a child element of the list item and other associated attributes like `aria-checked` should also be moved to that element.
For context, this issue was caught by the automated Axe tests when writing an end-to-end test for the block editor:
https://github.com/WordPress/gutenberg/pull/22659#discussion_r431036627
To reproduce:
1. Ensure some images are uploaded to the media library
2. Add a gallery block to a post
3. Click the 'Media Library' button
4. Open the browser dev tools and inspect the HTML of an image
5. Observe that the list item element for the image has the role of 'checkbox':
{{{
}}}
",talldanwp
Needs Patch,39358,Media search speed has been dramatically reduced,joemcgill,Media,4.7,normal,normal,Future Release,defect (bug),reopened,,2016-12-21T08:07:18Z,2023-10-18T16:48:40Z,"In the ajax-actions.php file there is function called wp_ajax_query_attachments. This function is responsible for searching images in the media library.
We see that in Wordpress 4.7, someone added a new filter to this function:
{{{
// Filter query clauses to include filenames.
if ( isset( $query['s'] ) ) {
add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
}
}}}
This filter is a performance killer and takes forever to output a result in large databases. We have tested this with db that has over 500000 posts.",merts
Needs Patch,54069,"Media title change in ""Attachment Details"" dialog opened via Media Library Grid View is not informing API/plugins properly",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2021-09-03T10:52:50Z,2023-02-03T23:08:50Z,"**Problem**:
If WordPress offers different UIs to edit media titles, then all those should properly inform the respective plugin/event APIs about that change. It seems there is a discrepancy, in one place it works, in the other not. See the reproductions.
**Environment / How I discovered the bug**
I noticed this bug when using the plugin [https://wordpress.org/plugins/media-file-renamer/ Media File Renamer] 5.2.4 on WordPress 5.8. What I observed is very likely a bug in WordPress and not from the plugin according to the [https://wordpress.org/support/topic/no-file-renaming-if-title-changed-via-media-library-thumbview-edit-popup/#post-14834202 support reply of the plugin developer @TigrouMeow]:
> Unfortunately, I think the problem is on the Media Library ThumbView Edit Popup side [remark: The documentation calls this ""Media grid view"" and ""Attachment details dialog"" respectively]. Media File Renamer renames files based on a title change depending on specific actions in WordPress, and those actions can be also fired by other plugins. Since this plugin is mimicking the Edit Media Page of WP, it should also includes the actions. Otherwise, that will break not only the process of my plugin, but also many more.
**✅ Reproduction I**
1) Media Library in [https://wordpress.org/support/article/media-library-screen/#media-library-list-view List View]
2) Hover over a media post > Click “Edit”
3) You get to “Edit Media”
4) Change the “title”
4) Be sure that the “Renamer” widget has the file name not locked
5) In the “Save” widget click “Update”
* Outcome as expected: The filename is changed accordingly.
* The slug is also changed from the filename change, due to the [https://wordpress.org/plugins/media-file-renamer/ Media File Renamer] plugin config:
* Advanced > Fields Syncing > Slug/Permalink: `[√] Sync with filename`
**❌ Reproduction II**
1) Media Library in [https://wordpress.org/support/article/media-library-screen/#media-library-grid-view Grid View]
2) Click on a media thumbnail
3) A dialog/popup opens, entitled [https://wordpress.org/support/article/media-library-screen/#attachment-details Attachment details]
4) Change the “title”
5) Optional step for observation purposes: Click into the next field, or TAB into the next field. You see a saving indicator.
6) Close the popup. (If you skipped 5, you very briefly see the saving indicator while the popup closes)
* **Actual**: The title is changed, the filename not!
* **Expected**: Whichever of [https://wordpress.org/plugins/media-file-renamer/ Media File Renamer]'s sync settings are active (title, filename, slug) kick in here in this editing method as well.",abitofmind
Needs Patch,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
Needs Patch,49431,Media uploader window leaves behind orphan button element in Block Editor,,Media,5.0,normal,normal,Awaiting Review,defect (bug),new,,2020-02-14T07:13:52Z,2022-05-06T02:59:54Z,"This issue was originally reported in the Gutenberg Github repo - https://github.com/WordPress/gutenberg/issues/9184. Reporting this here as well—currently it looks like a fix might need to be applied in core, but also possibly in both Gutenberg and core.
----
**Describe the bug**
Whenever you focus an Image Block or Gallery Block, a button element is created just before the closing body tag. Then, after blurring, the button is still there. This can be performed indefinitely times, leading to a massive amount of orphan button elements
----
**Steps to reproduce**
1. Open up the block editor
2. Open up dev tools and inspect the closing body tag
3. In the editor sidebar, switch between the document and the block tab and back again
4. Check the dev tools, observe that button(s) are appended to the dom every time the document tab is opened
Expected: No buttons are appended
",talldanwp
Needs Patch,45021,Media: Gallery modal has wrong focus and image detail,joedolson*,Media,6.1.1,normal,normal,Future Release,defect (bug),accepted,,2018-10-02T01:06:04Z,2024-02-05T20:21:21Z,"When you first click on Add Media from the post editor, the existing images are shown, and nothing has specific ""focus"" (blue outline).
Clicking on Create Gallery first, the Search box is focused.
Clicking on images first, and then Create Gallery, the last image selected is focused.
Once images are selected, clicking on the Create New Gallery button, the Cancel Gallery link is focused.
On the Edit Gallery page, before clicking on an image, the sidebar shows Gallery Settings for link, columns, size. Once an image is selected, there is no way to unselect it, and although the Gallery settings remain the same, it is unclear whether this applies to the image selected or the entire gallery. Regardless, the image details are shown in the sidebar. However, if you Cancel Gallery and choose different images, when you get back to the Edit Gallery page, it will still be showing the image details for the old image, not any of the newly chosen ones (but none of the images are focused when you get there). So the Cancel didn't actually cancel.
If you close the modal without inserting the gallery into the post, and then click on Add Media again, it will show the values from the last attempt. This is unexpected, and unwanted if you had selected a lot of images and wanted to start over. There ''is'' a Clear link, but it is small and at the bottom. The last selected image is focused, but not after you click Create Gallery (the Cancel Gallery link is), so the image detail is the wrong one. If you go ahead and insert the gallery, and click Add Media again, then nothing is remembered from the previous gallery.
While in Edit Gallery, if you had selected two images and click on Add to Gallery, you can select more and click Add, they will all be shown, with one image focused and showing the correct image detail. Clicking Cancel Gallery at this point returns to the media list, but with the original two selected and perhaps a different image focused than the previous list. The added ones are forgotten.",joyously
Needs Patch,53663,Media: fix and improve WebP features detection,,Media,,normal,normal,Future Release,defect (bug),new,,2021-07-14T23:17:35Z,2022-12-01T00:25:44Z,"Follow up from #53653.
Looking at https://developers.google.com/speed/webp/docs/riff_container, the ""extended"" WebP file format `VP8X` may include a lossy or lossless ""bitstream"" chunk (`VP8 ` or `VP8L`) and few optional chunks: `ALPH`, `EXIF`, `ICCP`, `ANIM`, etc.
Ideally the `wp_get_webp_info()` function should be extended to detect these features. ",azaozz
Needs Patch,48436,Media: fix the layout of Gallery settings in the media modal dialog,,Media,3.9,normal,normal,Awaiting Review,defect (bug),assigned,,2019-10-26T12:53:10Z,2020-11-01T11:47:20Z,"In WordPress 3.8, the gallery settings in the media modal right sidebar were well aligned:
[[Image(http://cldup.com/eEOQrDgtO6.png)]]
The alignment broke pretty soon in WordPress 3.9, see [27487] / #26631. The CSS was changed to adjust the styling for the audio / video playlists settings but it broke the gallery details settings:
Screenshot from WordPress 3.9:
[[Image(http://cldup.com/EP_dN25J_v.png)]]
That's because the playlist settings are not intended to be aligned in two ""columns"":
[[Image(http://cldup.com/9djN13Naos.png)]]
The gallery settings are fully operable, so this is just a minor visual glitch.
Regardless, the layout is broken since March 2014 and still needs a fix on current trunk, even after the many changes to the media modal form controls markup and CSS, see [45499] / #47122.
[[Image(http://cldup.com/XfzKug_020.png)]]
",afercia
Needs Patch,56439,Missing Title Attribute at HTML TAG FIGURE,,Media,6.0.1,normal,normal,Awaiting Review,defect (bug),new,,2022-08-25T14:30:58Z,2022-08-25T21:46:31Z,"Hi,
i like to parse my website https://draeger-it.blog an grap all videos from pages.
I'm missing the pissible attribute title at TAG FIGURE like below:
{{{
some description
}}}
At my backend i can fill this fields but this don't would be rendered:
{{{
Hier steht eine Beschriftung.
}}}
Here is my Website Report:
`
### wp-core ###
version: 6.0.1
site_language: de_DE
user_language: de_DE
timezone: Europe/Berlin
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: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog
wordpress_size: 515,57 MB (540609358 bytes)
uploads_path: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/uploads
uploads_size: 1,92 GB (2060998403 bytes)
themes_path: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/themes
themes_size: 17,81 MB (18674742 bytes)
plugins_path: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/plugins
plugins_size: 108,27 MB (113525365 bytes)
database_size: 255,52 MB (267927552 bytes)
total_size: 2,80 GB (3001735420 bytes)
### wp-dropins (2) ###
advanced-cache.php: true
maintenance.php: true
### wp-active-theme ###
name: Draeger-IT.blog (draegeritblog_admiral)
version: 1.0
author: Stefan Draeger
author_website: http://www.draeger-it.blog
parent_theme: Admiral (admiral)
theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, title-tag, post-thumbnails, menus, html5, custom-background, custom-logo, woocommerce, editor-style, customize-selective-refresh-widgets, editor-color-palette, responsive-embeds, admiral-pro, themezee-breadcrumbs, themezee-mega-menu, themezee-widget-bundle, themezee-related-posts, infinite-scroll, widgets
theme_path: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/themes/draegeritblog_admiral
### wp-parent-theme ###
name: Admiral (admiral)
version: 1.6.9 (latest version: 1.7)
author: ThemeZee
author_website: https://themezee.com/de/
theme_path: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/themes/admiral
### wp-plugins-active (20) ###
Antispam Bee: version: 2.11.1, author: pluginkollektiv
Blog2Social: Social Media Auto Post & Scheduler: version: 6.9.9, author: Blog2Social, Adenion
Broken Link Checker: version: 1.11.18, author: WPMU DEV
Complianz | GDPR/CCPA Cookie Consent: version: 6.3.1, author: Really Simple Plugins
Disable & Remove Google Fonts: version: 1.4.1, author: Fonts Plugin
Download Manager: version: 3.2.54, author: W3 Eden, Inc.
Easy Video Player: version: 1.2.2.1, author: naa986
Enlighter - Customizable Syntax Highlighter: version: 4.5.0, author: Andi Dittrich
OneSignal Push Notifications: version: 2.2.7, author: OneSignal
Redirection: version: 5.3.2, author: John Godley
Schema App Structured Data: version: 1.17.15, author: Hunch Manifest
Simple Lightbox: version: 2.8.1, author: Archetyped
Site Kit by Google: version: 1.81.0, author: Google
Table of Contents Plus: version: 2106, author: Michael Tran
ThemeZee Toolkit: version: 1.3, author: ThemeZee
WordPress Editorial Calendar: version: 3.7.12, author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
WPDM - Extended Short-codes: version: 3.0.4, author: W3 Eden, Inc.
WP Super Cache: version: 1.8, author: Automattic
WP YouTube Lyte: version: 1.7.19, author: Frank Goossens (futtta)
Yoast SEO: version: 19.6, author: Team Yoast
### wp-media ###
image_editor: WP_Image_Editor_GD
imagick_module_version: Nicht verfügbar
imagemagick_version: Nicht verfügbar
imagick_version: Nicht verfügbar
file_uploads: File uploads is turned off
post_max_size: 64M
upload_max_filesize: 64M
max_effective_size: 64 MB
max_file_uploads: 20
gd_version: 2.2.5
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: 9.27
### wp-server ###
server_architecture: Linux 4.4.302-icpu-088 x86_64
httpd_software: Apache
php_version: 8.1.9 64bit
php_sapi: cgi-fcgi
max_input_variables: 5000
time_limit: 50000
memory_limit: -1
max_input_time: -1
upload_max_filesize: 64M
php_post_max_size: 64M
curl_version: 7.64.0 OpenSSL/1.1.1n
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true
### wp-database ###
extension: mysqli
server_version: 5.7.38-log
client_version: mysqlnd 8.1.9
max_allowed_packet: 67108864
max_connections: 3000
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content
WP_PLUGIN_DIR: /homepages/10/d872679325/htdocs/draegerit/draeger-it.blog/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: -1
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Nicht definiert
DB_CHARSET: utf8
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable
### google-site-kit ###
version: 1.81.0
php_version: 8.1.9
wp_version: 6.0.1
reference_url: https://draeger-it.blog
amp_mode: no
site_status: connected-site
user_status: authenticated
verification_status: verified-non-site-kit
connected_user_count: 1
active_modules: site-verification, search-console, adsense, analytics, analytics-4, pagespeed-insights, tagmanager
recoverable_modules: none
required_scopes:
openid: ✅
https://www.googleapis.com/auth/userinfo.profile: ✅
https://www.googleapis.com/auth/userinfo.email: ✅
https://www.googleapis.com/auth/siteverification: ✅
https://www.googleapis.com/auth/webmasters: ✅
https://www.googleapis.com/auth/adsense.readonly: ✅
https://www.googleapis.com/auth/analytics.readonly: ✅
https://www.googleapis.com/auth/tagmanager.readonly: ✅
capabilities:
googlesitekit_authenticate: ✅
googlesitekit_setup: ✅
googlesitekit_view_posts_insights: ✅
googlesitekit_view_dashboard: ✅
googlesitekit_manage_options: ✅
googlesitekit_view_splash: ✅
googlesitekit_view_authenticated_dashboard: ✅
googlesitekit_view_wp_dashboard_widget: ✅
googlesitekit_view_admin_bar_menu: ✅
enabled_features:
adsenseSetupV2: ✅
dashboardSharing: ⭕
ga4ActivationBanner: ⭕
ideaHubModule: ⭕
twgModule: ⭕
userInput: ⭕
zeroDataStates: ✅
search_console_property: https://draeger-it.blog/
adsense_account_id: pub-877•••••••••••••
adsense_client_id: ca-pub-877•••••••••••••
adsense_account_status: approved
adsense_site_status: added
adsense_use_snippet: yes
adsense_web_stories_adunit_id: none
analytics_account_id: 1883•••••
analytics_property_id: UA-1883•••••••
analytics_profile_id: 2364•••••
analytics_use_snippet: yes
analytics_4_property_id: none
analytics_4_web_data_stream_id: none
analytics_4_measurement_id: none
analytics_4_use_snippet: yes
tagmanager_account_id: 6002••••••
tagmanager_container_id: GTM-PMS••••
tagmanager_amp_container_id: none
tagmanager_use_snippet: yes
`
",stdr1980
Needs Patch,40126,Mobile has two media editing experiences,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-03-12T12:38:39Z,2023-10-25T05:04:49Z,"Seems like two editing experiences on mobile
One: Upload an image, click edit once uploaded. See this in new tab:
[[Image(https://cldup.com/TblPv9TBJT.PNG, 50%)]]
Two: Click ending on existing image, don't get new tab and get double pane weirdness. See this:
[[Image(https://cldup.com/eK7TcVfqi4.PNG, 50%)]]
We should have one experience as it feels not sensible having two.
",karmatosed
Needs Patch,17255,More statuses (like draft and/or private) for media files,,Media,3.1,normal,normal,Future Release,defect (bug),new,,2011-04-27T11:48:11Z,2023-10-25T15:39:32Z,"It's weird that media files don't carry any concept of pub status. If someone wants to upload files (either attached to a post or directly into the library), they should be able to keep them hidden via 'draft' status just like any other content. The fact that people can link to things that haven't been explicitly published is bizarre.
Media files should have a pub status. If uploaded as post attachment, should inherit publish on post publish. Would then need a workflow for if a post becomes unpublished containing media, as it then lives in library for use by other content, so would need to ask if user wants to unpub media files as well. This would be a big shift, so would make most sense as part of a media redux with a long notice period for plugin and theme authors. ",jane
Needs Patch,38479,Need to check utf8_encode() is available before use.,,Media,4.4,normal,normal,Future Release,defect (bug),new,,2016-10-25T04:38:14Z,2017-08-10T18:05:17Z,"The DOM/XML extension isn't necessarily installed on some distros so use of `utf8_encode()` should be checked for availability first. It's not checked in `wp_read_image_metadata()` in ""wp-admin/includes/image.php"" (where I encountered its lack on a Ubuntu 16.04 PHP 7 server), introduced in [36429] and [36430], nor in `wxr_cdata()` in ""wp-admin/includes/export.php"", introduced in the distant past.
(Also it does ISO-8859-1 not Windows-1252 so more than likely not that good in the image situation anyway.)",gitlost
Needs Patch,50667,New attachment size is created even the source is smaller,,Media,5.4.2,normal,normal,Awaiting Review,defect (bug),new,,2020-07-15T09:42:55Z,2022-10-19T20:37:30Z,"When you upload a very optimized image sometimes the created attachment size's file size is larger than the source image. When a new size is created its filesize should be checked whether it's really smaller or not. Now it just allocates extra space and uses extra bandwidth.
Sample image: [https://ibb.co/x8LhGC0]",adam.radocz
Needs Patch,58289,No support for AVIF with HDR gain maps,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2023-05-10T17:37:39Z,2023-05-10T20:47:52Z,"HDR (""high dynamic range"") images offer vastly improved image quality on supporting hardware (see here for more details: ).
When displaying an HDR image on an SDR (standard dynamic range) screen, the image needs to be ""tone mapped"" to fit the reduced dynamic range of the screen. That can provide mediocre results, and a separate SDR version of the image will usually look better on an SDR monitor. Supplying two versions of the same image is complicated, and that is the reason for the new ""gain map"" proposal.
Adobe has published the gain map specification (and test images) at https://helpx.adobe.com/camera-raw/using/gain-map.html#resources and Chrome Canary already supports proper rendering of the JPG gain map (be sure to view on a true HDR display, such as the M1 / M2 MacBook Pro).
AVIF gain maps offer an ideal way to share HDR content in a format which is much smaller than a JPG gain map.
This issue depends on getting support for HDR AVIF (ie an HDR image without a gain map): https://core.trac.wordpress.org/ticket/51228
It is also related to concepts involved with JPG gain maps: https://core.trac.wordpress.org/ticket/58288#ticket",gregbenz
Needs Patch,58288,No support for JPG with HDR gain maps,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2023-05-10T17:36:45Z,2023-09-29T19:43:09Z,"HDR (""high dynamic range"") images offer vastly improved image quality on supporting hardware (see here for more details: ).
When displaying an HDR image on an SDR (standard dynamic range) screen, the image needs to be ""tone mapped"" to fit the reduced dynamic range of the screen. That can provide mediocre results, and a separate SDR version of the image will usually look better on an SDR monitor. Supplying two versions of the same image is complicated, and that is the reason for the new ""gain map"" proposal.
Adobe has published the gain map specification (and test images) at https://helpx.adobe.com/camera-raw/using/gain-map.html#resources and Chrome Canary v115 already supports proper rendering of the JPG gain map (be sure to view on a true HDR display, such as the M1 / M2 MacBook Pro).
JPG gain maps (with an SDR base image) offer an ideal way to support HDR as we all transition to HDR over time. They will display in an ideal way on both an SDR or an HDR display. And they will safely display as SDR in browsers which do not understand gain maps.
When a JPG with a gain map is uploaded to the WordPress media library, it is converted to an SDR JPG. The gain map is lost and therefore the image will no longer properly display as HDR when viewed on HDR hardware using a browser which supports HDR gain maps (such as Chrome).",gregbenz
Needs Patch,36722,"No way to access media ""Attachment Display Settings"" using wp.media",,Media,4.5.1,normal,normal,,defect (bug),new,,2016-04-29T15:55:47Z,2020-03-12T05:51:47Z,"I am using custom wp.media request to get WP Media uploader iframe on front end.
Added scripts, styles and media:
{{{
wp_enqueue_script('jquery');
wp_enqueue_media();
wp_enqueue_style( 'wp-admin' );
}}}
then I am using JS to open the Media iframe:
{{{
var custom_uploader;
jQuery(document).ready(function($){
if (custom_uploader) {custom_uploader.open();return;}
var parent_container = parent.document.body;
custom_uploader = wp.media.frames.file_frame = wp.media({
frame: 'post',
state: 'insert',
title: 'Choose Image',
library : {type:'image'},
button: {text: 'Choose Image'},
multiple: false
});
custom_uploader.on('insert',function(){
var attachment = custom_uploader.state().get('selection').first().toJSON();
console.log( attachment );
});
custom_uploader.open();
});
}}}
after selecting needed image, link and size I get the result:
{{{
{""id"":2182,""title"":""WordPress"",""filename"":""WordPress.jpg"",""url"":""http://localhost:8080/mgwebthemes.com/uploads/2015/05/WordPress.jpg"",""link"":""http://localhost:8080/mgwebthemes.com/wordpress/"",""alt"":"""",""author"":""1"",""description"":"""",""caption"":"""",""name"":""WordPress"",""status"":""inherit"",""uploadedTo"":2166,""date"":""2015-05-13T09:09:47.000Z"",""modified"":""2015-05-13T09:09:47.000Z"",""menuOrder"":0,""mime"":""image/jpeg"",""type"":""image"",""subtype"":""jpeg"",""icon"":""http://localhost:8080/mgwebthemes.com/wp-includes/images/media/default.png"",""dateFormatted"":""13/05/2015"",""nonces"":{""update"":""2d7619f512"",""delete"":""725c6d8639"",""edit"":""709844b592""},""editLink"":""http://localhost:8080/mgwebthemes.com/wp-admin/post.php?post=2182&action=edit"",""meta"":false,""authorName"":""admin"",""uploadedToLink"":""http://localhost:8080/mgwebthemes.com/wp-admin/post.php?post=2166&action=edit"",""uploadedToTitle"":""Test"",""filesizeInBytes"":8990,""filesizeHumanReadable"":""9 kB"",""sizes"":{""thumbnail"":{""height"":150,""width"":150,""url"":""http://localhost:8080/mgwebthemes.com/uploads/2015/05/WordPress-150x150.jpg"",""orientation"":""landscape""},""full"":{""url"":""http://localhost:8080/mgwebthemes.com/uploads/2015/05/WordPress.jpg"",""height"":249,""width"":201,""orientation"":""portrait""}},""height"":249,""width"":201,""orientation"":""portrait"",...}
}}}
it does not contain any Attachment Display Settings options.",chattyboy
Needs Patch,40127,On mobile media deleting message formatting issues,,Media,,normal,normal,Future Release,defect (bug),new,,2017-03-12T12:42:20Z,2023-09-05T15:21:34Z,"Formatting leads to widow in delete media image on mobile. Seen tested on iPhone 7 plus.
[[Image(https://cldup.com/91KH54-k3y.PNG, 50%)]]",karmatosed
Needs Patch,45813,PDF preview images are not generated,,Media,,normal,normal,Future Release,defect (bug),new,,2019-01-02T20:33:24Z,2023-07-02T13:39:07Z,"I discovered this when the test suite started failing in my local environment using VVV.
Recently, ImageMagick updated it's `policy.xml` file to [https://git.launchpad.net/ubuntu/+source/imagemagick/tree/debian/patches/300-disable-ghostscript-formats.patch?id=be94d865776b391a60323603b1cc002213c37c39 remove rights for PDF files from Ghostscript].
After this change, a `WP_Error` is [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/image.php#L264 returned by `wp_get_image_editor()` when a PDF file is passed]. This prevents preview images from being generated and causes the test failures due to lack of metadata.
The PDF tests check that the selected image editor supports PDF images using `wp_image_editor_supports()` before running, but this does not seem to be catching this change (`Imagick::queryFormats()` indicates support for PDFs even when rights are removed).
This can be fixed bychanging the `rights` attribute for PDFs to `read|write`, or commenting out that line in the `/etc/ImageMagick/policy.xml` file.
More info: https://alexvanderbist.com/posts/2018/fixing-imagick-error-unauthorized
",desrosj
Needs Patch,45982,PDF thumbnails have a default black background,,Media,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-01-14T13:45:47Z,2023-06-13T21:47:43Z,"I wouldn't necessarily call this a bug, but when a PDF is uploaded where the page has no solid background colour its thumbnail image background is rendered black. As most paper used is white ( I would hazard a guess... :) ), it feels like the default background colour of thumbnails should be set to white. I have created a fix within'' /wp-includes/class-wp-image-editor-imagick.php''
{{{#!php
image = new Imagick();
$file_extension = strtolower( pathinfo( $this->file, PATHINFO_EXTENSION ) );
$filename = $this->file;
if ( 'pdf' == $file_extension ) {
$filename = $this->pdf_setup();
}
// Reading image after Imagick instantiation because `setResolution`
// only applies correctly before the image is read.
$this->image->readImage( $filename );
if ( ! $this->image->valid() )
return new WP_Error( 'invalid_image', __('File is not an image.'), $this->file);
// Select the first frame to handle animated images properly
if ( is_callable( array( $this->image, 'setIteratorIndex' ) ) )
$this->image->setIteratorIndex(0);
$this->mime_type = $this->get_mime_type( $this->image->getImageFormat() );
// !bb modification to default to white backgrounds
if ( 'pdf' == $file_extension ) {
if ($this->image->getImageAlphaChannel()) {
// Remove alpha channel (use 11 if constant does not work... see https://stackoverflow.com/questions/10805122/imagemagick-setimagealphachannel-not-working-php)
$this->image->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE);
// set image background color to white
$this->image->setImageBackgroundColor('#ffffff');
}
}// !bb end modification to default to white backgrounds
}
}}}
",nebrekab
Needs Patch,41516,PNG Image Saturation Loss on Resize,,Media,4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-08-01T16:08:23Z,2017-08-04T04:16:39Z,"I work with PNG images made with grey colors. And the colors change because of wordpres, not the original image, but all the new sizes.
By default make the colors much darker but sometimes, also is weird:
[[Image(http://i.imgur.com/L3Sk1Rg.png)]]
Left and right are the same image. Some times handle even different for the same K=70 color.
( I export with Adobe illustrator to sRGB )",colomet
Needs Patch,42128,PNGs lose color space information when resized,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-10-06T21:11:46Z,2017-10-06T22:17:56Z,"In cases where a PNG image is RGB but contains no color pixels, ImageMagick is converting the image to a gray color model during resizing, which makes the image look dark and blocky.
I'm uploading a few of original example images, saved as both PNG8 and PNG24 and one without an alpha channel.
Based on these examples, this seems to only affect PNG images and transparency doesn't seem to matter.",joemcgill
Needs Patch,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
Needs Patch,42851,Problem with video height since 4.9,,Media,4.9.1,normal,normal,Awaiting Review,defect (bug),new,,2017-12-09T12:02:55Z,2018-01-02T23:19:13Z,"I have a video on a page and after updating to WP 4.9.1 the following element gets a height of 0px:
The result is that the video area shows just the controls and nothing more (see attached screenshot on the left) .
I can fix this with workarounds via CSS like styling mejs-container and mejs-mediaelement (see attached screenshot on the rigth) but that's a hassle for the responsive versions.
Anyone elese facing these problems?
(P.S.: I'm not an expert AND a German, so forgive me for dumb questions and bad writing …)
",vhcrossmedia
Needs Patch,41468,"Provide contextual info about what ""attached"" and ""detached"" means regarding media objects",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2017-07-27T22:10:56Z,2017-07-30T14:25:03Z,"From user testing:
""I have no idea what it means when it says an image is 'Attached' to a post. Does it mean the image is in the post? Does it mean if I 'Detach' the image from the post it will go away from the post? I'm worried a client might 'Detach' an image from a post to remove it, or 'Attach' an image to add it. What is this for? How can an image be 'Unattached' to the post it is displayed in anyway?""",mor10
Needs Patch,60141,Proximity of controls: Upload New Media multi-file uploader,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2023-12-22T13:50:57Z,2023-12-22T13:50:57Z,"See #40822
See #51754
When uploading media files in the Upload New Media > multi-file uploader page, newly added files are listed within rows after the uploader.
The rows contain:
- The attachment details, on the left.
- Additional tools, on the right.
There's a couple problems with that.
== Proximity of controls
The tools are displayed too far to the right, way far from the details. This is a problem, for example, for low vision users and users who use screen magnifiers, as the tools may be out of their vision field.
Controls should be displayed visually grouped so that they can be easily discovered by all users. I'm not sure there's a good reason to have all that spacing between details and tools in the first place.
== The Copy button shifts to the left when copying
There's a few Copy buttons in use in the admin pages. Most of them are aligned to the left and there's a good reason for that: The UI must provide space for the 'Copied!' confirmation text.
However, on this page the Copy button is aligned to the right. After a copy operation, the 'Copied!' text appears on the right of the button thus making the button itself shift to the left. I'm not sure having moving interactive controls on the screen is a good user experience. Instead, the Copy button should be placed in a way to reserve some space for the 'Copied!' text to appear without triggering a shift of other content.
See screenshots and animated GIF below.",afercia
Needs Patch,51584,Publishing a large image post while the image is still uploading allows you to leave and return to a broken image,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-10-21T05:24:32Z,2020-11-10T18:49:23Z,"This issue was originally reported by @antpb in #core-media here;
https://wordpress.slack.com/archives/C02SX62S6/p1603135350316800
If you go to the post editor and upload a large image to the image block, then publish/save and leave the screen before it's uploaded you'll return to the post with a broken image.
I'm thinking we should provide a dirty flag while that upload/resize process is underway for large images to flag to users and stop them from leaving the editor before the process completes.",garrett-eclipse
Needs Patch,39679,Redirect loop on attachment pages,,Media,4.7.1,normal,normal,Awaiting Review,defect (bug),new,,2017-01-24T17:12:11Z,2018-09-03T15:48:54Z,"Summary: a URL to an attachment page will redirect to itself in an infinite loop in certain cases.
Speculation: this may be due to my permalink structure, which would be why others are not complaining about it.
This issue depends on the letter case of the URL. The attachment pages exist, and there is a method that allows them to be accessed, however they cannot be reached if the link is all lowercase letters. Because that is the link generated by the Media Library, users can encounter this.
It took me a while to convince myself that this is a WP core issue because it does not happen on all servers. After adding logging code to some of the action hooks, I could see that a URL comes in and then generates a redirect, using `wp_redirect`, to the exact same URL that was requested.
My permalink structure is `/%postname%.html`, and the WP portion of the site is in a subdirectory, so WP pages are accessed as: http://yourfriendpaul.com/wp/shredding-on-my-guitar.html
Trying to reach the attachment page using this URL will result in an infinite loop:
http://yourfriendpaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
Trying to reach it with this one will succeed, note the uppercase C. Making ANY letter in path uppercase will make it succeed:
http://yourfriendpaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
To complicate matters further, this does not happen on my Ubuntu server, but does happen on GoDaddy with the exact same database (other than site name).
This is my first bug report, so I'm not sure how much info to put in the initial report. The following is an excerpt from my error log, with some notes added. Sorry for the formatting, it is just pasted.
Thanks in advance for looking into this.
Paul
The data is captured using the error log.
The first entry is made in wp-config.
The next 3 lines are when yfp_functions is loaded.
It creates the function that prepends `**yfplog` to an error message.
The final three lines are from the action hooks indicated.
{{{
` # A call in all lowercase has multiple tries, in bursts, which loop and cause 301 redirects to the original URI,
` # but one uppercase letter avoids any redirects and finds the content. Only two of the redirects are shown.
`
` [24-Jan-2017 06:19:04 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:04 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:04 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect() action was called, location: http://YourFriendPaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900, status: """"
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect_status() action was called, location: , status: ""301""
`
` [24-Jan-2017 06:19:04 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:04 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:04 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect() action was called, location: http://YourFriendPaul.com/wp/shredding-on-my-guitar.html/good-at-shredding-dscn4850-1200x900, status: """"
` [24-Jan-2017 06:19:04 UTC] **fyplog - wp_redirect_status() action was called, location: , status: ""301""
`
` [24-Jan-2017 06:19:49 UTC] *** in wp-config.php, REQUEST_URI is /wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
` [24-Jan-2017 06:19:49 UTC] **fyplog - *** Log writing is enabled in yfp_functions, making funcion yfp_write_log()
` [24-Jan-2017 06:19:49 UTC] **fyplog - script: /wp/index.php
` [24-Jan-2017 06:19:49 UTC] **fyplog - uri: /wp/shredding-on-my-guitar.html/good-at-shredding-dsCn4850-1200x900
` [24-Jan-2017 06:19:49 UTC] **fyplog - wp_loaded() action was called.
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
` [24-Jan-2017 06:19:49 UTC] **fyplog - ******* in function get_attachment_link()
}}}",OPunWide
Needs Patch,46970,Remove white Space - iPhone 6/7/8,,Media,5.2,normal,normal,Future Release,defect (bug),new,,2019-04-18T08:42:03Z,2023-05-20T07:27:13Z,"Hello,
While we edit image from admin dashboard (Dashboard > Media > Library - edit), there is much white space displayed in iPhone-6/7/8 landscape and portrait mode. So for that, we can make that element in full width.
Thanks,
Shashank.",shashank3105
Needs Patch,40299,Removing width attribute on an image with a caption removes entire caption,,Media,4.7.3,normal,normal,Future Release,defect (bug),new,,2017-03-29T13:59:21Z,2018-12-27T21:56:20Z,"If you insert an image with a caption into the visual editor, it will create code like:
{{{
[caption id=""attachment_12345"" align=""alignnone"" width=""150""]
My caption[/caption]
}}}
If you switch from the visual editor to the text editor and remove the `width` attribute '''of the image''' to get:
{{{
[caption id=""attachment_12345"" align=""alignnone"" width=""150""]
My caption[/caption]
}}}
And then either update the post, or switch back to the visual editor, the caption is stripped and only the image remains:
{{{
}}}
Removing the `height` attribute doesn't appear to cause the same behavior. I don't believe that removing the width attribute on the image should result in both the caption being stripped and the `[caption]` shortcode being removed.
I'm not sure but this might be related to [27426] and #23103.",catchmyfame
Needs Patch,53669,Respect the quality settings in `wp_editor_set_quality` for lossless WebP,adamsilverstein,Media,5.8,normal,normal,Future Release,defect (bug),assigned,,2021-07-15T14:56:26Z,2022-12-01T00:23:58Z,"In Imagick, WordPress now supports saving lossless WebP images when the source is a lossless WebP image. 🎉
This happens [https://github.com/WordPress/wordpress-develop/blob/f17f4f5f7e474e2c0bb77ace02aaf44fccd8362c/src/wp-includes/class-wp-image-editor-imagick.php#L208 inside the Imagick editor in `set_quality`].
The filter, `wp_editor_set_quality`, applies before this is run, in [https://github.com/WordPress/wordpress-develop/blob/f17f4f5f7e474e2c0bb77ace02aaf44fccd8362c/src/wp-includes/class-wp-image-editor.php#L241 the parent class].
This means that if a WebP is detected as Lossless, it isn't possible to override lossless thumbnailing with `wp_editor_set_quality`.
WordPress should respect the `wp_editor_set_quality` filter's override, [https://developer.wordpress.org/reference/hooks/wp_editor_set_quality/ unless `set_quality()` is run manually].",kirasong
Needs Patch,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
Needs Patch,51115,Scaled Images have larger file size than the original,,Media,5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-08-23T22:29:29Z,2020-08-24T20:02:43Z,"I saw a bug about this for png files but I have the same issues with jpg. This occurs with WP 5.5 on different sites.
As a result, I turn scaling off to work around the issue. ",koolkatwebdesigns
Needs Patch,48784,Search box in Select / Upload image pop-up not working with cropped images,,Media,5.3,normal,normal,Awaiting Review,defect (bug),reopened,,2019-11-24T20:52:28Z,2020-03-28T20:10:45Z,"Hi, it seems that the search field in the pop-up of selecting or uploading images can not find the images which have been cropped before. For example, if I go to Appearance / Customize and want to change the Logo image, and I am asked to cropped the image, that image won't show in the search field. It will show the non cropped image, but not the cropped one.
Thank you!
In the attached image you can see how the search field can do find the filename ""Foto-de-Javier-1.jpg"" using just the letters ""jav"". But there is another image in the Media which name is ""cropped-Foto-de-Javier-1.jpg"" and this one does not appear.",javierr
Needs Patch,48361,Select Files on iOS doesn't trigger on modal if start on Upload Files tab and switch to Media Library tab,adamsilverstein,Media,,normal,normal,Awaiting Review,defect (bug),assigned,,2019-10-17T23:27:06Z,2019-11-03T19:46:59Z,"Hello,
I came across an odd issues on a client site recently using ACF and the Gallery field so I did a fresh install and found the issue resides in core as well.
In short the 'Select Files' button doesn't trigger the uploader if you trigger the media modal starting on 'Upload Files' and then switching to 'Media Library' when there's no files present.
To reproduce use an iOS device (iPad/iPhone);
1. Install a clean WordPress
2. Create a new post.
3. Add a Gallery block
4. Click the 'Media Library' button.
5. If your Media Modal opens with 'Media Library' tab selected then switch to 'Upload Files' and reload the screen.
6. Your Media Modal should open on 'Upload Files' now.
7. Switch to the Media Library tab now.
8. Click the 'Select Files' button that appears below the 'No items found' text.
9. Note the uploader isn't triggered.
This seems to only occur when there's no items in your media library and you are using the Media Modal but your settings have it open on 'Upload Files' first and then you switch to 'Media Library'.
I initially came across this with an ACF Gallery field, but in my clean install it was the Gallery block that I was able to reproduce the issue with.
All the best,
Cheers
",garrett-eclipse
Needs Patch,48469,Selecting Media File as image block link creates blob URL if large image still being processed,,Media,5.3,normal,normal,Future Release,defect (bug),new,,2019-10-30T17:05:54Z,2019-11-05T21:46:36Z,"Steps to reproduce...
1. In post editor, select image block.
1. Use ""Upload"" button.
1. Select a large file, e.g. 5120x2880 image.
1. While the image is still being processed (has spinner overlay), select link button on the block and pick ""Media File"".
When the post is then saved and viewed, the wrapping link will have an `href` with a value like ""blob:http://example.com/cee61eeb-3bf1-984a-9930-5660bba8a2f8"".
If you then go back and edit the post, remove the link from the block, and then re-select Media File as the link type and save the post, expected URL used in post, e.g. ""http://example.com/wp-content/uploads/2019/10/image-scaled-2560.png""
Tested with WP 5.3-RC3.",ianmjones
Needs Patch,35771,Setting Size for Native Video Player Doesn't Work,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2016-02-07T21:28:00Z,2017-06-27T16:50:20Z,"Width and height rules do not affix the size of the embedded native media player.
Width is ultimately honored, but height setting is overruled and set proportionally based on video's proportions. Consequently, if width of the player is set to fill in the theme's available content space, but the embedded video is vertical (filmed vertically, whereby height of the video is greater than width), then the player will be stretched way too tall, regardless of height settings (which is ultimately ignored).
To reproduce:
Embed any locally hosted, vertical video using native video player, using the Embed Media Player option from the Insert Media attachment window. Set width to the width of your theme's content area, and height to less than width. Height will not be honored.
Desired solution:
Set player size to the width and height chosen by the user. Fit the video within the set space of the player.",Tranny
Needs Patch,37311,Site icon thumbnails are lost if wp_generate_attachment_metadata called again later,,Media,4.5,normal,normal,Awaiting Review,defect (bug),reopened,,2016-07-07T22:36:48Z,2021-04-14T16:36:05Z,"If image sizes are regenerated with the Regenerate Thumbnails plugin, the custom Site Icon sizes (and possibly other images in the customiser?) are lost.
The question is whether this is something that needs changing in the plugin, or whether the logic for how these sizes work should change in core. (Virtually all core documentation tells people to use this plugin when changing image sizes, so it should be fixed in one of the other).
I'm of the opinion it should be changed in core, where custom sizes like the ones created by Site Icons should be somehow marked as special sizes, with wp_generate_attachment_metadata checking for any existing custom sizes and including them in the output.",smerriman
Needs Patch,54555,Slow media query on big sites,,Media,5.8.2,normal,normal,Awaiting Review,defect (bug),new,,2021-12-02T07:50:02Z,2021-12-03T20:12:28Z,"On wordpress version 5.8.2 the wp_enqueue_media() slow query is still there. I found several old discussions about being fixed for many years ago but in my case is still there.
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = 'attachment'
ORDER BY post_date DESC
4.6238s
I have 73903 media items",lebada
Needs Patch,54818,Some file names are no longer sanitized,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-01-14T11:16:03Z,2022-01-14T13:03:24Z,"When uploading a file which filename contain accents, those accents are no longer replaced by non-accent letter.
It's specific to JPEG file.
Tested with PDF and PNG: accent are well removed.
See attached screenshot with JPEG, PNG and PDF example.
I can reproduce this with WP 5.9 RC2 and WP 5.8.3.",Chaton666
Needs Patch,55274,Special chars in attachment filename breaks srcset,audrasjb,Media,4.4,normal,normal,Future Release,defect (bug),reviewing,,2022-02-28T09:18:25Z,2022-04-27T05:03:17Z,"There is currently fix that handles spaces in filenames, but it doesn't handle other special characters e.g. $! or any other special char
Spaces issue was reported there:
https://core.trac.wordpress.org/ticket/36549
And fixed here:
https://core.trac.wordpress.org/changeset/38052",dravnic
Needs Patch,25103,Submit buttons on form fields in the Add Media panel,joedolson*,Media,3.5,normal,normal,Future Release,defect (bug),accepted,,2013-08-20T21:23:11Z,2021-05-21T15:57:23Z,"Splitting this out from #23561
There is no Go or Search button available to trigger the action for the search and filter input fields in the Add Media screen - both of which change the content of the panel below. For accessibility reasons the user should be in control of triggering the filtering.",johnbillion
Needs Patch,47144,Text inadvertently rendered by assistive technologies,joedolson*,Media,,normal,normal,Future Release,defect (bug),accepted,,2019-05-06T14:58:01Z,2022-10-28T15:49:23Z,"Moved from the WPCampus accessibility report issues on GitHub, see https://github.com/WordPress/gutenberg/issues/15296
* **Severity**:
* Medium
* **Affected Populations**:
* Blind
* Low-Vision
* Cognitively Impaired
* **Platform(s):**
* Windows - Screen Reader
* Mac - VoiceOver
* Android - TalkBack
* iOS - VoiceOver
* **Components affected**:
* Block Panel
* Document Panel
* Media Dialog
**Issue description**
Users of assistive technologies such as screen readers who navigate to
the bottom of the Settings panels will find a button which they cannot
activate (nor see if sighted) called ""Select files"".
Additionally, if users change the color modes in the popup custom color
picker, the current mode is announced in a live region. However, long
after users are done with choosing a color, even after choosing to edit
another block on the page, when they reach the bottom of the Block panel
they'll still hear ""hex color mode active"". At this point, users may
not remember what this was for and have no idea what this is
referencing, as it no longer has any context.
**Issue Code**
{{{
Hex color mode active
Select Files
}}}
**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**
{{{
Select Files
}}}
**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
Needs Patch,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
Needs Patch,54320,There are no more thumbnails for uploaded PDFs,,Media,5.8.1,normal,normal,Awaiting Review,defect (bug),new,,2021-10-25T19:05:09Z,2022-08-24T14:45:09Z,"My current WP configuration
• PHP / MySQL version: 7.4
• Theme used: Camp Maine of TAM’S TRADING POST (no longer maintained)
• Extensions in place: activated: Akismet - BackWPup - contact Form 7 - Cookie Notice - Honeypot for Contact Form 7 - Ithemes Security - Post Type Switcher - SF Move Login - TablePress - WP Image Zoom - WP Maintenance Mode.
Name of the host: OVH
Site address: https://amapdlacrau.fr
Problems encountered:
The latest .PDF files uploaded to the media library have a generic file icon and no longer display the small thumbnail unlike older files. Clicking on the icon no longer opens the image of the 1st page of the file.
Everything I did that didn't work to fix the problem:
* Create PDFs with different tools; Microsoft, Do PDF, ApowerPDF ...
* Install WordPress version 5.8.1
* Downgrading the PHP version from PHP 8 to PHP 7.4 This fixed the problem with the imagik module, declared absent by the site health check in version 8, but not the thumbnail problem.
* Use an upload plugin: File Manager
* Use thumbnail regeneration plugins: Regenerate Thumbnails and Force Regenerate Thumbnails.
I have not tested: use a media management plugin instead of the media library
I note that the function for generating the thumbnails of the PDF files has stopped working when the theme is no longer maintained and the PHP version is the same. Only the version of WordPress has changed
",10rjulienk21
Needs Patch,34571,Thumbnails and featured images broken if the filename contains utf8 characters (e.g. üäö),,Media,4.3.1,normal,normal,,defect (bug),new,,2015-11-04T01:56:03Z,2019-06-04T20:17:29Z,"I did an upgrade to 4.3.1 from 3.6.1 and I have a whole bunch of media assets (more than 4000 images) where a substantial portion of these images have filenames containing utf8 characters like apostrophes, umlauts etc.
While these images work just fine in posts, neither the ""feature image"" nor the thumbnail in the media library will work for that image (broken image icon, rename plugins won't work, feature image shows broken image icon).
Both functionalities worked fine in 3.6.1
I would be grateful if the media library and the featured image functionally could be fixed so that the media library will work for these files again as well as the feature image.",smuts
Needs Patch,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
Needs Patch,48194,"Unregistered image sizes used for IMG tag ""srcset""",,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-10-02T02:16:24Z,2020-07-21T06:25:14Z,"Following design changes, previously-generated thumbnails remain on the site, along with matching post meta entries linked to the respective attachment. WordPress then uses those to produce IMG tags.
In fact, these thumbnails are referenced even when the files don't exist on the site anymore, following a cleanup.
I think WordPress should only use thumbnail URLs for registered image sizes.
For bonus points, there can be a way to remove unregistered size references from attachment meta, perhaps in a Media > Audit admin page, which lets the user decide what to remove and what to keep.
For context, I've just cleaned images on a site and found a lot of legacy references to thumbnails of previously registered sizes in IMG tags. Media management and cleanup plugins I used could only detect the redundant meta data when I re-registered the old sizes temporarily.",galbaras
Needs Patch,60666,Unwanted section appears as a sidebar in 'Create gallery' section,joedolson*,Media,5.0,normal,normal,6.6,defect (bug),accepted,,2024-03-01T09:04:35Z,2024-03-06T16:46:30Z,"Unwanted section with 'Actions' and 'Create gallery' texts appear in the sidebar of Media Library and nothing happens on selection or click of the texts.
To find the issue, please go through the below steps.
1.From the 'File' block add the block 'Gallery', then select Media Library.
2.Unwanted sidebar section with the specified texts appears.",ukdrahul
Needs Patch,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
Needs Patch,32443,Upload iframe renders pictures in reverse order,,Media,4.2.2,normal,normal,,defect (bug),new,,2015-05-19T18:49:56Z,2019-06-04T20:13:54Z,"Attachments are in reverse order when they have menu_order attributes.
It is because this code in get_media_items function:
{{{
$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') );
}}}
Generates this query:
{{{
…wp_posts.menu_order DESC, wp_posts.ID DESC…
}}}
It should be:
{{{
$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => array( 'menu_order' => 'ASC', 'ID' => 'DESC') ) );
}}}
Which will generate:
{{{
…wp_posts.menu_order ASC, wp_posts.ID DESC…
}}}
",sapegin
Needs Patch,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
Needs Patch,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
Needs Patch,43839,Video Player Mobile,,Media,,normal,normal,Future Release,defect (bug),new,,2018-04-23T23:51:04Z,2019-04-15T19:51:39Z,"I usually use the video player with autoplay on.
\\
But I noticed that on the mobile (I know the autoplay does not work on the mobile), the video player does not display the big play button in the middle of the player.
\\
And the only way to run a video is to press the play button from the control bar at the bottom of the player.
\\
Print screen:
\\
That's how it should look (So it was up to wp 4.8.3)[https://i.imgur.com/PkHjszD.jpg]
\\
That's what it looks like now [https://i.imgur.com/l8Zp94G.jpg]
\\
Does anyone know how to solve this issue?
Thank you!",studiosx
Needs Patch,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
Needs Patch,54876,WP fails to recognize and use Imagick PHP 8 module on OpenLiteSpeed / Litespeed Web Server,,Media,5.8.3,normal,normal,Awaiting Review,defect (bug),new,,2022-01-21T16:23:13Z,2022-02-03T15:39:00Z,"Hi, I've made a ticket with the LiteSpeed people but they insist that their version of PHP (LSPHP) is a like-for-like copy of the PHP binaries, only hosted in their own repos. So it seems this error may be on the WordPress side.
I'll first refer you to this support thread to show I'm not the only one with this problem: https://wordpress.org/support/topic/imagick-module-recognized-but-not-used/
In short, WordPress does not recognize the Imagick module in LSPHP 8, so it will not use it and defaults to WP_Image_Editor_GD as its image editor. It has no problems detecting and using it in an Apache environment where I used PHP 8 from the CentOS repos. It also has no problem using the LSPHP 7.4 version either.
Here's a breakdown of the results:
**Apache 2.4.37 with PHP 8.0.14**
Custom Image Processing with WP_Image_Editor_Imagick = **Success**
ImageMagick version number = 1692
ImageMagick version string = ImageMagick 6.9.12-34 Q16 x86_64 2021-12-22
Imagick version = 3.7.0
**OpenLiteSpeed 1.7.14 with LSPHP 7.4.26**
Custom Image Processing with WP_Image_Editor_Imagick = **Success**
ImageMagick version number = 1690
ImageMagick version string = ImageMagick 6.9.10-86 Q16 x86_64 2020-01-13
Imagick version = 3.4.4
**OpenLiteSpeed 1.7.14 with LSPHP 8.0.12**
Custom Image Processing with WP_Image_Editor_Imagick = **Error** (see notes*)
ImageMagick version number = 1690
ImageMagick version string = ImageMagick 6.9.10-86 Q16 x86_64 2020-01-13
Imagick version = **@PACKAGE_VERSION@**
***Notes:** Active editor is listed as WP_Image_Editor_GD. WordPress fails to recognize and use the Imagick extension. Custom image processing fails as it tries to run Imagick methods through the GD class.
All environments are running on Rocky Linux release 8.5.
",luboslives
Needs Patch,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
Needs Patch,55323,When an image is edited the URL of the image is not updated,,Media,5.9.1,normal,normal,Awaiting Review,defect (bug),new,,2022-03-06T01:31:01Z,2022-03-07T19:34:24Z,"When an image is edited from the image editor, after an edit has been applied, the URL of the image is not updated due it always references back to the original image instead of referencing the image to the updated image (when the edit has been applied to all images sizes).
== Steps to replicate the problem.
1. Upload an image into the media library
2. After the image is uploaded into the media library click on Edit image
3. Apply an edit to the image, either rotate, flip or crop,
4. Make sure that the option is applied to all images sizes.
5. Click on Save
6. Observe how the URL of the image (see attached image), by clicking on Copy URL to the clipboard
7. Open the copied URL into a new tab the copied URL still references to the original image, and not the edited image instead.
",mitogh
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,49183,Width alignment issue in Edit attachment page,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-01-13T09:55:56Z,2020-01-13T20:11:52Z,"Hello,
There is an issue with the width in the edit attachment page.
First, go to the media page and open any image and edit that image and click on the button that says ""Edit Image"" and you can see the issue.
I am using a laptop having size of 1366 x 768.
https://youtu.be/A440xIRrUJU
Please see this video for the issue I am talking about.
",rnitinb
Needs Patch,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
Needs Patch,49995,WordPress creates unnecessary thumbnails,,Media,5.4,normal,normal,Awaiting Review,defect (bug),new,,2020-04-24T11:44:23Z,2020-04-26T12:09:32Z,"Hello,
I think I found a bug in WordPress 5.3 onwards, when **imagick is installed and activated** on the server (PHP 7.3, phpinfo attached).
To reproduce the problem:
1 - in /wp-admin/options-media.php check what sizes are set (defaults are: 1024x1024, 300x300x 150x150)
2 - upload an image with the same size as one of the three, let's say I upload this image https://via.placeholder.com/1024x1024
3 - WordPress uploads the image and generates the following files
1024x1024.png -> original image
1024x1024-1024x1024.png -> SHOULD NOT BE CREATED
1024x1024-768x768.png -> medium_large
1024x1024-300x300.png -> medium
1024x1024-150x150.png -> thumbnail
1024x1024-1024x1024.png should not be generated, it's also bigger than the original (3.5kB vs 6.3kB).
The same thing happens with the other sizes as long as the image size is the same as one of the sizes set in the options.
It doesn't happen on Wordpress 5.2.x and downwards.
To solve the problem imagick must be deactivated, using GD the problem doesn't happen.",XXVII
Needs Patch,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
Needs Patch,57158,bug for image 2/3 ratio size when max height is 480px,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2022-11-21T00:13:46Z,2022-11-21T00:13:46Z,"When I upload a 2/3 size image (example: 700/1050px, 1000/1500px, etc.) and in the media settings (/options-media.php) I set the maximum height and maximum width to 480px, the medium size image (which measures 320px x 480px) is never displayed on wordpress.
this problem exists only for images resized in medium size. everything seems OK for small and large size.
I think this bug exists since several versions.
* screenshot settings : https://drive.google.com/file/d/1LAKzw2RHVDb3MskmQ4V86FX_eGw_XBEC/view?usp=sharing
* screenshot 320x480px medium size not displayed : https://drive.google.com/file/d/1EDcCVpwW4Cd21qn9JQldL2Q9EpwvF701/view?usp=sharing",tshak93
Needs Patch,53193,chmod(): Operation not permitted in class-wp-image-editor-imagick.php,,Media,5.7.1,normal,normal,Awaiting Review,defect (bug),new,,2021-05-12T05:49:17Z,2021-05-12T13:15:24Z,"Hi
**Current install:**
Using the LATEST version of WordPress, the line numbers in this bug report relate to that version number.
The system is running on CENTOS with APACHE as the server.
**Problem Discription:**
PHP Warning: chmod(): Operation not permitted in ""wp-includes/class-wp-image-editor-imagick.php"" on line 710
**Explanation why this is a problem**
Every security conscious system administrator will have the following settings:
On directories e.g.
drwxr-x---. 10 editor apache 4096 Feb 19 2019 wp-content
drwxr-x---. 25 editor apache 12288 Mar 29 13:26 wp-includes
drwxr-x---. 4 editor apache 4096 Dec 11 17:10 themes
drwsrws---. 2 editor apache 4096 May 12 15:09 upgrade
drwsrws---. 20 editor apache 4096 Jan 1 00:00 uploads
On files e.g.
-rw-r-----. 1 editor apache 31328 Mar 29 13:25 wp-signup.php
-rw-r-----. 1 editor apache 4747 Dec 11 15:27 wp-trackback.php
While the apache server can READ every file, it cannot WRITE every file abd that is good! I have NEVER had a problem with these settings, ever.
Where the apache server NEEDS to write, it can (e.g. uploads/upgrade/cache)
I can happily update core/plugins/themes using FS_METHOD ssh2 with ssh keys set for the editor.
Also it is nearly IMPOSSIBLE to have the system being taken over as the apache server cannot write core files.
**Does the problem occur even when you deactivate plugins, use default theme?**
N/A
File system permission issue
**In case it's relevant to the ticket, what is the expected output or result?**
There needs to be an additional check whether the line SHOULD/CAN be executed.
On my system the editor is NOT the same as the user running the http server. The server user is MOSTLY (and should) restricted to reading (other that the upload/upgrade/cache/etc directories).
This will lead to errors on Linux based systems.
",jobst
Needs Patch,45562,drag and drop file upload fails with empty files when dragging from macOS Preview into WP on Safari 12,,Media,5.0,normal,normal,Awaiting Review,defect (bug),new,,2018-12-10T00:27:48Z,2020-11-19T15:39:30Z,"Part of my workflow involves opening multiple files in Preview (on macOS), and then adding them to WordPress by dragging and dropping them to the Add Media page in WordPress (running in Safari). That used to work fine, but when I upgraded to Safari 12.0, I get the error:
""File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.""
I'm using self-hosted WordPress (on both Ubuntu 11.04 or 11.10, with Apache 2.4 as the web server); I don't think I made any server-side configuration changes when this started happening, though it's possible I upgraded Apache versions at about the same time? This occurs in WordPress 5.0, and also occurred in WP 4.x versions; again, I don't think it was caused by a WP change, though I can't rule out a WP upgrade at about the same time.
This works fine when dragging and dropping from Finder, it's only when dragging and dropping from Preview.
To reproduce:
* Select multiple images and open them up in Preview.
* Go to Add Media in WordPress in Safari 12.
* Drag one of the images from the Preview sidebar to Wordpress.
I get the above file upload error when I do this.",dbcarlton
Needs Patch,44127,editing an image can result in intermediate sized images left over after the image is deleted,,Media,4.9.5,normal,normal,Awaiting Review,defect (bug),new,,2018-05-17T19:51:02Z,2023-08-09T17:19:13Z,"Steps to reproduce:
1. set thumbnail_size to `150x150`
1. upload a `300x300` image, e.g., `foo.jpg`
* will result in `/wp-content/uploads/foo-150x150.jpg` being generated
1. edit the image and scale to `200x200`
* will result in something like `/wp-content/uploads/foo-e1526583456941.jpg` being generated
* `/wp-content/uploads/foo-150x150.jpg` will still be present, since it is still a valid thumbnail for the scaled image
1. regenerate intermediate sized images (e.g., by calling [[https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/|wp_get_attachment_metadata()]] followed by [[https://developer.wordpress.org/reference/functions/wp_update_attachment_metadata/|wp_update_attachment_metadata()]], which the [[https://wordpress.org/plugins/regenerate-thumbnails/|Regenerate Thumbnails]] plugin does)
* will result in something like `/wp-content/uploads/foo-e1526583456941-150x150.jpg` being generated
1. ""Delete Permanently"" the image
Check `/wp-content/uploads` and you will see that `foo-150x150.jpg` is still there.
",pbiron
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,47619,i got error in /wp-includes/media.php,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2019-06-28T06:17:58Z,2019-06-28T12:38:30Z,in media php at line 3633 in $strings array you use objects without to check if this objects is exist... thanks!,Asaf Azoulay
Needs Patch,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
Needs Patch,35870,image_default_link_type does not work for galleries,,Media,4.4.2,normal,normal,,defect (bug),new,,2016-02-19T10:25:33Z,2019-06-04T20:22:54Z,"After some updated I've noticed all galleries started to point the URL to attachment post instead of image. After some digging it seems that attachment post will appear if no settings were found in the code. I've tried to override this without any luck
I found this and it describes the problem:
https://core.trac.wordpress.org/ticket/35101
Now I find out that this fix does not work for galleries. Even if I have image_default_link_type i the data table the attachment appears as default. And the front generates galleries with attachment post url when the setting is missing in the gallery code from content.",jayse83
Needs Patch,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
Needs Patch,49640,image_get_intermediate_size returns wrong,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-13T10:25:35Z,2020-03-13T17:20:32Z,"The function `image_get_intermediate_size` isn't working as expected.
If I upload a `1200px x 900px` image as the original. In WordPress theme I use `wp_get_attachment_image( $post_id, array( '1x1-large', '1x1-medium' ) );`
`1x1-large` is setup using `add_image_size( '1x1-large', 1024, 1024, true );`
It will fail as, it cannot create this image size as the the original is smaller. However, the function in question is clever enough to look for other aspect ratios that match. This is good.
So if I had another name images called `1x1-medium` (setup using `add_image_size( '1x1-medium', 768, 768, true );` )
This will exist as the original image is large enough to be sized down to this.
The function however uses this this code-block to short-circuit it:
https://github.com/WordPress/WordPress/blob/46674e2367b8ca0c15b859bd578bc2119bfa0150/wp-includes/media.php#L780
{{{
// If there's an exact match to an existing image size, short circuit.
if ( intval( $data['width'] ) === intval( $size[0] ) && intval( $data['height'] ) === intval( $size[1] ) ) {
$candidates[ $data['width'] * $data['height'] ] = $data;
break;
}
}}}
So `$data['width'] =` each image sizes width and `$size[0] = '1x1-large'`
This will never match!!! $size should in theory be a string, not an integer.",CHEWX
Needs Patch,54714,images deleted from media library still exist in upload directory,,Media,,normal,normal,Awaiting Review,defect (bug),new,,2021-12-31T01:20:28Z,2021-12-31T13:39:45Z,"Currently its so easy to make storage full of all wp site which allow user to upload image.
Just upload big image all the time. Eventhough the admin of the website delete it permanently from media gallery. This files still exist in 'uploads' directory.
When media is deleted permanently from media library, all files for this images should also be deleted including the size variations.",erikdemarco
Needs Patch,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
Needs Patch,39521,media_handle_sideload does not initialize the caption/excerpt value,,Media,2.6,normal,normal,Awaiting Review,defect (bug),new,,2017-01-09T02:58:05Z,2019-05-16T02:37:04Z,"In /wp-admin/includes/media.php changes have been made in the media_handle_upload() function to initialize the caption/excerpt value after an upload. Here's the code:
{{{#!php
$type,
'guid' => $url,
'post_parent' => $post_id,
'post_title' => $title,
'post_content' => $content,
'post_excerpt' => $excerpt,
), $post_data );
}}}
Corresponding changes should be made in the media_handle_sideload() function, which still has:
{{{#!php
$type,
'guid' => $url,
'post_parent' => $post_id,
'post_title' => $title,
'post_content' => $content,
), $post_data )
}}}
",dglingren
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,45212,mediaelement.js WordPress .mp4 videos not playing/working on certain browsers/devices,,Media,,normal,normal,Awaiting Review,defect (bug),reopened,,2018-10-28T04:46:14Z,2020-04-10T18:11:46Z,"Instead of the normal embedded Media Element video player working properly, on Safari Desktop and Safari/Chrome/Firefox on iPhone, the video player does not work. It's black and provides the actual video download beginning with mejs.download-file: https://cdn.elitesportsny.com etc. ...
Please help. Thanks. ",robsabo10
Needs Patch,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
Needs Patch,53408,png images bit depth is modified in resized images,,Media,5.7.2,normal,normal,Awaiting Review,defect (bug),new,,2021-06-15T11:27:39Z,2023-08-02T16:10:42Z,"Hi,
When I upload a 8 bit png image graphic, WordPress resizes as usual but modifies the bit depth to 24 or 32 bit, depending if their is a alpha channel. Without Alpha channel it is 24bit, with it's 32bit.
The problem with that is that the file sizes end up being multiple times bigger than the original image.
I opened a ticket with ImageMagick https://github.com/ImageMagick/ImageMagick/discussions/3825
Some of the replies included these solutions:
**Setting bit-depth to 8 in the way done in the script may not be adequate for PNG. I think the only way to ensure that is to preface the output name with PNG8:filename.png. But I am not sure if it will preserve you transparency if the input has transparency. But the best thing to resolve that would be simply to try it.**
**Scaling the image, depending upon the scaling method, most likely will add more colors than the 256 limit for 8-bit color. So the image has to be forced to quantize colors to the 256 limit in order to save as 8-bits. Otherwise, it is saved as 24 or 32-bits. So specifying PNG8:filename.png will save as 8-bits.**
PNG00: Inherit PNG color and bit depth from input image(https://legacy.imagemagick.org/Usage/formats/#png_formats)
Also here are related tickets I was able to find:
https://core.trac.wordpress.org/ticket/36477
https://core.trac.wordpress.org/ticket/30402
https://core.trac.wordpress.org/ticket/48736
Thanks!",wpfed
Needs Patch,45589,resized images does not delete after delete main image in media library,,Media,5.0,normal,normal,Awaiting Review,defect (bug),new,,2018-12-11T20:18:31Z,2018-12-23T21:25:00Z,"1) upload image
2) check the uploading folder - image-100x100.jpg image-540x750.jpeg and etc
3) delete image.jpg in media library
4) image-100x100.jpg image-540x750.jpeg and all other are still exist
Looks like 10 years old bug #8309
",alexufo
Needs Patch,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
Needs Patch,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
Needs Patch,44456,srcset max-width set to image width,,Media,4.9.6,normal,normal,Awaiting Review,defect (bug),new,,2018-06-25T14:53:48Z,2020-04-07T03:05:48Z,"My understanding is the max-width value in the image srcset should be limited to 1600px, however it is actually always set to the width of the original image. Also, max_srcset_image_width does not appear to be properly setting the max-width value either.
Thanks,
Mike",mikedunn
Needs Patch,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
Needs Patch,32609,tinymce gallery preview uses full resolution images,,Media,4.2.2,normal,normal,,defect (bug),new,,2015-06-10T23:59:15Z,2019-06-04T20:14:12Z,"If a user uploads a batch of ''very'' high-res images, and inserts them as a gallery, the browser will become unresponsive as these giant images are rendered in the TinyMCE gallery preview. The gallery preview should use a thumbnail instead of the original image.",leedo
Needs Patch,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
Needs Patch,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
Needs Patch,36293,video/audio object passed to wp_video_shortcode/wp_audio_shortcode is always null,,Media,,normal,normal,,defect (bug),new,,2016-03-22T06:47:41Z,2020-03-12T05:16:51Z,"Hi,
The following:
{{{
apply_filters( 'wp_video_shortcode', $output, $atts, $video, $post_id, $library );
apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library );
}}}
send the {{{$video}}} and {{{$audio}}} objects respectively to the filtering function.
However, these objects seem to be always {{{null}}}.
By checking the relevant code I notice that these objects are only set when the {{{$primary}}} variable is set to {{{false}}}. The code does not clarify why the audio/video object is bound to that variable. Perhaps someone more familiar with the logic behind these functions should check this please.",gnotaras
Needs Patch,59573,warning: trying to access array offset on value of type bool in wp-includes/media.php,,Media,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-10-09T16:14:04Z,2023-10-26T17:04:39Z,"{{{
function image_get_intermediate_size($post_id, $size = 'thumbnail')
{
$imagedata = wp_get_attachment_metadata($post_id);
// Checking whether $imagedata and $imagedata['sizes'] are real arrays.
if (!is_array($imagedata) || empty($imagedata['sizes']) || !is_array($imagedata['sizes'])) {
return false;
}
// Checking whether $size has a valid structure.
if (!is_array($size) || count($size) < 2) {
return false;
}
$data = [];
}}}
.....",androidforlife
Needs Patch,56071,wordpress images too large,,Media,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-25T13:51:58Z,2022-10-26T15:45:15Z,"How is it that an optimzed .png of 1081x753 with file size 61.5KB is converted to 1024x713.png and occupies 527.31KB. Overall WP increased the environmental impact of that one image ten fold, and as I publish about 100 or so of such images weekly server space is also occupied unnecessary.
The WP generated file of 527.31K optimises to 106K.
Also if I upload the optimised 1024x713.png of 106K, then WP generates a duplicate of 527.31K instead of just copying it.
I read it is no longer permissible, as was in the earlier releases of WP, to disable the auto generation of of 'large', 'medium-large' etc. files.
Also google degrades sites that serve unoptimized content. I consider this as defect and thus report it as a bug, if yo do not think so, please reassign to enhancements.
",antonv
Needs Patch,45075,wp_delete_attachment() has unreliable return and wrong process order,,Media,,normal,normal,Future Release,defect (bug),new,,2018-10-11T04:48:13Z,2019-04-15T22:36:10Z,"When doing permanent deletion, this function should also remove the files of the target attachment. However successful return of this function does **not** guarantee this even though it still can delete the attachment object and its relations.
Problems when permanent deletion is in process:
1. {{{wp_delete_attachment()}}} must check for {{{wp_delete_attachment_files()}}}'s return and should fail too when {{{wp_delete_attachment_files()}}} fails
2. {{{wp_delete_attachment_files()}}} should be called first - what is the point of deleting object and it's relations when physical data could not be removed...
",jave.web
Needs Patch,45913,wp_enqueue_media() - slow query,,Media,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-01-10T17:11:32Z,2020-04-01T09:25:14Z,"I have sites with very large databases and I've noticed some slow queries since 5.0.3 on new/edit post screens:
{{{
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = 'attachment'
ORDER BY post_date DESC
}}}
This query is coming from wp_enqueue_media()
I am using php 7.2.1, MySQL 5.7.24",lubimow
Needs Patch,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
Needs Patch,29370,wp_get_attachment_image() returning unexpected image size,,Media,3.9.2,normal,normal,,defect (bug),new,,2014-08-25T18:40:16Z,2019-06-04T20:08:49Z,"I have a 'thumbnail' size image of 150x150 px and a 'thumb-250' size image of 166x250 px.
{{{
add_image_size('thumb-250', 0, 250, false);
}}}
I am using wp_get_attachment_image() to get the best image fit for a 133x200 format.
{{{
wp_get_attachment_image( $id, array(133,200) );
}}}
this returns the 'thumbnail' size which has an area that's smaller than the requested size, as well as a different aspect ratio. I would expect the 'thumb-250' size image to be returned, which has a bigger area and the exact aspect ratio that was requested.
I tracked this down to the first condition in the following line:
https://core.trac.wordpress.org/browser/tags/3.9.2/src/wp-includes/media.php#L599
Why is the 'thumbnail' image size preferred in the selection process? This means the thumbnail is always returned if it's next in row even if it's area is smaller and the aspect ratio is off.",martinleopold
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,55872,"wp_image_add_srcset_and_sizes trys to parse images from external pages, fails with error",,Media,6.0,normal,normal,Awaiting Review,defect (bug),reopened,,2022-05-30T08:08:17Z,2023-02-16T19:31:44Z,"If a user embeds image content from another domain by copy pasting and includes a tag like
{{{
}}}
it seems like wordpress trys to parse the file as it were hosted in its own instance. This won't work of course, because it cannot access the file in the filesystem. It then fails with the following warning:
{{{
PHP Warning: Undefined array key ""file"" in /wp-includes/media.php on line 1676""
}}}
",pampfelimetten
Needs Patch,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
Needs Patch,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
Needs Patch,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
\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 `
` tag as easily as this is done for mediaelement.
This could be done by replacing the previous lines with an filter call, and doing the mediaelement stuff inside the filter callback that can be unregistered and replaced by plugins.
",Fab1en
Needs Patch,32965,Add new Credit field to media attachment details,,Media,,normal,normal,,enhancement,new,,2015-07-12T05:14:33Z,2023-10-18T16:35:53Z,"I propose adding a new form field to the attachment details page to easily add information to credit media files to their original sources. For example, if I upload an image I can use this new field (Credit) to add the photographer and any other related or required information to fulfill copyright or attribution requirements. Currently the attachment details pane has the following fields (from Codex [https://codex.wordpress.org/Inserting_Media_into_Posts_and_Pages]):
• Title: the name of this media
• Caption: brief explanation - this text will be displayed below the image
• Alternative text: text to describe the media - used for accessibility
• Description: an explanation of this particular media
These fields are not ideal for adding attribution information because doing so would prevent a user from adding information originally intended for those fields. Having a separate field specifically for crediting an attachment would be better because users could still add a caption or description but also add their attribution. Plus, the Credit field could have a CSS class selector (e.g., ""wp-credit-text"") assigned to it to make it easy to style in a theme.
'''Why this is important'''
Whenever anyone inserts a media file into their post or page they should (or sometimes must) credit the original source. This is important to provide copyright information or to attribute items that are in the creative commons. Because there is currently no specific place to put this information on an attachment, users might not be adding it or are doing so in an inconsistent or makeshift way (e.g., in the caption field or at the end of a post).
When a user uploads a media file and sees the Credit field they may be more motivated to add the appropriate information, which can be as simple as the word ""Credit"" with a link to the original source to something more complex. For instance, the Creative Commons says an ideal attribution contains the following: title and author, as well as links to the original source, author's profile, and the Creative Commons license. For example:
• ""Creative Commons 10th Birthday Celebration San Francisco"" by tvol is licensed under CC BY 2.0. See [https://wiki.creativecommons.org/wiki/Best_practices_for_attribution]
Although some plugins exist that add this feature and developers can add it to their functions file, it would be more beneficial as part of the WordPress Core. It would enhance WordPress for everyone, promote the idea of attributing work, and allow theme developers to easily add or style it in themes.
Helpful things to note:
• The Credit field should allow HTML
• The magic happens in wp-admin/includes/media.php
• Current attachment form fields are added in get_attachment_fields_to_edit() (line 1164)
• WordPress creates a shortcode for the caption in img_caption_shortcode() (line 843) with tags and CSS class of ""wp-caption-text"" so we may want to do something similar to Credit, like tags and "".wp-credit-text"" class.
I've developed a small plugin that adds the field, but it needs a little work with styling for the attachment editor. See some more specific notes in the plugin.
Thank you!",mcuomo2013
Needs Patch,20205,Add the ability to filter wp_get_attachment_image(),,Media,3.4,normal,normal,,enhancement,new,,2012-03-08T20:21:16Z,2019-06-04T20:03:15Z,"i'm working on a plugin that lets users define any image to serve as the thumbnail for any PDF document. I'm storing the ID of the image as post_meta for the PDF attachment. Instead of showing the default icon with wp_get_attachment_image() I'm quite close to being able to do this by filtering image_downsize.
the trouble is that the image_downsize filter it run ''after''
{{{
if ( !wp_attachment_is_image($id) )
return false;
}}}
so the PDF image fails the test and I never have a chance to run my filter.
",helgatheviking
Needs Patch,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
Needs Patch,30687,Ajax media attachment save has no error handling,,Media,4.0.1,normal,normal,,enhancement,new,,2014-12-12T10:23:24Z,2019-06-04T20:10:06Z,"When using the ajax media system on adding media in posts. It is not possible to show errors to the users.
In the file ajax-actions.php (located wp-admin/includes/) in the function wp_ajax_save_attachment_compat() the feedback of errors is trown away. If this code is further developed with visual feedback, the user understand why data is not saved or imported.
Code: (wp 4.0.1 line 2294)
{{{
if ( isset( $post['errors'] ) ) {
$errors = $post['errors']; // @todo return me and display me!
unset( $post['errors'] );
}
}}} ",Krielkip
Needs Patch,52489,Allow List View when inserting images from the media library,,Media,,normal,normal,Awaiting Review,enhancement,new,,2021-02-10T14:18:41Z,2021-02-10T14:18:41Z,"The media library allows a list view when browsing, allowing one to see (and sort) media by the various columns. But, when selecting those images via an image block, only the grid view is available. This makes it hard to find images other than by date and next to impossible to locate in any order (e.g., alpha).
Allow both views of the media library when it's in ""select from media library"" mode.
(Per user request at https://wordpress.org/support/topic/media-labrary/)",sterndata
Needs Patch,53787,Allow changing number of attachments displayed,antpb,Media,5.8,normal,normal,Future Release,enhancement,assigned,,2021-07-26T16:44:22Z,2022-02-24T15:28:38Z,"#50105 introduced a new load more button to replace infinite scroll for media library.
In the initial version the number of [https://github.com/WordPress/wordpress-develop/blob/18ebf26bc3787e8ccc03438bd8375e4828030ca9/src/js/media/models/query.js#L174|posts per page is set in the code to 40].
In #50105 was discussed adding a filter to make it developer customizable. There are use cases for having more or less than the default 40. This should apply for the initial and later requests.
In a second step:
> It would be nice if this were user controllable like posts per page, or terms per page are from the screen options tab. We would need to integrate this into the modal itself though since it operates in numerous contexts.
[https://core.trac.wordpress.org/timeline?from=2021-02-07T04%3A28%3A43%2B01%3A00&precision=second|Quote from @adamsilverstein]
",grapplerulrich
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,32849,Allow option of Grid AND List View of the gallery when inserting media into post,,Media,,normal,normal,,enhancement,new,,2015-07-01T00:24:57Z,2023-10-18T16:27:12Z,"I’ve looked around quite extensively for this, but can it appears this feature simply doesn't exist in WP currently.
Basically, when you’re on a post and want to either “insert media” or select “featured image”, you cannot view the gallery list on a post using the “list view”. Rather the only option appears to be the default “grid view”.
The ""list view"" interface is already available in Gallery, is there any reason why this isn't available in the post editor as well?
I've seen a number of requests for this online, especially when there are installations that have a large number of images that are similar (and thus you need to easily see the meta information to differentiate).",ashkas
Needs Patch,37330,Attachment pages do not always provide a link to the original article.,,Media,4.5.3,normal,normal,,enhancement,new,,2016-07-11T21:56:27Z,2019-06-04T20:26:17Z,"I wasn't sure where to post this issue, as it seems to be a limitation in the WordPress code itself rather than a bug. But perhaps someone knows what's going on?
Individual attachment pages (which are created when inserting an image or gallery on a page or post) sometimes provide a link to the main article, BUT NOT ALWAYS.
This is noticeable in themes which take advantage of this capability, such as Twenty Thirteen and Twenty Fourteen, (for other themes that don't include a link back to the original article anyway this doesn't matter.)
For example, in Twenty Thirteen's image.php the following code checks to see if the article URL is available. If it is, the attachment page displays a ""published in"" link, but if not it just displays the date:
{{{
Published on
%2$s in
%5$s ', 'twentythirteen' );
if ( empty( $post_title ) || 0 == $post->post_parent )
$published_text = '
%2$s ';
}}}
Obviously, WordPress expects that the article URL will not always be known, and this is observable. Some attachment pages link back to the article and some do not.
But why is this? It seems kind of random- I can't figure out which scenarios generate an attachment page without the link?
And in any case, why should WordPress not be able to figure out the article URL and always make it available for themes to use?
",webtechmailbag
Needs Patch,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
Needs Patch,48103,Bulk image resizing,,Media,,normal,normal,Awaiting Review,enhancement,new,,2019-09-22T22:02:00Z,2019-09-23T01:44:07Z,"When adding multiple images, it would be good to be able to select multiple and resize them all at once. Currently, if you have, say, 20 images on a page and you want to change their image sizes, you'd have to do all individually, which takes a fair amount of time.",scottscrivens
Needs Patch,60610,Consider fixing user mistakes and/or adding unit tests for $preferred_ext in wp_mime_type_icon(),joedolson*,Media,trunk,normal,normal,6.6,enhancement,accepted,,2024-02-22T19:39:29Z,2024-03-06T16:48:20Z,"Follow-up to ticket:31352#comment:54
The `$preferred_ext` value for `wp_mime_type_icon()` begins with a period, and developers might miss that. The function could check the first character and add the dot if it does not exist there. The function also could ensure that the letters are lowercase.
For unit tests, the `test_wp_mime_type_icon_video` test in `post/attachments.php` checks the default `$preferred_ext` parameter value. Adding at least one more test with a specific `$preferred_ext` could help.",sabernhardt
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,21714,Enable Intermediate choice in UI if Full Size Image is exact match to Intermediate Image,,Media,3.4.1,normal,normal,,enhancement,new,,2012-08-28T15:56:09Z,2020-01-15T01:49:54Z,"
This is simply a minor usability enhancement for Media Gallery. If an image is uploaded that is exactly the same size as an intermediate image (300x300 = Medium for example) it is not a choice when inserting that image into a post. It would be nice if it was a choice pointing to the full/original image since full is the same size as the intermediate.
It seems to be caused in the image_downsize function in /wp-includes/media.php because image_get_intermediate_size returns false.
I believe image_downsize can be updated as such to provide this enhancement:
Line 162 (if statement) Currently:
{{{
if ( !$width && !$height && isset($meta['width'], $meta['height']) ) {
// any other type: use the real image
$width = $meta['width'];
$height = $meta['height'];
}
}}}
could be updated to read the intermediate width and height and set intermediate to true if it is an exact match to the original image:
{{{
if ( !$width && !$height && isset($meta['width'], $meta['height']) ) {
// any other type: use the real image
$width = $meta['width'];
$height = $meta['height'];
// add check for real image being exact match to intermediate image to enable intermediate choice in UI
if (isset($_wp_additional_image_sizes[$size])) {
$goal_width = intval($_wp_additional_image_sizes[$size]['width']);
$goal_height = intval($_wp_additional_image_sizes[$size]['height']);
} else {
$goal_width = get_option($size.'_size_w');
$goal_height = get_option($size.'_size_h');
}
if ($width == $goal_width && $height == $goal_height)
$is_intermediate = true;
}
}}}
Thanks for considering, and hope I put this in the right place,
Andrew
",andrewteg
Needs Patch,35775,Enhancements: add_post_thumbnail_image_size / wp_get_attachment_id,,Media,,normal,normal,,enhancement,new,,2016-02-08T14:14:08Z,2019-06-04T20:22:23Z,"Hello,
I hope I am in the right place here to suggest two enhancements for WP core.
1:
From my perspective the most used image of a post is the post-thumbnail. I use this post thumbnail quite often in different sizes - for teasers, related posts, sliders etc. From a performance perspective I always want to deliver the image in the correct dimensions. No 1600px image in a related post section where the image is 200px wide etc. I am struggling a bit because I often work on websites which have a lot of pictures in their posts. When I add a new image size its always relevant for all images which are uploaded to WP and often they are not necessary. I do not need a 200px wide image of 20 images which are used in the post - I only need it for the post-thumbnail. From that perspective I would like to have another function than add_image_size - for example: add_post_thumbnail_image_size which is only triggered when somebody selected an image as the post-thumbnail. This will save space on the servers as well.
2:
Sometimes I have the case that I need the attachment ID of an url that has been uploaded. For example: I delevoped a plugin where an image can be chosen, the input field is a text field for a URL. In that case I need to determine the attachment ID to have access to all the necessary WP functions. In this case I built my own function that does it, but I think it will also be a function that can be helpful if it is integrated in WP.
Looking forward to your reply.
In order to always get the image in the correct dimensions which are ",torben.tschechne@…
Needs Patch,57781,Exclude sized variant from SRCSET if larger in file size than the original image,adamsilverstein,Media,6.1.1,normal,normal,Awaiting Review,enhancement,assigned,,2023-02-21T13:01:57Z,2023-02-21T13:01:57Z,"== Problem
Every here and then some anomalies may occur where a sized image variant, which is smaller in image dimensions than its original, may nevertheless be larger in file size than the original. Some examples were shown in #57238.
== Scope
The goal of #57238 is to improve the rulesets/algorithm that this is less likely to happen. And continue to improve if new edge cases get reported.
WP Media has no mechanism to alter the outcome of the sized image variants (e.g. multi pass optimization like rerun with different parameters until sized version is smaller in file size).
But if that situation nevertheless happens there is still an easy ""last safety net"" we can make use of.
== Goal of this very ticket
- The original will always be better in quality (natural law, unless a sized variant gets improved by artificial intelligence).
- If a sized variant is larger in file size than the original, it makes no sense to offer it, hence exclude it from the SRCSET.
- Possibly not only the first sized variant may be larger in file size, but potentially more (was the case in #57238). All those variants shall be excluded.
== Extra goal
If such an incident is detected on a real world WordPress instance, it would be ideal if the WordPress dev team could learn from it and potentially improve the algorithm accordingly.
Ideas:
- In WordPress > Settings > Media
- [√] Allow to send analytical data when image optimizations fails
- In WordPress > Dashboard > Site Health: Hint + action links
- ""We detected X images where the smaller sized responsive images were larger than the original.""
- __Show affected images__ and __Report to WordPress team to improve the image optimizations__.
- For both situations we would need a ""show me more"" disclaimer text, which would be like:
> Note: WordPress has clever responsive image algorithms. Still occasionally there may be a situation where a very optimized original results in resized images which oddly are larger in file size. With this check you allow to transmit the URLs of such affected images to the WordPress development team, so that we can study them and improve WordPress accordingly. The images will be purely used for analytical purposes and your image rights remain unaffected. No other data than the URLs of the images get transmitted.",abitofmind
Needs Patch,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
Needs Patch,47839,Extended file management in Media Library,,Media,,normal,normal,Awaiting Review,enhancement,new,,2019-08-06T10:01:16Z,2022-09-28T15:32:08Z,"Following enhancements should be made to the Media Library:
1) Option to organize media in custom folders, not only by month and year, but let the user choose a folder or create a new one in ""wp-content/uploads"" to save the item.
2) Ability to move files is essential for keeping them organized. This should be possible with an inbuilt file manager like [https://tempspace.net/plugins/?page_id=111] while updating all posts and pages the item is associated with.
3) I prefer to keep all my images in its original quality. I've set the image sizes to 0 in the Media settings, but WordPress still produces reduced image files. For thumbnails in the gallery, I'd prefer to view my untouched files as thumbnails in its original size without getting cropped in. Thus, the media gallery could arrange all items in a way that the height stays the same while the width is displayed in full.",mimoho
Needs Patch,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
Needs Patch,60569,Generate UUID for media slugs if attachment pages are inactive.,,Media,,normal,normal,Awaiting Review,enhancement,new,,2024-02-19T02:36:19Z,2024-03-06T16:55:03Z,"For hierarchical post types, WordPress compares slugs with those used by attachments to avoid collisions. The effect of this is that a page can not have the same slug as an uploaded image. [https://core.trac.wordpress.org/browser/tags/6.4.3/src/wp-includes/post.php?marks=5100-5101#L5100 Source code.]
This remains the case now that attachment pages have been disabled by default.
As the attachment pages slugs are now largely meaningless on new WordPress installs, the media slugs should not reserve nice names and prevent pages from using them. For example, a media file with the name `about-us.png` should not prevent the page `about-us` from existing.
Steps to reproduce above:
1. Install WordPress 6.4 or later
2. Go to Dashboard > Media > Add new media file
3. Upload the file `about-us.png`
4. Go to Dashboard > Pages > Add new page
5. Title the page `About Us` and publish
6. Observe the page's slug is `about-us-2`
If the attachment pages are disabled, the URLs for the media pages (as opposed to the image) can use `wp_generate_uuid4()` for the slug to avoid reserving nice names and preventing their use on available permalinks.",peterwilsoncc
Needs Patch,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
Needs Patch,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
Needs Patch,32313,Image upscale as Media's settings option,,Media,4.3,normal,normal,,enhancement,new,,2015-05-08T13:58:11Z,2019-06-04T20:13:19Z,"Hello,
I had to searching for hours to find image upscale (because unusually keyword for me as non-English). I am creating new school's website and custom featured images are up to 1200px width (in fact ~876px when with sidebar), however old images are only 800px width and I had problem with deal it.
I found so simple solution to set image to required width/height if not enought, then crop.
{{{
/* Thumbnail upscale
/* ------------------------------------ */
function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){
if ( !$crop ) return null; // let the wordpress default function handle this
$aspect_ratio = $orig_w / $orig_h;
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
$crop_w = round($new_w / $size_ratio);
$crop_h = round($new_h / $size_ratio);
$s_x = floor( ($orig_w - $crop_w) / 2 );
$s_y = floor( ($orig_h - $crop_h) / 2 );
return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
}
add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 );
}}}
[http://alxmedia.se/code/2013/10/thumbnail-upscale-correct-crop-in-wordpress/]
In my opinion it should be included as option for each/globally for image sizes in Media's settings page and also as fifth parameter for add_image_size(), because this can make big headache.
Greetings",odie2
Needs Patch,21810,Improve intermediate image size handling,,Media,3.5,normal,normal,,enhancement,new,,2012-09-05T20:28:14Z,2019-06-04T20:03:44Z,"When discussing the new media workflows on #21390, the need to improve our image size API became apparent.
A quick overview of the improvements that should be made:
* All image attachments have an original, or ""golden master"", which is never altered.
* An image size creates a new image and stores all transformations applied to the image as metadata. Transformations are described relative to the golden master. An image size has a unique slug (which means a set of dimensions does *not* have to be unique).
* Image attachments have a ""master"" image size, which is used to create any automatically generated image sizes.
* Automatically generated image sizes can be overridden with manual transformations.
Would love for someone to step up on this ticket, as the media modal editing UI will benefit greatly from these improvements.",koopersmith
Needs Patch,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
Needs Patch,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
Needs Patch,43741,Improve media_sideload_image() image extensions detection,,Media,4.9.5,normal,normal,Awaiting Review,enhancement,new,,2018-04-12T00:30:44Z,2018-04-15T21:35:07Z,"**media_sideload_image()** applies a pattern to the URL trying to detect image extensions.
There are cases where Image URLs don't end on jpg, png or any other extensions.
They can be simply a number or any other weird urls, but they are actually just fine
https://crmall.generalshopping.com.br:8097/Api/store/image/bkxjNm5LU0RzQW5rdVNvUHZVSURkQT09
So I think it would be a good idea trying to detect the image extensions on these cases, like this:
{{{#!php
[...] if I have two images that look identical the only way to differentiate between them is click each of them and read their properties in the properties section.
One possible solution would be to show the title/file name of the image and/or the file size.",F J Kaiser
Needs Patch,57369,Insert Media dialog gets ad-hoc controls: Thumbnails squared/proportional + Sort order by date/name asc/desc,,Media,6.1.1,normal,normal,Awaiting Review,enhancement,new,,2022-12-21T21:16:02Z,2023-07-28T10:50:06Z,"== Reproduction
- Edit a page
- Insert an image gallery
- The ""Create gallery"" (aka ""Insert Media"") popup opens.
== The user experience in this dialog is problematic
- Screenshot with annotations and proposed improvements
- (If inline embedding failed, please see attached below)
[[Image(https://www.dropbox.com/s/i3nx5ewqkp5itne/wordpress-insert-media-dialogue.png?raw=1)]]
== Problems
- This dialog follows the WordPress design philosophy ""decisions not choices"" but here I'd propose ""good defaults (=decision) which satisfy the majority but extra ad-hoc choices for users and use cases which require otherwise"".
=== Order is by upload date, newest first
- A good default suited for the majority of typical bloggers.
- In case you want to insert numbered image series or image stories (where upload order occurred not exactly in the lexicographical order) this gets a nightmare! Especially in combination with the other issue, read on.
=== Squared thumbnails
- Very bad if you have many similar images, where the significant differences may be in the hidden areas.
== Proposals
- The dialog gets extra controls. As illustrated in the mockup.
=== Sort preference
- Dropdown menu with the choices ""Date, Name""
- Nearby a toggle button for ascending or descending order
- ""Date with newest on top"" remains the default.
=== Display preference
- Dropdown with these values:
- ""Thumbs"" --> image fits container
- Original image ratio is kept
- Has no effect ofc if the source files were cropped due to: Settings > Media > Crop thumbnail to exact dimensions (normally thumbnails are proportional) = ON. But by default this is OFF as the remark in brackets indicates.
- ""Thumbs (squared)"" --> image fills container
- ""List"" with thumbs
- ""List (with micro thumbs)""",abitofmind
Needs Patch,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
Needs Patch,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
Needs Patch,51261,Integrate the -scaled.jpg images setting into _wp_make_subsizes,,Media,5.3,normal,normal,Awaiting Review,enhancement,new,,2020-09-07T15:31:24Z,2020-11-09T23:51:27Z,"Creating a -scaled.jpg BIG threshold image on upload is a good idea, but it has been implemented in a way that makes it hard to adjust, try out different settings, or unify the look of the site.
After a photo has been scaled once I can't find a way to regenerate the scaled version, even using plugins and digging through the image.php file. It appears that after it has been scaled once there is a marker that prevents the images from being scaled again with different settings.
The -scaled.jpg image needs to be integrated into _wp_make_subsizes so that they can be regenerated if necessary. Also if the -scaled.jpg image settings were placed in the settings>media pane like all the other default image sizes it would make for easier adjustments.
The current implementation leaves websites where pre-5.3 posts serve full-sized images and post-5.3 posts serve scaled images. And if the default scale isn't ideal there is no way to re-create the previously scaled images.
--- Here are my attempts to work around this lack of functionality
While developing my wordpress site I had the ""Disable ""BIG image"" Threshold"" plugin installed half the time. So half of my images had a -scaled.jpg version and half didn't.
I found the default -scaled.jpg size to be too small so I want to use the ""Regenerate Thumbnails"" plugin to regen all the images to have a -scaled version. I removed the ""Disable ""Big Image"""" plugin and added this to my ''function.php'' file.
{{{
function td_big_image_size_threshold( $threshold, $imagesize, $file, $attachment_id ) {
return 4000;
}
add_filter( 'big_image_size_threshold', 'td_big_image_size_threshold', 10, 4 );
}}}
I ran the Regenerate plugin and it half worked, creating -scaled.jpg images, for the half of the attachments that didn't previously have them, but didn't overwrite the previously created -scaled.jpg images.
I thought the updated pixel metadata of the -scaled.jpg images might be below the threshold so I went into the ''images.php'' file and temporarily removed the
{{{
if($image_meta['width'] > X etc){}
}}}
part of the check. It didn't work. Now I can't find a way to force a regenerated -scaled version of of the images. It is as if once they have been scaled once, even if those files are removed or the scale has changed they can't be scaled again.
I'm at a loss. I feel like running the _wp_image_meta_replace_original function over my whole library to reset them would be the best option but don't really know how to do that.
",ddegner
Needs Patch,44655,Introduce alternative srcset option for custom logo,,Media,,normal,normal,Awaiting Review,enhancement,new,,2018-07-27T15:06:23Z,2018-07-30T12:00:04Z,"When adding theme support for custom-logo I can define the recommended size for the logo:
{{{#!php
38,
'width' => 186,
'flex-width' => true,
'flex-height' => true,
));
}}}
The user will then be notified that they should upload their image at these dimensions. If they follow the advice the_custom_logo() will output:
{{{
}}}
Due to the small size srcset is not included and viewing on mobile could produce a blurry image. So to get srcset increase the height and width 3x making height 114 and width 558 we will now get:
{{{
}}}
We now have srcset but have had to use a larger image than we want, we have the option to resize the image via css to produce the correct dimensions but we are still potentially loading an image larger than needed. Also, from my testing I cannot seem to get this method to swap images at all, this could be due to my own error/misunderstanding however, I did find another person with a similar issue on SO
[https://stackoverflow.com/questions/49177239/srcset-and-sizes-not-working-consistently-across-browsers]
and viewing the following page always shows large.jpg as the image being used in my browser (chrome):
[https://simpl.info/srcsetwvalues/]
It would be good if we could specify the type of srcset to use e.g use 1x, 2x, 3x instead of 350w, 500w...
{{{
}}}
This way we could specify the required logo size to be 3x then server the appropriate size according to the pixel density of the device the user is viewing on.",mrmadhat
Needs Patch,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
Needs Patch,52451,Make the media sideload functions testable and add tests,,Media,,normal,normal,Awaiting Review,enhancement,new,,2021-02-04T17:18:55Z,2021-02-04T17:27:08Z,"Goals:
1. Make the media ""sideload"" functions testable
2. Provide code coverage for these functions
To accomplish this:
- These functions will first need to be refactored.
- Then unit tests can be built to provide code coverage.
Sideload functions include:
- `media_handle_sideload()`
- `media_sideload_image()`
A guide for the refactoring work:
- All changes will focus on testability
- No changes should impact or alter the current behavior, extensibility, or backwards compatibility
- Care will be given to maintainability and readability (i.e. code quality)
",hellofromTonya
Needs Patch,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
Needs Patch,49583,"Media Library in SubFolder, when Organize by Mo/Yr is deactivated",,Media,,normal,normal,Awaiting Review,enhancement,new,,2020-03-05T18:33:41Z,2022-10-26T16:06:46Z,"I'd like to suggest that an additional folder is added to the /uploads folder, for /media_library uploads. If not for all media uploads, then at least for when Mo/Yr Media organization is disabled.
I've worked on several projects where there are simply not going to be very many media files. In effect, I'll deactivate the ""Organize my uploads into month- and year-based folders"" checkbox/feature. BUT, even if there are only 4 dozen images uploads, that ends up creating = 12 x 4 x (image sizes per theme settings). Those 48 photos can quickly turn into a few hundred, diluting the convenience of quickly referencing /wp-content/uploads.
Today, several plugins/addons store files/folders within the Uploads folder. This probably wasn't an issue years ago, but today it creates a mess of files in /uploads. Between all of these factors, it's not nearly as ""clean"" in /uploads as it once used to be.
my .02",splaquet
Needs Patch,54016,Media Library: Bulk delete elements in grid view takes very long,,Media,,normal,normal,Awaiting Review,enhancement,new,,2021-08-26T15:10:47Z,2023-07-10T13:52:51Z,"When bulk deleting images in media grid view they will be deleted one by one counting down, refreshing the view (not reloading the page!) and this takes unnecessarily long. I wonder if this can be accelerated by first deleting all of them before the view gets refreshed for example.
",Presskopp
Needs Patch,58435,Media library strips color profiles => significant image color problems,,Media,,normal,normal,Awaiting Review,enhancement,new,,2023-05-31T17:10:59Z,2023-06-14T14:03:00Z,"If you upload a JPG with an embedded profile (such as P3 or some other wide gamut), the reprocessed image in the media library is stripped of its color profile. This is likely to result in significant display errors for any image not encoded as sRGB, including: desaturation, clipping of gradients or vibrant colors, and hue shifts.
Tested with WP v6.2.2 and PHP v7.4.33
",gregbenz
Needs Patch,28750,Media modal: preview images,,Media,,normal,normal,,enhancement,new,,2014-07-04T21:00:03Z,2019-06-04T20:08:29Z,"I'm not sure if this has been talked about before, but with FileReader we could preview images in the media modal.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
I've made a quick patch to try it, but it's far from perfect... It sometimes flickers and the reading seems to block js from executing further, so not ideal for uploading a ton of images at the same time. Still, I'm sure we can get this to work smoothly somehow.
I'll attach a screenshot. I think this would be a really cool experience. :)",iseulde
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,28321,"Media uploader confuses user with description, caption, alt and title, without explanation",,Media,3.5,normal,normal,,enhancement,new,,2014-05-21T08:07:21Z,2023-10-18T16:08:48Z,"After a decade using WordPress, I still scratch my head when confronted by the media uploader, with its offer for me to enter for each of my images a ""Title"", a ""Caption"", some ""Alt Text"" and a ""Description"".
As a developer, I can just about figure that out - title and alt text correspond to the HTML attributes. Playing with caption shows that it adds a visual caption. Description? Not sure what that gets used for.
Admittedly, I don't work a lot on content creation. I work more on internals. On the other hand, someone who does work on content creation might not have the knowledge of HTML attributes, so they might be worse off.
There's no help that appears if you mouse around the labels, that explains what they're for.
In summary: the bug is that there are four separate ways to describe your media upload, and no obvious link to any help to explain how these four are distinguished.",DavidAnderson
Needs Patch,33773,"Media, Featured Images: The media modal doesn't remember filter settings in the context of featured images",,Media,4.3,normal,normal,,enhancement,new,,2015-09-07T21:46:15Z,2024-01-28T09:18:20Z,"https://make.wordpress.org/flow/2015/09/07/media-featured-images-setting-the-featured-image-on-an-old-post-macnchrome/
A thread on #23205 discusses featured image flow through the media modal. There are requests that the filter in the media modal remember the “uploaded to this post” filter setting independently for the featured image flow.
Considerations:
* “Uploaded to this post” requires that the image be attached to a post. Images uploaded through the media modal from the editor are attached to the post, but images uploaded directly to the media library are not attached and don’t get attached later when added to a post. We could use some API for pulling images out of post content, like we do with some other media types. See related discussions on #23041 ""Images Don't Become Attached When Inserting a Gallery"" and #32622 ""Make the text of the Image delete AYS dialog clearer"".
* If no images are attached to the post, the filter should be set to show all images.
",ryan
Needs Patch,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
Needs Patch,22894,Need WordPress Media Uploader Stop or Cancel Button in WP Version 3.5,,Media,3.5,normal,normal,,enhancement,reopened,,2012-12-12T17:34:01Z,2023-10-18T16:05:38Z,"Today I was testing the new media uploader of WP 3.5 from post editor by clicking 'Add Media'. I clicked 'upload files' and I choose a big file from my computer by a mistake. But I did not want to upload that file. Then I wanted to cancel the uploading, but there is no stop or cancel button . Then I close the popup window and open again by clicking 'Add Media' button. I see the previous file is being uploaded yet. I choose another small file and both files upload are running.
[[Image(http://onetarek.com/wp-content/uploads/2012/12/stop-media-uploader.jpg)]]",onetarek
Needs Patch,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
Needs Patch,29687,Original image should be visible in media-library after image-processing,,Media,4.0,normal,normal,,enhancement,new,,2014-09-16T16:46:47Z,2019-06-04T20:09:15Z,"After editing an image in the library, e.g. after cropping and saving the resulting image will be shown in the library. At this time the original-image was not deleted or overwritten, because it could be used before the processing.
It would be very fine if this original-image appears again:
1. someone could use the whole (uncropped) version again.
2. you are not able to delete this image completely from the server without using FTP",arkonisus
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,57459,Reexamine the usefulness of file size meta for images,,Media,,normal,normal,Future Release,enhancement,new,,2023-01-13T21:41:10Z,2023-01-21T00:09:08Z,"Storing of the file size for images was added in #49412 without it being used in core and with pretty marginal use case(s) expectations:
Storing file size means, developers will not have to resort to doing filesize function calls, that can be time consuming on assets on offloaded to services like Amazon’s S3.
#49412 also mentions some serious drawbacks:
- Image filesize meta is missing for all previously uploaded images.
- It is unreliable as seemingly many hosting companies optimize images directly on the disc, without running WP, hence the cached file size becomes outdated/wrong soon after images are uploaded.
- Many sites replace JPEGs with WebPs on the fly, making the stored file size unusable.
In that terms the cached image file size seems too unreliable to even fulfill the expected use in plugins. Furthermore not being useful in core, and the additional overhead when uploading images seems to make it a poor addition.",azaozz
Needs Patch,20602,Replace media,,Media,3.3.1,normal,normal,,enhancement,reopened,,2012-05-02T13:29:45Z,2023-10-18T23:58:59Z,"I have been developing themes for clients lately that require the same image across the theme in varying places. A good example is an event site where the image is a badge/sticker showing the price of the tickets. This gets output on various pages in varying locations.
get_attachment_link is perfect as I can plugin a single ID and use the graphic wherever. However, the ticket prices change as the event gets closer and the graphic needs to be updated which breaks the theme in production when my client does so as a new ID is generated.
This doesn't make too much sense to me. I've worked with and developed CMSs of all kinds and usually the ID is preserved.
I would at least like the option, perhaps a checkbox, to indicate I want to reupload a new image. I think it's more common that an update on a media item would be to modify the same logical graphic rather than just replacing it with something entirely new.
I found the following plugin but I feel this really ought to be core.
http://wordpress.org/extend/plugins/enable-media-replace/
Thanks for your consideration.",PorridgeBear
Needs Patch,35094,Replace static with Dynamic Image Sizes for inserted images,,Media,,normal,normal,Awaiting Review,enhancement,new,,2015-12-15T02:27:38Z,2018-08-16T20:36:21Z,"== Proposal ==
Change the behavior of the add image size selector from hard-coding `width` and `height` attributes to adding size-based classes to the `
` 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
Needs Patch,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
{{{
}}}
**Todo.
While adding a new image to the editor we get a small JavaScript error.
",MacPresss
Needs Patch,11877,Resized Images lose their EXIF data,,Media,3.0,normal,normal,,enhancement,reopened,,2010-01-12T10:47:55Z,2019-06-04T20:01:51Z,"The thumbnail, and medium re-sized images do not keep EXIF data of the original image.",thee17
Needs Patch,32459,Send custom metadata alongside a file upload via the media uploader,,Media,4.2.2,normal,normal,,enhancement,new,,2015-05-21T18:53:13Z,2019-06-04T20:14:00Z,"As WordPress has evolved into a very powerful CMS, responsive layouts and high-resolution screens are growing more and more common. It's not uncommon for large sites to register several additional image sizes, and adding 2X support doubles the number of images created behind the scenes.
It would be nice for plugins to be able to have more granular control over the sizes that are created when an image is uploaded.
An example: a company Team page features portraits for each employee. Only two sizes are needed: 250x250 and 500x500 (2x). Meanwhile, the rest of the site has nearly a dozen custom image sizes. When the portraits are uploaded, a dozen sizes are created, but only two are needed. Similarly, registering these two new sizes registers them for every image uploaded to the site.
In a plugin like Advanced Custom Fields, I'd like to be able to tell the uploader to skip all of the built-in sizes and hand-pick the sizes I do want to create.
In other words, a new set of sizes would need to be registered that aren't automatically included in the global set of image sizes, but are available for plugins to select and send to the uploader. The uploader could be given a special set of sizes when it's opened, and those special sizes can be fetched from the theme.
To be clear, I'm not talking about generating new image sizes when the theme requests them. This request is for overriding the sizes that the uploader applies to a new image.
I've explored the built-in functions and hooks and filters, but it doesn't appear there's a way to override the sizes that are created in the way I describe.",danphilibin
Needs Patch,52705,Set threshold for lazy loaded images,,Media,,normal,normal,Awaiting Review,enhancement,new,,2021-03-03T17:18:31Z,2021-03-05T19:38:30Z,"The new lazy load by default has caused a lot of problems for my websites. It broke a3 lazy load and created large content layer shifts with that plugin enabled. Even after the developer said he turned off the new default lazy load. That plugin is now unusable which is fine if there is a good alternaitve.
Without a3 lazyload the sites are much slower than previously when using a3 lazyload. I guess the new feature can be turned off but I think other things changed when making the role out. Maybe WordPress core use to define the image width and then height rather than height and then width in the HTML? Not positive but I think so.
Even though I think this made WordPress worse I imagine these changes are here to stay.
Can you make it so we can set an image threshold on the default lazy load? Lazy loading without a threshold makes the images pop out of black space, providing a very poor user experience in my opinion. ",cbw5007
Needs Patch,31283,Setting poster image for videos inside a video playlist is not very intuitive,,Media,4.2,normal,normal,,enhancement,new,,2015-02-10T15:43:13Z,2019-06-04T20:11:16Z,"This is somehow a follow-up to #27891.
When you create a video playlist, it's very hard to understand how to change the poster images of the videos.
Here is the workflow :
1. Upload some videos
1. Create a new article and insert one single video
1. Edit the inserted video to open the media modal again, and select a poster image for your video
1. Nice !
1. Create another article and insert a video playlist
1. When you choose video, the one that was inserted in the previous article is shown with the poster image instead of the default video icon : very nice !
1. For other videos, there is no way to select a poster image, neither during initial playlist creation, nor after having inserted the playlist :-(
1. To select a poster image, you have to go back to the main Media menu, find the right video and edit its details, and then set the featured image (that you guessed it was the same as the poster image)
I see at least three ways to improve that workflow.
1. In the ""Edit video playlist"" modal, add a ""Select poster image"" menu, similar to the one that exists in the ""Video details"" modal for the video shortcode.
1. When browsing videos in the media modal, add a link to set the poster image, in the same manner that the ""Edit image"" link works for images
1. When browsing videos in the main Medias menu, add a link to set the poster image, in the same manner that the ""Edit image"" link works for images
1. Bonus : change ""Featured Image"" title to ""Poster image"" in the video attachment post edition page
1. Big Bonus : when browsing videos in the main Medias menu, add a button ""take a screenshot and set as poster"" when a video is shown. This will load the video into a canvas, generate an image from this canvas, send the image to the server and set it as poster !
",Fab1en
Needs Patch,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
Needs Patch,60369,Shortcut for Select Button in Media Library,antpb,Media,,normal,normal,6.6,enhancement,assigned,,2024-01-29T11:58:30Z,2024-03-07T19:34:39Z,"Hi there,
there should be a shortcut to confirm the selected image in Media Library? It is possible to choose an image with Return Shortcut but there is no combination (and documentation) to just confirm the selection with keypad and insert it to the page …
Dealing with lots of images is currently really cucumbersome, as one has to click the button manually each time again and again.
[https://pasteboard.co/sX5B35Ns3tM7.jpg]",hirschferkel
Needs Patch,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
Needs Patch,35865,Site Icon should be uploaded to a different directory or not able to be deleted from library,,Media,4.4,normal,normal,Awaiting Review,enhancement,new,,2016-02-18T22:52:42Z,2023-08-14T21:50:57Z,"The new site icon feature is great. However I think if an image is set as the site icon, that image should not be able to be deleted from the media library, or it should be uploaded somewhere else and use that location as its link. ",DoodleDogCody
Needs Patch,31715,Small UI redesign proposal for media uploader,,Media,4.1.1,normal,normal,,enhancement,new,,2015-03-20T17:50:29Z,2019-06-04T20:12:17Z,"Right now, when adding images to a post, you get an 'Insert Media' dialog (or 'media grid') where you can drag and drop files to upload. Perfect, so far.
However, if you want to ''manually'' select some files via file chooser, you have to click another tab, and then click again on a button to launch the file chooser. If you use it a lot, that extra click can become a bit annoying.
My proposal would be to remove that extra 'Upload Files' tab and just add a simple 'Select Files' button on top of the Media Grid dialog.
See attached mockup.
That would be self-explanatory and quicker to use, and we could get rid of the tabs.",jorgetoledo
Needs Patch,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
Needs Patch,34324,Tag picker for attachments,,Media,4.3.1,normal,normal,Awaiting Review,enhancement,new,,2015-10-16T11:46:21Z,2019-01-21T12:10:03Z,"When adding a taxonomy for attachments you only get a basic input field in the modal views, like in a post or when using the grid view on the attachment page:
[[Image(https://s3.amazonaws.com/f.cl.ly/items/2T2n3k2014362w402z2P/Image%202015-10-16%20at%201.36.39%20PM.png)]]
Someone in the forums [pointed out](https://wordpress.org/support/topic/tags-picker-for-attachments?replies=3) that this is because the modal view is only for editing the image, and not the attachment post it belongs to. This makes sense when editing a post, but not in the grid view on the attachments page.
The only way to edit tags and categories in the normal way is to press ""Edit more details"", where you get the proper tags/category pickers. I feel like we should either remove or improve the basic input field. It doesn't really make sense to have a stripped down version in the modal. It's confusing and not very good UX.",filipstefansson
Needs Patch,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
Needs Patch,53637,Video poster image is not shown after video has been played,,Media,5.7.2,normal,normal,Awaiting Review,enhancement,new,,2021-07-10T10:12:25Z,2021-07-12T21:34:03Z,"The poster image is shown correctly before the video starts. When the video has been played, it can be restarted. But then the first frame image of the video is shown instead of the poster image. It would be great if the poster image would be shown again.
This is how the video was embedded:
{{{
[video width=""960"" height=""540"" mp4=""https://mydomain.com/wp-content/uploads/2021/07/video.mp4"" poster=""https://mydomain.com/wp-content/uploads/2021/07/video_thumbnail.jpg""][/video]
}}}
",marowi
Needs Patch,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
Needs Patch,48299,"When ""big_images"" are automatically scaled, communicate with a UI message",,Media,,normal,normal,Awaiting Review,enhancement,new,,2019-10-12T19:36:49Z,2019-10-25T15:33:39Z,"The new big_image handling is done behind the scenes automagically which has a couple of downsides:
1. If a user actually wants a huge image for some reason, they’re going to be confused about what’s happening.
2. By fixing the issue for them with no communication, we’re missing out on the opportunity to better inform people about why they shouldn’t be uploading massive images to begin with.
Proposal: Add a UI message to communicate “hey, we fixed this huge image for you. Here’s why [insert link to helpful article]”
I would be happy to help contribute to such a document.
The addition of the Alt text message in the UI is a great model for how such communication can help educate and inform site owners.
",webtrainingwheels
Needs Patch,57760,add 'pre_wp_get_attachment_url' filter,,Media,,normal,normal,Awaiting Review,enhancement,new,,2023-02-17T18:16:16Z,2023-05-04T14:35:02Z,"We are making plugin for featured image using external url.
If user gt featured image url via `wp_get_attachment_url()` there is no way for us to hook because `wp_get_attachment_url` hook will never called if the post is not 'attachment'. The only way for us to make it work via creating fake attachment which is complicated.
`pre_wp_get_attachment_url` filter will be very helpful in this case.",fodisery
Needs Patch,41977,media_handle_upload() un required second parameter,antpb,Media,2.5,normal,normal,Future Release,enhancement,assigned,,2017-09-25T14:21:04Z,2023-02-07T06:26:41Z,"Why second parameter of `media_handle_upload( $file_id, $post_id )` is required?
It's better to define it as 0 and make it optional. In some cases it's more convenient! And we lose nothing if do so...",Tkama
Needs Patch,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
Needs Patch,46835,unnecessary image size created,,Media,5.1,normal,normal,Awaiting Review,enhancement,new,,2019-04-08T21:14:39Z,2019-04-09T08:38:57Z,"[[Image(https://i.stack.imgur.com/JDFyd.png)]]
This is hard to explain. I have the medium size set to 640px wide.
If i upload an image that is exactly 640px wide. It creates an unnecessary copy of it that matches the original image in every sense.
The problem is that when i upload an image that's exactly 640px wide it makes a copy like so:
image.png (is 640x640 px)
image-640x640.png (is ALSO 640x640 px, so why create it?)
The medium (640px) size should only be created if the original image is Wider than that, not equal.
I hope i explained it well enough. Let me know if it needs clarification.",ctrlaltdelete
Needs Patch,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
Needs Patch,57733,wp-includes/functions.php::do_enclose() should handle post content differently,,Media,6.1.1,normal,normal,Awaiting Review,enhancement,new,,2023-02-16T12:21:59Z,2023-02-16T12:21:59Z,"This method **removes enclosures** if {{{get_post()->post_content}}} doesn't contain the enclosure URL.
What if the post **will** contain the URL **after** it is being rendered with, say, a shortcodes? For example, I may use shortcodes to form the media URL in the post content as {{{media file }}} as the string that will be rendered (and then match) the URL found in enclosure. And by the way, on the enclosure I would also like to use shortcodes, but this is yet to be tested and not relevant to this bug report.
URL comparisons should happen with both post content and enclosure content transformed to their final forms, not its raw version.
Thank you in advance.",avibrazil
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,22937,Bulk Actions > Edit could allow batch-assignment of taxonomies to Media following the WP 3.5 media changes,,Media,,normal,normal,,feature request,new,,2012-12-14T13:59:37Z,2023-10-18T15:53:15Z,"[First and foremost the media improvements in WP 3.5 are wonderful, thanks to all involved.]
Now that you can assign taxonomies to media easily, it would be extremely useful if you could also use Bulk Actions > Edit (as you can with posts / pages / custom post) to assign them to multiple images more quickly.
Real world case: we added a taxonomy to media yesterday for a client, so they could categorise their ~500 images into sitewide categories, and they immediately replied to ask if there was a way of doing it in batches...",yeswework
Needs Patch,54226,Cleanup Unused Image Sizes,,Media,,normal,normal,Awaiting Review,feature request,new,,2021-10-06T09:45:25Z,2021-10-06T11:21:46Z,"I have just spent my morning cleaning up over 400,000 unused image sizes taking up over 14Gb of disk space on my site. This comes from both WordPress & WooCommerce not cleaning up after thumbnail sizes have been changed in the past. I am luckily an advanced user and able to do this via the command line but I really feel for the average user who is paying a premium for hosting to host a plethora of images that are old and never used. WordPress & Woocommerce really need to look at cleaning up after themselves.",mitchellk
Needs Patch,34223,Core support for image regeneration,,Media,4.3,normal,normal,,feature request,new,,2015-10-08T20:26:48Z,2023-10-18T15:52:00Z,"Making this a separate ticket from #34196 so as to not hijack another conversation.
I’d like to discuss WordPress doing image regeneration as a part of core.
Images are most often defined in themes, and when switching themes, I think it makes sense to at least offer the ability to easily regenerate images to create the images a theme expects to exist.
Similarly, if the default image sizes are changed, it’d be nice if users could regenerate images to make older images compatible to new size definitions.
I think the nomenclature for images (i.e.: medium, large) help define images well enough that regenerating an image that exists on an old post would not alter it in a way that is out of expectation.
And if we have a new image size that’s equivalent to the content width (and I’d actually argue to make that the standard insert size), it would make sense to be able to change it easily, with core, as part of a theme switch routine.",krogsgard
Needs Patch,57238,Criteria for Responsive Images of WebP: Preserve Alpha + Preserve Lossless + Smaller in size than original,adamsilverstein,Media,,normal,normal,Future Release,feature request,assigned,,2022-12-01T00:07:55Z,2023-02-21T13:09:28Z,"On WordPress 6.1.1 I uploaded different WebPs (lossless/lossy + with/without alpha channel) and the Responsive Images that WordPress creates from them should fulfill these criteria
1. ✅ Preserve the alpha channel → To maintain layout/design capabilities
2. ✅ Lossless original should result in lossless sized versions → To preserve full quality (e.g. screen designs, diagrams, etc)
3. ✅ File size of smaller sized versions should never be larger than the original → Else the purpose of Responsive Images to conserve bandwidth is moot.
To my shock in one case ALL 3 criteria were violated, in other cases some criteria were violated.
== Input: WebP, lossless, with alpha channel
**Original**: Axure-Prototyping-2-dynamic-title-scaled.webp • 2880 × 1750 • 21.77 KB • 1:926 (compression factor)
1. ❌ Without alpha channel → Looses me layout/design capabilities.
- Found no ticket ""Responsive Images of WebP should preserve alpha channel"" - Should we file this?
2. ❌ Lossy versions from lossless original → Looses me quality against my intention.
- Possibly related to one of those:
- #53663 another example for a failed feature detection?
- #53669 maybe related?
3. ❌ Larger in file size, even if smaller in dimensions → Contrary to the intended goal of Responsive Images.
- Axure-Prototyping-2-dynamic-title-scaled.webp • 2560 × 1556 • 29.67 KB • 1:536
- Axure-Prototyping-2-dynamic-title-2048x1244.webp • 2048 × 1244 • 23.89 KB • 1:426
- Axure-Prototyping-2-dynamic-title-1536x933.webp • 1536 × 933 • 16.20 KB • 1:353
- Is the first one to be smaller in file size than the original
- Issue #53653 fixed larger file sizes by avoiding lossless versions from lossy original.
- But here we have the reverse, but nevertheless an increase in file size! Also need to avoid that.
== Input: WebP, lossless, without alpha channel
Original: Confluence-Absence-Inspector-in-Create-Mode.webp • 2880 × 1620 • 672.73 KB • 1:27
1. N/A No alpha channel present in the original. So no alpha channel can be lost either.
2. ❌ Lossy versions from lossless original → Undesired!
3. ✅ File size of smaller sized versions are all smaller than the original:
- Confluence-Absence-Inspector-in-Create-Mode-scaled.webp • 2560 × 1440 • 136.88 KB • 1:107
- Already the first smaller version is already smaller in file size
- Thanks to compression ofc. Note: When the version would remain lossless (see point 2) I still would have that expectation ofc.
== Further notes
- The WebP files were created from PNGs with GraphicConverter 11.7.1 (beta build 5672) with these metadata options:
- Without any color profile information (the raw pixel values are sRGB compliant, so the default fallback sRGB applies)
- With a [https://www.lemkesoft.info/forum/viewtopic.php?p=27608#p27608 minimal Exif chunk which only stores resolution info] (I tag my Retina images as 144 PPI, something which I would like WordPress to detect as a @2x Retina image, but that's another issue)
- Btw I was concerned that that Exif chunk is at the end of the file (at the end of the linked post), but the developer of GraphicConverter said, [https://www.lemkesoft.info/forum/viewtopic.php?p=27646#p27646 I just use the public code from Google to create the WebP and can't influence the order, that's how the WebP comes out.]
- Wanted to mention it here for completeness, maybe relevant.
- With webpinfo I confirmed the existence of alpha channel and lossless/lossy status of WebP for all mentioned files (originals + responsive image versions by WordPress) .",abitofmind
Needs Patch,48462,Download from Media in Backend,,Media,5.2.4,normal,normal,Awaiting Review,feature request,new,,2019-10-30T10:48:12Z,2019-11-15T15:26:41Z,"It would be great to quickly download multiple images/files from the media in the backend.
This would speed up the editing process, when an editor needs help with image editing.
Mark multiple images > click download.",diebombe
Needs Patch,60250,Feature Req – Media Library Grid-List,,Media,,normal,normal,Awaiting Review,feature request,new,,2024-01-14T16:18:41Z,2024-03-06T16:57:57Z,"Hello, i have site with lots of images so i have to check attachment details of images and upload new ones everyday. so in grid view of media library, the attachment details modal is really helpful and i have infinite scroll enabled. i have to check old images after uploading a new into media library but need to scroll a lot and it’s very annoying. on the other side in list view there is a pagination so i can remember page number everyday but there is No attachment modal thats why I have to open attachment page of every image and update info which takes lots of time.
I really need pagination in grid view or attachment details modal in list view. kindly add an one feature in media library. it will save lots of time in future. Thank You 🙂
",smtkapps
Needs Patch,55093,Feature Request - Media Uploads option for year-based folders (without month),,Media,,normal,normal,Awaiting Review,feature request,new,,2022-02-05T22:18:22Z,2022-10-26T15:53:30Z,"Feature Request (maybe while you’re working on 5.9.1… :-)) :
On Settings > Media (wp-admin/options-media.php screen),
under “Uploading Files”
In addition to “Organize my uploads into month- and year-based folders”,
an option to “Organize my uploads into year-based folders”
Cheers,
Kim",wardencenter
Needs Patch,52978,Feature Request: option to show full images in Media Library,,Media,5.7,normal,normal,Awaiting Review,feature request,new,,2021-04-06T04:58:27Z,2021-09-02T14:20:14Z,"It would be very helpful to have an option (perhaps in Settings/Media) to have the Media Library show the full image even if it’s not square, instead of cropping everything to square.
There are a lot of reasons why some of us (perhaps many or even most) don’t like the images shown cropped to square – here are three: (1) the full content is not visible, (2) searching for items you know are a certain aspect ratio is much more difficult, (3) multiple images that are the same in the center but cropped differently (or extended with additional background to make a certain shape) look identical.
I would be perfectly happy if the CSS was simply changed to always show the full image, but I suppose some people might be used to the squares (although I don’t see what advantage that would have other than looking tidy), so I’m suggesting a setting to allow the user to choose.
Currently I’m using a workaround on some of my sites – I installed the “Add Admin CSS” plugin and added this CSS:
{{{
.wp-core-ui .attachment .portrait img { max-height: 100%; }
.wp-core-ui .attachment .landscape img { max-width: 100%; }
}}}
But it would be better if WordPress could do this natively.
Here are two screenshots of the same Media Library before and after using my workaround:
[[Image(https://imgur.com/a/Vt5hX9H)]]",OsakaWebbie
Needs Patch,50092,Implement Focal Point Picker for all images in the Media Library,,Media,,normal,normal,Awaiting Review,feature request,new,,2020-05-05T15:18:55Z,2022-09-16T13:23:25Z,"The FocalPointPicker component which came as a part of the Cover element is a great idea, but it only applies to that block.
Can we implement this in the Media Library when editing the properties of an image?
For themes that uses background images (eg: in tiles) this could allow for a standardised way of setting / getting the default background-position for that specific image.",sfoxe
Needs Patch,41279,Make PDF Thumbnail (WP 4.7 feature) accessible via the Media Manager,,Media,,normal,normal,Awaiting Review,feature request,new,,2017-07-09T19:24:26Z,2020-10-21T12:55:14Z,"When you upload a PDF file WordPress creates a ""preview image"" - This was added as of WP 4.7
This feature request to have that image also added into the database so that it is accessible via the Media Manager.
The use case for this feature is that I have a Monthly Newsletter and want to use the preview image (page 1 of the PDF) as the featured image for the post where I am putting the link to the PDF
Additionally some plugins (like visual composer) allow you to insert single images, however, you need to be able to select it from the media manager, not just put in a URL",sflwa
Needs Patch,19834,More Robust Capabilities for Attachments,,Media,,normal,normal,Awaiting Review,feature request,new,,2012-01-15T00:43:40Z,2020-09-10T14:05:33Z,"Attachments/files should have their own set of capabilities mirroring those of posts, in addition to upload_files. Specifically:
- read_attachments
- edit_attachments
- edit_others_attachments
- delete_attachments
- delete_others_attachments
Currently, attachments rely on the edit_posts capability, which can create complications if you don't want your users to see the ""Posts"" sidebar item, or don't want them to be able to delete the attachments they upload. ",walkinonwat3r
Needs Patch,36842,"More global event hooks using the media.events, like ""modal:open"", ""modal:close"", etc",,Media,4.6,normal,normal,,feature request,new,,2016-05-15T00:30:04Z,2019-06-04T20:25:03Z,"There seem to be plentiful hooks in the media backbone system, but most require listening to the frame/controller/etc vs having global hooks/events to listen to. This, obviously, would be much like WP's `do_action`. Each event should pass contextual info including the frame/controller/etc object.
Select2 (as well as most JS modal libs) provides an example of prior art: [https://select2.github.io/examples.html#events]
Using that implementation as an example, we could do something like:
`wp:media:open` is fired whenever the modal is opened. `wp:media:opening` is fired before this and can be prevented.
`wp:media:close` is fired whenever the modal is closed. `wp:media:closing` is fired before this and can be prevented.
`wp:media:highlight` is fired whenever a result is highlighted (clicked).
`wp:media:unhighlight` is fired whenever a result is unhighlighted.
`wp:media:select` is fired when a result is chosen and modal is closed. `wp:media:selecting` is fired before this and can be prevented.
`wp:media:change` is fired whenever the modal changes state. `wp:media:changing` is fired before this and can be prevented.
",jtsternberg
Needs Patch,45710,New feature: deleted related files when deleting a page or post,,Media,4.9.8,normal,normal,Awaiting Review,feature request,new,,2018-12-19T20:26:22Z,2020-10-02T04:11:21Z,"Hello,
Nowadays, when you delete a page or post there's the downside that the related images will remain on the server.
It would be great if WordPress keep track of where this image is being used. For example, image.png is used on 3 pages and 2 posts.
So, when you're sending a page or post to the trash can, it will be great if WordPress could check if the related images are being used on another pages or posts.
If not, the system could show a message: ""X image is not being used on any page or post. Do you wish to send it to the trash can as well?""
The user would have the final choice if he wants to leave that file at the server or not.
And this would also could lead to a new function to find orphan images/files.",gmr1970
Needs Patch,29368,Pasted media do not appear in the library,,Media,3.9.2,normal,normal,,feature request,new,,2014-08-25T17:49:15Z,2019-06-04T20:08:45Z,"So I don't know if this is a bug or a feature request, but when I paste an image into a post, i would assume that it goes into the media library (where else would it live?). But when I go to then chose that image as my featured image, surprise, surprise - it's not in the library.
",Matt McLaughlin
Needs Patch,32658,Post media attachments should show assigned media by default,,Media,4.3,normal,normal,,feature request,new,,2015-06-16T08:56:15Z,2019-06-04T20:14:23Z,"When adding the attachments to post, the popup always starts with All media files as default, so that if i want to see attached media, i need to click the select, click the Assigned to post option and wait few secs.
I really hate this behaviour, i would like to see assigned media first (if there are some allready asigned).
The problem is, that it is not easy to change it, without hacking the core code - the only way is to add some javascript, that changes the value after page load, but theese solutions are not trivial and buggy (http://wordpress.stackexchange.com/questions/76125/change-the-default-view-of-media-library-in-3-5)
Maybe other people want different default option (i have seen a post of someone, who wanted ""unassigned""), so I think the best would be, if the script would remember the last selected value, or if there would be some option, which to select by default or (and) if at least there would be some easy filter, which we could use to change the default
",thomask
Needs Patch,42633,Suggestion to provide Better Page and Image Management,,Media,4.9,normal,normal,Awaiting Review,feature request,new,,2017-11-20T03:41:59Z,2017-11-20T05:24:14Z,"**** This is not bug report but a suggestion ****
Not at all sure if this is the right place for this however, I've been using wordpress for about 12 months now and believe it lacks somewhat in the management of pages and media. I believe that it would help tremendously helpful if we could:
(1) organize pages into groups or folders as it can be overwhelming with the current long list of pages when we are working on large sites with a lot of pages, and
(2) similarly, organize media into folders so for example, we could keep site media separate from post media.
Thanks for listening",sixlinksrule
Needs Patch,40140,upload_url_path doesn't seem to make any effect,,Media,4.7.3,normal,normal,Awaiting Review,feature request,new,,2017-03-13T06:53:00Z,2018-12-27T21:15:21Z,"An site of mine had '''http://site.com/articlefiles/''' as the place to receive uploads, equally it was '''/site/root/articlefiles''' on the filesystem, instead of '''/site/root/wp-content/uploads'''.
Now I migrated the site into a multisite installation as site 2 and uploads are going into /site/root/articlefiles/site/2/ and all previous uploads in old posts are linked as '''http://site.com/articlefiles/site/2/something.jpg''', causing broken images and links cause they originally don't have the ""site/2"" part. Editing the post, these links and images do not have the ""site/2"" part either. WordPress is rewriting the URL dynamically when reading the posts.
I want to keep compatibility with '''http://site.com/articlefiles/''' and '''/site/root/articlefiles''' without the ""site/2"" part. I was expecting '''upload_url_path''' on options table to be the solution but it doesn't work. I put there '''http://site.com/articlefiles/'''.
How can I keep URL and path compatibility when migrating a single site to a non-primary site of multi site installation ?
Thank you in advance",avibrazil
Needs Patch,60010,"""Navigation Block"" Markup: missing?",,Menus,6.4,normal,normal,Awaiting Review,defect (bug),new,,2023-12-04T20:43:38Z,2024-02-15T16:21:03Z,"I'm wondering if there is a reason why the text of menu items **without** children is wrapped with a as follows..
{{{
Menu Item Text
}}}
..but if an item has a child, then this span is ""missing"".
Wouldn't it be more consistent to wrap the text of menu items equally?",ekesto
Needs Patch,49331,'output' Taxonomy Slug Crashes Menu,,Menus,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-30T16:52:58Z,2020-01-30T22:42:13Z,"If I create a custom taxonomy with its slug as 'output' the Menus in the admin area disappear as well as on the frontend.
The 'output' is not listed as a reserved term here: https://codex.wordpress.org/Reserved_Terms",nekokun
Needs Patch,52616,Admin Taxonomy Search returns only 10 results max and no pagination,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2021-02-23T00:51:16Z,2021-02-23T10:37:57Z,"In Admin : /wordpress/wp-admin/nav-menus.php
In the 'Add menu items' section.
When you search for products or categories or other taxonomies, it returns maximum of ten 10 results and with no option of pagination.
Looked for a solution but found nothing.
Can this be fixed somehow?",aristotelisj
Needs Patch,57546,Appearance>Menus Disappear (actual menu items) When Updating to WP 6+,,Menus,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-01-24T14:12:03Z,2023-02-17T13:43:52Z,"Hi folks,
This has been an ongoing issue for many months. It only affects select single sites or select subsites on a multisite for unknown reasons even after using the default WP theme and disabling all plugins.
See page 2 here https://wordpress.org/support/topic/appearancemenus-disappear-when-updating/page/2/#post-16399937 for the most recent info but also look at the beginning too on page 1.
On a staging site for multisite I just recently did this to continue testing:
Current is 5.9.5 and everything is fine. Shows what menus are prior to updating to WordPress 6 plus:
https://app.screencast.com/IeeYd9srBeKVl (this is on a full network staging site to test)
Keep in mind this issue can be on single WP installs or multisite installs. See the WordPress forum post
It can not be replicable because it seems to only affect certain websites for unknown reasons even after putting sites on the default WP theme and deactivating all plugins (on both single sites WP installs and multisite).
After updating:
I was showing some subsites are fine but about 6 or 7 of my 70 subsites have menus that disappear https://app.screencast.com/OXcdWgR4D3jE1 initially on updating WordPress 6 plus. I have found other people with single WP site installs that have the same problem like the WordPress forum post here for example.
See:
https://app.screencast.com/OXcdWgR4D3jE1
See how I resolved on staging:
https://app.screencast.com/X60RG8l61sVsG (keep in mind when I tried this a couple months ago on my live network, the menus came back initially, but then they disappeared after a day or so again...I had to revert back to WP 5.9.5 to get the menus to stay on those 7 sites).
For this testing site, so far, on staging, I disabled a couple of menu-related plugins before updating and then fixed the menus and reenabled (like Max Menu just as a hunch), but there is also a newer version of WP now too so that is different too.
I then made a backup of the menus using the Duplicate Menu plugin on each of the 7 sites for all menus just in case they disappeared after a few days I would try the backup menus made with the new version of WP. I have not had to use them yet. It has been a week on staging and menus are still so far there.
I tried this before on another staging a few months ago, and the menus stayed on staging but continued to disappear when trying on the live site after af few hours in my case or day or so.
Excerpt from page 2 recently talking to another person who has a single WP site doing the same thing:
""
#1 I disabled Max Menu plugin first only cause I suspect (guessing since it is a menu based plugin) that may be part of this. You could disable only any menu related plugins or all plugins. But if you menus are driven by your theme just try also changing your theme before updating WP core too.
#2 I updated to the latest WP core.
#3 Menus items are gone but…
#4 I go to the Menus titles that I had active and added a new random page to the menus that should have menu items but shows none at that moment. I then SAVE the menus. All menu items that were gone then reappear. Don’t just try to resale without adding a new random page to the menu. You have to add a new page first for it to work. You can remove it after all your menu items come back and resale again afterwards.
#5 Optional…I then used the top plugin in WP repository to duplicate the menus as a quick backup (it has about 80k active installs). Search duplicate menu in WP repository.
#6 Then enable all plugins I had disabled (or enable your theme too if you changed that).
#7 All menus are now restored with the latest WP.
#8 I have left the staging going for about a week to monitor to be sure the menus stayed up. So far so good. I made duplicate backups of the menus while on the new version of WP just in case the originals disappeared again (i.e. #5 above). So far the original menus have not disappeared.
""
It would probably be best for you to get a staging site on a single WP site that is doing it vs an entire multisite staging to see the replication of the issue.
I am asking the other person ( @marpan ) to post here to and provide you access to a fresh single WP site staging site so you can see it for yourself too as this only seems to happen on a smaller percentage of single sites. For my multisite, I have 70 subsites and only 6 or so are doing this too FYI. The other subsites seem fine.
",truebird
Needs Patch,60176,BLOCK NAME input data not saving,,Menus,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2024-01-02T07:02:40Z,2024-02-15T09:24:27Z,"Hello,
I've encountered an issue with the default Navigation block on block-based sites. The ""BLOCK NAME"" input fields do not retain any entered data. Upon reloading, the information disappeared, and I couldn't locate it in the database.
I'm hopeful that this is just an unused field.
Thank you.",heymehedi
Needs Patch,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
Needs Patch,35330,Categories Format & Search Bug,,Menus,4.4,normal,normal,,defect (bug),new,,2016-01-06T16:27:32Z,2019-06-04T20:20:20Z,"Hello,
I have been advised by WooCommerce to submit this to Wordpress as they deduced it was a Core problem and not related to WooCommerce. I have been able to re-produce this 3x, Once on SiteGround, another on Hostgator and also locally. This is on Wordpress 4.4.
Issue #1: After adding categories if I go to Appearance > Menu and search for a category no results are returned. Furthermore, if I was to go to second page of categories and then try and search for something then only placeholder text is written.
Issue #2: The problem occurred when I tried adding a lot of nested categories onto my WooCommerce categories. The format which I had was 9x Parent Categories, 5x Second Level Categories and under one of the Second Level Category are 11x Third Level Categories. If you were to view the categories via Appearance > Menu then the format is all broken. The WooCommerce support mentions as soon as pagination is involved then the format breaks. He also said ""It looks like the way WordPress is handling the Taxonomy is incorrect"".
Please confirm if you can reproduce or need further details.
Many Thanks,
Jawad",jawad96
Needs Patch,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
Needs Patch,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
Needs Patch,51623,Does WordPress run a clean-up cron-job for menu items having the draft status?,,Menus,5.5.1,normal,normal,Awaiting Review,defect (bug),new,,2020-10-24T22:15:13Z,2020-10-24T22:15:13Z,"On the menu admin screen, after dragging new menu items to the selected menu, whenever I discard the option to save the menu settings before reloading the page I noticed that the added menu items (not-saved) is still in my post database table with status ""draft"". Now if I discard 100 menu items, my post table is filled with 100 rows of redundant data. Why?
",zenithcity
Needs Patch,54585,Issue in the menu editor,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2021-12-06T10:04:32Z,2021-12-06T10:16:17Z,"In the WP menu editor (in apparence), when im searching a category with a ' (quote) inside the category's name, WP don't find it. The category will only be found if i'm testing with a word rather than the exact expression.
Actualité sur l'outillage -> not found
outillage -> the category ""Actualité sur l'outillage"" is found
The same probleme exists for the product category's name when Woocommerce is installed.",fiotty0
Needs Patch,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
Needs Patch,21669,"Make ""Home"" option persistent in Pages box on Menus screen",,Menus,3.4,normal,normal,,defect (bug),new,,2012-08-23T16:57:08Z,2019-06-04T20:03:36Z,"If you have some pages, or even a page, then on nav-menus.php in the Pages box, View All, it will display Home as an option. However, if you do not have any pages at all (mostly Blog on front page scenarios), then it just says ""No items."" in the Pages box.
It should always be populated with at least the Home option. Oversight on our part that we didn't uncover this behavior before. ",jane
Needs Patch,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
Needs Patch,20325,Menu item parent classes for page_for_posts (home.php) not properly set on single.php,,Menus,,normal,normal,,defect (bug),new,,2012-03-29T12:50:06Z,2019-06-04T20:03:21Z,"If one has set page_for_posts (Settings => Read), on single.php wp_nav_menu() will set current_page_parent for the accordant menu item, but it will not set any parent or ancestor classes for its parent menu items as expected. [tested with 3.3.1]",ptietz
Needs Patch,39355,Menu title doesn't get updated if I change the page title,,Menus,4.7,normal,normal,Awaiting Review,defect (bug),assigned,,2016-12-21T01:38:03Z,2020-01-08T00:23:49Z,"It seems like WordPress converts the hyphen character to the dash character automatically. I created a new page with the following page title:
'''Foo - Bar'''
However, when I checked the menu title (Appearance > Menus), I found the title was displayed as:
'''Foo – Bar'''
The page gets stored in the database with a customized menu title (page title with a hyphen and menu title with a dash) and that's why the menu title doesn't get updated if I change the page title.",maaarsl
Needs Patch,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
Needs Patch,31360,Missing active state classes for parent menu items,,Menus,4.1,normal,normal,,defect (bug),new,,2015-02-17T13:59:09Z,2019-06-04T20:11:21Z,"wp_nav_menu() currently dont set current_post_parent(or other active state css classes) for all parent pages, when it has a category menu item with current_post_parent state.
Steps to reproduce:
You have following menu (theme menu):
- Level 1.1 (Page)
- Level 2.1 (Page)
- Level 3.1 (Category: ""Allgemein"")
- Level 2.2 (Page)
- Level 2.3 (Page)
- Level 1.2 (Page)
On ""Level 3.1"" you will see blog posts from the category ""Allgemein"".
Each blog post is linked to a detail page. (full blog post).
When you visit the full blog post page, Level 3.1 will get the class ""current_post_parent"". But Level 2.1 and Level 1.1 dont get any active states. Its missing.
i currently use following to fix it in my theme:
{{{
function me_fix_category( $menu )
{
//parse output of wp_nav_menu
$xml = new DOMDocument();
$xml->loadXML( $menu );
do {
$fixed = false;
//search for li tags
$elems = $xml->getElementsByTagName( 'li' );
foreach ( $elems as $el ) {
//check if li has a active state
if ( strstr( $el->getAttribute( 'class' ), 'current-post-parent' ) ) {
//check parent li tag
$parent = $el->parentNode->parentNode;
$class = $parent->getAttribute( 'class' );
if ( !strstr( $class, 'current-post-parent' ) ) {
//no active state for the parent? append class
$parent->setAttribute( 'class', $class ? $class . ' current-post-parent' : 'current-post-parent' );
$fixed = true;
}
}
}
//do this, till nothing was fixed
} while ( $fixed );
return $xml->saveHTML();
}
}}}
",donkelduffi
Needs Patch,36411,Missing admin menu for custom taxonomy,,Menus,,normal,normal,,defect (bug),new,,2016-04-04T16:38:00Z,2019-06-04T20:23:47Z,"I found an edge case that can cause that a user with the right capabilities becomes unable to manage terms on a custom taxonomy.
The scenario includes:
* A user with an editor role.
* A custom post type with a set of custom capabilities that the current editor can not match.
* A custom taxonomy assigned to that custom post types with default capabilities, so editors can manage it.
Under those premises, the admin menu for the taxonomy is not generated. Note that you can access the admin page to manage terms on that custom taxonomy if you access the URL manually.
If you then register a second custom taxonomy, also assigned to the same custom post type and with default capabilities (so an editor can manage it), then a custom admin menu is generated, wit the custom post type label, and granting access to admin pages to manage both taxonomies terms.
I am attaching a minimum test case that does register the three objects, and includes comments as to how to test it.",jadpm
Needs Patch,60162,Navigation block rending content from post with shared ID,,Menus,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2023-12-28T14:05:36Z,2023-12-28T14:05:36Z,"Hello,
I believe I've found a somewhat niche issue. I have a wordpress multisite with four sites housed within it. I recently came across an issue where on one of my archive pages for an event content type, on one of the sites only, the header (leveraging a template part with a navigation block inside) is rendering content from one of the pages within the result list. This archive is leveraging cross site indexing powered by elasticpress to search and return content from this content type from all four sites in one archive page.
After some investigation, I found that the ID of the navigation matched that of one of the events published on a separate site and that the post_content for that event is being rendered in place of the post_content of the wp_navigation object which has the matching ID. This seems to be a very rare condition however it might be beneficial to have some kind of post_type check before render since this is a possible issue.",dsteersf1
Needs Patch,35640,No API to set a nav menu location,,Menus,,normal,normal,,defect (bug),new,,2016-01-28T05:21:19Z,2019-06-04T20:21:30Z,"We've got an API to retrieve the nav menu locations - `get_nav_menu_locations()` however, there's nothing (as far as I can tell) to set a theme location, either singularly or for all menu's.
We should probably have a method that can be used to set a single theme locations menu, and one to bulk-set.
For reference, the admin pages currently all call `set_theme_mod( 'nav_menu_locations', $locations );` directly.",dd32
Needs Patch,55893,Not able to save navigation menus and not able to retrieve menus using wp_get_nav_menu_items,,Menus,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-01T11:40:00Z,2022-06-01T21:10:27Z,"Hey,
i'm having some issues with navigation menus since upgrading WordPress from 5.9.3 to 6.0.0. In two custom themes i've built i notice the following behaviour:
* Using {{{wp_get_nav_menu_items}}} does not return anything when trying to fetch the menu items for a given id.
* When using the 'Menus' option in the Appearance menu items added to the menu don't show up. I can add new menus, and even add items to it. But when i press 'Save Menu' and reload the page they dissappear.
I've bumped my head around this for two hours but i can't find anything that i'm doing wrong. A couple of things i noticed:
* This has definitely something to do with the 6.0 upgrade. When going back to 5.9.3 the problem doesn't occur.
* The items do seem to be added to the database, they just don't display anymore on the site.
* I've got a hunch this might be related to #54905, which i've also run into.
* When switching to the twentytwenty and twentytwentyone themes things work as normal. I can also see the menu items i've added in my custom theme that don't appear there.
* I'm not using any activated plugins.",huskyr
Needs Patch,51948,Override fallback nav menu item label,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2020-12-06T15:57:28Z,2020-12-06T15:57:28Z,"While looking into some advanced concepts for improving navigation menus, I noticed if I create completely custom Nav Menu items, WordPress falls back to using ""Custom Link"" no matter what.
I think this needs a filter adding in the fallback method, https://github.com/WordPress/wordpress-develop/blob/ac71fffac0045511a990ce02210300421d8b3b0e/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php#L322 whereby I can add in a more correct message to display for my custom Nav Menu items.",invisibledragonltd
Needs Patch,53214,Register Menu Item Custom Field,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2021-05-15T11:53:35Z,2021-05-15T12:00:58Z,"Hello, I got problem with adding custom field in menu. I set $depth == 0 for one custom field and it's work perfectly when i saved. But when user drag the menu item and make it 2nd depth, The custom field still show. It should to be hide because i just make it to show in 1nd depth not 2nd depth. I think this issue need to work or there is one solution that i don't know!
This is code
{{{
function custom_field( $item_id, $item, $depth ) {
if ( $depth == 0 ) { ?>
Hello World
Menus on a mobile browser, dragging it to the desired position becomes an almost impossible task because the screen keeps scrolling to the bottom.
Steps to reproduce:
1. Access wp-admin in a mobile browser
2. Go to Appearance > Menus
3. Create a menu and add four or more menu items
4. Tap and hold on a menu item and drag it to a desired position
Expected:
Screen remains in current position and I'm able to move menu items around smoothly
Actual:
Screen scrolls to the bottom and I'm unable to see where to position the menu item
Issue happens on both mobile Safari and Chrome. However, this does not occur in the Menus section of the Customizer where I had a much better experience managing menus.
",druesome
Patch Needs Refresh,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
Needs Patch,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
Needs Patch,23023,Touch UI Menu Code doesn't address flyout menus two-levels deep.,,Menus,3.5,normal,normal,,defect (bug),new,,2012-12-20T15:21:17Z,2019-06-04T20:04:37Z,"The code we did in #20614 only addressed the single dropdowns you normally see in a single site install.
A multisite install will have flyouts coming out of the dropdowns that we need to account for as well.
Related: http://wordpress.org/support/topic/wp-admin-bar-doesnt-play-well-with-touch-device-in-wp-35",georgestephanis
Needs Patch,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
Needs Patch,57173,Unable to edit Main Menu,,Menus,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2022-11-22T04:09:06Z,2022-11-22T16:06:02Z,"Steps to reproduce the issue:
1. Edit a website with a main menu.
2. Select the navigation block in the block editor and click on ""Manage menu""
3. Step 2 takes you to the page where you can edit menus.
4. Expected: hitting ""edit"" on the Menu entry should allow adding Pages/Posts to the navigation menu
Actual: Seeing a blank page with no ability to modify the contents of the navigation menu",vpalepu
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,58538,Wrong menu is shown after adding new Header Template parts,,Menus,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-06-14T18:51:11Z,2023-06-14T18:51:11Z,"I believe I have found a repeatable bug, and workaround, pertaining to adding new Header Template Parts in WordPress 6.2.2, using multiple FSE themes.
The goal: To have (at least) three custom Page templates, each with a different Nav block in its header. The current site has a working header, containing a Nav block with ""menu 1"" selected from the Classic menu list, in the Front Page, Page (and other) Templates - so it's necessary to add two more Template Parts for Headers, and two new Custom Page Templates, using each new Header.
Steps:
- Add second Header Template Part, with a second menu selected from existing Classic menus.
- Add third Header Template Part, with a third menu selected from existing Classic menus.
- Add Custom Page Template 2, using Header Template Part 2, including Nav 2.
- Add Custom Page Template 3, using Header Template Part 3, including Nav 3.
**- Note that both new page Templates and Header Template Parts show the correct Nav menu in the editor.
**
- Assign one or more pages to Custom Page Template 2
- Assign one or more pages to Custom Page Template 3
- **BUG: All pages assigned to BOTH Custom Page Templates 2 and 3 will show only Nav menu 3**.
**In other words, creating the third Header Template Part seems to to overwrite the Nav menu selected in the second Header Template Part.
**
THE WORKAROUND:
For each of the two new Header Template Parts (2 and 3)
- Modify the menu of each Header Template Part in some way, such as:
- Add an item to the menu at the end (anything - just an empty item is fine).
- Save the Header Template Part, and test it. You will see the correct menu with the new item.
- Return to the Header Template Part, remove the extraneous item from the menu, and save it again.
- After doing this for both of Header Template Parts 2 and 3, they should then function correctly throughout the site.
",littleen
Needs Patch,54135,`nav_menu_meta_box_object` filter doesn't work on taxonomies,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2021-09-16T19:16:45Z,2021-09-16T19:44:03Z,"I am trying to remove the pagination on main category taxonomy but it doesn't work
{{{#!php
name ) {
$post_type->_default_query['number'] = -1;
}
return $post_type;
}
add_filter( 'nav_menu_meta_box_object', 'disable_pagination_in_category_meta_box', 9 );
}}}
Think it's bug but not sure
",papazetis
Needs Patch,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
Needs Patch,49332,method Walker_Nav_Menu::start_el should not call filter the_title on non post menu items,,Menus,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-30T17:16:29Z,2020-01-30T22:39:24Z,"I am working on a site with a.o:
- WP 5.3.2
- WPML 4.3.6
- Estatik-pro 3.8.1
- Divi 3.29.1
And am seeing the following notices in the debug log:
PHP Notice: Trying to get property 'post_type' of non-object in .\wp-content\plugins\estatik-pro_3.8.1\functions.php on line 386
PHP Stack trace:
PHP 1. {main}() .\index.php:0
PHP 2. require() .\index.php:17
PHP 3. require_once() .\wp-blog-header.php:19
PHP 4. include() .\wp-includes\template-loader.php:98
PHP 5. get_header() .\wp-content\themes\Divi\single.php:3
PHP 6. locate_template() .\wp-includes\general-template.php:41
PHP 7. load_template() .\wp-includes\template.php:671
PHP 8. require_once() .\wp-includes\template.php:722
PHP 9. wp_nav_menu() .\wp-content\themes\Divi\header.php:263
PHP 10. walk_nav_menu_tree() .\wp-includes\nav-menu-template.php:217
PHP 11. Walker_Nav_Menu->walk() .\wp-includes\nav-menu-template.php:583
PHP 12. Walker_Nav_Menu->display_element() .\wp-includes\class-wp-walker.php:244
PHP 13. Walker_Nav_Menu->display_element() .\wp-includes\class-wp-walker.php:156
PHP 14. Walker_Nav_Menu->start_el() .\wp-includes\class-wp-walker.php:144
PHP 15. apply_filters() .\wp-includes\class-walker-nav-menu.php:213
PHP 16. WP_Hook->apply_filters() .\wp-includes\plugin.php:206
PHP 17. es_the_title_filter() .\wp-includes\class-wp-hook.php:288
(If you want, I can post a stack trace with variable info.)
Diving into this problem I noticed that:
- The main nav menu does not only contain items that are a post, but also the language switcher flags (added by WPML)
- On line 213 of file wp-includes/class-walker-nav-menu.php, Walker_Nav_Menu->start_el() calls
{{{
apply_filters( 'the_title', $item->title, $item->ID );
}}}
for all items in the menu, be it posts or other items.
- Estatik-pro hooks into this filter and calls get_post() on the given ID which is not a post ID:
{{{#!php
post_type == Es_Property::get_post_type_name() ) {
...
}
return $title;
}
add_filter( 'the_title', 'es_the_title_filter', 10, 2 );
}}}
Who is wrong?
- WPML: by adding non-posts to menu's.
- Estatik-pro for not checking that the filter is called for non-posts?
- Walker_Nav_Menu->start_el() for unconditionally calling the filter 'the_title' on all menu-items?
IMO:
- Menu-items can be other things than posts, and WPML shows that this is indeed possible.
- The filter 'the_title' seems to be explicitly for altering a post title, not titles of images, non-post menu-items, or whatever. So Estatik-pro should not have to check that the given ID is indeed from a post.
- Walker_Nav_Menu->start_el() calls its own filter 'nav_menu_item_title' directly after calling the 'the_title' filter (though still documenting $item as a WP_Post).
Based on the above, my conclusion is: Walker_Nav_Menu->start_el() should check if the item is a WP_Post before calling the 'the_title' filter.
If you agree, solving this should be easy, surround line 213 with
{{{
if ( $item instanceof WP_Post ) { ... }
}}}
However, in a lot of places it is documented that a menu-item is a WP_Post and changing that may take considerably more work.
",erwinbr
Needs Patch,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
walk` expects an object but
`walk_page_tree` passes an array.
https://github.com/WordPress/WordPress/pull/679",lazardanlucian
Needs Patch,46042,wp_nav_menu always returns a container,,Menus,,normal,normal,Awaiting Review,defect (bug),new,,2019-01-19T16:03:15Z,2019-01-19T20:20:35Z,"wp_nav_menu('container' => false) is returning an empty div when there is no menu items. This should return either false or an empty string. You can change the div to a different element, but you cannot remove the container.
This makes it difficult to test whether the menu is empty or not. Checking !empty($menu) no longer works like it used to.",thememason
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,26935,Add empty submenu page to hide menu page title in list,,Menus,3.8,normal,normal,,enhancement,new,,2014-01-25T07:46:30Z,2019-06-04T20:06:31Z,"My question has to do with `add_menu_page()` and `add_submenu_page()`. If we add a menu page, and one sub_menu page.. we end up with the main menu page being duplicated in the sub pages list.
If we have ""Main"" as our main page, and ""Sub"" as our sub page...
{{{
add_menu_page('Main', 'Main', 'manage_options', 'main_options', array($this, 'main_do_page'));
add_submenu_page('main_options', 'Sub', 'Sub', 'manage_options', 'sub_options', null);
}}}
This will create a menu structure such as:
* Main
* Main
* Sub
The ""Main"" page is duplicated in the sub list.
Now, we can hide that duplication with a slight adjustment to the code:
{{{
add_menu_page('Main', 'Main', 'manage_options', 'main_options', array($this, 'main_do_page'));
add_submenu_page('main_options', 'Sub', 'Sub', 'manage_options', 'main_options', null);
}}}
By changing the fifth argument to match the ""Main"" page slug.. it will successfully hide the submenu; resulting in:
* Main
* Sub
However... the issue with this... is a menu item still gets created in the generated html. The inner html is blank.. so no title is actually displayed.. but the outer html is still there.
It appears in the submenu html output as such (with the second snippet above):
{{{
Options
}}}
See how the top item has the html for a list item.. but has no inner html?
This creates a space, about 4 or 5 pixels.. in between the main item and the sub menu items.
Now, I know this is trivial when there is only one menu item. But, now that I know it exists.. it is driving me nuts.
1. It results in unnecessary html output.
2. It results in a space in the menu item list.. which is faint, but unattractive... and hinders the visual appeal of the new admin panel.
Could we perhaps first check if the `add_submenu_page()` fifth argument ($menu_slug) matches the `add_menu_page()` first argument ($page_title)... then the outer html wrapper doesn't get rendered?
With space example(http://joshlobe.com/testsite/images/trac1)
Without space example(http://joshlobe.com/testsite/images/trac2)
Thank you for reading.",josh401
Needs Patch,53982,Adding pages to menus could be more user friendly,,Menus,5.8,normal,normal,Awaiting Review,enhancement,new,,2021-08-23T19:15:16Z,2021-09-10T06:35:13Z,"It's difficult to find pages or visually see the page hierarchy when working with the site's menus.
**Appearance / Menus**
For a site that has a lot of content and multiple levels is hard to manage in the tiny Pages tab, it would be ideal if the height was adjustable.
Adding a page places the item at the bottom of the list where the user needs to manually move the item up the stack.
It would be ideal to drag the item from the Pages section into the menu.
**Appearance / Customize / Menus**
For some reason, this interface doesn't represent the page hierarchy making it hard to see the structure.
Same height restriction as above, there are only a small number of pages visible here making it hard to use with a lot of content.
The text input beside `+ Add` makes me think that I can search the page list based on some interactions in the `Appearance / Menus` area.
It would be ideal to drag the item from the Pages section into the menu.",adampatterson
Needs Patch,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
Needs Patch,12934,Allow a menu to be added as a menuitem to be a submenu.,,Menus,3.0,normal,normal,,enhancement,assigned,,2010-04-08T21:55:32Z,2019-06-04T20:02:03Z,"Add capability to add a menu as a menuitem to be a submenu thus allowing multiple menu items to share the same submenus.
See reference in April 8 devchat:
https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2010-04-08&sort=asc#m106225",mikeschinkel
Needs Patch,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 `` container of menus. The main purpose of this proposal is to enable the ability to add schema.org structured data attributes to the menu, but this could be extended to other purposes as well given its flexibility.
Currently, `wp_nav_menu()` offers 3 container-related arguments: `$container`, `$container_id`, and `$container_class`. Using these arguments, we can create container elements such as
{{{
}}}
However, it is not possible to create elements with Structured Data such as the [https://schema.org/SiteNavigationElement SiteNavigationElement] as [https://developers.google.com/structured-data/schema-org recommended by Google], which would look like this
{{{
}}}
Adding the `role`, `itemscope`, and `itemtype` attributes is currently impossible with `wp_nav_menu()` (without resorting to error-prone string replacement), so theme authors and end users need to resort to hard-coding the menu wrapper in order to add such attributes.
My proposal is to add a new `container_atts` argument to `wp_nav_menu()`, which will allow arbitrary attributes to be added to the container when the `$container` argument is defined.
The changes required are very minimal and only apply to the `wp_nav_menu()` function in `wp-includes/nav-menu-template.php`
1. First, we just need to register `container_atts` as a valid argument in line 257 by adding it to the `$defaults` array
{{{
$defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '',
'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '',
'depth' => 0, 'walker' => '', 'theme_location' => '' , 'container_atts' => array() );
}}}
2. Next, we process and concatenate the attributes and add them to the container via the `$nav_menu` string on line 355
{{{
$atts = ''; //initialize string to concatenate attributes
foreach( $args->container_atts as $att => $att_val ){ //iterate over each attribute
$atts.= ' '.$att; //add attribute name, spaced out
//Add attribute value, if it exists. This logic allows for attributes without values
if( ! empty( $att_val ) ) $atts.= '=""'.esc_attr( $att_val ).'""';
}
$nav_menu .= '<'. $args->container . $id . $class . $atts . '>'; //add the string of attributes to the nav/div container
}}}
That's all the code that would be required to enable this capability. This then allows for function calls such as this:
{{{#!php
'primary',
'container' => 'nav',
'container_class' => 'my-menu',
'container_atts' => array(
'role' => 'navigation',
'itemscope' => 'itemscope',
'itemtype' => 'http://schema.org/SiteNavigationElement',
)
));
}}}
Which would produce this output for the container element:
{{{
}}}
(The other thing I might consider is calling `unset()` on the `id` and `class` keys in the `$container_atts` array, to prevent users from adding those attributes, since there are already dedicated arguments for them. But that is likely adding more restriction than necessary.)
I think this would be a really simple change, and add a lot of flexibility to the `wp_nav_menu()` function. Beyond just adding valuable attributes like structured data, adding data-attributes could be useful for javascript-driven applications, and I'm sure there are plenty of other possibilities I haven't thought of.
Thanks for your consideration!",sevenspark
Needs Patch,54274,Choose where new menu items should go instead of default ending them to the end.,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2021-10-16T11:14:38Z,2021-10-22T14:21:16Z,"I think it would be a nice quality of life improvement if you were able to choose where a menu item goes when you add it.
Currently, when you want to add a menu item in the middle, you have to add it and move it from the bottom towards the correct position.
Thinking out loud, add a sort of clickable line/button between the menu items in the appearance -> menu section that opens a list where the user can select which page/post/custom item to add in between the two items and possibly a checkbox if the user wants to add it as a child or not. ",NekoJonez
Needs Patch,60690,Consistency in Theme Update Warnings in Menu,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2024-03-05T10:29:33Z,2024-03-05T10:29:33Z,"When plugins are plugins pending update, a warning appears under ""Plugins"". However, even if are pending theme updates, the same warning does not appear under ""Appearance"".
Considering that the security issues of an outdated theme can be the same as those of an outdated plugin, I think we should display the same warning in both cases.
In the following image you can see a site with an outdated theme and plugin. At a glance you can only see a warning about ""Plugins"", but no warning about ""Apparence"", only inside ""Apparence > Themes"".
Although ""Apparence"" has no updates, it would be nice to have the same warning as in ""Plugins"".
I am attaching pictures to illustrate this.",Marc4
Needs Patch,59079,Draft Pages should not be shown in menus to those who can't see them (or possibly anyone),,Menus,,normal,normal,Awaiting Review,enhancement,new,,2023-08-11T19:36:37Z,2023-08-11T19:36:37Z,"Especially when the option to ""automatically add new pages"" to a menu is enabled, it's very easy to add Draft pages to a menu accidentally by publishing them and then reverting them to Draft status.
When this happens, the menu now contains a menu item that links to something like mysite.com/?p=123 that just 404's for most visitors (and might even accidentally expose a page title they didn't want shown yet).
I've spoken with more than a few users who made this mistake and had no idea that turning a Published Page back into Draft status would leave the menu item intact.
I believe that menu items that represent items in Draft status should not be displayed in the menu on the front-end.
I think someone could make the case they should appear to authenticated users who can edit the Page, but I don't believe they should be shown to anyone. I think them being present makes it very easy to confuse site owners on what the site looks like to a normal visitor, both in terms of the menu but also the page itself, as viewing a page in draft status has no clear indicator that they're viewing a page in draft status.",MadtownLems
Needs Patch,13247,Drag/drop for add menu item boxes,koopersmith,Menus,3.0,normal,normal,,enhancement,new,,2010-05-04T07:12:03Z,2019-06-04T20:02:06Z,Because checkboxes are no fun. This first patch covers dragging from view all and most used. Search still has bugs.,koopersmith
Needs Patch,55773,FSE navigation menu - styling problem,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2022-05-18T12:21:49Z,2023-06-14T17:30:29Z,"WordPress 5.9.3 running Twenty Twenty-Two theme
also WordPress 6.0-RC3 running Twenty Twenty-Two theme
No plugins active
There seems to be a problem with the styling of the FSE navigation menu.
Looking at the WordPress website https://wordpress.org/ the navigation menu is styled (in blue) to show which page you are on and in the case of a nested menu item it shows both the the subpage and the ancestor menu item.
But this isn't working reliably on FSE.
With a similar menu I have found that the styling is absent in the following cases...
the homepage which was the 'Front Page'
with a nested menu of 2 subpages the styling was absent on the first subpage which was the 'Posts Page'
with a nested menu and a subpage selected the styling is absent on the menu-ancestor
Styling is provided by ""current-menu-item"" Class in the li tag.
""aria-current='page'"" is also absent from the link when the styling isn't working.
Maybe someone can confirm this is a bug - thanks.",jim5471
Needs Patch,25122,First nav menu automatically adds all pages (including sub pages) but doesn't preserve page hierarchy,nacin,Menus,3.6,normal,normal,,enhancement,reopened,,2013-08-23T06:20:33Z,2020-10-20T04:59:46Z,"When you first visit {{{/wp-admin/nav-menus.php}}} in WordPress 3.6, if you don't already have a menu defined it automatically creates a new menu with all published pages in the menu.
On sites with many published pages and particularly sites with multiple levels of pages (child/parent pages), all of those pages are added as top level nav menu items.
(After the first menu is created, subsequent new menu requests create empty menus with no menu items in them).
The functionality was introduced in [23441].
Previous versions (such as 3.5) didn't automatically create a new menu.
Instead, when the first nav menu is automatically created I think we should either:
1. only add all top level pages by default, or
2. add all pages (including sub pages) but preserve the page hierarchy into the nav menu.
My preference would be option 1.",jamescollins
Needs Patch,46208,Improve Menu experience by making it easier to delete multiple menus at once,audrasjb,Menus,5.0.3,normal,normal,Future Release,enhancement,reviewing,,2019-02-07T21:35:19Z,2019-05-03T22:03:30Z,"If possible, please make it easier to delete multiple menus with a one click button (same as the plugin interface).
For example add an extra tab next to ""Manage Locations"".
- Right now, we've to select a menu (to edit) then remove it. If you have like 10 menus... then this task simply takes too much time.
The menus are saved all over different tables wp_terms, wp_posts, etc. inside the database. Wouldn't it be better to simple create a seperate db table for menus instead and have all data placed in there (with object cache)?
Mireille",mireillesan
Needs Patch,40024,Include CPT archives in the menu cutomizer,,Menus,,normal,normal,Future Release,enhancement,new,,2017-03-03T15:35:25Z,2019-11-07T16:57:39Z,"If we create a new Custom Post Type and go to the menu customizer, we can insert links to particular posts of that type.
What we can't easily do is insert a link to the Custom Post Type archive page.
Example: we create a Movies CPT. We want to add a link to the list (archive) of all Movies to the menu. We can't do that unless we use the custom URL field (and the URL is not provided anywhere in the admin panel, only in the CPT registering code itself).
Enhancement needed: add a section which lets you link to archive pages for CPTs.
Suggested name for the box: ""Content archives"" or ""Custom content archives"".",eclare
Needs Patch,35879,Increase width of menu item classes field,,Menus,,normal,normal,,enhancement,new,,2016-02-19T20:20:43Z,2019-06-04T20:23:00Z,"Relatively self-explanatory patch attached.
Let me know if more details needed.",lkraav
Needs Patch,60673,Indicate submenu item level in admin nav menu editor and customizer nav menu editor,rcreators,Menus,,normal,normal,6.6,enhancement,assigned,,2024-03-02T03:31:57Z,2024-03-05T15:23:23Z,"Follow up to #32728
Following the closure of #32728, both navigation menu interfaces indicate whether an item is in a submenu. It would improve the experience for screen reader users to indicate what level an item is at.",joedolson
Needs Patch,58857,Menu class should be in BODY tag,,Menus,6.2.2,normal,normal,Awaiting Review,enhancement,new,,2023-07-20T03:57:48Z,2023-07-26T17:29:55Z,"Currently, if you assign a class to a menu item, the class is only usable to the menu link alone. It would be 'very' beneficial to have the class in the BODY tag. If you want to keep them separate, you could preface the class with 'body-'.
So I have a menu link for 'Sponsors' and I assign the class 'g-sponsor' to the menu link.
Right now, it would show similar to this:
Sponsors
It would be great to have it added to the body class like this:
This the class can be use for 'any' element on the page instead of just the menu link.
FYI, I have a lot of experience in Joomla and they have had this functionality since the beginning. Now that I am migrating all Joomla websites to WordPress, I no longer have this functionality.
It should be a core function of the menu class.
Just a suggestion.
Luke Douglas
Webbering.com",LukeDouglas
Needs Patch,47983,Menus: Only send non-empty values on menu save on nav-menus.php,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2019-09-05T22:17:02Z,2019-09-06T15:04:17Z,"In an effort to do some admin navigation menu customization (adding additional metaboxes/properties to individual menu items), I noticed that all menu properties (even ones that may be hidden due to ""Screen Options"") are being submitted to the server. And it actually began to cause the following PHP warning:
{{{
[05-Sep-2019 21:48:58 UTC] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
}}}
Would it be better to make sure only menu properties that have been explicitly set are submitted to the server and saved to the database?
~~When building a nav-menu and utilizing custom links the entered value isn't trimmed.
Once you click 'Add to Menu':
If you have whitespace at the start: no url added to the custom link in the menu item
If you have whitespace at the end: %20 is added to the custom linkprevent PHP warning max_input_vars~~",metalandcoffee
Needs Patch,43176,Nav Menu Search - add filters for query args,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2018-01-29T16:01:00Z,2019-01-16T06:50:09Z,"On sites that have lots of content with similar names, it can be almost impossible to find the correct page using the search tab. One way to fix this is described in #38224 (changing the number of posts returned, or providing a filter so developers can change it).
Another option would be to check if the search query is_numeric(), and if so, search for a page with that ID. This could either be implemented in core directly, or appropriate filters could be provided so a plugin could implement this functionality.",billerickson
Patch Needs Refresh,35702,No current-menu-item in WP custom menus,,Menus,,normal,normal,,enhancement,new,,2016-02-03T09:35:08Z,2019-06-04T20:22:08Z,The _wp_menu_item_classes_by_context() method misses some menu item matches for the currently-queried object. This patch adds support for a common case.,dotancohen
Needs Patch,48133,Please add filter on wp walker li element,,Menus,,normal,normal,Awaiting Review,enhancement,new,,2019-09-25T11:12:48Z,2019-10-01T22:26:44Z,"Can you please add a filter in the menu li elements so we can add structured data to the li element?
http://schema.org/SiteNavigationElement",BackuPs
Needs Patch,36891,Saving large menus is super slow,,Menus,,normal,normal,,enhancement,new,,2016-05-20T01:37:54Z,2019-06-04T20:25:09Z,"When saving menus, `wp-admin/includes/nav-menu.php` calls `wp_update_nav_menu_item()` for every menu item. This function call can take 0.1-0.4s, when multiplied by 50 (or more!) menu items, is a less than pleasant experience.
Because of the length of time this takes, it's also quite likely that an interrupted connection could cause the menu to be saved in a weird state.",pento
Needs Patch,14331,Tweaks to menu setup page,,Menus,3.0,normal,normal,Future Release,enhancement,new,,2010-07-16T21:30:45Z,2020-05-29T19:39:57Z,"It would be great if you could select a parent Page and ""Automatically add children"" to the menu.
In a similar fashion, it would be great if the Menu could then automatically add any new children Pages created under that Parent.",mrmist
Needs Patch,35132,UX improvements when creating/editing menus,,Menus,4.4,normal,normal,,enhancement,new,,2015-12-17T10:32:28Z,2019-06-04T20:20:10Z,"Using the menus component (accessible via Appearance -> Menus) is currently a bit of a pain! A few improvements would go a long way to making this feature more pleasant to use:
1. When editing a menu, the '''Pages/Posts/Custom Links/Categories''' panel on the left hand side does not show which pages have already been added to the menu; all items are unchecked, even if they've already been added to the menu. This makes it very hard to discover any new pages which need adding and also makes it easy to accidentally add duplicate pages.
2. There is currently no means to bulk edit existing menu items - two functions which would be very useful here are the deletion of all existing items and the alphabetical sorting of all existing items.
3. It should be possible to select all children of an existing parent page. For example, if creating a sub menu that lists 20 children of a parent page, we have to click on each child separately. If a new page is added a week later, then items 1 and 2 above become problematic - we need to either carefully check for the new page in the list on the left, cross referencing that list with the existing pages, or we have to delete everything in the menu and add each individual item again from scratch, which despite being quite lengthy is actually the quickest, least error-prone option here.
Hope this helps!",chris_dac
Needs Patch,44803,Add a page to a menu by its ID or slug,,Menus,4.9.8,normal,normal,Awaiting Review,feature request,new,,2018-08-15T15:07:48Z,2019-01-30T05:38:39Z,"I'm ""porting"" a college's website from Joomla to WordPress.
Said website has +2000 pages, which span from ~2013 onwards. It's the biggest mess you can imagine. There are many repeated pages, repeated categories, empty categories and so on.
Building the main menu for this website has been a pain in the ass, too, because the ""adding pages to a menu"" in WordPress is meant for small websites:
For example, I was trying to add a page named ""Evaluación docente"". There are several pages called exactly the same, but typing ""Evaluación docente"", or ""Evaluacion docente"" (without accents), ""evaluacion docente"" or even """"Evaluación docente"""" (with the quotes, hoping them would help to do a exact match search) returned other pages that weren't the one I was looking for - nor even the other ""Evaluación docente"" pages! Seems like a very fuzzy search. Sometimes you're lucky and you get the page you're looking for, but sometimes you don't.
So I think it would be wonderful if there were some sort of way to add a page to a menu by typing its id or its slug.",milerm
Needs Patch,51964,Add bulk moving to items in the menu screen,azhiyadev,Menus,,normal,normal,Future Release,feature request,assigned,,2020-12-08T07:02:07Z,2021-01-24T09:43:14Z,"Hello
I am blind and I use WordPress with screen reader software (JAWS and NVDA).
Using WordPress menu editor is too tedious and time-consuming for a blind user, although other features are quite accessible.
When I go to Appearance > Menus and I add many items to the menu, I cannot rearrange the menu items by drag&drop. I can use Move up / Move down / Move under options for moving the menu items, but this is too time-consuming. I need to press Move Up button 20 times if I want to move an item up to 20 steps higher. If I want to move 5 items up by 20 steps, I need to press ""Move up"" 100 times, over and over. If I want to create a hierarchical menu with an average of 30 menu items, I need to take about 3 hours on rearranging the items.
Bulk Action Feature Request:
I want to have checkboxes beside menu items, so I can select several menu items simultaneously and apply a bulk move / reposition action on all of them simultaneously. For example, I select 6 menu items at a time and I have two comboboxes: parent item, position. I select ""About Us"" as the parent item, and ""3"" as their position. This way, all 6 items go to position 3 under ""About Us"". This is much faster than pressing ""Move Up"" 120 times for reordering those 6 items.
Bulk actions are available in all WordPress taxonomies (Pages, posts, plugins, themes, etc.). I wonder why bulk actions are not available for menu items.
Thank you
",javad2000
Needs Patch,43383,Allow menu items to be inserted in place,,Menus,4.9.4,normal,normal,Awaiting Review,feature request,new,,2018-02-21T23:47:20Z,2019-02-11T22:01:04Z,"When adding menu items to a menu, they default to the bottom of the menu and then need to be dragged into the desired position. This can be time consuming when adding a lot of menu items and can also result in inadvertent changes to the position of existing menu items.
My proposal is that you can select a menu item or sub-item already in the menu before adding new items to the menu and when you add the new item, it inserts itself directly under the selected item.",aaronpwd
Needs Patch,35055,Custom Meta for nav_menu_items,,Menus,4.4,normal,normal,,feature request,new,,2015-12-13T19:42:08Z,2019-06-04T20:19:35Z,"With the release of custom meta for taxonomy terms, I can't help but suggest the same for nav_menu_items.
One can currently use a custom walker class as demonstrated here:
[https://github.com/kucrut/wp-menu-item-custom-fields]
However this is a tedious and ultimately ridiculous method, as Core should lend itself to easy customization and display of nav_menu_item meta. Not to mention this method makes it extra difficult to utilize UI components other than a standard text input when creating options for navigation menu items.
I'd love to be able to utilize add_meta_box or something similar on nav_menu_items and I'm sure others in the community would benefit as well. Thoughts/Concerns/Corrections?
",vincentastolfi
Needs Patch,53903,Duplicate Menu Bar option,,Menus,,normal,normal,Awaiting Review,feature request,new,,2021-08-09T15:56:43Z,2021-09-17T16:46:14Z,"Hi,
I would really like to see a way to duplicate a WordPress Menu bar. There have been countless times in the past few years of working with WordPress websites where this would have come in very handy.
So if possible, please add a way to duplicate a menu bar in a future WP version.
Thank you. ",AlGala
Needs Patch,34641,Inline menu item editing in backend,,Menus,,normal,normal,,feature request,new,,2015-11-10T04:03:01Z,2019-06-04T20:17:39Z,"Editing menu item in WordPress in backend is very pain full when we are dealing with large menu item list. We can create editing menu item process in WordPress backed more simple by adding inline editing to menu item.
Can we add a switch feature to menu item, which allow us to change any menu item to any type dynamically for which we do not have to create a new item and put it into menu list manually?",ravinderk
Needs Patch,54097,Menu Dividers,,Menus,5.8.1,normal,normal,Awaiting Review,feature request,new,,2021-09-09T07:58:38Z,2021-09-09T07:58:38Z,"On the Menus page — along with Pages, Posts, Categories, Custom Links and other available items — it would be nice to have a Divider item so that users can organize menu items in logical groups separated by a horizontal dividing line. That divider line would not be clickable.",rti451
Needs Patch,60198,Menu Handling,,Menus,6.4.2,normal,normal,Awaiting Review,feature request,new,,2024-01-05T10:54:58Z,2024-01-05T10:54:58Z,"Currently it is easy to accidentally delete a menu. In the ""Design"" / ""Menus"" backend area the ""Delete menu"" link is situated very close to the Save Button, and there is no ""Are you sure?""-question in order to prevent an accident.
Some menus can be very complex, and it really takes time to recreate them. The restore of the database might loose other changes, which happened in the meantime (orders, posts) and should be kept.
Addtionally it would be fine if an export and import of menus (XML, JSON) is possible without plugin. It could extend the ""Tools / Export""-section.",ewerkstatt
Needs Patch,34235,Multi selection in menu,,Menus,4.3.1,normal,normal,,feature request,new,,2015-10-09T18:39:44Z,2019-06-04T20:16:58Z,Can we have multiple selection of pages/posts/categories/ which are added in menu? So that if we have more number of things are there we can change order easily instead of selecting one by one.,vir2714
Needs Patch,35048,custom menu - OPTIMIZE QUERY!,,Menus,,normal,normal,,feature request,new,,2015-12-13T14:00:14Z,2019-06-04T20:19:29Z,"
hi..
i had an idea - developers should have an ability to set a constant i.e.
USE_STATIC_CUSTOM_MENU('menu_name') = true;
in general, output of custom_menus on front-end, takes long (sometimes 1 second)..
so, i think, that the custom-menu output should be saved as static string, and that should be outputed on FRONT_END request by visitors...
and that STATIC string should be changed/ updated every time the custom-menu is edited, or when any of that custom-menu's item is modified...
i think, it will save huge resources over millions of sites/hosting..
p.s. of course, somehow, ""current-menu-item"" should be added while front-end request..",selnomeria
Needs Patch,33832,Add admin email column to list table on wp-admin/network/sites.php,,Networks and Sites,4.3,normal,normal,,defect (bug),new,,2015-09-11T15:56:31Z,2019-06-04T20:51:32Z,"The list table on `wp-admin/network/sites.php` currently shows for every site
* the site's URL
* the date when the site was last updated
* the date when the site was created
* the number of users.
It would be nice to have another column which contains the email address of the administrator which is stored in the `admin_email` option. That way, the network administrator(s) could see at a glance the email addresses of the people responsible for the single websites.",thomaswm
Needs Patch,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
Needs Patch,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
Needs Patch,55663,CSS theme and features themes is buggy,,Networks and Sites,5.9.3,normal,normal,Awaiting Review,defect (bug),new,,2022-05-03T09:19:07Z,2022-05-03T09:19:07Z,"Hello,
To explain my problem, I created a multi-site network and I want to use a theme, or even divi, the WordPress CSS is buggy.
Then I installed Divi (the theme) and when I go to validate my license (in the options), there is no divi css, but this: https://prnt.sc/ElUkmp_zXBPW
But even with the default theme ""Twenty Twenty-Two"", I have this same problem: https://prnt.sc/j1BRIO8yU85I
While on the main site, there are no CSS bugs.
Is this normal, is it still recommended to use the network?
Thank you for your reply",valentindu62
Needs Patch,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
Needs Patch,54290,Domain mapping: Text displayed on wp-signup.php asserts site doesn't exist when it does actually exist,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2021-10-19T09:22:59Z,2021-10-26T18:11:21Z,"In a network install, when domain mapping is active for a custom domain, the following message appears on the wp-signup.php page when the network sub-domain is visited:
> The site you were looking for, https://foo.example.com/, does not exist, but you can create it now!
**Steps to reproduce**
1. Map a network site ""foo.example.com"" to a custom domain ""foo.com"" using this guide: https://wordpress.org/support/article/wordpress-multisite-domain-mapping/
2. Visit the network sub-domain ""foo.example.com"" in a browser
3. Observe the text on wp-signup.php which notes ""foo.example.com"" doesn't exist
The network sub-domain ""foo.example.com"" does exist so this text shouldn't be displayed.",henry.wright
Needs Patch,50694,Impossible to add user to network site when username / email are both emails and different values,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2020-07-18T16:03:14Z,2020-07-18T16:03:14Z,"If you have a network site and create a user where the username is an email address (myemail@example.com) and your email address is different (otheremail@differentdomain.com) you cannot add a user to the network site. Under the Add Existing User section it will find the user you're trying to add and autofill it, but when you try to actually add it, it tells you it's not a valid user.
Steps to reproduce:
- Create a network site
- Add a new user where their username is one email address and the email address is a different one
- Add a new network site under your main one
- Try to add your user to that newly created main one
I ran into this issue because I created some users initially using their email address as a username, and then their email address changed. We can't change username so the only thing I could do was update their email on their account which I did. Then this bug popped up.",elrae
Needs Patch,46610,In Multisite The Edit Page Is Missing From Toolbar And Root of Multisite Gets Displayed,,Networks and Sites,5.1,normal,normal,Awaiting Review,defect (bug),new,,2019-03-22T17:11:07Z,2019-06-14T22:06:21Z,"I reported an issue here: https://github.com/WordPress/gutenberg/issues/14562
A contributor there referred me to post this here because it might not be a Gutenberg issue.
In a multisite network, the Toolbar site displayed after My Sites is changed to the root of the site when the admin User adds the Toolbar to the URL so they can edit the page. The Edit Page is also not displayed in the Toolbar.
Steps to reproduce the behavior:
login to WordPress
-- in a multisite network
select one of your multisites
verify the correct site is loaded after My Sites
create a simple test page
publish the test page
copy the link for the page and open the link in a new tab
paste ?bar=yes to the url and press return on the url to display the toolbar
notice that the multisite display after My Sites shows the main root site now instead of the multisite you are in based on the url you selected
notice that the Edit Page does not show either
Expected behavior:
The selected site should display properly after My Sites and the Edit Page should display to the User.
used WordPress 5.1.1 and the Gutenberg release installed with this version
OS: Windows 7 Enterprise
Browser chrome Version 73.0.3683.75
It could possibly relate to Gutenberg because a test of 4.9.10 with Gutenberg plugin not installed and Gutenberg not a part of WordPress core in that release doesn't have that problem. ",wordpressdevtester
Needs Patch,43899,Move the view mode switcher into screen options for multisite users and sites,,Networks and Sites,4.4,normal,normal,Awaiting Review,defect (bug),new,,2018-04-29T15:37:00Z,2018-04-29T22:05:59Z,"In the Posts screen, WordPress used to have two links to ""switch mode"" from the normal list view to the ""excerpt"" view. In WordPress 4.4 these links were moved to the Screen Options panel, see [35357].
However, on multisite the ""Sites"" and ""Users"" screens still show the switch mode links at the top right of the main table. For consistency, and for the design / UI reasons explained in #22222, they should be moved to the Screen Options as well.
",afercia
Needs Patch,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
Needs Patch,58795,Multisite Network Admin Sites - Search doesn't work well,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2023-07-12T20:36:32Z,2023-07-24T19:45:39Z,"The built-in Search functionality in the Multisite Network Admin area has not been working well. Whenever I update a Site Name on a Subsite to be the unique Subdomain, the Search box does not seem to index or cache the new Site Name (even after I clear the cache on the network). So the only way to find sites on my multisite network is to browse through hundreds of site domains until I find the one I am looking for. If I know the Site ID, I can input it into the Search box and the site comes right up. For some reason, text from the subdomain in the Site Name field do not seem to get searched through.",paulpleasant
Needs Patch,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
Needs Patch,31664,Multisite network setup for .htaccess,,Networks and Sites,4.1.1,normal,normal,,defect (bug),new,,2015-03-17T09:06:42Z,2019-06-04T20:12:06Z,"Hi there,
Sorry if this is not the correct place to post it. But I donot know where then.....
I have 2 multisite installations that were not working.
Dashboard for the Primary site was working. Trying to go to the dashboard for the other sites gave an error code or a loop message. And the other sites where not shown under ""My sites"" (hover function). I was able to have a look at the child site but it had no theme it was just a ""sitemap"" list.
What did I wrong? I thougt....
Here what I did:
================ 1st installation (localhost using XAMPP)
- install wp 4.1.1
- change config.php to multisite
- Copy andPaste ""Network setup"" from Dashboard. Here is the ""problem"", the .htaccess here shows:
{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) D:/Programs/xampp/htdocs/H4Net/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ D:/Programs/xampp/htdocs/H4Net/$2 [L]
}}}
After a long researching, I have found an advice from a long time ago and applied. The advise where to change these 2 lines to:
{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /H4Net/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /H4Net/$2 [L]
}}}
After this change it works.
================ 2nd installation web based hosting
- install wp 4.1.1
- change config.php to multisite
- Copy andPaste ""Network setup"" from Dashboard. Here is ""again"" the ""problem"", the .htaccess here shows:
{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) sites/MYURL/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ sites/MYURL/$2 [L]
}}}
The solution I found is to change it to:
{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
}}}
================================================
My request is:
Althought I have seen it was already asked some time ago, Network setup still doesnot come up with the correct .htaccess information.
When installing I do follow instructions given. This was the issue.....
I am not a technical person, far from that. I am good in copy and paste :-)
I have seen / read a lot of people are the same as I am, or have the same issue as I had.
So if you could please change it in the next update it would help a lot!
BTW Thanks a lot for making wordpress available!!!!!
Cheers,
Helena
PS: sure I can give screenshots of more info if needed.
",wph4
Needs Patch,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
Needs Patch,52378,Network admin site action confirmation leads to expired link screen when referer not available,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2021-01-26T17:30:39Z,2021-01-29T15:20:50Z,"Sorry for the wordy summary.
In the network admin on a multisite installation the sites list shows links for actions like ""Archive"", ""Deactivate"" etc. that take you to an interstitial page to confirm the action.
This interstitial page outputs a simple form with the action being confirmed, nonce values and so on filled in, including a field for `_wp_http_referer` which is then used in the `check_admin_referer()` call.
The referrer field is built using the following code:
{{{#!php
"" />
}}}
In infrastructure where WordPress is behind a load balancer and for caching reasons the referer header is not passed to the web server this breaks because the output from `wp_get_referer()` is empty. Clicking confirm will result in a `wp_die()` screen from `wp_nonce_ays()` saying the link has expired.
This can be worked around by filtering `network_admin_url` where the link contains `action=confirm` to add `_wp_http_referer` as a query parameter but ideally the referer should be passed in the query string by default.
Given there is a workaround this is low priority, and I can't see anywhere else in WP affected by this currently either.
",sanchothefat
Needs Patch,38312,Network setup step 2 throws warning in certain server setups,,Networks and Sites,3.5,normal,normal,Awaiting Review,defect (bug),new,,2016-10-14T14:31:02Z,2019-04-01T13:47:23Z,"Hi,
I got this error on my local server:
''Warning: Strpos(): Empty delimiter in wp-admin\includes\network.php line 344''
I tracked this down to line:
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
After some more digging, it seems to me that it's possible that this line is causing the initial problem:
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
Since realpath() can be false in some server setups, $document_root_fix can be empty as well (hence the error)
From http://stackoverflow.com/questions/7906513/realpath-returns-empty-string:
''Note: The running script must have executable permissions on all directories in the hierarchy, otherwise realpath() will return FALSE.
So your web server should have access also to pre-webroot directories.''
Leaving us with perhaps unexpected behavior of the lines following.
I'm not quite sure what to do next, since the next couple of lines are quite hard to grasp.
Thanks,
Ruud
",ruud@…
Needs Patch,46662,"Networked WP ""Deactivate"" a blog site then later ""Activate"" it loses posts and comments",,Networks and Sites,4.9.8,normal,normal,Awaiting Review,defect (bug),new,,2019-03-26T20:47:38Z,2020-02-20T00:26:55Z,"Site dashboard shows WP version as 4.9.10 (does that equal 5.0?).
Using network administration, the list of sites shows the following when hovering over a given site:
Edit | Dashboard | Deactivate | Archive |Spam | Delete | Visit
Selecting ""Deactivate"" appears to work. The blog site is **not** deleted (confirmed) and none of the posts appear to be retrieved. Attempting to access the blog site provides an appropriate message (versus a 404 not found or similar).
However, a day or two later, when the site is ""Activated"", all the recent posts and comments appear to have been deleted (i.e. no longer visible). This involved the years 2016 - 2019. Previous posts and comments going back several years were retained and can be displayed.
The only vaguely similar issue I could find is #44515; but clearly I used ""Deactivate"" or I would not have been able to re""Activate"" the blog site.
Note 1: The networked setup uses sub-domains.
Note 2: Using phpMyAdmin to view the records in wp_13_posts (the particular blog site involved has the Id 13), there are rows for the years 2018 and 2019 -- 8 for 2018 and 7 for 2019. The ""post_content"" column for these records appears blank. The ""post_title"" column appears to indicate these are entries associated with a post, but not the ""main"" post. Those with a post_title like ""Rev-9-MAR-2019-Sectional.jpg"" have a post_type of ""attachment"" and post_title ""Auto Draft"" have a post_type of ""post"".
",johngoold
Needs Patch,57453,Newly created sub-site in multisite not appearing immediately in My Sites list,,Networks and Sites,6.1.1,normal,normal,Future Release,defect (bug),new,,2023-01-12T13:53:20Z,2023-01-19T20:47:48Z,"Hello:
**Issue**
When, as a super-admin, a sub-site is created while in a multisite environment, the newly created sub-site does not appear immediately in the toolbar's site list dropdown.
**Expected Behavior**
The expected result of adding a new sub-site is that while logged in as a super-admin, the super-admin would immediately see all sub-sites on the multisite.
**Findings**
New sub-sites will not appear to even a super-admin until the super-admin is manually added to the new site as a user.
**Question-Request**
Should WordPress require a super-admin to manually add themselves to a sub-site to include that sub-site in the super-admin's toolbar list of sites dropdown?
",richardkrone
Needs Patch,58983,Old error message from 5.1 reappeared in 6.2.2,,Networks and Sites,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-08-04T16:33:41Z,2023-08-08T16:29:04Z,"The following error message appears in multisite installations after upgrade to 6.2.2
Performing the network upgrade doesnt seem to get rid of the message
`Notice: Function wp_check_site_meta_support_prefilter was called incorrectly. The wp_blogmeta table is not installed. Please run the network database upgrade. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.) in .../wp-includes/functions.php on line 5865`
The table itself doesnt seem to exist in the database nor is it being created. Its no affecting any multi site functionality though.
The hosting is Wp-Engine if that matters.",namith.jawahar
Needs Patch,49335,"On Multisite, wp_get_attachment_image_url returns URL with current site path even though switch_to_blog() is on another",,Networks and Sites,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-31T21:39:44Z,2024-01-13T13:31:56Z,"Also see https://github.com/aubreypwd/WordPress/issues/6
----
So in my example, I have a sub-dir site with three sites:
1) The root site (ID: `1`)
2) site-2 (ID: `2`)
3) site-3 (ID: `3`)
Then I load up site `2` wp-admin/ and let the following code run in an `mu-plugin/`:
{{{
add_action( 'plugins_loaded', function() {
switch_to_blog( 3 );
error_log( print_r( (object) [ __FILE__ => __LINE__,
wp_get_attachment_image_url( 4, 'full' ),
get_site( get_current_blog_id() ),
], true ) );
restore_current_blog();
} );
}}}
This switches to site `3` and gets an attachment URL using `wp_get_attachment_image_url` and outputs the WP_Site of site `3`, but in the output:
{{{
(
[/app/public/wp-content/mu-plugins/debug.php] => 9
[0] => http://wordpress-subdir.test/site-2/wp-content/uploads/sites/3/2020/01/Database.png
[1] => WP_Site Object
(
[blog_id] => 3
[domain] => wordpress-subdir.test
[path] => /site-3/
[site_id] => 1
[registered] => 2020-01-31 20:43:10
[last_updated] => 2020-01-31 20:43:10
[public] => 1
[archived] => 0
[mature] => 0
[spam] => 0
[deleted] => 0
[lang_id] => 0
)
)
}}}
Notice that the URL `[0] => http://wordpress-subdir.test/site-2/wp-content/uploads/sites/3/2020/01/Database.png` contains the site slug `site-2` of site `2` (of the Dashboard I ran this from) even though we are actively on site `3` via `switch_to_blog()`.
Oddly, on sub-domain I get:
{{{
(
[/app/public/wp-content/mu-plugins/debug.php] => 9
[0] => http://site2.wordpress-subdomain.test/wp-content/uploads/sites/3/2020/01/terminal-gnome.ong_.png
[1] => WP_Site Object
(
[blog_id] => 3
[domain] => site3.wordpress-subdomain.test
[path] => /
[site_id] => 1
[registered] => 2020-01-31 21:28:57
[last_updated] => 2020-01-31 21:28:57
[public] => 1
[archived] => 0
[mature] => 0
[spam] => 0
[deleted] => 0
[lang_id] => 0
)
)
}}}
Which does NOT contain the site slug of the admin dashboard.",aubreypwd
Needs Patch,53244,PHP Warning on non-existent multisite wp-cron.php,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2021-05-21T04:33:52Z,2021-05-21T04:33:52Z,"A PHP warning can be triggered when a HTTP request is made to `wp-cron.php` on a non-existent multisite site.
For example:
{{{
GET https://foobar.example.org/wp-cron.php
PHP Warning: Cannot modify header information - headers already sent in wp-includes/ms-settings.php on line 79
PHP Stack trace:
PHP 1. {main}() wp-cron.php:0
PHP 2. require_once() wp-cron.php:44
PHP 3. require_once() wp-load.php:55
PHP 4. require_once() wp-config.php:125
PHP 5. require() wp-settings.php:141
PHP 6. header($header = 'Location: https://example.org/wp-signup.php?new=foobar') wp-includes/ms-settings.php:79
}}}
While the error doesn't define why it's being triggered, but it's because [44488] ends the request when `wp-cron.php` is requested prior to the multisite bootstrap.
Initial thoughts say that this is probably a ""good enough"" fix:
{{{
#!diff
Index: wp-includes/ms-settings.php
===================================================================
--- wp-includes/ms-settings.php (revision 50552)
+++ wp-includes/ms-settings.php (working copy)
@@ -73,7 +73,7 @@
if ( true === $bootstrap_result ) {
// `$current_blog` and `$current_site are now populated.
- } elseif ( false === $bootstrap_result ) {
+ } elseif ( false === $bootstrap_result || headers_sent() ) {
ms_not_installed( $domain, $path );
} else {
header( 'Location: ' . $bootstrap_result );
}}}
While this warning will never be seen by users, it can end up in the PHP logs, especially when a vulnerability scanner is trying every subdomain under the sun.",dd32
Needs Patch,50228,Plugins can inadvertently trigger `wp_die()` infinite loop during site creation,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2020-05-22T21:00:39Z,2020-05-22T21:11:04Z,"==== Problem
This is one example of an execution path that leads to an infinite loop, but there are probably several others. It can happen to any callback that tries to query a new site's tables after the `wp_insert_site` action, and before the `make_db_current_silent()` call inside `wp_initialize_site()`.
1. Creating a new site in a Multisite network will eventually call `wp_initialize_site()`
1. That calls `switch_to_blog()`
1. A plugin could hook into the `switch_blog()` action, and call `get_locale()`.
1. That calls `get_option()`, which will trigger a MySQL error, because the tables don't exist.
1. `wpdb->print_error( )` calls `_default_wp_die_handler()`
1. That calls `get_language_attributes()`, which calls `get_option()`
1. The process repeats until PHP gives up.
> ( ! ) Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting! in wp-includes/class-wp-hook.php on line 196
It's not obvious to plugin developers that this kind of thing can happen, so I think Core should handle it gracefully.
Related: #49263
==== Potential solutions
1. `wp_die()` coule call a new `_installing_wp_die_handler()` when `is_installing()` is `true`. This could be a minimal version of `_default_wp_die_handler()`, where no database queries are made.[[br]][[br]]
1. `_default_wp_die_handler()` could avoid calling `get_language_attributes()` when `is_installing()` is `true`.[[br]][[br]]
1. Something else?",iandunn
Needs Patch,57233,Send password reset action link not working on multisite,,Networks and Sites,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2022-11-30T08:08:46Z,2022-11-30T08:08:46Z,"In a multisite installation while the quick action link ""Send password reset"" shows up when accessing users list (wp-admin/network/site-users.php), it doesn't send the email neither any admin notice appear when clicked. It simply redirects to the main multisite users screen (wp-admin/network/users.php).",christopherplus
Needs Patch,47083,"Site Info Update Not Adjusting ""Last Updated"" Value",,Networks and Sites,5.1.1,normal,normal,Awaiting Review,defect (bug),new,,2019-04-30T14:30:27Z,2019-05-09T17:14:48Z,"
+ Navigate to `/wp-admin/network/site-info.php?id=XXX` where XXX is a valid Site ID.
+ Checkmark: Spam
+ Click: Save Changes
Expected: ""Last Updated"" changed to current time.
Actual: ""Last Updated"" not changed.
---
This is in contrast to `/wp-admin/network/sites.php` -> Bulk action -> Mark as Spam.
Doing it bulk updates the Last Updated field to current time.
---
In fact, behaviour is broken since 5.1.0
`update_blog_details` function used to do:
{{{
$details = array_merge($current_details, $details);
$details['last_updated'] = current_time('mysql', true);
}}}
https://github.com/WordPress/wordpress-develop/blob/5.0/src/wp-includes/ms-blogs.php#L297
---
This is a problem because we use ""Last Updated"" field to purge spam. It gives users X days from the ""Last Updated"" value to dispute the spam.
",conner_bw
Needs Patch,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
Needs Patch,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
Patch Needs Refresh,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
Needs Patch,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
Needs Patch,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
Needs Patch,48442,"deleting a site leaves ""orphaned"" user options",,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2019-10-27T20:15:02Z,2019-10-27T20:15:02Z,"When a site/blog is deleted, whether from the Network > Sites screen or via `wp_delete_site()`, most ""per site"" user options (i.e., those added with `update_user_option()` where `$global == false`) remain in the `usermeta` table. The `capabilities` and `user_level` ones are deleted, but all others remain.
Core adds at least the following such user options:
* `dashboard_quick_press_last_post_id`
* `media_library_mode`
* `user-settings`
* `user-settings-time`
and plugins often add others (e.g., classic editor adds `classic-editor-settings`).
In a large network (with many users and many sites that have been deleted) this can result in significant bloat to the `usermeta` table.
To reproduce:
1. create a network and add at least 1 site in addition to the main site (e.g., with `blog_id == 2`)
* can be either sub-domain or sub-directory network
2. visit the dashboard of the site with `blog_id == 2`
* this will create the `wp_2_dashboard_quick_press_last_post_id` user meta
3. delete the site with `blog_id == 2`
4. see that `wp_2_capabilities` and `wp_2_user_level` user metas have been deleted from the `usermeta` table but that `wp_2_dashboard_quick_press_last_post_id` remains",pbiron
Needs Patch,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
Needs Patch,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
Needs Patch,60659,get_subdirectory_reserved_name bypass on mutlisite,,Networks and Sites,6.4.3,normal,normal,Awaiting Review,defect (bug),new,,2024-02-29T12:07:13Z,2024-02-29T12:07:13Z,"By default on Multisite installation, you cannot have subsite(subdirectory) with name /blog/ due to: https://developer.wordpress.org/reference/functions/get_subdirectory_reserved_names/ as this tigger an error when you try to create such subsite:
{{{
The following words are reserved for use by WordPress functions and cannot be used as site names: page, comments, blog, files, feed, wp-admin, wp-content, wp-includes, wp-json, embed
}}}
But you can bypass that by creating subsite /aaa/ and edit name later on in network. I wonder is that a bug, and if so will it cause any issues using such subsites slug?
The only one I have found so far is that if on main site you will have /blog/ page slug, after re-save slug will get the number at the end.
Also, if you can bypass that, maybe it should be removed from reserved list?
Apart from /blog/ slug I was able to replicate that for /comments/ using same bypass.
I could not find any information in that matter.
Thank you
",knightrider123
Needs Patch,51779,wpdb->get_blog_prefix() doesn't allow wp_1_tablename structures,,Networks and Sites,,normal,normal,Awaiting Review,defect (bug),new,,2020-11-15T15:42:46Z,2023-06-08T18:32:59Z,"Context: We have some OLD networks (10+ years, started as WPMU, etc)
In the process of dropping our Domain Mapping plugin for WordPress's native support, I encountered the following problem. Some (probably very few) old networks have the root site's tables as wp_1_options (instead of wp_options).
{{{
if ( defined( 'MULTISITE' ) && ( 0 === $blog_id || 1 === $blog_id ) ) {
return $this->base_prefix;
}
}}}
This logic explicitly prevents wp_1_options and friends as being queried, with requests to the root/base site going to wp_options (which doesn't exist).
Perhaps there could be some kind of sanity check that checks for the existence of tables with the prefix in this kind of situation?",MadtownLems
Needs Patch,60549,"""Site Upload Quota Space"" should indicate network default and possibly site's current usage",,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2024-02-15T14:52:41Z,2024-02-15T14:52:41Z,"In Multisite, there is a network default site quota which can be overridden on individual sites by visiting /wp-admin/network/site-settings.php?id=BLOG_ID
It says:
Site Upload Space Quota (input box here) MB (Leave blank for network default).
It would be incredibly helpful to have easy access to two other pieces of information here.
1) The network default.
This could be shown as: (Leave blank for network default: 2500 MB)
2) The site's current use.
This could be shown as. (Leave blank for network default: 2500 MB) (Space currently used: 100 MB)
Each of these pieces of information would really help in editing sites to change the storage quota. I'd suggest the network default is more important, and if only one were to be added, that should be it.",MadtownLems
Needs Patch,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
Needs Patch,46184,Add WP_Tax_Query support to WP_Site_Query,,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2019-02-04T15:59:24Z,2019-02-12T21:00:32Z,"Because sites are just another object type in WordPress, taxonomies can already be added to the `site` object type. Even though there are no user interfaces in Core for taxonomies when assigned to object types other than `post` (for example, see users #31383), it would be nice to add `WP_Tax_Query` support to `WP_Site_Query`.
One thing to be aware of though is that there are issues in Core when a taxonomy is assigned to multiple object types. I don't think this should be added until that is addressed. #45107 has a more detailed breakdown of that.",desrosj
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,46641,Add site_id to WP_Post object,,Networks and Sites,5.1,normal,normal,Awaiting Review,enhancement,new,,2019-03-25T14:07:42Z,2022-10-26T13:50:49Z,"Hi,
I work on a multisite, where each website can get all posts (from one post type or not).
It seem interesting to add new line in object response (get_post() for example) : ""site_id"" (where site_id is an int)
- site_id is 1 per default (if no multisite)
{{{
WP_Post Object
(
[ID] =>
[post_author] =>
[post_date] =>
[post_date_gmt] =>
[post_content] =>
[post_title] =>
[post_excerpt] =>
[post_status] =>
[comment_status] =>
[ping_status] =>
[post_password] =>
[post_name] =>
[to_ping] =>
[pinged] =>
[post_modified] =>
[post_modified_gmt] =>
[post_content_filtered] =>
[post_parent] =>
[guid] =>
[menu_order] =>
[post_type] =>
[post_mime_type] =>
[comment_count] =>
[filter] =>
[site_id] =>
)
}}}
If this feature is good for some people, I can make this change and submit here
",Spidlace
Needs Patch,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
Needs Patch,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
Needs Patch,53338,Determine when there is an error submitting the wp-signup.php form,,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2021-06-05T15:07:19Z,2021-06-05T15:07:19Z,"For both the wp-signup.php user and blog forms there doesn't seem to be a way to determine if an error occurred in the form submission aside from error text being displayed above the form.
If a body class of something like `error` is added or something like `error=true` is appended to the query string then developers will be able to perform actions or style the page easier.",henry.wright
Needs Patch,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
Needs Patch,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
Needs Patch,56870,Introduce a general `pre_site_option` filter in `get_network_option()`,,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2022-10-20T13:13:09Z,2023-03-20T13:39:15Z,"Similar to the new filter from #37930 I suggest to also add a general `pre_site_option` filter.
I attach a patch to add the filter.
Don't know how to create the test for it.",Drivingralle
Needs Patch,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
Needs Patch,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
Needs Patch,31673,Multisite UX: deleting a plugin,,Networks and Sites,4.1.1,normal,normal,Awaiting Review,enhancement,new,,2015-03-17T20:27:23Z,2021-05-22T14:59:50Z,"'''Better that current:'''
Change the wording form the Network Admin Plugin deletion screen from:
""Caution: This plugin may be active on '''other''' sites in the network.""
to
""Caution: This plugin may be active on sites in the network.""
... the current wording assumes that your action is tied to one particular website rather than the network as a whole when you are deleting a plugin. With this change, the warning is still there but does not make any assumptions about weather you are deleting it because you are thinking about one site and not the ""others.""
'''Best case scenario:'''
A check would be run to see if the plugin is actually active and list out which sites it is active on before deletion. ",saracannon
Needs Patch,54325,Multisite domain mapping: No blog address to revert to when domain mapping is made inactive,,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2021-10-26T18:06:05Z,2021-11-07T21:14:03Z,"When a user creates a blog in a network install they are given a blog address like ""foobar.example.com"". Now, imagine domain mapping is activated for this blog and the blog can be accessed using a custom domain like ""example.com"".
If the user decides they no longer want example.com to be hosted on the network, they may point DNS records to an IP address not associated with the network install. This will result in an orphaned blog because the ""foobar.example.com"" address was vacated when the initial domain mapping became active.
""foobar.example.com"" isn't reserved so a completely different user may have created a new blog in the mean time using the ""foobar.example.com"" address.",henry.wright
Needs Patch,47700,My Sites text is confusing,,Networks and Sites,5.3,normal,normal,Awaiting Review,enhancement,new,,2019-07-14T17:12:00Z,2019-07-19T00:51:30Z,"To me the ""My Sites"" wording indicates I own the lists of sites shown. This isn't the case. I just need to be able to ""read"" a site for it to be shown in the ""My Sites"" list",henry.wright
Needs Patch,26953,"Network Admin ""Site Edit"" page needs Settings trimmed down",,Networks and Sites,,normal,normal,,enhancement,new,,2014-01-28T23:16:41Z,2019-06-04T20:06:39Z,"Piggybacking off of The UI/UX settings revamp, the Edit Sites pages needs a reskin as well.
Most important is the Settings page, which is a massive list of options.php and really most of this should never be edited by anyone, not even a network admin.
This proposal (which was suggested by Nacin) would be to change this to be not a massive dumping ground but a list of items that only the network/super admin can and should change. Anything that is editable by the site-admin (such as Blogname and Blogdescription) would not be displayed.
Items that should be shown:
* Fileupload Realpath
* Fileupload Url
* Permalink Structure (nb: see #12002 - this is the only way around that at this time)
* Uploads Use Yearmonth Folders (questionable - Nacin says no)
But really other than those, there's no need to have that whole ""Settings"" page and it could be folded into the main ""Info"" tab, making life much smaller and easier for everyone.
Related to #15800
",Ipstenu
Needs Patch,28694,Provide a clean way for Plugins to run update scripts for MultiSite,,Networks and Sites,3.9.1,normal,normal,,enhancement,new,,2014-06-30T18:54:34Z,2019-06-04T20:08:25Z,"It's commonly accepted that, if a plugin needs to run a script after updating (such as to modify the database or its settings stored within), that it should do so hooking into admin_init, checking its version number against a database-stored version number, and making adjustments if needed. This works relatively well for single site, only temporarily failing when the plugin is updated through SVN /ftp, and immediately being addressed as soon as any dashboard page is visited.
However, this can often be a much larger issue in MultiSite.
In many MultiSite instances, there will be sites who won't have their dashboards logged into for extended periods of time (sometimes even years), meaning that using admin_init to check for running such an update is impractical.
While hooking onto admin_init AND init would likely solve the issue, it feels like an excessive amount of additional processing (by EVERY plugin on EVERY page load).
I believe that this is an issue that MultiSite needs to address, as currently, plugin authors who use the suggested admin_init method to maybe_update are at risk of major failings in sites using their plugins as part of a network.
(The closest related ticket I found was https://core.trac.wordpress.org/ticket/14912, and it's 4 years old and has no mention of the more serious MultiSite implications.)",MadtownLems
Needs Patch,47735,Separate sites I have created and sites I have joined in a network install,,Networks and Sites,,normal,normal,Awaiting Review,enhancement,new,,2019-07-18T21:31:53Z,2019-07-19T00:51:13Z,"In a network install there doesn't seem to be a way to separate ""My Sites"". For example, ""My Sites"" in wp-admin/my-sites.php includes both sites I have created and sites I have joined. As a user I would like to see the sites I have created and manage in a different area to the sites I have joined.
",henry.wright
Needs Patch,36372,Show Plugins Active at the Site Level,,Networks and Sites,4.4.2,normal,normal,,enhancement,new,,2016-03-29T23:04:31Z,2019-06-04T20:56:33Z,"[35151] added a new feature to multisite installs to show the Network Active plugins at the subsite level (#20104). Although this fixed one problem, it has created an issue where the Network Admin has no simple way to discern which plugins -- in addition to the Network Active list -- are activated at the site level.
Previously the active plugins filter at a sub-site level could be used to show the sub-site activated plugins. In order to find out which plugins are subsite activated now, the Network Admin has to scan through all the plugins available on the Network, looking for the small ""deactivate"" link, amidst the Network Active and Inactive plugins.
[[Image(https://cldup.com/EM7DN3pStf.png)]]
On the subsite level, it would be helpful to be able to toggle a filter to view the ""Site Active"" plugins, in addition to the ""Network Active"" plugins, particularly in busy multisites where a large number of plugins are being used in specific ways on small sub-sections of the network.
This would mimic the additional filters available at the network level, where plugins can be filtered by Must-Use, Drop-ins, Recently Active etc,
[[Image(https://cldup.com/Lq7ubQ5PDx.png)]]
expanding on the existing Sub-site filters:
All, Active, Inactive
[[Image(https://cldup.com/zP5v9BqxRc.png)]]
I recognize there is a filter to regress to the the previous behaviour, but I'm looking for the best of both worlds.",mrjarbenne
Needs Patch,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
Patch Needs Refresh,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
Needs Patch,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
Needs Patch,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
Needs Patch,48901,WordPress multisite with subdirectories sites using the same 'Site Title',,Networks and Sites,5.3,normal,normal,Awaiting Review,enhancement,new,,2019-12-06T10:32:25Z,2019-12-06T10:32:25Z,"I want to create a WordPress multisite with subdirectories sites using the same 'Site Title'.
I’ll be implementing an English version, Italian version, Spanish version, and so on.
The URL will be:
mysite.com
mysite.com/it
mysite.com/es
By clicking on 'My Sites', the sites list on the My Sites screen will show the same name. A change in the file my-sites.php may resolve this annoying problem
Instead of:
{{{#!php
userblog_id );
echo '';
echo ""{$user_blog->blogname} "";
$actions = """" . __( 'Visit' ) . ' ';
if ( current_user_can( 'read' ) ) {
$actions .= "" | "" . __( 'Dashboard' ) . ' ';
}
?>
}}}
Would it possible to change as described below ?
{{{#!php
userblog_id );
echo ' ';
if ( count($site_name) == 1 ):
echo ""{$user_blog->siteurl} "";
else:
echo ""{$user_blog->blogname} "";
endif;
$actions = """" . __( 'Visit' ) . ' ';
if ( current_user_can( 'read' ) ) {
$actions .= "" | "" . __( 'Dashboard' ) . ' ';
}
}}}
",simpleform
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,56458,Multisite Theme Details,,Networks and Sites,6.0.1,normal,normal,Awaiting Review,feature request,new,,2022-08-29T17:51:16Z,2022-09-30T14:39:06Z,"It would be great if there were some accounting for the use of themes across a network. I'm thinking the /wp-admin/network/sites.php listing could show the active theme of each site.
Even if there was a counter so I could confirm the number of sites using a given Theme, that would work.
Or similar to the Users list, which has a column of Sites the user has access to, you could add a Sites column to the Themes listing.
Use Case: I have 8 themes installed, and 97 subsites. There doesn't seem to be any way to confirm which themes are active on 0 sites, confirming which I can uninstall.",hopetommola
Needs Patch,55263,Multisite: Multidomain Single Sign On,,Networks and Sites,,normal,normal,Awaiting Review,feature request,new,,2022-02-26T10:21:26Z,2022-02-26T10:21:26Z,"This came up in the Slack multisite channel a few days ago.
https://wordpress.slack.com/archives/C03BVB47S/p1645670322425659
It would be very helpful to have multidomain Single Sign On as an option through the Network -> Settings -> Settings. (Should probably be renamed to General so that we do not have a Settings Settings screen.)
Here is a plugin: https://wordpress.org/plugins/multisite-multidomain-single-sign-on/",paaljoachim
Needs Patch,57408,Show at which sites in the multisite a plugin or theme is installed,,Networks and Sites,6.1.1,normal,normal,Awaiting Review,feature request,new,,2022-12-31T15:42:49Z,2023-12-18T12:19:13Z,"Please add to each item in the lists of plugins and themes in the multisite WordPress list of sites for which this plugin or theme is installed.
It is especially useful to find plugins that are not installed (installed on zero sites) for candidates for removal.",porton
Needs Patch,33186,Stop sending password via e-mail when creating a new site in Multisite,,Networks and Sites,,normal,normal,,task (blessed),reopened,,2015-07-29T18:32:29Z,2019-06-04T20:50:55Z,"We should continue on this ""don't e-mail passwords work"" and stop e-mailing passwords when new sites are created.
see #33175 and #32428",markjaquith
Needs Patch,52651,$option_group argument in settings_fields() function is misdescribed,,"Options, Meta APIs",2.7,normal,normal,Awaiting Review,defect (bug),new,,2021-02-25T10:59:49Z,2021-02-28T10:52:51Z,"The settings_fields() function in plugin.php takes a single argument described as $option_group. However this argument is then used to populate the 'option_page' hidden element.
The docBlock param description says ""This should match the group name used in register_setting()"" but if you follow this advice, your option group will not be included in $allowed_settings and you will get an error.
{{{#!php
/**
* Output nonce, action, and option_page fields for a settings page.
*
* @since 2.7.0
*
* @param string $option_group A settings group name. This should match the group name
* used in register_setting().
*/
function settings_fields( $option_group ) {
echo "" "";
echo ' ';
wp_nonce_field( ""$option_group-options"" );
}
}}}
It seems a common fix for this on the internet is to pass the 'option_page' value instead.
https://wordpress.stackexchange.com/questions/376785/wordpress-error-options-page-setting-not-found-in-the-allowed-options-list
if the argument name could be changed to $option_group and the docBlock updated accordingly, that would correct the issue without breaking existing implementations
{{{#!php
"";
echo ' ';
wp_nonce_field( ""$option_page-options"" );
}
}}}
",pe01b6
Needs Patch,56752,Add get_post_metadata filters by $meta_key,,"Options, Meta APIs",,normal,normal,Awaiting Review,defect (bug),new,,2022-10-06T23:18:56Z,2022-10-12T18:24:06Z,"`get_metadata_raw()` applies `get_{$meta_type}_metadata` filters, which means that when trying to filter a single meta key, this function will be executed for EVERY meta key and require a condition that checks for the correct meta key to filter.
It would be a great idea to have `get_{$meta_key}_metadata` filters. Since `$meta_key` is some generic string, though, it cannot be used directly, and must be adapted first to suit a PHP function name by replacing any non-alphanumeric character with an underscore.",galbaras
Needs Patch,37635,BUG in get_option,,"Options, Meta APIs",,normal,normal,Awaiting Review,defect (bug),new,,2016-08-11T08:11:58Z,2020-12-17T23:11:48Z,"in wp_options, i had saved this large serialized string:
http://pastebin.com/raw/hxwETuHX
however, when i run `get_option(""option_name"")` it returns false...
i have spent time and found out, that it's because that get_option tries to unserialize it and return the result, but it have problems while unserializing.
then i decided to manually grab the value and unserialize by hand.. and i succeeded!
{{{#!php
$raw_data=$wpdb->get_var(""Select option_value from wp_options Where option_name='option_name'"");
unserialize(Serialized_Fixer($raw_data));
function Serialized_Fixer($serialized_string){
// securities
if ( !preg_match('/^[aOs]:/', $serialized_string) ) return $serialized_string;
if ( @unserialize($serialized_string) !== false ) return $serialized_string;
return
preg_replace_callback(
'/s\:(\d+)\:\""(.*?)\"";/s',
function ($matches){ return 's:'.strlen($matches[2]).':""'.$matches[2].'"";'; },
$serialized_string )
;
}
}}}
and that worked!
this is seriously a bug of WP!
please fix it! thanks!",tazotodua
Needs Patch,55600,Can't save registered post meta field of type string that equals registered default value via REST API,,"Options, Meta APIs",,normal,normal,Awaiting Review,defect (bug),new,,2022-04-21T13:47:24Z,2022-04-21T13:47:24Z,"== Current behaviour
Currently if you register a post meta key as string and set a default value:
{{{
register_post_meta(
'my_cpt,
'my_meta',
[
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'default' => 'foo'
]
);
}}}
and then save the default value it is not actually being written to the database.
If you save any other type, e.g. a boolean
{{{
register_post_meta(
'my_cpt,
'my_meta',
[
'show_in_rest' => true,
'single' => true,
'type' => 'boolean',
'default' => true
]
);
}}}
it is being written to the database.
Also not saving via the REST API, but via `update_metadata()` works for strings.
== What seems to happen
The problem seems to happen like this:
- Post meta is only saved if it differs from the currently stored value.
- So before saving each field the new value is compared with the stored value.
- When doing so the assumption is (rightfully) that all stored data is a string since that is how post meta is stored in the DB.
- If the key doesn't exist though, the comparison happens with the default value.
- The default value though isn't necessarily a string, but is handled as such in the strict equality check.
- So the strict equality check fails on anything but a string field.
**-> String fields can't save the default value, anything else can.**
== How did it come to this?
I am not absolutely sure what is actually the intended behavior, but I assume if there is nothing stored in the DB the value should be saved, even if it equals the default.
I assume this because the behavior of `update_metadata()` [https://core.trac.wordpress.org/changeset/48402 got changed] to only consider DB data, not default values for the comparison by retrieving the stored data using `get_metadata_raw()` instead of `get_metadata()`.
`WP_REST_Meta_Fields` duplicates some of the checks in `update_metadata()` ([https://github.com/WordPress/wordpress-develop/blob/14d9ca8da64688f799695eb9683e6ac8166cd4ee/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php#L382 even explicitly states that in a comment]) but `WP_REST_Meta_Fields::update_meta_value()` (and some other places in that class) didn't get the change to use `get_metadata_raw()` instead of `get_metadata()`.
I assume this got overlooked when introducing the default metadata values in https://core.trac.wordpress.org/changeset/48402
It seems that replacing get_metadata with get_metadata_raw in that class should fix the issue, but I haven't found time yet to prepare a patch, so I thought I'd at least document the issue for now to see if someone else finds time for a fix before me.",kraftner
Needs Patch,48426,Can't update meta via the REST API if an identical value for a field you don't have permission to update is included,,"Options, Meta APIs",4.7,normal,normal,Future Release,defect (bug),new,,2019-10-24T18:20:55Z,2020-10-26T21:36:10Z,"On WP 5.3-RC2-46575, if you update any meta via the REST API via Gutenberg, all meta gets updated. If any of those meta update attempts fail because of user cap requirements, all meta updates fail because of that user cap requirement. Thus, all registered meta require the same user caps.
This happens because all passed-in meta values are iterated through here:
https://github.com/WordPress/WordPress/blob/master/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php#L135
And then updated here:
https://github.com/WordPress/WordPress/blob/master/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php#L187-L191
From Gutenberg, those update calls fire regardless of whether the value is being changed. I believe this is because the entire Redux store is passed in and iterated over.
This causes the issue I mentioned in regards to capability checking with protected meta. Because you can require a user capability for protected meta through the auth_callback when running register_meta, any unrelated meta could prevent another unrelated piece of meta from being updated.
For example, if User A has cap_a, and tries to update _custom_meta_a, but _custom_meta_b requires cap_b, that user cannot update _custom_meta_a without getting a WP_Error here:
https://github.com/WordPress/WordPress/blob/master/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php#L258
If we only update meta that has been changed, this should help here.
**To replicate the problem follow these steps (props @modernnerd):**
1. Install WP 5.3-RC1 via the WP beta tester plugin by choosing “bleeding edge nightlies” at Tools → Beta Testing.
2. Activate the Twenty Twenty theme (these steps will work with any theme, though).
3. Add this PHP code to the Twenty Twenty theme's functions.php file to add custom post meta exposed to the REST API:
{{{
function custom_register_post_meta() {
$args = [
'auth_callback' => 'custom_prefix_require_update_plugins',
'type' => 'boolean',
'single' => true,
'show_in_rest' => true,
];
register_meta( 'post', '_custom_post_meta_one', $args );
$args = [
'auth_callback' => 'custom_prefix_require_non_existing_cap',
'type' => 'boolean',
'single' => true,
'show_in_rest' => true,
];
register_meta( 'post', '_custom_post_meta_two', $args );
}
add_action( 'init', 'custom_register_post_meta' );
function custom_prefix_require_update_plugins() {
if ( current_user_can( 'update_plugins' ) ) {
return true;
} else {
return false;
}
}
function custom_prefix_require_non_existing_cap() {
if ( current_user_can( 'this_cap_does_not_exist' ) ) {
return true;
} else {
return false;
}
}
}}}
4. Edit a post or page. Make a change to the post content and click “Publish” or “Update” to confirm that changes work as expected.
5. In the browser console, display the post meta exposed to the REST API by pasting this command and typing enter:
{{{
wp.data.select( 'core/editor' ).getEditedPostAttribute( 'meta' );
}}}
You should see an object that includes your new custom meta:
{_custom_post_meta_one: false, _custom_post_meta_two: false}
6. Update _custom_post_meta_one to 'true' with this command (this persists the data to the Redux store, but not the database):
{{{
wp.data.dispatch( 'core/editor' ).editPost( { meta: { _custom_post_meta_one : true } } );
}}}
Note that this is just a simplified test case. It emulates a plugin or theme updating meta via the WP API, without having to install a plugin or theme that uses custom post meta and Gutenberg.
7. Click Update in the post editor to save your post meta changes to the database.
You'll see **“Updating failed. Error message: Sorry, you are not allowed to edit the _custom_post_meta_two custom field.”.**
The thing is, _custom_post_meta_two wasn't actually updated or changed by the user, yet their lack of permissions for _custom_post_meta_two is preventing them from updating _custom_post_meta_one.
I looked at doing a comparison check prior to saving for the saved value vs the new value, but because the saved value is always a string when coming from the database, you can't do strict checking, which could be problematic. So I am not sure what the fix needs to be here.
",johnstonphilip
Needs Patch,45353,Homepage title none static homepage when static blog page is set,,"Options, Meta APIs",4.9.8,normal,normal,Awaiting Review,defect (bug),new,,2018-11-14T16:28:58Z,2020-12-22T18:56:19Z,"Hi
I have issue with the title of teh page in the browser tab. When i use a seo plugin and i have a static blog page set and a non static homepage the none static home page show the static blog page title in the browser tab.
I have tested this with wp 20-17 and various other themes and they all have the same issue.
I tried AIOSEO and YOAST SEO and even if i enter the title for the nin static homepage i get the title for the static blog page.
I reported to both plugin builders and they sais i had to be at wordpress core team.
You can read all details here. https://github.com/Yoast/wordpress-seo/issues/11548
1) static blog page none static home page. When Index.php is called
is_home = true is_front_page=false
2) static home page none static blog page. When front_page.php is called
is_home = false is_front_page=true
3) none static home page and none static blog page (set it to ""your latest posts""). When Index.php is called is_home = true is_front_page=true;
Exactly as it should be, But only in case 1) the browser tab has the wrong title !
Please advice how to resolve this issue as the none static home page is not equal to the static homepage and can have different content then the static blog page. It all depends on the theme used if the theme is also pulling the default page content and or has a setting for adding content into the non static home page.
One can easily detect the homepage id.... for the none static homepage it is 0 https://github.com/Yoast/wordpress-seo/issues/11548#issuecomment-438643740
is_home() should only be true in case 3) and not in case a static blog page is used and a none static home page.
I would like to get this resolved. Please advice.
Thanks",BackuPs
Needs Patch,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
Needs Patch,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
Needs Patch,58761,Make the filter option_page_capability_options available when access options.php directly,,"Options, Meta APIs",,normal,normal,Awaiting Review,defect (bug),new,,2023-07-08T05:43:13Z,2023-07-08T05:43:13Z,"The problem is that when wp-admin/options.php is accessed directly $option_page is Empty, and the filter for option_page_capability_options is bypassed.
For a requirement to prevent direct access to this page, which exposes all WordPress options, this filter is needed to modify the capability from 'manage_options' to 'do_not_allow'.
For any other settings page the value of $option_page is set to something other than 'options' and would not be affected by this change.
I'd also suggest the 'back compat' comment is irrelevant and could be removed (or at least better explained if it is relevant).
The suggested change is from:
{{{#!php
'string',
'sanitize_callback' => 'sanitize_text_field'
);
register_setting( 'permalink', 'test_base', $args );
}
add_action( 'admin_init', 'register_test_base_setting' );
}}}
2. Add settings field to the permalink group, at the optional section:
{{{#!php
function add_test_base_settings_field() {
add_settings_field(
'test_base',
'Test base',
'test_base_settings_field',
'permalink',
'optional',
array( 'label_for' => 'test_base' )
);
}
add_action('admin_init', 'add_test_base_settings_field' );
function test_base_settings_field( $args ) {
global $blog_prefix;
$test_base = get_option( 'test_base' );
echo $blog_prefix;
?> "" class=""regular-text code"" />
Permalinks and try to set a value and save the setting.
What is expected: the setting gets (a) passed to the sanitize callback and then (b) saved to the DB.
What happens: nothing of these two.
There is really no point of the `do_settings_fields('permalink', 'optional')` and `do_settings_sections('permalink')` in wp-admin/options-permalink.php if options added though these hooks will never get treated.
",RavanH
Needs Patch,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
Needs Patch,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
Needs Patch,58269,Store attachment metadata in separate fields,,"Options, Meta APIs",,normal,normal,Awaiting Review,defect (bug),new,,2023-05-08T17:05:42Z,2023-05-08T17:05:42Z,"At the moment as far as I can tell information like image dimensions is stored alongside a lot of other information in the _wp_attachment_metadata field
This is far from ideal as there are many times you may want to wp_query by individual attachment attributes. Such as all images larger than 1000*1000 pixels. This is not able to be done (as far as I know) in an efficient standard way at the moment.
I propose that certain key attributes are stored in their own meta fields going forward",shawfactor
Needs Patch,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
Needs Patch,50678,Transient: save object with protected attributes will fail,,"Options, Meta APIs",5.3,normal,normal,Awaiting Review,defect (bug),new,,2020-07-16T11:16:22Z,2020-07-16T11:16:22Z,"When I save a custom object with protected attributes no value is set into database.
I think it's because php's serialize function use null bytes (\0) when serializing protected properties. MySql does not complain so function returns true like everthing is normal.
See this stack overflow [https://stackoverflow.com/questions/62915246/wordpress-save-object-with-protected-attributes-to-transient-will-fail post].
I'm using:
- WordPress 5.3.4
- MySql Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2.
- PHP Version 7.3.19-1~deb10u1",mxlq
Needs Patch,48855,Updating transient to remove expiration fails,,"Options, Meta APIs",5.3,normal,normal,Awaiting Review,defect (bug),new,,2019-12-02T19:50:42Z,2019-12-03T14:09:21Z,"When updating a transient using the set_transient method, it fails to update the transient's expiration date.
Looking at the code, it appears it's only looking for the expiration and deleting it if a new expiration date is specified. This renders it impossible to switch a transient from having an expiration date to not having one.
ex. code:
{{{#!php
* False for an invalid `$object_id` (non-numeric, zero, or negative value),
> * or if `$meta_type` is not specified.
Source: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/meta.php#L596:L597
However, if your metadata contains serialized data that is incorrect for some reason, maybe_unserialize() will (also) return `false`.
Source: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/meta.php#L661
E.g. `a:2:{s:3:""foo"";b:1;}` is invalid due to it expecting 2 entries, but only 1 is present.
History check; It seems to have been made a lot more precise (but missing this minor case):
* https://core.trac.wordpress.org/ticket/51797
* https://github.com/WordPress/wordpress-develop/commit/3bb06ce10b8ddac22091803b2e85832ed3ca3b1b",igorsch
Needs Patch,56944,get_option does not return expected value,,"Options, Meta APIs",6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-11-01T15:33:38Z,2022-11-04T15:33:26Z,"Hello,
I ran into the issue when `get_option` does not return any value:
`get_option( ""_wp_session_{$this->session_id}"", array() );`
It returns an empty value, but the value exists in DB and in cache.
I tested with 3 different methods one-by-one for option `_wp_session_5c1f3b8058ca4b6cf9e637c31300bc23`:
==== 1) `get_option`
`get_option( ""_wp_session_5c1f3b8058ca4b6cf9e637c31300bc23"", array() );`
It returns an empty value (but sometimes it works fine)
==== 2) `wp_cache_get`
`wp_cache_get( ""_wp_session_5c1f3b8058ca4b6cf9e637c31300bc23"", 'options' );`
It returns correct value
{{{
a:6:{s:8:""edd_cart"";s:40:""[{""id"":79377,""options"":[],""quantity"":1}]"";s:13:""edd_cart_fees"";s:0:"""";s:18:""edd_resume_payment"";s:0:"""";s:14:""cart_discounts"";s:0:"""";s:10:""edd_errors"";s:0:"""";s:12:""edd_purchase"";s:1072:""{""downloads"":[{""id"":147706,""options"":[],""quantity"":1}],""fees"":[],""subtotal"":0,""discount"":0,""tax"":""0.00"",""tax_rate"":0,""price"":0,""purchase_key"":""f7f8403a9d9edb93f9be9376d117c1f0"",""user_email"":"""",""date"":""2022-10-31 13:59:43"",""user_info"":{""id"":37847,""email"":"""",""first_name"":"""",""last_name"":"""",""discount"":""none"",""address"":[]},""post_data"":{""edd_email"":"""",""edd_first"":"""",""edd_last"":"""",""edd_agree_to_terms"":""1"",""edd-user-id"":"""",""edd_action"":""purchase"",""edd-gateway"":""manual"",""edd-process-checkout-nonce"":""911cf02037""},""cart_details"":[{""name"":"""",""id"":,""item_number"":{""id"":147706,""options"":[],""quantity"":1},""item_price"":0,""quantity"":1,""discount"":0,""subtotal"":0,""tax"":0,""fees"":[],""price"":0}],""gateway"":""manual"",""card_info"":{""card_name"":"""",""card_cvc"":"""",""card_exp_month"":"""",""card_exp_year"":"""",""card_address"":"""",""card_address_2"":"""",""card_city"":"""",""card_state"":"""",""card_country"":"""",""card_zip"":""""}}"";}
}}}
''I removed some private information here.''
==== 3) direct DB request
`$wpdb->get_results('SELECT * FROM wp_options WHERE option_name = ""_wp_session_5c1f3b8058ca4b6cf9e637c31300bc23""')`
It returns correct value
{{{
Array
(
[edd_cart] => [{""id"":79377,""options"":[],""quantity"":1}]
[edd_cart_fees] =>
[edd_resume_payment] =>
[cart_discounts] =>
[edd_errors] =>
[edd_purchase] => {""downloads"":[{""id"":147706,""options"":[],""quantity"":1}],""fees"":[],""subtotal"":0,""discount"":0,""tax"":""0.00"",""tax_rate"":0,""price"":0,""purchase_key"":""f7f8403a9d9edb93f9be9376d117c1f0"",""user_email"":"""",""date"":""2022-10-31 13:59:43"",""user_info"":{""id"":37847,""email"":"""",""first_name"":"""",""last_name"":"""",""discount"":""none"",""address"":[]},""post_data"":{""edd_email"":"""",""edd_first"":"""",""edd_last"":"""",""edd_agree_to_terms"":""1"",""edd-user-id"":""37847"",""edd_action"":""purchase"",""edd-gateway"":""manual"",""edd-process-checkout-nonce"":""911cf02037""},""cart_details"":[{""name"":"""",""id"":147706,""item_number"":{""id"":147706,""options"":[],""quantity"":1},""item_price"":0,""quantity"":1,""discount"":0,""subtotal"":0,""tax"":0,""fees"":[],""price"":0}],""gateway"":""manual"",""card_info"":{""card_name"":"""",""card_cvc"":"""",""card_exp_month"":"""",""card_exp_year"":"""",""card_address"":"""",""card_address_2"":"""",""card_city"":"""",""card_state"":"""",""card_country"":"""",""card_zip"":""""}}
)
}}}
''I removed some private information here.''
----
So the problem only with function `get_option`. I checked this function as well. It selects values for `notoptions`:
`$notoptions = wp_cache_get( 'notoptions', 'options' );`
And if current option exists in this array – it do return
{{{
if ( isset( $notoptions[ $option ] ) ) {
/**
* Filters the default value for an option.
*
* The dynamic portion of the hook name, `$option`, refers to the option name.
*
* @since 3.4.0
* @since 4.4.0 The `$option` parameter was added.
* @since 4.7.0 The `$passed_default` parameter was added to distinguish between a `false` value and the default parameter value.
*
* @param mixed $default The default value to return if the option does not exist
* in the database.
* @param string $option Option name.
* @param bool $passed_default Was `get_option()` passed a default value?
*/
return apply_filters( ""default_option_{$option}"", $default, $option, $passed_default );
}
}}}
Current option exists in this array, so it applies filter ""default_option_{$option}"", function filter_default_option. But this function check `get_registered_settings`, and there is no information about this option, so it returns empty result.
That’s all information I have so far.
This problem exists at least for 1 year, for this time we always update WordPress core and Plugins for latest version, and it does not any effect.",planvova
Needs Patch,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
Needs Patch,58993,"metadata_exists() returns incorrect value when ""get_{$meta_type}_metadata"" filter returns false.",,"Options, Meta APIs",6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-08-07T14:58:38Z,2023-10-30T18:16:14Z,"metadata_exists() applies the ""get_{$meta_type}_metadata"" filter. If the $single metadata value is false, 0, an empty string, or an empty array (see https://www.php.net/manual/en/language.types.boolean.php), then metadata_exists() will return false instead of true (ie. the metadata exists).
{{{
function metadata_exists( $meta_type, $object_id, $meta_key ) {
.
.
.
$check = apply_filters( ""get_{$meta_type}_metadata"", null, $object_id, $meta_key, true, $meta_type );
if ( null !== $check ) {
return (bool) $check;
}
}}}
If any value is returned, then the metadata exists, so the code should be:
{{{
function metadata_exists( $meta_type, $object_id, $meta_key ) {
.
.
.
$check = apply_filters( ""get_{$meta_type}_metadata"", null, $object_id, $meta_key, true, $meta_type );
if ( null !== $check ) {
return true;
}
}}}
js.",jsmoriss
Needs Patch,57162,out of date More Info on code reference for get_option,,"Options, Meta APIs",,normal,normal,WordPress.org,defect (bug),new,,2022-11-21T11:18:07Z,2022-11-21T13:29:17Z,"[https://developer.wordpress.org/reference/functions/get_option/#more-information More information section] has been updated for `get_option` reference page, as reported and proposed in [https://github.com/WordPress/Documentation-Issue-Tracker/issues/376 #376 Docs Issue Tracker].
Props @joyously @jaedm97",milana_cap
Needs Patch,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
Needs Patch,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
Needs Patch,33977,"set_transient('settings_errors', get_settings_errors(), 30); and multi user @ wp-admin/options.php",,"Options, Meta APIs",4.3.1,normal,normal,,defect (bug),new,,2015-09-23T13:37:52Z,2019-06-04T20:51:48Z,"
{{{
#!div style=""font-size: 80%""
Code highlighting:
{{{#!php
/**
* Handle settings errors and return to options page
*/
// If no settings errors were registered add a general 'updated' message.
if ( !count( get_settings_errors() ) )
add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
set_transient('settings_errors', get_settings_errors(), 30);
/**
* Redirect back to the settings page that was submitted
*/
$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );
wp_redirect( $goback );
exit;
}}}
}}}
I see the code above in wp-admin/options.php
since the key 'settings_errors' is not binding to a user, Is there a chance than one user's error message may be shown on another user's page?",coldwinds
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,37579,Inconsistent names for `update_(network_)option` actions,,"Options, Meta APIs",4.5.3,normal,normal,,enhancement,new,,2016-08-05T03:11:39Z,2019-06-04T21:02:49Z,"I noticed that there seems to be some inconsistency in the hook naming convention, regarding the setting, deleting, and updating of options and transients. It would be nice if all the hooks indicated when in the function they were occurring, and matched the others (see the list below).
For example, if all hooks that occurred before the action were prefixed with `pre_`, and all hooks occurring after were in the past tense: `added_`, `deleted_`, `updated_`. I'm not sure how this was allowed to happen to begin with, so if I'm missing something, please inform and then close this ticket... but if it's simply a result of sloppiness, cleanup should be performed (volunteering myself).
Here is the list of the actions that are performed (in `wp-includes/options.php`), grouped by when the action fires (before or after):
== BEFORE ==
- `update_option`
- `add_option`
- `delete_option`
- `delete_transient_{$transient}`
- `set_transient_{$transient}`
- `pre_delete_site_option_{$option}`
- `delete_site_transient_{$transient}`
== AFTER ==
- `add_site_option_{$option}`
- `add_site_option`
- `add_option_{$option}`
- `added_option`
- `setted_transient`
- `set_site_transient_{$transient}`
- `setted_site_transient`
- `update_site_option_{$option}`
- `update_site_option`
- `update_option_{$option}`
- `updated_option`
- `delete_site_option_{$option}`
- `delete_site_option`
- `delete_option_{$option}`
- `deleted_option`
- `deleted_transient`
- `deleted_site_transient`",crstauf
Needs Patch,46314,JSON strings in postmeta issue,,"Options, Meta APIs",5.2,normal,normal,Awaiting Review,enhancement,new,,2019-02-22T11:02:38Z,2019-02-22T13:44:07Z,"Using and storing data as JSON is becoming more and more widely used. Also in the course of the increased future use of JavaScript for the WordPress admin area.
JSON strings could be part of an serialized array in the postmeta database value. Unfortunately update_post_metadata() removes all backslashes and may destroyes JSON string syntax if protected quotes are included in the JSON string.
In general all stored backslashes in postmeta will removed whether from a JSON string or part of an code example value etc. update_post_metadata() should not change the value at all. This is what to expect from this and any other function that takes a value to store that value in the database.
update_post_metadata() is used by many plugins and themes without providing wp_slash() to the value before. Is there a chance to solve that problem?
Cheers
Johann ",Jonua
Needs Patch,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
Needs Patch,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
Needs Patch,39286,"Standardizing actions and filters for adding, getting, setting, updating, and deleting options and transients",,"Options, Meta APIs",,normal,normal,Awaiting Review,enhancement,new,,2016-12-14T21:46:09Z,2022-07-21T14:33:56Z,"== The Problem ==
In a nutshell, the problem is that there is no standardization of hooks surrounding the options and transient APIs and the hooks presently available are inconsistent in their terminology.
=== Issue 1: Add Option ===
When adding an option to the database, there are presently 3 hook available:
* `add_option`
* `add_option_{$option}`
* `added_option`
There are two main points of confusion:
* The first point of confusion is that `add_option` is fired before the option is added to the database, but `add_option_{$option}` is fired after the option is added.
* The second is that prior to the option being added to the database, there is a hook available that will fire anytime an option is added, while there are two hooks fired after the option is added. There is no hook available prior to the option being added to the database that fires for the specific `$option`.
These same two issues are present for updating and deleting options.
=== Issue 2: Get Option ===
When getting an option from the database, there are only two hooks fired:
* `pre_option_{$option}`
* `option_{$option}`
The first is fired before the option is getted from the database and the second after. The problems are that:
* Unlike adding, updating, and deleting, there is no verb in this hook to tell what is being done
* There are no hooks that fire for every option getted from the database
=== Issue 3: Delete Transient ===
Transients are sort of like options. Without an external object cache, WordPress stores them in the options table of the database. It would make sense that the hooks available for transients are consistent with those available for options. If we look at deleting a transient, there are two hooks available:
* `delete_transient_{$transient}`
* `deleted_transient`
( The same issues are present with site transients. )
Remembering issue 1 above, there are presently three hooks available when deleting and option.
* `delete_option`
* `delete_option_{$option}`
* `deleted_option`
There are a couple issues:
* There is no hook present that will fire every time a transient is deleted, either before or after
* The `delete_transient_{$transient}` is fired BEFORE the transient is deleted in contrast with the `delete_option_{$option}` hook which is fired AFTER the option is deleted.
=== Issue 4: Pre ===
Prior to getting and setting transients, the hooks all start with `pre_`. But this prefix is used inconsistently throughout.
* It is not used prior to deleting the transient
* It is used prior to getting an option, but not prior to adding, updating or deleting
== Proposal ==
=== Structure of hooks ===
I would like to propose that there be four hooks for each action: two before and two after, one general and one specific. The general structure would look like so:
{{{
""pre_{present-tense-verb}_{noun}""
""pre_{present-tense-verb}_{noun}_{$variable}""
[verb noun]
""{past-tense-verb}_{noun}_{$variable}""
""{past-tense-verb}_{noun}""
}}}
So for instance, adding an option would look like:
{{{
""pre_add_option""
""pre_add_option_{$variable}""
[add option]
""added_option_{$variable}""
""added_option""
}}}
=== Type of hook ===
Prior to adding, setting, or updating options/transients, the hooks should be a filter to allow changing of the option/transient prior to writing to the database. After adding, setting, or updating the hooks should be an action since the write has already occurred.
Both prior and after getting an option/transient, the hook should be a filter. I'm not sure the use case for filtering the option before running the query, but that's what's presently done.
Before and after the option is deleted the hook should be an action as there's no need to change the value of the option since it's being deleted anyway.
=== Deprecating hooks ===
There are several hooks no present that don't fit the proposed structure above. I suggest these hooks continue to work for backward compatibility, but that they be deprecated.
=== See also ===
[https://docs.google.com/document/d/1Zl7SuBJTWY8oWvWP6p4QuDmOCowuuqKHtmnmmlhasBI Google Doc] showing all the new and deprecated hooks
== Related Tickets ==
* #37928
* #37929
* #37930
",NathanAtmoz
Needs Patch,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
Needs Patch,51699,The only correct method to check for existence of option,,"Options, Meta APIs",,normal,normal,Awaiting Review,enhancement,reopened,,2020-11-03T12:08:00Z,2024-02-13T15:27:02Z,"There are many valid cases to check if particular option exists in WP (checking for leftovers of other plugins, or existence of some theme options, or some other cases).
The current advertised method to check that is:
{{{
if ( ! get_option('optionName') )
}}}
However, that is no way the correct approach as it is not able to check for option existence (because if the option is set with value: `null/false/0/empty-string`, then the check for existence will be meaningless with that approach).
So, I suggest to add a correct function named `option_exists` to get the correct answer:
{{{#!php
function option_exists( $option_name, $site_wide = false ) {
global $wpdb;
return $wpdb->query( $wpdb->prepare( ""SELECT * FROM "". ($site_wide ? $wpdb->base_prefix : $wpdb->prefix). ""options WHERE option_name ='%s' LIMIT 1"", $option_name ) );
}
}}}
",ttodua
Needs Patch,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
Needs Patch,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
Needs Patch,52360,speed up update_meta_cache with easy fix,,"Options, Meta APIs",,normal,normal,Awaiting Review,enhancement,new,,2021-01-25T14:02:57Z,2022-02-15T19:15:09Z,"wp-includes/meta.php:1061
{{{#!php
get_results( ""SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC"", ARRAY_A );
}}}
in this request should avoid ""ORDER BY $id_column ASC"" to speed up this query (at least 3 times faster)",vladislavdavarashvili
Needs Patch,51730,update_metadata function: differentiate failure from no update,,"Options, Meta APIs",,normal,normal,Awaiting Review,enhancement,new,,2020-11-09T12:11:35Z,2020-11-10T00:50:13Z,"The WordPress function update_metadata, (as well as update_post_meta, and update_term_meta which call it) returns false on failure or if the value passed to the function is the same as the one that is already in the database. This behavior is documented by WordPress: https://developer.wordpress.org/reference/functions/update_metadata/.
However, I would like to be able to differentiate the failure case from the no update case. In my custom plugin I allow users to update post meta; I want to show them a failure message if their update failed and nothing if there was no update.
There is precedent for such a differentiation in wpdb::update which returns 0 if no rows are updated and false on failure. I can use this instead, but I would like the full functionality of update_metadata.
Is there a reason this differentiation is not made here? (either by default or with a passed in parameter). If not, this is a feature request to make that differentiation and return false on failure and 0 on no update.",msea55
Needs Patch,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
Needs Patch,52284,Add filter for notoptions after retrieval,,"Options, Meta APIs",,normal,normal,Awaiting Review,feature request,new,,2021-01-12T18:17:59Z,2021-01-12T18:17:59Z,"Since we are able to filter alloptions after retrieving them via `alloptions` (https://github.com/WordPress/WordPress/blob/f0078d043e0f2805c2400bd5e869eb3533712eec/wp-includes/option.php#L270), it would be nice to do the same for notoptions. This would be great in the case where a developer would want to add a check to ensure that a certain value **never** ends up there.
Perhaps, this could live in a function similar to `wp_load_alloptions()`, potentially `wp_load_notoptions()`?",rebasaurus
Needs Patch,54212,Add hooks to get/update/add_option functions,,"Options, Meta APIs",5.8.1,normal,normal,Awaiting Review,feature request,new,,2021-10-03T04:47:44Z,2023-10-29T06:11:44Z,"It would be great if there were hooks in option saving/updating functions so that it would be possible to override usage of `serialize` in favour of `json_encode` when storing option value in DB. `serialize` gives a lot of problems with site URL when moving from one domain to another.
I spent about two days already trying to replace site URL after moving the website from local to prod environment. The problem is that my prod website's domain name has couple more characters than my local domain, thus when replaced, the PHP-serialized values in DB become invalid so it breaks the entire website for me. I tried many different tools already, as well as the official `wp search-replace` CLI tool, but it also breaks the website completely, I start getting a lot of SQL-related errors.
Please add away to replace that ugly serialize with json!",nik7n
Needs Patch,55889,Allow specifying multiple keys as an array in meta and option retrieval functions.,,"Options, Meta APIs",,normal,normal,Awaiting Review,feature request,new,,2022-06-01T08:00:27Z,2022-06-01T12:24:44Z,"Allow specifying multiple keys as an array in meta and option retrieval functions like get_option and get_post_meta.
Currently when we have to get multiple meta values from multiple keys we have to use get_post_meta without mentioning the key to retrieve everything or make multiple calls to the function for each key. It will be really helpfull and a lot more efficient if one can specify the keys in the function call as follows
get_post_meta(post_id, array('key_1, 'key_2'...))
Same applies to get_option.",namith.jawahar
Needs Patch,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
Needs Patch,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
Needs Patch,44659,Display custom fields,,"Options, Meta APIs",,normal,normal,Awaiting Review,feature request,new,,2018-07-27T23:10:34Z,2019-01-16T06:40:52Z,"There should be an option to display custom field data without having to acquire a plugin, rely on a theme supporting it, or hack a theme; surely this can be achieved in core, programmatically. Options could/should include (in order of importance):
Global Admin settings to:
1. Enable/disable the display of raw custom field data in a post
2. Option to rewrite outputted field data (add wrapper) that may include HTML
3. Specify where in a post, the field is output, depending of available hooks
4. Specify optional regex validation
5. Specify optional data regex replacement on output
6. Specify which options above, are returned via the API to other plugins
7. Specify optional CSS for any classes and IDs added in (2) above.
8. Specify whether a custom field should be a requirement/optional
9. Specify where the custom field box should appear on the post edit page
10. Option to rewrite outputted field data using PHP snippet
Even implementing only items 1-3 would provide a powerful and flexible way to manage meta data, and provide WP v5 with a significant improvement over earlier versions.",iantresman
Needs Patch,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
Needs Patch,46705,"Harden WP core against ""update option"" endpoint vulnerabilities",,"Options, Meta APIs",5.2,normal,normal,Awaiting Review,feature request,new,,2019-03-28T19:46:36Z,2019-11-25T11:01:24Z,"A fairly frequent problem is plugins failing to perform nonce and permission checks on endpoints servicing their admin pages. Following discovery of such a vulnerability it is usually very straightforward for an attacker to perform a large scale attack defacing or establishing persistent administrative access by modifying the options `siteurl`, `default_role`, `users_can_register`, and likely more.
I propose that all updates to these selected critical options in a web context warrant validating there has been a nonce verification and the current user has the capability to manage_options. This would force an attacker to follow a more difficult exploit path, potentially preventing large scale exploitation of these issues.
The goal I have in mind here is not to be bulletproof, just to defend against a seemingly common bug class.",tsewlliw
Needs Patch,49452,Approximately every week permalinks are lost for custom post types in multisite,,Permalinks,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-02-17T07:31:42Z,2020-02-17T09:49:56Z,"I have to check my site https://6teamconditions.com/ multiple times a day as it will randomly just loose the permalinks for custom post types and will return a 404.
I have deactivated security and cache plugins and still have same behaviour.
There are no errors logged, I can not find any event that is causing this.
I have used the same theme method for creating custom post types on hundreds of normal (non multisite) wordpress sites over many years without ever having this problem.
The site has had this problem since going live in December, wordpress has been updated to latest version each time.
I have been posting in the support forum with no luck
https://wordpress.org/support/topic/permalinks-disapear-for-custom-post-types/#post-12332300
Example log of error 404 on website https://6teamconditions.com
135.180.133.34 - - [17/Feb/2020:01:14:55 +0000] ""GET /podcast/episode-002-the-6-conditions-framework/ HTTP/2"" 404 6464 ""-"" ""Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.100 Safari/537.36""
",Lauriate
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,59434,Changing permalink structure results in failure to save draft posts,,Permalinks,,normal,normal,Awaiting Review,defect (bug),new,,2023-09-23T21:07:44Z,2023-09-23T21:07:44Z,"Steps to reproduce:
1. On a fresh install change Permalink structure from plain to Month and date
2. Create new Blog Post
3. Click Save draft
EXPECTED: draft is saved
OBSERVED: Error ""Updating failed. The response is not a valid JSON response.""
Root cause:
POST https://abc.com/wp-json/wp/v2/posts/93?_locale=user
HTTP/1.1 404 Not Found
Date: Sat, 23 Sep 2023 21:05:16 GMT
Server: Apache/2.4.57 (CentOS Stream) OpenSSL/3.0.7
Content-Length: 196
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1",omikheev
Needs Patch,37435,Conflicting permalinks with attachment and category of same name,,Permalinks,4.5.3,normal,normal,,defect (bug),new,,2016-07-21T18:58:56Z,2019-06-04T21:01:58Z,"On my company site, I created a category called '''Announcements''' and uploaded an image called '''Announcements.png''' Both had permalinks of http://MYDOMAIN/announcements When I tried to navigate to http://MYDOMAIN/announcements I was expecting to see a listing of all the posts in that category, but instead the site was showing the image.
I tried with different themes, deactivated all plugins but the issue remained. At the time I didn't realize there was an attachment with the same name as my category. Once I figured that out, I simply changed the attachment name and updated the permalink and everything worked properly.
I have a custom permalink structure: '''/%category%/%postname%''' Category Base '''.''' and Tag base of '''keyword'''",Spidergirl1979
Needs Patch,46257,Deleting a page can break the permalink of other pages if it had media uploaded to it,,Permalinks,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-02-14T16:36:50Z,2020-06-04T23:30:48Z,"Trashing and deleting a page can cause the permalink of another page to break the next time that page is edited. It is not obvious to the user that this will happen. It is also not obvious how to fix this, because when an image is not ""Uploaded To"" a particular page, it is not possible to edit the permalink.
1. Start with vanilla WP installation using twentynineteen and no plugins
1. Add New Page > Title: ""Cat""
1. Add Block > Image > Upload > Pick the image > Open
1. Publish... > Publish
1. Media > Click on the image that was just uploaded, see that it says ""Uploaded To Cat""
1. Edit more details > Edit (permalink) > Set to ""dog"" > OK > Update
1. The permalink should now be `http://localhost/cat/dog/`
1. Add New Page > Title: ""Dog"" > Publish... > Publish
1. See that ""Page address"" is `http://localhost/dog/`
1. Visit `/dog/` to confirm the page is displayed
1. Pages > Trash (Cat) > Trash (at the top of the page) > Empty Trash
1. Pages > Dog > Make a change, such as adding text to the existing block > Update
1. Document > Permalink > Notice that URL is now `dog-2`
1. Visit `/dog/` to see that instead of the page, the image is instead displayed
",mallorydxw
Needs Patch,48903,Drafts or pending posts overwrites existing published post with same url,,Permalinks,5.3,normal,normal,Awaiting Review,defect (bug),new,,2019-12-06T16:33:57Z,2021-01-13T22:02:59Z,"The creation of a draft with post_name set to as an existing post will prevent the reachability of the older until the pubblication of the new one. The cause of the issue is that the function ''wp_unique_post_slug'' only acts if the post isn't in the status of draft or pending so in the database will be stored two posts with the same post_name. In the frontend side (in a installation with permastruct set to /%postname%/) the executed query is
{{{
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = 'example' AND wp_posts.post_type = 'post' ORDER BY wp_posts.post_date DESC
}}}
This query will return 2 posts and the wordpress considers the most recent (the draft) so the url returns 404.
",uatania
Needs Patch,32498,Media Library and Page Slug conflict,,Permalinks,4.2.2,normal,normal,,defect (bug),new,,2015-05-26T17:56:18Z,2019-06-04T20:50:04Z,"This is a follow-up to #18962.
Please also check out this thread on the forum - https://wordpress.org/support/topic/41-slug-issue-when-same-title-exists-in-media-library
If you have a pre-existing media file with the same slug as a page then a ""-2"" will be added to the page slug. With a custom content type and page or custom content type and media file, this doesn't appear to be happening.",m7csat
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,45784,Pages and archives containing /[0-9]/ should redirect or redirect correctly,,Permalinks,5.0.2,normal,normal,Awaiting Review,defect (bug),new,,2018-12-28T03:56:06Z,2019-01-07T00:33:55Z,"With default settings,
https://www.example.com/0 should redirect to https://www.example.com/ but doesn't and instead redirects to https://www.example.com/0/
https://www.example.com/page/0 should redirect to https://www.example.com/ but doesn't and instead redirects to https://www.example.com/page/0/
https://www.example.com/2018/1/25/post-name/ should redirect to https://www.example.com/2018/01/25/post-name but doesn't.
So basically there is some issue about redirection with pages containing /[0-9]/
",superpoincare
Patch Needs Refresh,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
Needs Patch,36305,Permalink can't decide the parent category,,Permalinks,,normal,normal,,defect (bug),new,,2016-03-23T10:46:11Z,2019-06-04T20:55:59Z,"'''The bug:-'''
There is a bug in the permalink generation that it can't decide the parent category. This means that even though we choose the child & parent both as a post's category, it creates the permalink as /parent/child/ in '''certain situations'''.
Please note that the Permalink Structure is set to:-
{{{
/%category%/%postname%/
}}}
----
'''What should happen:-'''
If we choose a parent category as well as the child category as post's categories, the permalink should be:
{{{
/parent/
}}}
And if we choose only the child as post category, the permalink should be:
{{{
/parent/child/
}}}
----
'''Demonstration:-'''
I created a parent-child category set as ""Parent 1 (parent) & Child 1 (child)"" & another set as ""Parent 2 (parent) & Child 2 (child)"". The difference between the two sets is that 'Child 1' was created before 'Parent 1' & then edited to have 'Parent 1' as it's parent, while the 'Child 2' was created after 'Parent 2'.
Now, if I choose 'Parent 1' & 'Child 1' as a post's category, it creates the permalink as:
{{{
/parent-1/child-1/hello-world/
}}}
And if I choose 'Parent 2' & 'Child 2' as a post's category, it creates the permalink as:
{{{
/parent-2/hello-world/
}}}
----
'''How to reproduce the bug:-'''
1. Create a category 'child 1'.
2. Create another category 'parent 1'.
3. Now edit the 'child 1' category and set 'parent 1' as it's parent.
4. Now the permalink can't judge that 'parent 1' is the parent of 'child 1' & creates a wrong permalink as if only 'child 1' was selected.
----
'''Possible Reason:-'''
A possible reason for this bug maybe due to the category id. Here, the 'Child 1' has lesser category id than 'Parent 1'. And the permalink algorithm checks for the least selected category id.",gr8shivam
Needs Patch,47755,Permalink in RTL version not correct,,Permalinks,,normal,normal,Future Release,defect (bug),new,,2019-07-22T23:23:47Z,2023-07-06T00:14:44Z,"I have notice many problem with permalink in version RTL:
1- for example : https://www.byarabic.com/category/دروس/تعلم-السياقة/
تعلم-السياقة = child
دروس = parent
in LTR this is how it was : `http://www.example.com/category/parent/child`
but in RTL it display like this : `http://www.example.com/category/child/parent`
so the correct direction is `http://www.example.com/category/parent/child`
all url must be in LTR direction even if it in arabic letter.
so the correct direction for my permalink must be like this :
https://www.byarabic.com/category/تعلم-السياقة/دروس
*if you have an arabic support please let him to write the link manual and you will see the first word after ""category"" will write like this :
category/دروس/
but the second word in arabic after category/دروس will write like this :
category/دروس/تعلم-السياقة
this is a problem , because the second word in arabic must be the last word in url , like this
category/تعلم-السياقة/دروس
2- setting -> permalink : the input field it appear behind text :
https://prnt.sc/oi7t8x
the correct way to show input field it like version LTR, like this :
https://prnt.sc/oi7u63
3- also the same problem in article ''(block editor)'' :
— first about the title of the post it show like this
https://prnt.sc/oi7v2a
but the correct way is like this :
https://prnt.sc/oi7w42
— other place show wrong direction of permalink, like this :
https://prnt.sc/oi7wjy
4- about decode url: if I copy an arabic permalink from browser and I past it in other place like here it will display some symbols like `%%%%%` :
example of my permalink : `https://www.byarabic.com/category/%d8%af%d8%b1%d9%88%d8%b3/%d8%aa%d8%b9%d9%84%d9%85-%d8%a7%d9%84%d8%b3%d9%8a%d8%a7%d9%82%d8%a9/`
so I have to decode link to fix the problem and then I can send it to my friend
I use this website to decode it : https://www.url-encode-decode.com/",rachid84
Needs Patch,60624,Permalinks corrupted,,Permalinks,6.3.3,normal,normal,Awaiting Review,defect (bug),new,,2024-02-23T14:36:27Z,2024-02-23T14:36:27Z,"Hello.
We experienced an issue now on WP 6.3.3 while all of the sudden all pages started to return 404.
This occured on a multisite installation hosting around 500 websites with many of them (presumably all) suffering from this error.
Then we realised the quick and only solution was to either reboot the server(s) or manually flush the permalinks...
Could you please give us a hand to understand the root cause of this.
Best ",christianbaltazar
Needs Patch,56583,Permalinks in Multisite not working when Main Site is in a subdirectory,,Permalinks,6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-09-15T16:07:18Z,2022-11-25T07:05:15Z,"Hello
I have installed WP 6.0.2 on my Server in a subdirectory
`/var/www/example.org/wp`
After install I activated Multisite.
I added a website ""example2"" to the main site and permalinks are working, e.g.:
`example.org/wp/example2`
Sites are found as e.g. `example.org/wp/example2/subsite`
Then I used an own domain `example2.org` instead of `example.org/wp/example2`
and now the subsites of `example2.org` are only accessable with Permalinks > Simple (e.g. `example2.org?p=123`) but not with subsite names (e.g. `example2.org/subsite`).
This seems to me a bug, as it should work since WP 3.5 as I read in doc.
Thank.frank",francwalter
Needs Patch,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
Needs Patch,48658,"Post, Page, and Attachment permalinks can be silently overwritten when Permalinks are set to /%postname%/",,Permalinks,5.4,normal,normal,Awaiting Review,defect (bug),new,,2019-11-15T21:28:17Z,2019-11-16T11:05:13Z,"When a new post is created with a permalink that matches an existing attachment page permalink, the attachment page permalink is silently overwritten. The expected behavior of having `-2` appended to the new post permalink does not occur and instead the existing attachment page becomes inaccessible via its permalink, which starts pointing to the new post instead.
Steps to reproduce:
1. Ensure pretty permalinks are enabled in Settings -> Permalinks (e.g., `/%postname%/`)
1. Upload something to the Media Library (e.g., `happy-pumpkin.jpg`)
1. Note the Attachment Page permalink generated from the upload (e.g., `/happy-pumpkin/`)
1. Publish a new post with a title that will produce the same permalink (e.g., a post title of ""Happy Pumpkin"" will generate a new post permalink of `/happy-pumpkin/`, ''not'' `/happy-pumpkin-2/` as expected)
1. Now both the attachment page and the new post have the same permalink (`/happy-pumpkin/`, in this example) and the attachment page permalink has been silently overwritten.
When the attachment page permalink is overwritten, there's no way to access that attachment page on the front-end (it now points at the new post). There's also no obvious way to manually change the permalink.
In testing, what works is to edit some detail of the attachment in the Media Library—once the change is saved, the permalink is regenerated and updated to include `-2`, which then makes the attachment page accessible again.",raamdev
Needs Patch,31293,Previously uploaded attachment affects page slug,,Permalinks,4.1,normal,normal,,defect (bug),new,,2015-02-11T06:23:15Z,2019-06-04T20:49:10Z,"I have page url: abc.com/products/novus-3 (novus page never create but it add -3 in url)
so i check directly where the page exist: abc.com/products/novus So basically i found the banner image i upload only showing in this url as ATTACHMENT ID, So i delete that header image and change my page url ""NOVUS-3 to NOVUS"" and after that i re-add image. Its fine.
But the question is when creating new page, for example Page title: New Page so url will be /new-page but before setting page title if we import image with the same name of page title, the Permalink url reserved that desired page url. So everytime first add Page title first then add image.
Hope you understand, sorry for my bad english.
Thanks",funorang
Needs Patch,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
Needs Patch,60143,Running behind HAProxy with fcgi makes WordPress think URL rewriting is unavailable,,Permalinks,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2023-12-22T21:10:19Z,2023-12-22T21:10:19Z,"I have WordPress set up behind HAProxy which directly uses fcgi for PHP and nginX for static files. HAProxy sends `$_SERVER['SERVER_SOFTWARE'] = 'HAProxy 2.3.20-1ppa1~focal'`. As a result in Settings > Permalinks I'm having `index.php` prefixes for permalinks. If I do not change permalink settings rewriting works just fine but as soon as I make changes I'm set for `index.php` in the permalinks as then the rewrite rules are updated.
WordPress here incorrectly infers that URL rewriting might be unavailable. If I trick WordPress into believing I'm running on nginX by making HAProxy sending `$_SERVER['SERVER_SOFTWARE'] = 'nginx'` rewriting works fine and the `index.php` prefix for permalinks is gone.
This might be resolved by adding a condition for HAProxy in `got_url_rewrite()` and defining a `is_haproxy` global similar to the one for nginX which then checks if the `SERVER_SOFTWARE` contains `HAProxy`.",nebulon42
Needs Patch,47207,Specific custom permalink 404 on archive page,,Permalinks,5.2,normal,normal,Awaiting Review,defect (bug),new,,2019-05-10T00:22:54Z,2019-05-10T02:15:23Z,"If we set a custom permalink of
/%year%/%monthnum%/%day%/%postname%/
archive pages will be
/2019/05/
If we want european/asian/african/southamerican D/M/Y date format
/%monthnum%/%year%/%postname%/
archive pages will be
/2019/05/
US format but doesn't matter, at least it works
but with this permalink:
/%day%/%monthnum%/%year%/%postname%/
archive pages (at least on archive widget) will be
/05/2019/
Which looks good
But returns 404 with default wp and theme and WP 5.1.1 or 5.2
tried to go to /2019/05/ but 404 too",briandd
Needs Patch,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
Needs Patch,52295,The response is not a valid JSON response - URL permalink using the ? sign,,Permalinks,5.6,normal,normal,Awaiting Review,defect (bug),new,,2021-01-14T10:39:41Z,2021-02-20T22:24:44Z,"Encountered a problem at a friend's blog so tried to recreate it on a test site.
1. Installed vanilla WP_5.6-he_IL with no additional settings or changes on shared Dreamhost hosting with default settings - no cache, Cloudflare or any other settings. Server uses php 7.4
2. Created a first post - everything works great.
3. Changed the permalink to the simple permalink format e.g. /?=123, that was the default in older versions.
4. Tried to create a new post with a URL inside the post and got the above mentioned error message.
5. Changed to other permalink structures - no problem at all. ",rshlo
Needs Patch,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
Needs Patch,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
Needs Patch,35529,Updating to 4.4.1 causes new pretty permalinks for media to break existing permalinks,kraftbj,Permalinks,4.4,normal,normal,Awaiting Review,defect (bug),assigned,,2016-01-19T18:43:41Z,2022-08-01T19:36:30Z,"When updating a site from v4.0.9 to v4.4.1 at least one page (which is a top-level page for the site) is getting ""-2"" added on to its slug while an unattached image takes the original slug. This causes problems for SEO as well as breaking things that depend on results from functions like `is_page('slug')`.",nyodulf
Needs Patch,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
Needs Patch,36746,WP v4.5.1 broke something in the Permalinks settings,,Permalinks,4.5.1,normal,normal,,defect (bug),new,,2016-05-04T00:41:24Z,2019-06-04T20:58:32Z,"WP v4.5.1 broke something in the Permalinks settings. The Plain Permalink settings do work, though:
http://domain/?p=123
One weird thing I saw just now while I was trying different Permalink settings is that several times the word ""blog"" appeared in all the Common Settings example URLs when it never had before. For instance:
http://domain/blog/2016/05/04/sample-post/
But it is no longer there now. Now that Day and name common setting shows as:
http://domain/2016/05/04/sample-post/
",voidPortal
Needs Patch,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
Needs Patch,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
Needs Patch,48786,"Wrong URLs to categories, authors etc. to a site in a multisite",,Permalinks,5.3,normal,normal,Awaiting Review,defect (bug),new,,2019-11-25T01:41:48Z,2023-03-15T15:37:53Z,"WP returns a wrong URL to a term if the term is in another site of a multisite. Terms like categories, tags, authors, date archives and other terms.
How to reproduce: execute this code, with site ID and post ID as examples of valid values in the current installation, in a subsite different to site ID = 3:
{{{#!php
%s',
esc_url( get_category_link( $category->term_id ) ),
esc_html( $category->name )
);
}
print join( ', ', $category_links );
restore_current_blog();
}}}
If other base names for the category and tags are used (being specified on the Permalinks Settings page) the bug is more obviuos. In the next example the subsite is the german version of the main site, so the site path is '/de' and the category base name is specified to 'kategorien', and the german name for the category 'General' is 'Allgemein':
On the english main site the code prints this URL to the german category 'Allgemein':
{{{https://www.example.com/de/blog/category/allgemein/}}}
which is wrong. The correct URL is
{{{https://www.example.com/de/kategorie/allgemein/}}}
On the german subsite the code prints this URL to the english category 'General':
{{{https://www.example.com/kategorie/general/}}}
which is wrong. The correct URL is
{{{https://www.example.com/blog/category/general/}}}
The code sets correct links if it is executed in the site with the ID = 3 (e.g. is current site is same as the site being switched to).
Same is with similar functions like:
{{{
get_author_posts_url()
get_category_link()
get_month_link()
get_post_format_link()
get_post_type_archive_link()
get_tag_link()
}}}
",Hinjiriyo
Needs Patch,51953,"flush_rewrite_rules works not as the same as pressing ""save permalinks"" in backend (breaks system)",,Permalinks,5.5.3,normal,normal,Awaiting Review,defect (bug),new,,2020-12-07T08:23:09Z,2020-12-07T08:23:09Z,"Hello!
We got a strange issue in one of our production systems.
It has the latest WordPress version (5.5.e).
Deactivating all plugins is not possible on the production system.
If a plugin (e.g. after updating) is using flush_rewrite_rules, it breaks the permalinks for the woocommerce backend.
However, the fix to this issue is, to simply save the permalinks via the backend again and everything works fine.
Where does the implementation of the two functions differ?
Should both functions not work the same?",rocket.works
Needs Patch,53346,get_permalink( $post->ID ) returns plain permalink instead of pretty permalink for CPT registered on subsite,,Permalinks,5.7,normal,normal,Awaiting Review,defect (bug),new,,2021-06-07T10:39:15Z,2021-06-07T11:09:34Z,"I have a multisite network with CPTs that are registered individually by subsite.
The main site provides an overview of these, using
{{{
get_permalink( $post->ID );
}}}
to link to the pretty permalink location in each subsite.
After the introduction of
{{{
wp_force_plain_post_permalink()
}}}
in WP 5.7.0
#52373 #5272
**get_permalink()** returns plain permalinks due to failing to pass the test in **wp_force_plain_post_permalink()**:
{{{
$post_type_obj = get_post_type_object( get_post_type( $post ) );
}}}
**get_post_type_object()** returns null, as the CPT is not present in the global **$wp_post_types** of the main site (even after trying switch_to_blog( $post->blog_id );",1theo
Needs Patch,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
Needs Patch,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
Needs Patch,39670,urlencoded non-alphanumeric permalink,,Permalinks,4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-01-23T16:47:15Z,2020-12-15T21:49:22Z,"I don't know it is the problem of wordpress or not. It may yes or it may other problem like server or php setting.
When I update new version of wordpress, some permalink that contains non-alphanumeric characters not working. Because $req_uri of WP::parse_request() in class-wp.php has urlencoded.
So I think it's better to urldecode to proceed parsing.
{{{#!php
list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );
$req_uri = urldecode($req_uri); // added to fix urlencoded permalink
$self = $_SERVER['PHP_SELF'];
}}}
",jeongsu
Needs Patch,45819,"when {category|tag}_base include spaces their rewrite rules don't get generated correctly, resulting in 404's",,Permalinks,,normal,normal,Awaiting Review,defect (bug),new,,2019-01-03T17:00:58Z,2019-01-03T17:00:58Z,"Steps to reproduce:
1. Go to Settings > Permalinks
2. Enter ""this is a test"" in the `category_base` field
3. Click ""Save Changes""
4. Notice that `category_base` gets saved as ""this%20is%20a%20test"".
5. Notice that the rewrite rules such as the following get generated:
{{{
'this%20is%20a%test/(.+?)?$' => 'index.php?%20was%$matches[1]&%20test%$matches[2]'
}}}
instead of (what I imagine the correct rule would be)
{{{
'this%20is%20a%test/(.+?)?$' => 'index.php?category_name=$matches[1]
}}}
I'm not sure whether the best thing to do is to disallow spaces in `{category|tag}_base` or to fix`WP_Rewrite::generate_rewrite_rules()` to generate correct rules if they do include spaces.",pbiron
Needs Patch,52889,Add filter to disable forced plain permalinks,,Permalinks,5.7,normal,normal,Awaiting Review,enhancement,new,,2021-03-23T12:04:29Z,2021-04-19T08:06:39Z,"There should be an option to disable forced plain permalinks introduced with #5272. In my use case, showing the permalinks is totally fine and a requirement, even for private posts. Even worse, `wp_force_plain_post_permalink` results in additional capatibility checks which are expensive in my use case, especially for pages with lots of permalinks (e.g. menus). Setting the posts or the post statuses to public is not possible, as this results in other unwanted side effects. With `wp_force_plain_post_permalink`, there is currently no way to have the old behaviour.
As a proposal, I added a patch that introduces a filter for `wp_force_plain_post_permalink` to completely disable the check.",cneumann
Needs Patch,60675,Add hook for wp_check_for_changed_slugs(),,Permalinks,6.4.3,normal,normal,Awaiting Review,enhancement,new,,2024-03-02T16:09:18Z,2024-03-02T16:09:18Z,"The wp_check_for_changed_slugs() function adds old post slug (post_name) to the list is post_name was changed. And it do it always without ""make sense"" check.
For example I just publish a new post and after a couple of minutes change the post_name (slug), because I forgot to change it before publishing. And the old slug is added to the list, but this make no sense, because this is new post - it newer indexed yet and newer pushed somewhere (if I don't have auto publish to some social network functionality), so the saved post slug meke no sense here.
I think there should be possibility to hook the function and disable it after custom checks.
I suggest to add the following hook:
{{{#!php
post_name == $post_before->post_name ) {
return;
}
// We're only concerned with published, non-hierarchical objects.
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
return;
}
/**
* Allowes to stop {@see wp_check_for_changed_slugs()} function functionality.
*
* @param bool $is_skip If true the {@see wp_check_for_changed_slugs()} will be stopped.
* @param WP_Post $post The post object.
* @param WP_Post $post_before The previous post object.
*/
if ( apply_filters( 'skip_wp_check_for_changed_slugs', false, $post, $post_before ) ) {
return;
}
$old_slugs = (array) get_post_meta( $post_id, '_wp_old_slug' );
// The rest of the function code
}
}}}
",Tkama
Needs Patch,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
Needs Patch,34184,IIS with Helicon Ape is not detected for suggesting pretty permalinks,,Permalinks,4.3.1,normal,normal,,enhancement,new,,2015-10-07T07:30:04Z,2019-06-04T20:52:03Z,"When deciding on suggesting pretty permalinks on the permalinks settings page, the function got_url_rewrite() is used, which checks the function iis7_supports_permalinks(). In this function, only the Microsoft URL Rewrite module is checked. A check for Helicons Ape (www.helicontech.com/ape/) should be included here as well since it supports full mod_rewrite functionality.",mikek70
Needs Patch,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
Patch Needs Refresh,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,46180,get_permalink: Ability to pass required information for better performance,,Permalinks,,normal,normal,Awaiting Review,enhancement,new,,2019-02-04T09:47:46Z,2019-02-04T09:47:46Z,"Hi,
somewhat related to this ticket:
https://core.trac.wordpress.org/ticket/46179
I have another proposal.
get_permalink accepts a post object or an ID to create a permalink. If you only pass the ID, the function will get all post information from the database and generate the permalink. However, this might not be necessary every time. Look at the use-case in 46179, when I already have loads of information. For example, when my permalink structure is /%Y/%M/%TITLE%/, I can easily get all information I need from the one query.
So my proposal is that you can not only pass an ID or a WP_Post object to get_permalink but also an array with all available information (from the database). And if the information provided is sufficient to create the permalink, then use it, otherwise fall back to get_post($id).
This won't save ""much"" time and not even crazy much memory but it takes off a lot of load from the database when you have to not use the API for some reason and this could be interesting in a high-load environment.
Thank you,
-alduin",alduinwf
Needs Patch,53859,Add a filter hook to modify the paginate links arguments,,Permalinks,,normal,normal,Awaiting Review,feature request,new,,2021-08-02T07:35:35Z,2023-05-24T05:51:19Z,"A filter hook to modify arguments in the function paginate_links()
https://developer.wordpress.org/reference/functions/paginate_links/
This filter hook can be added as below:
Current:
{{{
$args = wp_parse_args( $args, $defaults );
}}}
After:
{{{
$args = apply_filters( 'paginate_links_args', wp_parse_args( $args, $defaults ) );
}}}
",ibachal
Needs Patch,52835,Disable permalink for images,,Permalinks,5.7,normal,normal,Awaiting Review,feature request,new,,2021-03-17T14:02:01Z,2022-11-02T09:36:25Z,"Hello.
It would be nice if there is a option to disable the automatic permalink for uploaded images in mediathek.
I've the problem, that I upload an image named ""star"" in mediathek. After that I want to create a single page names ""star"" where the uploaded image goes to. But this is impossible, because the permalink www.demopage.com/star/ do already exist (from the image).
For all projects, I've created with WordPress, I do not need a short permalink for the uploaded images.
It also would be nice if there is a build in solution to save images in folders ;)
Thank's alot!",mariomd
Needs Patch,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
Needs Patch,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
Needs Patch,37160,Pingbacks fail on multi-page posts,,Pings/Trackbacks,,normal,normal,,defect (bug),new,,2016-06-23T18:48:37Z,2019-06-04T21:00:55Z,"Repro:
1. Publish a post to pingback in a subsequent post and assure that the site/post will allow pings.
2. Create a second post that has multiple pages with a reference to the post created in step 1 in one of the later pages (sample content below).
3. Publish the second post.
Expected: The pingback will register.
Actual: The pingback doesn't register. If you repeat steps 2 and 3 but move the link to the post created in 1 to the first page, the pingback works. Here's some sample content to demonstrate the issue:
{{{
Page One
Page Two
Page Three with pingback: http://pleasetest.me/2016/06/23/page-to-ping/
}}}
This fails because the pingback code checks the pinging post to confirm that the pung link exists in the content. Since the pung link displays on a subsequent page, it's not displayed on the un-paginated permalink. Thus when the pingback code fetches the pinging link, it doesn't find a link to itself in the content and it discards the pingback. But this is a valid use case and not an instance of spoofing (which I take it is what this check is designed to prevent).
I'm not sure if there's some parameter we could append to the url when we fetch to validate the link in context that might skip the pagination. If so, that might be the simplest fix. I suppose another fix might be to look for `verifying pingback` in the user agent (which is included in this validation request's UA) and skip pagination if found. That feels kind of brittle, though.",dllh
Needs Patch,56380,The pingback function does not work on internal or external links,,Pings/Trackbacks,6.0,normal,normal,Awaiting Review,defect (bug),assigned,,2022-08-15T15:21:44Z,2022-08-15T15:35:18Z,"Whenever I publish an article, I add some internal and external links, but there is no pingback for internal and external links.
I have published an article [https://freetestpractices.com/2022/08/15/short-essay-on-wordpress/] and added some external and internal links, but no pingback received (Internal link). I have also changed themes (Generatepress) and deactivated all the plugins. Unfortunately, it's still not working. How to get help in this matter, please help me.
",awdhesh19
Needs Patch,57363,WP <= 6.1.1 - Unauthenticated Blind SSRF via DNS Rebinding,,Pings/Trackbacks,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2022-12-20T23:25:00Z,2023-05-05T14:17:38Z,"Hi,
Is this issue going to be fixed? No one has really answered this in the forums.",edavis711
Needs Patch,49703,do_all_pings brings race back,,Pings/Trackbacks,5.4,normal,normal,Awaiting Review,defect (bug),new,,2020-03-26T02:54:21Z,2020-03-26T06:20:14Z,"In ticket #2088, the patch changes if condition to while loop to fix race condition, but the current version uses if condition again, which brings race problem back. The patch is from ticket #36824.",caseqiu
Needs Patch,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
Needs Patch,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
Needs Patch,52874,"Activating plugins on Install page randomly errors with ""The plugin does not have a valid header"" message.",,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2021-03-21T01:09:33Z,2021-03-22T22:10:18Z,"This seems to be something that has been occurring for some time without resolution in core.
Just started seeing a lot more reports of it recently for one of my plugins, which lead me to dig and see that it has been occurring in the same way to other plugins for years.
Issue: On Plugin Installer page, if you install and activate plugins it can show the following message: ""The plugin does not have a valid header"".
Most users get around it by going to the All Plugins page and activating without issue.
Plugin that currently seems affected include:
- Content Control
- [W3 Total Cache](https://www.pixelwars.org/forums/topic/the-plugin-does-not-have-a-valid-header/)
- [Zapier](https://wordpress.org/support/topic/the-plugin-does-not-have-a-valid-header-198/)
And some from the past few years with same issue:
- [Etsy Shop](https://wordpress.org/support/topic/the-plugin-does-not-have-a-valid-header-150/)
- [Jotform](https://www.jotform.com/answers/2975729-jotform-wp-plugin-plugin-does-not-have-a-valid-header-error)
That was only what I found on first page of google.",danieliser
Needs Patch,59288,Blocks API JSX Map in Save function does not rerender,,Plugins,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-09-05T18:39:00Z,2023-09-05T18:39:00Z,"Hi,
I am building a custom block, it is a hero slider.
In the parameters I am defining an attribute called slides which has an empty array as it's default value.
In the Edit function :
{{{
registerBlockType(""fa-gutenberg-blocks/fa-01-hero-slider"", {
edit: Edit,
save: Save,
});
}}}
It loads fine and I can create add new elements to it like so
{{{
const addSlide = () => {
const emptySlide = {
title: """",
description: """",
media: { url: """", id: null },
ctaLabel: """",
ctaURL: """",
backgroundColor: ""#CCC"",
};
const newCurrentSlide = slides.length;
setAttributes({
slides: [...slides, emptySlide],
});
setTimeout(() => {
setAttributes(
{
currentSlide: newCurrentSlide,
},
200
);
});
};
}}}
However in the Save function it does not load an empty array the attribute is undefined. To try and solve this I set the slides attribute to an empty array if undefined, as I added objects to the slides array they appeared in the Save function. I then called a array map method on the slides in the returned JSX in the save function which returned some html for each array item. When I loaded the the block on the actual page (not the edit screen) it did not render the mapped JSX html, but the attribute slides does contain the updated array.
To see the full code view the repo here : https://github.com/frankastin2023/fa-hero-slider
",frankastin2023
Needs Patch,36288,Bug Found when you update plugins...,,Plugins,4.4.2,normal,normal,,defect (bug),reopened,,2016-03-21T20:20:04Z,2019-06-04T20:55:53Z,If you leave the checkbox(s) when you go to update a plugin php errors appear and a success message appears but no plugins where updated... ,georgemou
Needs Patch,32041,Bulk updating selected Plugins with and without updates fails,,Plugins,4.1.1,normal,normal,,defect (bug),new,,2015-04-21T17:54:54Z,2019-06-04T20:49:39Z,"In WordPress 4.1.1 (and possibly some earlier releases of 4) there is a bug in the following scenario.
Your site has n+ plugins that need updated. You navigate to the general 'installed Plugins' page. You select ALL plugins (including those without updates) and go to Bulk Actions and select 'update'. In prior versions WordPress would only update the plugins in the selected list with updates. Currently it takes you to the updating screen and says it's finished without updating any plugins or listing any plugin updates in the updating screen.",gmariani405
Needs Patch,31515,Cannot enable plugins with protected function redeclarations (PHP Fatal Error),,Plugins,3.9.3,normal,normal,,defect (bug),new,,2015-03-03T18:48:17Z,2019-06-04T20:49:25Z,"I'm working on a codebase where the theme or plugins concurrently declare the same function inside a function_exists() however the original plugin defines the function without a function_exists check. In this situation, all the declarations can live together at runtime, but attempting to activate (or reactivate) the original plugin causes an error.
Since the plugin initialization sandbox occurs after wp is loaded, the other plugins (with their checks) will have filled the function, any additional function declarations will fail. However this is merely an artifact of the initialization system -- as this plugin is being artificially run much later than it will be regularly running.
A usecase -- perhaps you are trying to wean yourself off the Advanced Custom Fields plugin so you've implemented the get_field function in the theme's functions file in a function_exists check. After disabling the ACF plugin, you decided to reenable it to adjust a field. Game over, Fatal Error.",brokentone
Needs Patch,53395,Cannot use wp_is_mobile() in Network activated plugins,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2021-06-14T10:31:25Z,2021-06-14T21:56:30Z,"Steps to reproduce
- Create a network site
- Create and activate a simple custom plugin, use wp_is_mobile() function anywhere in that plugin
- Login to the network dashboard and then activate the plugin
You will see an error:
Uncaught Error: Call to undefined function wp_is_mobile()
Looking at the source code of wp_is_mobile(), I can't see anything that would prevent it from loading earlier. Maybe it should be loaded earlier?
",promz
Needs Patch,36704,Delete Plugin not compatible with Bulk Actions,,Plugins,4.5.1,normal,normal,,defect (bug),new,,2016-04-28T19:56:38Z,2019-06-04T20:58:09Z,"`delete_plugins()` has a `foreach` loop which calls `uninstall_plugin()` which defines a constant:
{{{
define('WP_UNINSTALL_PLUGIN', $file);
}}}
A constant cannot be defined twice. If several plugins are selected for bulk deletion and two of these have uninstall.php, only the first one will see the expected constant value. For example, Jetpack's uninstall.php dies immediately when the constant contains an unexpected value. This prevents the code at the end of `delete_plugins()` finishing the job for the plugins that were uninstalled and deleted. (Jetpack's uninstall.php isn't exactly doing it right, but it's a very real example.)
The obvious fix is to remove Delete from bulk actions on the Plugins page. This leaves the working parts in working order and buys time to rewrite the delete/uninstall API to work with a bulk delete function if this is desirable.
Part of the rework would involve rewriting `uninstall_plugin()` and the uninstall.php pattern so that it can return a `WP_Error` instead of dying. This way, `delete_plugins()` could continue without leaving the work of `delete_plugins()` incomplete for the plugins that were uninstalled.
I propose removing Delete from bulk plugin actions until the uninstall API is made compatible with bulk deletion.",andy
Needs Patch,18563,Disallowing editing of .php files in the plugin editor blocks access to allowable extensions,,Plugins,2.8,normal,normal,,defect (bug),new,,2011-09-01T04:12:29Z,2019-06-04T20:42:15Z,"By using the editable_extensions filter, a user can disallow the editing of php files (more accurately: files with a php extension...)
{{{
add_filter( 'editable_extensions', 'disallow_php_file_editing' );
function disallow_php_file_editing( $editable_extensions ) {
unset( $editable_extensions[0] );
return $editable_extensions;
}
}}}
However, the file selected when first clicking on the Editor link in the menu is always a php file, so the user is given the ""Files of this type are not editable"" wp_die() message without being presented with a chance to select a file with a different/allowable extension.",trepmal
Needs Patch,49731,Display embeds in WordPress plugin descriptions,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-31T03:05:52Z,2020-03-31T04:08:25Z,"The WordPress.org plugin directory [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php#L573 supports two shortcode embeds] (specifically `[youtube` and `[vimeo`) and [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php#L1401 several oembed locations].
Most of these embeds appear to return `iframe` elements, which are removed by Core, see [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/plugin-install.php#L533 $plugins_allowedtags].
For example, the Updraft Plus plugin has an embed on the WordPress.org site, but not within the WordPress Add new plugin screen.
If you have Jetpack installed, it appears that it converts the `iframe` into a shortcode and displays that instead.
This was originally reported as #meta2846, see that ticket for an example of the HTML that's stripped by this behaviour.",dd32
Needs Patch,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
Needs Patch,50554,Do not use iframe for plugin information dialog,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2020-07-03T22:38:07Z,2020-10-08T23:11:45Z,"When you click a plugin title in the Add Plugins page, the plugin information dialog displays inside an iframe. This causes a problem if your htaccess file has X-Frame-Options: DENY. A solution to this problem would be to not use an iframe for the dialog.",techboyg5
Needs Patch,53384,"External plugins who can auto-update are always listed under ""auto-updates"" disabled",,Plugins,5.7.2,normal,normal,Awaiting Review,defect (bug),new,,2021-06-11T13:57:21Z,2021-12-10T17:46:55Z,"On my site, I have four plugins who can auto-update yet in the plugin screen they are shown under ""auto-updates disabled"".
I think it would be better if those come under a list that has the name: ""external updating"" or something of that nature. OR a way for devs to tell WP their plugins can auto update so it doesn't appear on that list...?
In it's current implementation, it can give the wrong idea to a site admin. ",NekoJonez
Needs Patch,52443,Extra networkwide param in activate_plugin function,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2021-02-04T08:52:18Z,2021-02-04T08:52:18Z,"The issue is an extra $_GET parameter that is added in the `activate_plugin` function.
{{{#!php
may appear first. When the menu separator appears first in the menu, unwanted extra margin is created.
This issue occurs when the Dashboard menu item has been disabled, but could occur under other menu reorganizations and configurations.",monopine
Needs Patch,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
Needs Patch,60448,Iframe from `$errmsg` is now removed from error message in the plugins page,,Plugins,6.3,normal,normal,Awaiting Review,defect (bug),new,,2024-02-06T21:27:23Z,2024-02-14T06:08:56Z,"We have a `die` with a message in case of a plugin activation failure here: https://github.com/Automattic/sensei/blob/1933acc544be8a98866bec1b8790a5b195d5b4c7/sensei-lms.php#L65.
The message used to work until WordPress 6.3, and it stopped working.
I think it was broken with this change:
[https://github.com/WordPress/WordPress/commit/768f51f60c308a06492dcda163b80c1c3ff6ebb9#diff-2740240ae408614059218246dd59f4bea9590b6c3f78a2bba71b1afbf8315e7a changeset 56573, wp-admin/plugins.php]
The reason seems to be because the iframe is now concatenated in the `$errmsg` variable, which is sent to the `wp_admin_notice`, and later it goes through the `wp_kses_post`, being removed.",renathoc
Needs Patch,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
Needs Patch,33215,Main plugin file loaded multiple times under special circumstances on Network Activate,,Plugins,4.2.3,normal,normal,,defect (bug),new,,2015-07-31T10:06:02Z,2019-06-04T20:50:57Z,"Consider the following code in the main plugin file:
{{{
function test_plugin_install ( $network_wide = null ) {
if ( $network_wide ) {
trigger_error( 'Please activate individually.', E_USER_ERROR );
}
}
register_activation_hook( __FILE__, 'test_plugin_install' );
}}}
and a multisite setup with
* mysite.intern as main site
* one.mysite.intern, two.mysite.intern, etc. as blog sites
Now, if you first activate the plugin ''individually'' on mysite.intern, and then select ""Network Activate"", the following is logged:
{{{
PHP Fatal error: Please activate individually. in test_plugin.php on line 17
PHP Fatal error: Cannot redeclare test_plugin_install() (previously declared in test_plugin.php:15) in test_plugin.php on line 15
PHP Fatal error: Cannot redeclare test_plugin_install() (previously declared in test_plugin.php:15) in test_plugin.php on line 15
}}}
and only the last error is displayed on the admin page.
If the plugin is first activated on another blog site or isn't activated individually anywhere, only the expected ""Please activate individually"" error is thrown and displayed on network activation, as expected.
Wrapping the function test_plugin_install in a conditional only results in the next function in the plugin file triggering the redeclaration error.",ccprog
Needs Patch,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
Needs Patch,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
Needs Patch,59413,PHP Warning: Undefined property: stdClass::$plugin,,Plugins,6.3.1,normal,normal,Awaiting Review,defect (bug),new,,2023-09-20T17:17:32Z,2023-10-27T22:06:50Z,"Just checking php www-error.log and saw that there was this error:
PHP Warning: Undefined property: stdClass::$plugin in /var/www/html/my-website/wp-admin/includes/class-wp-automatic-updater.php on line 228
Site is working as usual but the log is full of these warnings.
PHP 8.0.27
Apache 2.4.37
WordPress 6.3.1",zerofoolcoder
Needs Patch,50349,"Plugin Update deletes plugin and showing ""could not delete old plugin"" message.",,Plugins,6.2,normal,normal,Awaiting Review,defect (bug),new,,2020-06-09T16:54:11Z,2023-04-21T14:06:08Z,"I just came across this on my local machine (Windows).
I had a plugin directory open in vscode editor. I had also previously edited one of the files in that plugin (added {{{error_log}}}s in one of the functions for testing). I may or may not have had same file open with further unsaved changes (I don't know at this point).
In the Plugins page I clicked the ""update now"" in the plugin row (directory was still open in vscode).
The update resolved with a ""Could not delete old plugin"" error notice. However the plugin was removed and directory is left empty.",apedog
Needs Patch,58214,Plugin authors should not be able to delete tags from SVN repository,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2023-04-28T00:14:26Z,2023-04-28T00:14:46Z,"On https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/#delete-old-versions it notes that plugin developers may choose to delete from the SVN repository old tagged versions. I think that allowing plugin authors to rewrite history of production releases is a bad thing for WordPress to allow, much less suggest in the docs. The reason is that you may be relying on those older versions in your WordPress installation so a clean build might break without warning. E.g., if you are using wpackagist for dependency managementd, this can happen: https://github.com/outlandishideas/wpackagist/issues/497 . Since tags represent actual production releases (per the first link) WordPress should not allow tags to be deleted from the repository (or any other history to be rewritten for that matter if that's a thing in SVN), going forward.",rkaiser0324
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,31184,"Plugin update API times out too easily in practice, and is not handled gracefully",,Plugins,4.1,normal,normal,,defect (bug),new,,2015-01-30T16:54:46Z,2019-06-04T20:48:57Z,"In wp_update_plugins() the timeout is set to ""Three seconds, plus one extra second for every 10 plugins"" when not doing a cron job. I did some testing (with reasonable bandwidth) and in practice I need about twice that to be safe. I realize you need to arbitrarily choose something, but the problem is that if timeouts do occur, there are unhandled warnings like
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums . (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /media/sf_shared/digipowers/www.digipowers.com/httpdocs/wp-includes/update.php on line 297
which doesn't alert you to the real problem, which is that api.wordpress.com took too long to resolve.
To repro this, clear your transients to force an update check, and then force the timeout in class-http.php:96 to something short like 1s:
{{{
/**
* Filter the timeout value for an HTTP request.
*
* @since 2.7.0
*
* @param int $timeout_value Time in seconds until a request times out.
* Default 5.
*/
'timeout' => 1, //apply_filters( 'http_request_timeout', 5 ),
}}}
Recommend you do 2 things:
1) increase the default timeout for the plugin check from say 5 to 10.
2) handle this condition more gracefully by stating what's wrong in this case, e.g., : ""WordPress could not connect to the API server to check for plugin updates; please try again later."". And needless to say, don't throw PHP warnings as they break the headers if you have error_reporting and display_errors set to be loud.
",rkaiser0324
Needs Patch,51467,Plugins API endpoint regex breaks javascript parsing.,,Plugins,5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-10-07T12:47:36Z,2021-07-28T13:40:02Z,"The plugin endpoint `/wp/v2/plugins/(?P[^.\/]+(?:\/[^.\/]+)?)` added in 5.5 breaks JavaScript parsing of the regular expression.
This can be tested by adding the following into the console:
`new RegExp(/^[^.\/]+(?:\/[^.\/]+$/);`
Which results in:
`VM90:1 Uncaught SyntaxError: Invalid regular expression: /^[^.\/]+(?:\/[^.\/]+$/: Unterminated group at :1:1`
One of the effects is that the node-wpapi library can no longer autodiscover WordPress endpoints: https://github.com/WP-API/node-wpapi/issues/476",nielsdeblaauw
Needs Patch,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
Needs Patch,36705,Read-only plugins are uninstalled before deletion fails,,Plugins,4.5.1,normal,normal,,defect (bug),new,,2016-04-28T20:06:04Z,2019-06-04T20:58:14Z,"Plugin uninstall happens before deletion is attempted. If the plugin's files are read-only, the plugins list action says ""Delete"" but all that happens is uninstall and an error.
Plugins that cannot be deleted because they are read-only in the filesystem should not have Delete buttons. `is_writable()` should be checked while constructing the actions. If read-only, either remove the button or replace it with an action which deletes the plugin's data and leaves the files. I prefer the latter.",andy
Needs Patch,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
Changes Requested,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
Needs Patch,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
Needs Patch,37395,"Transients should be replaced with options, e.g. plugin delete notification",,Plugins,,normal,normal,,defect (bug),new,,2016-07-18T12:04:04Z,2019-06-04T21:01:46Z,"Transient data is not guaranteed. Even in the shortest possible duration, on a page redirect! In `wp-admin/plugins.php` :
{{{
set_transient('plugins_delete_result_' . $user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length
wp_redirect( self_admin_url(""plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s"") );
}}}
Now a delete notification is not critical, but it would be just as easy to do this with `set/get/delete_option()`, and set a good example for plugin authors. The retrieval step does an immediate delete:
{{{
$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
delete_transient( 'plugins_delete_result_' . $user_ID );
}}}
So it looks easy to write a patch substituting `set/get/delete_option()`, modulo multi-site perhaps.
I expected to see more of these in the WP codebase related to notifications, but it's mainly other stuff. About half the use of transients in WP is wrong. I'll list them here for future bugs, but I leave this bug for the Plugins component.
* GOOD: wp-admin/includes/dashboard.php ( $cache_key, 'plugin_slugs' )
* BAD: wp-admin/includes/template.php ( 'settings_errors' )
* GOOD: wp-admin/includes/theme-install.php ( 'wporg_theme_feature_list' )
* BAD: wp-admin/plugins.php ( see above: 'plugins_delete_result_' . $user_ID )
* ALL GOOD: wp-content/themes/*
* PROB. BAD: wp-trunk/wp-cron.php AND wp-includes/cron.php ( 'doing_cron' ). Using it as a file lock is either egregious or just confusing, depending on whether it is doubling as a global store for the same run. Why not use `*_option()` instead?
* GOOD: wp-includes/author-template.php ( 'is_multi_author' )
* PROB. BAD: wp-includes/class-feed.php ( $this->name, $this->mod_name )
* PROB. BAD: wp-includes/media.php ( $regeneration_lock ). Bad if it's to protect successive ajax calls, confusing if it's a global store for the same run.
* GOOD: wp-includes/ms-functions.php ( 'dirsize_cache' )
* BAD: wp-includes/pluggable.php ( 'random_seed' )
* GOOD: wp-includes/rss.php ( $cache_option )
* BAD: wp-mail.php ( 'mailserver_last_checked' )
You were expecting a Clint Eastwood reference?
Should all be easy fixes.
",kitchin
Needs Patch,60318,Update URI: false - sometimes not working,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-22T14:21:01Z,2024-01-22T14:21:01Z,"I've recently copied and modified a small plugin from wp-org for my own need.
I've set the {{{Update URI: false}}} header. However on the Plugins page, the View Details link still leads to the original plugin and the Enable/Disable auto-updates button link is present.
I've changed the main plugin file name to something else, but not the directory name, however the View Details link is still present.
I've removed the {{{readme.txt}}} file and that seems to do the trick.
To test this, I've then tried restoring the {{{readme.txt}}} file, removed the {{{Update URI: false}}} header and renamed the plugin file to its original wp-org name. The View Details link was NOT restored.
However, changing the plugin file name to something new again DID restore the View Details link. The experience has been very inconsistent throughout.
I'm running a LocalWP installation on Windows 10.
WordPress 6.4.2
PHP 8.2
VSCode editor.
This is not a long-term problem for me as I intend to rename the plugin file AND directory name, but thought I'd report this bug for the record.",apedog
Needs Patch,49901,Updating plugins error messages for multiple plugins that error,,Plugins,5.4,normal,normal,Awaiting Review,defect (bug),new,,2020-04-14T02:05:08Z,2020-04-14T06:46:37Z,"When updating plugins and more than 1 plugin causes an error the first error displays ok, but subsequent errors don't show correctly. They show the first plugin's error message not their own.
When I update both plugins separately they both show the correct error message.
When I update both plugins together, the first is correct but the second shows the same error message as 1st even its name....
",scole01
Needs Patch,45853,Videos embedded in a plugins readme.txt does not load while searching for a plugin in an actual WP install (not wp.org),,Plugins,5.0.2,normal,normal,Awaiting Review,defect (bug),new,,2019-01-07T16:06:38Z,2022-03-07T15:37:45Z,"If you embed a video within your plugins readme.txt file it only shows the video on the wp.org website, videos do not load when you're searching for a plugin via an actual WordPress install. In addition, if you install a plugin and click on ""View Details"" to learn more about the plugin, the video also does not load here either. Inspect element shows an empty span tag:
{{{
}}}
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
Needs Patch,32602,View Details links for plugins on individual sites on a Multisite Network use the network admin URL,,Plugins,4.0,normal,normal,,defect (bug),new,,2015-06-09T21:05:31Z,2019-06-04T20:50:34Z,"To duplicate, make sure you allow the plugins.php page to show on subites. Have (at least) one plugin that is ''not'' network activate and go to an individual site's plugin.php page.
The URL for ""View details"" will be for the network admin, not the site. With WP installed at example.com:
example.com/subsite/wp-admin/plugins.php links to example.com/wp-admin...
subsite.example.com/wp-admin/plugins.php links to example.com/wp-admin...
mappeddomain.com/wp-admin/plugins.php links to example.com/wp-admin...
This is problematic when you have admin over HTTPS and the cross-site-scripting sanity check stops the view-details page from loading.
`/wp-admin/includes/class-wp-plugins-list-table.php` line 628 has `network_admin_url()` in there, which is why it's defaulting to the network domain.
https://core.trac.wordpress.org/ticket/17902#comment:31 and https://core.trac.wordpress.org/changeset/29595 appear to be where this issue stems from.
To quote @jjj ""It probably just needs a series of `is_multisite()` and `is_plugin_active_for_network()` checks.""
The URL should probably just default to whatever the URL of the current site is, to prevent cross-site shenanigans.",Ipstenu
Needs Patch,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
Needs Patch,49656,WP_Plugins_List_Table: redirects on core row actions when the current view is a custom view,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-16T18:49:55Z,2020-03-16T18:49:55Z,"`WP_Plugins_List_Table::__construct()` sets a global variable to the current value of the `plugin_status` query arg. That global is used in the URLs of the row action links ('activate', 'deactivate', etc) core adds, so that when a user clicks any of those links the user is returned to same view they were on.
Like all good list tables, `WP_Plugins_List_Table` allows custom views to be added (with the `views_plugins` and `views_plugins-network` filters).
The problem is that the list table constructor sets the global variable to 'all' if `plugin_status` query arg is for a custom one.
Hence, when the current view is a custom view, then the core row actions take the user back to 'all', which is a bad UX in that he behavior of core's row actions is different depending on whether the current view is built-in to core or is custom.
This came up recently in [https://github.com/audrasjb/wp-autoupdates/issues/49#issuecomment-599068276 an issue] opened against the [https://wordpress.org/plugins/wp-autoupdates/ WordPress Auto-updates] Feature plugin.
That specific issue will resolve itself when the feature plugin is merged in core because the `plugin_status` for the 2 views it adds will be added to the whitelist in the constructor. But the problem will still exist for any other plugins that add custom views to that list table.
`WP_MS_Themes_List_Table::__construct()` also sets a global that is whitelisted to the statuses that core knows about. However, that is not a problem because it doesn't use that global to add a query arg to the row action links: the redirects on the row actions are handled differently.
I think the easiest way to address this would be modify `WP_Plugins_List_Table` (and `wp-admin/plugins.php`) to handle the redirects on core row actions actions the same way that `WP_MS_Themes_List_Table` does.",pbiron
Needs Patch,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
Needs Patch,51381,ZIP replacement asks to network activate even when activated,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2020-09-23T15:12:09Z,2021-02-01T17:05:49Z,"If you replace the zip of a network activated plugin in a multisite install, it will give you the ""Network Activate"" button, which is confusing.",stormrockwell
Needs Patch,47882,[Plugins][Add new]: Can't install plugin from More details pop-up,,Plugins,5.2.2,normal,normal,Awaiting Review,defect (bug),new,,2019-08-15T08:39:51Z,2019-08-16T10:40:15Z,"1. Go to http://something/wordpress/wp-admin/plugin-install.php
2. Chose a plugin and click on More details.
3. Click on Install Now.
Current: The button is depressed, but nothing happens.
Expected: The plugin should be installed and the pop-up should disappear.
Chrome Version 76.0.3809.100 (Official Build) (64-bit)",daniela1104
Needs Patch,47438,"do_action will convert ""single array object"" as ""object""",,Plugins,5.1.1,normal,normal,Awaiting Review,defect (bug),new,,2019-05-30T19:42:28Z,2019-10-21T14:53:03Z,"
{{{
/* Correct if $object is not object*/
$orders = array();
$orders[] = 'abc';
do_action( 'action123', $orders);
add_action('action123', 'func123');
function func123($orders){
//$orders will be array here (CORRECT)
}
/* BUG: if $orders is an object */
$orders = array();
$orders[]=new stdClass();
$orders->name='Order1';
do_action( 'action123', $orders);
add_action('action123', 'func123');
function func123($orders){
//$orders will be non-array here (BUG?)
}
}}}
Note:
This will run correctly if $orders[] is not object ",erikdemarco
Needs Patch,60373,plugin activation errors are accidentally hidden,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-29T15:25:08Z,2024-01-29T15:25:08Z,"in recent versions (can't tell exactly when) seems the admin_notice messages were being filtered by wp_kses_post, which caused breaking changes, which contradicts WP core itself.
to reproduce, add this to plugin:
{{{#!php
register_activation_hook(__FILE__, function($x){ die('plugin can not activate, because XYZ'); } );
}}}
then try to activate. it will show admin notice `Plugin could not be activated because it triggered a fatal error` and nothing more. however, it should have shown that XYZ message inside iframe, you can confirm that by looking :
https://core.trac.wordpress.org/browser/tags/6.4.2/src/wp-admin/plugins.php#L685
(if you do `var_dump($errmsg)` before that `wp_admin_notice` line, you will see that iframe part is also included in `$errmsg`)
however, inside `wp_admin_notice` there is `wp_kses_post` which filters out the `iframe` that was added by core itself:
https://core.trac.wordpress.org/browser/tags/6.4.2/src/wp-includes/functions.php#L8891
so, that is contradiction in WP, and should be solved either way. I understand that stripping `iframe` might have been a security step, however, it was done incorrectly. that wp_kses_post should allow iframe, but itself the XYZ message itself (coming from plugin's activation) should be filtered, so that would achieve the security goal.
at this moment, that change/misbehavior (which we noticed too late) have broken dozens of our plugins on wp.org. please fix it.",ttodua
Needs Patch,28727,plugin editor content empty when source contains an invalid character,,Plugins,3.9.1,normal,normal,,defect (bug),new,,2014-07-03T11:39:43Z,2019-06-04T20:47:22Z,"I happened to create a plugin source file which contained a pound sterling character (£) copied and pasted from a web page, and which therefore appeared in my Windows text editor as lower case u acute ( hex A3, ascii 163 ).
esc_textarea() makes a call to htmlspecialchars() which returns a null value for safe text.
{{{
$safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
}}}
Note: blog_charset is UTF-8
So the plugin editor displayed nothing at all for the source.
Question: Is this really the expected behaviour?
The documentation for htmlspecialchars says
If the input string contains an invalid code unit sequence within the given encoding an empty string will be returned, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set.
Shouldn't the plugin editor pass ENT_IGNORE OR otherwise issue a message to the user at least advising not to save the empty file when the safe content is nothing like the original.
",bobbingwide
Needs Patch,25648,plugin.php causes infinite loop and gigabytes of warning messages in error logs,,Plugins,3.6.1,normal,normal,,defect (bug),reopened,,2013-10-21T12:12:22Z,2019-06-04T20:45:02Z,"We host several wordpress instances in a multi-user environment on our servers. Some installations cause regulary massive error log files with warnings like these:
PHP Warning: next() expects parameter 1 to be array, boolean given in [...]/html/wordpress/wp-includes/plugin.php on line 408
PHP Warning: current() expects parameter 1 to be array, boolean given in [...]/html/wordpress/wp-includes/plugin.php on line 404
After some googling I found out, that this behaviour is known for more than 10 month. So, if you could fix that, that'd be great.",ticktoo
Needs Patch,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
Needs Patch,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
Needs Patch,45779,probable issue in Plugin activation hook,,Plugins,,normal,normal,Awaiting Review,defect (bug),new,,2018-12-27T13:38:13Z,2019-01-07T00:17:08Z,"i.e. if we have a simplest plugin:
{{{
(%s) ';
break;
}
}}}
Now please test in WP 6.3.x, using this:
{{{#!php
...
'accepted_args' => ...
'runs' => [
[ 'start' => ..., 'duration' => ... ],
[ 'start' => ..., 'duration' => ... ],
[ 'start' => ..., 'duration' => ... ],
]
]
}}}
Main concern would be resource cost, with sites possibly calling tens of thousands of hooks. I think resource overhead should be reasonable with only adding two floats to array and no complex calls or calculations. This can be tested and profiled on a proof of concept implementation.
The possible mitigation to runtime costs can be making the feature opt–in with flag analogous to `SAVEQUERIES`, for example `SAVE_HOOK_TIME`.
The possible mitigation to memory costs can be implementing cut off limit to amount of timings stored, e.g. start discarding old records when a certain limit of X records is reached for a callback.
If there is agreement on feasibility I will work on a patch.",Rarst
Needs Patch,37143,Missing Screen options tab in Add New plugin screen,,Plugins,,normal,normal,,enhancement,new,,2016-06-21T22:29:07Z,2019-06-04T21:00:36Z,"Hey
It would be great to have Screen Options tab for Add New Plugin screen. With the option to select amount of plugins to view on each page.
Having one very long add new plugin screen is preferable then to having 5-6 pages to have to jump through. Adding the Screen Options tab would really help.",paaljoachim
Needs Patch,55449,"More filter options for searching theme's & plugins - ""Last updated"" / ""Test with my WP version"".",,Plugins,,normal,normal,Awaiting Review,enhancement,new,,2022-03-23T11:30:36Z,2022-03-23T11:30:36Z,"When I'm looking in WP to install a new theme/plugin I find it quite annoying that I'm unable to filter my search results a bit more.
When I'm looking for a new plugin for a certain goal, I would love to filter on two things.
1) If the plugin is tested or not (and working) on my current WP version.
2) If the plugin got a recent update. (Maybe this might be a setting the user can choose. Since, for some is recent 1 year and for others it's 1 month.)
I think these filter options, with maybe checkmarks ...? could fit nicely on where I placed green in the attached screenshot.
",NekoJonez
Needs Patch,39414,New param in plugin_dir_path,,Plugins,,normal,normal,Awaiting Review,enhancement,new,,2016-12-28T09:02:45Z,2019-03-15T01:17:40Z,"New param - `path`. Function with this param return full path to file. Examples:
{{{#!php
Upload -> Replace existing, the registered activation hook function appears not to be called.
This may lead to unwanted behaviour when the activation function calls dbDelta().
The request is to run the activation hook function in this case, making this way to install a dfifferent version functionally equivalent to the regular update procedure.",opajaap
Needs Patch,40156,Warning for invalid hook callback is not very useful,,Plugins,0.71,normal,normal,Awaiting Review,enhancement,new,,2017-03-14T23:07:39Z,2017-03-15T08:38:54Z,"If you add a hook with an uncallable callback, an error like `Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'not_a_function' not found or invalid function name in` is shown.
This is technically correct, but not useful. When I say useful, I don't think it is useful to the following user profiles:
1) Non-technical user seeing errors. A non-developer might no what a WordPress hook is, but not how it works internally. Therefore they are not likely to understand this error is related to a hook. They are not given good information, and might be missing a clue as to who to ask for support (plugin or theme developer, host, etc.)
2) New developer. A developer new to WordPress might not understand yet what a hook is or that a missing callback generates this type of error. A more clear error will help guide their googling for the error and/ or help them find the issue in the code.
3) Experienced WordPress developer. When I see this error, I assume there is a non-callabale hook callback. But `call_user_func()` has other uses so it might be misleading to me.
I think it would be way more helpful if the error triggered was something like `Hook $hook_name could not call $callback` or `The callback function $hook, registered for $hook_name is not callabale`
",Shelob9
Needs Patch,53385,"When adding a plugin/theme via ""add new plugin/theme"" it should show if the plugin/theme is translated or not",,Plugins,5.7.2,normal,normal,Awaiting Review,enhancement,new,,2021-06-11T14:08:02Z,2021-09-27T14:18:56Z,"When you add a new plugin via the plugin menu and click on ""Add new plugin"" it should show if that plugin is translated to the site language.
Eg: show the flag or something of that nature with a checkmark or a cross...?
Of course, you could argue that if the explanation/plugin name is translated the translation is ""done"" but as a polygot for nl_BE and nl_NL myself, I can say that isn't the case. Since we have a TON of plugins where the readme isn't translated and even visa versa. ",NekoJonez
Needs Patch,39772,add ajax functionality to switching tabs and pagination in plugins,,Plugins,4.8,normal,normal,Awaiting Review,enhancement,new,,2017-02-02T22:06:48Z,2017-02-02T22:06:48Z,"Since we have the cool ajax search plugin functionality, maybe we add the ajax for the tabs on the add plugin page as same as with the pagination of the results.",m1tk00
Needs Patch,36686,plugin_row_meta hook for specific plugin,,Plugins,4.5.1,normal,normal,,enhancement,new,,2016-04-27T13:39:15Z,2019-06-04T20:57:51Z,"Hello WordPressers,
It is my first post here. So please forgive me if something is wrong.
What I see here https://core.trac.wordpress.org/browser/tags/4.5.1/src/wp-admin/includes/class-wp-plugins-list-table.php#L773 plugin_row_meta is a filter hook available but It is not available for specific plugin like we have ""plugin_action_links_{$plugin_file}"" available here https://core.trac.wordpress.org/browser/tags/4.5.1/src/wp-admin/includes/class-wp-plugins-list-table.php#L682
Shouldn't there be a ""plugin_row_meta_{$plugin_file}"" filter to call on specific plugins ??
",hiddenpearls
Needs Patch,50560,"show ""recently deleted"" plugins - a safer option than ""inactive plugins""",,Plugins,,normal,normal,Awaiting Review,enhancement,new,,2020-07-04T17:58:54Z,2020-07-07T15:28:57Z,"== **The REQUEST:**
**Please show recently removed plugins within /wp-admin/plugins.php**
== **The STORY:**
You may notice the title is unfamiliar to you because such a thing does NOT exist within wordpress.
One of the reasons why people like me **do NOT remove inactive plugins** is because there is no way to remember the plugin once deleted.
So i keep it.
Now, even ""Site Health Status"" shows **""remove inactive plugins"" for security reasons**.
[[Image(https://i.imgur.com/TuF1roA.jpg)]]
If i do that, i will have to **take notes manually** and links of that awesome file manager or image compressor plugin i found and want to keep.
Wordpress does NOT show the plugins that were used in the past (deleted).
Now, **if wordpress WOULD show**, i would not have to keep it inactive in order to ""keep"" it to remember, because i might not use the plugin all the time, such as a file manager or image compressor plugin, hence the reason for inactivation because they are seldomly used, BUT if i delete it, i would have to go on a search to find it again.
== **The SOLUTION:**
(Here is a way how wordpress would make it more delightful for users to delete inactive plugins)..
Simply show the recently removed plugins with the **NAME** and **URL** to the plugin itself as a simple line within **/wp-admin/plugins.php** somewhere.
[[Image(https://i.imgur.com/rviZF3w.jpg)]]
This way i will gladly delete the plugin right away and not keep it inactive, the settings of the plugin is obviously an entire different story.",mikulabc
Needs Patch,52048,the functions activate_plugin and deactivate_plugin need validation,,Plugins,3.0,normal,normal,Awaiting Review,enhancement,assigned,,2020-12-12T18:00:07Z,2020-12-30T22:25:02Z,"The function activate_plugin https://core.trac.wordpress.org/browser/tags/5.6/src/wp-admin/includes/plugin.php#L633 would need the validation of the array of plugins before saving it.
For normal installations, the current plugins are taken by
$current = get_option( 'active_plugins', array() );
For multisites they are taken by:
get_site_option( 'active_sitewide_plugins', array() );
Both the result of get_option( 'active_plugins', array() ) and get_site_option( 'active_sitewide_plugins', array() ) can be filtered by plugins, so you can't know if $current is a valid array of plugins.
At least, $current should be unique, so I would add
$current = array_unique( $current );
Then I would also check if the plugin files exist before saving the array of active plugins.
I would do the same validation for the function deactivate_plugins https://core.trac.wordpress.org/browser/tags/5.6/src/wp-admin/includes/plugin.php#L633",giuse
Needs Patch,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
Needs Patch,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
Needs Patch,48486,Add compliance tab to plugin repository pages on WordPress.org,,Plugins,5.3,normal,normal,Awaiting Review,feature request,new,,2019-11-03T18:46:36Z,2022-01-14T16:01:25Z,"== Overview
""Compliance tab"" is a working title that can be amended to be less intimidating and/or more generalized.
The benefit of this tab is to provide WordPress site owners who are researching plugins with privacy, accessibility, and other information to determine if this plugin will meet their site needs prior to installation and activation.
Ideally, this information can also be used in search and filter scenarios on WordPress.org to find tools compatible with the needs of site owners.
== Privacy
A privacy statement could include testing done against specific regulatory standards, and a statement of where data is transferred and stored at rest. It should also include any statements that need to be added to a site owner's privacy policy as part of using this plugin.
This could potentially leverage the privacy policy post box information currently available under ''Settings > Privacy'', added in WordPress 4.9.6.
== Accessibility
An accessibility statement could include the WCAG level that the plugin targets (A, AA, etc) and where to file any issues found.
== Security
A security statement should include code standards followed, measures taken, and who to contact if you find a vulnerability.
== Certifications
Any certifications that this plugin has undergone for compliance.",katwhite
Needs Patch,44073,Add functionality to search plugin with double quoted keyword,,Plugins,,normal,normal,Awaiting Review,feature request,new,,2018-05-14T14:22:42Z,2018-05-23T14:24:28Z,"Is this possible to add a feature where plugins could be searched on `Add New Plugin` page either with:
- More than one keyword wrapped inside double quotes. Example: ""my plugin""
OR
- Add a filter like **Match Whole Phrase** (in existing filter dropdown)
In either case, it would be much easier to locate the desired plugin as the result will become more filtered and less items would appear on screen. This can avoid scrolling through ""relevant results"".",subrataemfluence
Needs Patch,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
Needs Patch,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
Needs Patch,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@…
Needs Patch,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
Needs Patch,49626,Allow plugin developers to opt-out their plugin from auto updates,,Plugins,,normal,normal,Awaiting Review,feature request,new,,2020-03-12T01:36:43Z,2020-07-06T12:56:31Z,"I would like to request a filter for plugin developers to be able to opt their plugin out from the automatic updates completely.
For example in {{{wp_autoupdates_add_plugins_autoupdates_column_content}}} we could add something like
{{{#!php
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
Needs Patch,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
The Plugin Block Directory is a new feature coming in WordPress 5.5 that allows specially-written Block Plugins to be instantly and seamlessly installed in the editor, without ever leaving the page.
-- https://make.wordpress.org/plugins/2020/07/11/you-can-now-add-your-own-plugins-to-the-block-directory/
WordPress 5.5 will make it easier for folks to install block plugins, as they edit their posts and pages. As a result, and as the block directory becomes more and more popular, I assume the average number of plugins installed on a WordPress site will increase. On the Plugins screen UI we know, we'll see a mix of ""regular"" plugins as well as block plugins.
I wonder if we should consider making some changes to the Plugins Screen UI to clearly separate the 2 plugin types.
- This would help site owners quickly skim through their plugin list.
- It would help them understand how a specific plugin was added to the site.
- It may help them manage their plugin autoupdates (one could imagine a scenario where you'd want block plugins, including little PHP, to be automatically updated while ""regular"" plugins would require a manual update).",jeherve
Needs Patch,40651,Plugins: Make it easier to find plugin settings after install,,Plugins,,normal,normal,Awaiting Review,feature request,new,,2017-05-03T18:24:19Z,2017-05-04T14:01:14Z,"After installing new plugins, I invariably end up spending time hunting down wherever I need to configure or use it. Some plugins add a ""Settings"" link to their plugin card (very useful!) but this isn't always the case. It would be great to find a way to direct people to the settings screens upon activation. ",melchoyce
Needs Patch,48190,Show information from Plugins Directory into WP-Admin plugins page,,Plugins,,normal,normal,Awaiting Review,feature request,new,,2019-10-01T08:33:45Z,2019-10-04T08:51:39Z,"Hello everyone,
This is my first ticket/suggestion here.
First of all, hope this is not a duplicate request.
Recently one of the websites my company has been maintained got hacked:
https://www.wordfence.com/blog/2019/09/rich-reviews-plugin-vulnerability-exploited-in-the-wild/
Issue was on the Rich Review plugin.
The root cause of the problem was that we had installed on that website (was a theme requirement) the Rich Review plugins. We kept up to date all the plugins, WP core itself and themes on that websites and still the website got hacked.
The general guideline to keep your WordPress website safe is update everything. In this case though it failed.
It failed because we did not know that the Rich Review plugin was abandoned.
On plugin directory it clearly tells that the plugin has been closed for security reasons:
https://wordpress.org/plugins/rich-reviews/
So my question, request is, can it be made that we show this kind of information right away on the plugins list?
To improve it even further, show a WordPress notice on wp-admin when an administrater logins and he can directly see that plugin X has been abandoned or has been closed.
Thank you,
Arber.",arberbr
Needs Patch,42981,Sorting plugins and themes,,Plugins,4.9.1,normal,normal,Awaiting Review,feature request,new,,2017-12-26T09:09:56Z,2019-04-02T18:51:39Z,"PLEASE - Sort themes and plugins into :
Premium
Fremium / Cripple ware
Free and fully functional
Not as described in the image (Pretty picture, preview looks nothing like it = Hours of work to make it look like the demo. I'd write a theme if I wanted the work)
Anything not updated in the last 12 months - ""Abandoned"" pile, not visible
Anything with ratings - Sort by rating - Under 3 - not visible
Not tested on latest WP version - not visible
Not tested on PhP 7 - not visible
Speed test rating - Google wants a 2 second load time for mobile. Let's have an apples for apples rating. 5 pages, 10 images, 1000 words and (say) Yoast, Wordfence, WooCommerce and 4 other common plugins.
I am sick to death of wasting hours on sifting this garbage - Make these 'Filters' and help everybody.
You tell us to update things for security reasons and some of us professionals do that.
Client sees a pretty picture then it turns into a nightmare for the above reasons and who has to fix it for free or spend hours looking for a replacement?
The login Username should not be the default Editor name. You've handed a hacker half the login.
Security - Set permissions to prevent malware spreading - in 2017, one client had malware uploaded to his site and it spread to all other sites and within site folders. WordPress should be containerised by default and SQL / Updates / changes should require 2 factor authentication to update anything (Just a 'secret password')
Yes, I know, experts can fix this. In reality, most people do not have the skills. I buy a tool and assume the manufacturer has designed it for Joe Public to use with inbuilt basic safety.
Last suggestion - A fork of WP for eCom with included carts, security etc. Google wants fast loading and WP struggles, so fork it to optimised versions :
Blogs
eCom
Membership
Versatile - Current version (as is)
and the revolutionary version - Offline. This is where the site is built offline and uploaded as a stripped down html5 flat file database version that is a speed demon static site. Lauyan.com looks promising.
Regards",grumblenz
Needs Patch,41646,activate.php and deactivate.php for Plugins,,Plugins,4.8.1,normal,normal,Awaiting Review,feature request,new,,2017-08-15T15:01:12Z,2017-08-15T18:21:58Z,"There's currently a file for `uninstall.php` to simplify things. Alternatively, there's also a hook available.
There's hooks for plugin activation and deactivation. However, I think those hooks can be a bit tricky for newbie plugin developers.
I think by implementing a file for `activate.php` and `deactivate.php` could simply plugin development.
I'm totally fine using hooks for my own sake, but I just thought it could help simplify plugin development slightly. It might also make things easier on the code review team?",michael.ecklund
Needs Patch,34670,Default Post Format option lists formats that are not available in the theme,,Post Formats,4.3.1,normal,normal,Awaiting Review,defect (bug),reopened,close,2015-11-12T18:35:08Z,2021-06-16T22:30:02Z,"The problem happens when you set a post format that it's not available on the theme. It actually happened with the Canard theme, that doesn't allow Video post formats. Below is the steps to reproduce:
1) Select the Canard theme
2) On Settings > 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
Needs Patch,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
Needs Patch,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
Needs Patch,47675,No way to select Standard post format in Formats filter,,Post Formats,5.2,normal,normal,Awaiting Review,defect (bug),new,,2019-07-10T17:04:09Z,2019-07-10T17:04:09Z,"Background: #35497, #46591, #47359.
[45136] removed post format icons from the posts list table.
For some users, as noted in comment:52:ticket:35497, these icons were a convenient way to quickly distinguish posts with a format from standard posts.
Use case: when most of the posts have a non-standard format, you'd like check if there are any posts where you accidentally forgot to assign a format.
Even with the new Formats filter introduced in [44961], that's no longer possible, as it does not have a Standard option. This seems a bit inconsistent with the Categories filter, where you can filter by Uncategorized.
Brought up by @dimalash on support forums.",SergeyBiryukov
Needs Patch,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
Needs Patch,59093,WordPress 6.3 and Featured Image Resize Problem,,Post Formats,,normal,normal,Awaiting Review,defect (bug),new,,2023-08-13T12:59:49Z,2023-08-13T13:06:08Z,"Hello,
After installing WordPress 6.3, we realized that we have an important problem. The images we upload as Featured are cropping.This can seriously affect our site traffic. How can we prevent this from happening? Our featured images are all high resolution, but they appear as 1200px in Google results.
We have been using add_filter( 'big_image_size_threshold', '__return_false' ); since day one. Also in media settings all resolution values are set to 0px. But despite this, after WP 6.3, all our images started to be indexed as 1200px.
An image that is normally 3000px is now indexed at 1200px: https://ibb.co/YyrRKwV
",ungowp
Needs Patch,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
Needs Patch,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
Needs Patch,30172,Request: Filter for get_post_format,,Post Formats,4.0,normal,normal,,enhancement,new,,2014-10-29T15:43:33Z,2019-06-04T20:47:52Z,"Would it make sense to create a filter in get_post_format()? Then instead of having to write this a few times (in each template)
{{{
$format = get_post_format();
if ( false === $format ) {
$format = 'standard';
}
}}}
there could be just one filter in the functions file that does return 'standard' when false is returned:
{{{
// Apply filter
add_filter('post_format', 'my_filter');
function my_filter($format) {
if ( false === $format ) {
$format = 'standard';
}
return $format;
}
}}}
Or something along those lines.....
Just an idea,
Sascha",landwire
Needs Patch,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
Needs Patch,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
Needs Patch,45688,admin_post_thumbnail_html filter no longer works in WordPress > 5.0,,Post Thumbnails,5.0,normal,normal,Awaiting Review,defect (bug),new,,2018-12-18T15:35:21Z,2018-12-18T15:41:12Z,"Hello,
It seems the admin_post_thumbnail_html filter not longer working in latest WordPress ?",nik00726
Needs Patch,36996,get_the_post_thumbnail and the usage of class attribute,,Post Thumbnails,2.9,normal,normal,,defect (bug),new,,2016-06-02T05:08:46Z,2019-06-04T20:59:46Z,"Hi, I noticed that if I use class attribute, it overrides some of the standard classes. So in my example I use header image of custom size:
{{{#!php
ID, 'custom-header-image-large', array(
'id' => 'featured-image',
'itemprop' => 'image',
) );
}}}
In this case WP generates these classes for the header image:
attachment-custom-header-image-large size-custom-header-image-large wp-post-image
If I add attribute `'class' => 'photo u-photo',`
{{{#!php
ID, 'custom-header-image-large', array(
'class' => 'photo u-photo'
'id' => 'featured-image',
'itemprop' => 'image',
) );
}}}
WP skips some classes and final class list produces only:
photo u-photo wp-post-image
Is it by design, or a possible bug?
Thank you!",TomasM
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,55024,"In wp-admin, show thumbnail of featured image",,Post Thumbnails,,normal,normal,Awaiting Review,enhancement,new,,2022-02-01T11:39:26Z,2022-02-01T11:39:26Z,"Currently on wordpress.com in wp-admin in the area of posts and pages, the thumbnail of the featured image is shown if the option for this effect is selected.
This is a feature that would be useful to be present on wordpress.org without the need to install plugins.
",ricjcs
Needs Patch,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
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
Needs Patch,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
Needs Patch,48954,"""Sticky"" post state shows even for non-Post post-types",,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-12-12T21:54:48Z,2019-12-12T22:15:24Z,"Reported in the support forums: https://wordpress.org/support/topic/sticky-tag-remains/
When users of my Post Type Switcher plugin switch a Post into a Page, that page still shows as ""Sticky"" in the Pages list-table UI, even though Pages do not support the ""sticky"" functionality.",johnjamesjacoby
Needs Patch,18701,"""hierarchical"" argument for get_pages() does nothing",DrewAPicture*,"Posts, Post Types",3.0,normal,normal,,defect (bug),accepted,,2011-09-19T06:48:32Z,2019-06-04T20:42:19Z,"The `hierarchical` argument for `get_pages()` is never actually used. It is in an `if` statement, but one that requires `child_of` to also be set:
{{{
if ( $child_of || $hierarchical )
$pages = & get_page_children($child_of, $pages);
}}}
Props Vynce Montgomery for pointing this out to me.",Viper007Bond
Needs Patch,31331,$post->post_date displays current time if status is pending or draft,,"Posts, Post Types",4.1,normal,normal,,defect (bug),new,,2015-02-14T17:11:45Z,2019-06-04T20:49:15Z,"Create a new post and save as a draft or save as 'pending'. On single.php enter these lines of code:
{{{
global $post;
var_dump(date(""Y-m-d H:i:s"")); //current time
var_dump($post);
}}}
If you wait about 5 minutes to refresh the front-end page after saving the post as draft/pending, you'll notice that the current time and the $post->post_date are the same (accounting for timezone differences). Further more, if you refresh the page after another 5 minutes, the $post->post_date will change. However, the $post->post_date and $post->post_modified are different. When comparing to the database values, the $post->post_modified matches its database value, but $post->post_date will continue to match the current time and '''not''' what is in the database for `post_date`.
It seems to me that the post object should reflect what is in the database regardless of the post_status. If a post is draft/pending, it is inconsistent to use post_date to note when the post was originally created.
I can see the code that is responsible for this is on wp-includes/query.php on line 3527-3528:
{{{
if ( 'future' != $status )
$this->posts[0]->post_date = current_time('mysql');
}}}
I apologize if I'm thinking about this wrongly.",danbrellis
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,59986,Add a filter into the $wp_meta_boxes output loop to provide the ability to change data,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2023-11-29T13:52:42Z,2023-11-29T15:43:44Z,"I have a metabox added via plugin that connects a custom post type with users. But I don't like the name of the Meta Box, it obscures the purpose of the box. So, the plugin doesn't have this option, and I have to change global $wp_meta_boxes for the desired effect, which isn't the correct thing to do. Of course, I could write a plugin author plea to add a filter (and it will be the third ""brilliant idea"" from me in two days 🙈), but it is possible to stumble across this need with another plugin as well. This is why I think it is necessary to add the filter to the core.
Related ticket: https://core.trac.wordpress.org/ticket/39969",oglekler
Needs Patch,31504,Add new item gives bunch of errors if disabled,,"Posts, Post Types",4.1,normal,normal,,defect (bug),new,,2015-03-02T14:00:00Z,2019-06-04T20:49:24Z,"I created new post category 'cars'. But cars are added/deleted via Php code automatically via:
wp_insert_post(...)
and
wp_delete_post(...)
So I wanted to remove 'add new car' from navigation menu. And somehow remove the 'delete' capability.
So I used this code in plugins register_post_type $args:
{{{
array(
...
'capability_type' => 'car',
/*'capabilities' => array(
'create_posts' => false, // Removes support for the ""Add New"" function - DOESN'T WORK
'delete_post' => false,
'publish_posts' => false,
),
'map_meta_cap' => true, // Set to false, if users are not allowed to edit/delete existing posts
*/
...)
}}}
Appears the 'add_new' is not shown, but now I got bunch of warnings all over the admin:
{{{
Notice: Undefined offset: 0 in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1075
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1077
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1081
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1083
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1084
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1084
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1087
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1087
Notice: Undefined offset: 0 in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1075
}}}
",ozzWANTED
Needs Patch,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
Needs Patch,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
Needs Patch,55248,Ajax call has stop to work (single custom post content),,"Posts, Post Types",5.9.1,normal,normal,Awaiting Review,defect (bug),new,,2022-02-24T13:31:54Z,2022-03-01T12:40:41Z,"Ajax call which should get a content from a single custom post item has stop to work. On other hand, Ajax call which is getting more Portfolio items (more custom post items) works fine (you have all in the video - sorry for my English).
All was fine until the WP ver 5.9 but the bug is there after updating on ver 5.9.1
Video link - https://www.youtube.com/watch?v=Gcxtm4FF58E",zak87
Needs Patch,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
Needs Patch,60796,An error for page and post without revisions support,,"Posts, Post Types",6.4,normal,normal,Awaiting Review,defect (bug),new,,2024-03-18T10:03:04Z,2024-03-18T10:03:04Z,"Since **6.4.0** the `$revisions_enabled` argument was added to the arguments array of `register_meta()` function (https://developer.wordpress.org/reference/functions/register_meta/#changelog).
For post and page with disabled revisions support there is an error:
Error: Function register_meta was called incorrectly. Meta keys cannot enable revisions support unless the object subtype supports revisions. Please see Debugging in WordPress for more information. (This message was added in version 6.4.0.).
In register_block_core_footnotes() function `revisions_enabled` argument is permanently set to true and it's makes this error.",danielpietrasik
Needs Patch,52519,Anchor links not working on password-protected pages (on first click),,"Posts, Post Types",5.6.1,normal,normal,Awaiting Review,defect (bug),new,,2021-02-13T17:40:11Z,2021-02-14T07:31:00Z,"When first clicking an anchor link, the target of which is a password-protected page, and entering the password, the page is loaded without the #anchor in the URL and without jumping to the anchor content. The person has to go back and click the link again after entering the password to jump to the anchor on the page.",chrslcy
Needs Patch,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
Needs Patch,55152,Cannot delete post content if the title is empty,,"Posts, Post Types",2.1,normal,normal,Awaiting Review,defect (bug),new,,2022-02-12T04:54:56Z,2022-02-14T04:07:37Z,"Hi,
I installed WordPress on my new website at [https://openinghours.co.il/]
I've created a custom theme and custom fields and taxonomies for ""post"", in a custom php file, that is called in functions.php.
When I try to test and see if custom fields are saved, I noticed something interesting: when the WordPress default post title (the_title) is empty, and the_content and custom fields are filled, I cannot delete the content that's in ""the_content"" on update or on save draft.
I can delete content from custom fields and it works, but if the content is not empty, I try to delete the content and save draft, the content is still there.
However, after testing, I've found that if ""the_title"" is not empty, I can delete the content that's located in ""the_content"".
The problem accrues only when ""the_title"" (The default post title) is empty.
I am not sure, but I think it doesn't have any relation to the custom fields. However, I I didn't tested it on a site without custom fields.
I hope that I described it clearly, if you have any questions please ask. ",wpdans
Needs Patch,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
Needs Patch,37775,Capabilities inconsistence when registering CPT,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2016-08-22T21:52:54Z,2019-04-25T10:57:20Z,"When registering CPT I can define `capabilities`, and some of them can be ""turned off"", so I can disable, for example, creating a new CPT object with `'create_posts' => false`.
But here is the interesting part:
{{{
'delete_post' => null,
'delete_posts' => false,
}}}
To prevent deletion, I need to specify exactly like above, otherwise I will get notices from WP.
In my opinion, we should have 1 approach, like `false`",slaFFik
Needs Patch,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
Needs Patch,59085,Command Palette - switching posts wrong url redirect for non FSE sites,,"Posts, Post Types",6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-12T12:24:23Z,2023-08-12T12:24:23Z,"With the new update to WordPress 6.3, they introduced the command palette. This is great for quickly and easily switching between posts and other things.
It is enabled for all sites (including sites not using a FSE theme)
However, when trying to switch to a different post, it redirects me to:
{{{/wp-admin/site-editor.php?postType=post&postId=12621}}}
Which I then get the error:
{{{The theme you are currently using is not compatible with the Site Editor.}}}
The command should change the slug it tries to visit depending on if your site supports FSE or not.
Either:
{{{/wp-admin/post.php?post=12621&action=edit}}}
or
{{{/wp-admin/site-editor.php?postType=post&postId=12621}}}
",tdrayson
Needs Patch,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
Needs Patch,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
Needs Patch,57741,"Core throwing 'Attempt to read property ""post_type"" on null'",,"Posts, Post Types",6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-02-17T04:04:23Z,2023-02-17T10:25:39Z,"A calls B. B calls C.
C is calling get_post() passing in args from B.
C then proceeds to immediately use the results of get_post() ($post->post_type) without checking the response, resulting in an edge condition where a warning is thrown: Attempt to read property ""post_type"" on null
A: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-admin/post.php#L186-L189
B: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-admin/edit-form-blocks.php#L249-L253
C: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-includes/media.php#L4552-L4558",haykuro
Needs Patch,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
Needs Patch,47041,Custom Post type author empty,,"Posts, Post Types",5.1.1,normal,normal,Awaiting Review,defect (bug),new,,2019-04-25T11:30:05Z,2020-04-22T06:20:09Z,"If I created Custom post type with rest enabled [ for Gutenberg support ] and I try to created/publish custom post type then Post author is empty instead of the current user
I checked with bbPress Post type forum, For enabled rest support, refer the following code
{{{#!php
function twentyseventeen_rest_support_bbpress() {
global $wp_post_types;
$forum_post_type = bbp_get_forum_post_type();
if (isset($wp_post_types[$forum_post_type])) {
$wp_post_types[ $forum_post_type ]->show_in_rest = true;
}
}
add_action('init', 'twentyseventeen_rest_support_bbpress', 25);
}}}
",dipesh.kakadiya
Needs Patch,50843,Default category for custom posts when post_content is empty,,"Posts, Post Types",5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-08-04T15:44:52Z,2020-08-11T19:08:40Z,"If you enter only the post_content and save, or enter the post_title and post_content and save, the default category is selected and it works as intended.
But when I type in only the post_title and save it, no categories appear to be selected.
Upon investigating the reason, if no post_content is entered, the post_status value will be ""auto_draft"" and as a result the default category will not be applied.
Is the above as expected?
WordPress: 5.5-RC1-48708",tmatsuur
Needs Patch,41727,Draft page loses its hierarchy on save when other pages are drafts in hierarchy,,"Posts, Post Types",4.8.1,normal,normal,Awaiting Review,defect (bug),new,,2017-08-25T13:12:54Z,2020-12-15T22:48:25Z,"How to reproduce:
1. Create a set of pages with a status publish
2. Set hierarchy to pages
3. Change the status to of the aforementioned set to draft
4. Open draft for editing.
5. Save as draft.
6. Now you have lost the hierarchy.
I think you should retain the hierarchy, because it is quite common use case to build something as drafts before publishing them or taking pages to drafts if they are in need for editing and the user wants them out before edits are done. Tickets possibly related #15541 and #12890.
",stode
Needs Patch,45801,Duplicate post publish action,,"Posts, Post Types",5.0.2,normal,normal,Awaiting Review,defect (bug),new,,2018-12-31T21:53:44Z,2019-01-07T08:37:45Z,"I'll try to keep this short. Action ""publish_to_publish"" is being called twice when updating a published post under some circumstances. Web server registers two calls (one to index.php, one to /wp-admin/post.php). First call appears to update the content and non-meta data. Second call updates data from meta blocks.
Specifics: Any theme or plugin that adds meta data to a post forces a second call to the update process with the meta block data.
Problem: Any plugin that performs actions based on ""publish_to_publish"" is being called twice. In my specific instance the Better Notifications for WordPress plugin sends notifications mails doubled.
Wordpress version: 5.0.2
Theme: Customify, no plugins
Or
Theme: TwentyNineteen, and Plugin: Profile Builder
Basically anything that adds meta-data to a post object causes a second, duplicate, action.
If meta-data updates should trigger a second action, how can a plugin detect that there has been an additional call?",bmettee4
Needs Patch,55905,Edit date / quick edit not working,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2022-06-02T16:43:24Z,2022-06-02T16:43:24Z,"On one of my WordPress sites, after updating, if I click the ""edit"" link on the publish date or the 'quick edit' on the post list, it doesn't do anything. I've tried deactivating all the plugins and it's still doing it. It is fine on another WordPress site I have. ",angiefsutton
Needs Patch,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
Needs Patch,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
Needs Patch,49812,"EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".",,"Posts, Post Types",,normal,normal,,defect (bug),reopened,,2020-04-04T18:33:34Z,2020-11-11T11:26:21Z,"We got a problem =(
Clean wp installation.
Pages
/wp-admin/post-new.php
/wp-admin/post.php?post=1&action=edit
Server configuration: NGINX + PHP-FPM
I have a security file
/etc/nginx/blog.anv.me/security.conf
...
add_header Content-Security-Policy ""default-src 'self' http: https: data: blob: 'unsafe-inline'"" always;
...
Content Security Policy is an effective measure to protect my blog from XSS attacks.
Console log
{{{
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
(anonymous function) (blocks.js:6146:95)
__webpack_require__ (blocks.js:21)
(anonymous function) (blocks.js:85)
Global Code (blocks.js:86)
[Error] TypeError: undefined is not an object (evaluating 'wp.blocks.setCategories')
Global Code (post-new.php:1673)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
(anonymous function) (rich-text.js:761:95)
__webpack_require__ (rich-text.js:21)
(anonymous function) (rich-text.js:85)
Global Code (rich-text.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
createReduxStore (data.js:1722)
createNamespace (data.js:1611)
(anonymous function) (data.js:2240)
(anonymous function) (keyboard-shortcuts.js:853:91)
__webpack_require__ (keyboard-shortcuts.js:21)
(anonymous function) (keyboard-shortcuts.js:85)
Global Code (keyboard-shortcuts.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
createReduxStore (data.js:1722)
createNamespace (data.js:1611)
(anonymous function) (data.js:2240)
(anonymous function) (viewport.js:340:91)
__webpack_require__ (viewport.js:21)
(anonymous function) (viewport.js:85)
Global Code (viewport.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
(anonymous function) (lodash.js:5115)
(anonymous function) (block-editor.js:9447)
__webpack_require__ (block-editor.js:21)
(anonymous function) (block-editor.js:85)
Global Code (block-editor.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
(anonymous function) (core-data.js:2233:108)
__webpack_require__ (core-data.js:21)
(anonymous function) (core-data.js:85)
Global Code (core-data.js:86)
[Error] TypeError: undefined is not an object (evaluating 'external_this_wp_blockEditor_[""withFontSizes""]')
(anonymous function) (block-library.js:3388:104)
__webpack_require__ (block-library.js:21)
(anonymous function) (block-library.js:85)
Global Code (block-library.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
createReduxStore (data.js:1722)
createNamespace (data.js:1611)
(anonymous function) (data.js:2240)
(anonymous function) (notices.js:548:91)
__webpack_require__ (notices.js:21)
(anonymous function) (notices.js:85)
Global Code (notices.js:86)
[Error] TypeError: undefined is not an object (evaluating 'external_this_wp_blockEditor_[""SETTINGS_DEFAULTS""]')
(anonymous function) (editor.js:2095)
__webpack_require__ (editor.js:21)
(anonymous function) (editor.js:85)
Global Code (editor.js:86)
[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: ""default-src 'self' http: https: data: blob: 'unsafe-inline'"".
Function (data.js:161)
(anonymous function) (data.js:161)
combineReducers (data.js:162)
(anonymous function) (lodash.js:5115)
(anonymous function) (edit-post.js:1491:148)
__webpack_require__ (edit-post.js:21)
(anonymous function) (edit-post.js:85)
Global Code (edit-post.js:86)
[Error] TypeError: undefined is not an object (evaluating 'external_this_wp_richText_[""registerFormatType""]')
(anonymous function) (format-library.js:1897)
forEach
(anonymous function) (format-library.js:1893)
__webpack_require__ (format-library.js:21)
(anonymous function) (format-library.js:85)
Global Code (format-library.js:86)
[Error] TypeError: undefined is not an object (evaluating 'wp.editPost.initializeEditor')
(anonymous function) (post-new.php:1827)
[Error] TypeError: undefined is not an object (evaluating 'wp.blocks.unregisterBlockStyle')
(anonymous function) (editor-script-block.js:8)
}}}
",anvme
Needs Patch,59348,Excerpt block length is not full customizable any more,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2023-09-14T11:40:32Z,2023-09-14T15:19:35Z,"Since the latest changes in /src/wp-includes/blocks/post-excerpt.php now the excerpt length is not fully customizable any more. The problem is that previously `$excerpt = get_the_excerpt();` was used, which was filterable with `get_the_excerpt`, but now this excerpt is just getting forcefully trimmed by `wp_trim_words` based on the `excerptLength` option. Which is: a) A number forced to be between 10-100 b) now can not be changed or overwritted with custom code in any way.
If I want to display the excerpt of a post on the post's page, now there is no way to correctly display an excerpt that is longer than 100 words. I think this is a loss in features and a bad practice to limit the excerpt's usage in this way. At least allow `$excerpt_length = $attributes['excerptLength'];` to be modified with the already existing `excerpt_length` filter.
Mentioned change:
https://core.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=56065%40trunk%2Fsrc%2Fwp-includes%2Fblocks%2Fpost-excerpt.php&old=55246%40trunk%2Fsrc%2Fwp-includes%2Fblocks%2Fpost-excerpt.php",frzsombor
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,49294,"If multiple posts has same date, get_previous_post() and get_next_post() returns only first/last of them",,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2020-01-26T12:45:02Z,2020-10-06T06:04:04Z,"get_previous_post() and get_next_post() both uses get_adjacent_post() -function, which uses date for query. If query return multiple posts for same date, function only returns first or last post depending on $previous -parameter. As a result, if you have multiple posts for a same date, get_previous_post() and get_next_post() functions does not work as meant to.
Found one mention about this issue about a year earlier: https://wordpress.stackexchange.com/questions/330276/get-next-post-and-get-previous-post-return-wrong-posts
",oskarijarvelin
Needs Patch,50435,In some cases wp_get_post_parent_id() = get_post_ancestors,,"Posts, Post Types",5.4.2,normal,normal,Awaiting Review,defect (bug),new,,2020-06-19T21:00:44Z,2020-06-19T21:06:23Z,"Using wp_get_post_parent_id() while parsing gutenberg blocks in a save_post action, I found out, that when a parent page exists, and parent_id is the actual published post wp_get_post_parent_id() gives back the post_id of the parent page.
A turn around seems to be ($postParent == $postId) ? $post_current_ID : $postId;
",chvon7thal
Needs Patch,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
Needs Patch,51268,Issue with excerpts,,"Posts, Post Types",5.5.1,normal,normal,Awaiting Review,defect (bug),new,,2020-09-08T19:01:04Z,2020-09-08T19:01:04Z,"This is a follow-up to #51042.
Hope this is the correct place to report this. Regarding 50142, I have several customer sites (at least 50) in which we type a space in the Excerpt field in order for an Excerpt not to display. It displays the space, which is invisible. But with your change above, WordPress 5.5.1 is ignoring the typed space and displaying the excerpts, which we do not want. I'm going to have about 50 customers ask me how to fix this over the next few weeks when they start to notice the issue. If I type the code for a non-breaking space, the issue goes away but they'd have to manually adjust this on all posts. Can this be adjusted so that WordPress still recognizes a typed space as a single character excerpt? Thank you. I also posted on the WordPress forum at [https://wordpress.org/support/topic/odd-issue-with-excerpts/#post-13378581]",HollyKNY
Needs Patch,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
Needs Patch,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
Needs Patch,56479,Missing capability shows blank page in WP-Admin,,"Posts, Post Types",6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-08-31T16:34:07Z,2023-03-12T21:53:38Z,"Hello,
I have created a **custom post type** with the following code.
{{{#!php
_x('Fortbildungen', 'Post Type General Name', 'ibf'),
'singular_name' => _x('Fortbildung', 'Post Type Singular Name', 'ibf'),
'menu_name' => __('IBF', 'ibf'),
'name_admin_bar' => __('IBF-Fortbildung', 'ibf'),
'archives' => __('IBF-Archiv', 'ibf'),
'all_items' => __('Alle Fortbildungen', 'ibf'),
'add_new_item' => __('Neue Fortbildung', 'ibf'),
'add_new' => __('Neue Fortbildung', 'ibf'),
'new_item' => __('Neue Fortbildung', 'ibf'),
'edit_item' => __('Fortbildung bearbeiten', 'ibf'),
'update_item' => __('Fortbildung speichern', 'ibf'),
'view_item' => __('Fortbildung anzeigen', 'ibf'),
'view_items' => __('Fortbildungen anzeigen', 'ibf'),
'search_items' => __('Fortbildung suchen', 'ibf'),
);
$args = array
(
'label' => __('IBF', 'ibf'),
'description' => __('Fortbildungen verwalten', 'ibf'),
'labels' => $labels,
'supports' => array('title', 'editor', 'author', 'thumbnail', 'revisions', 'custom-fields'),
'show_in_rest' => true,
'hierarchical' => false,
'public' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-learn-more',
'has_archive' => true,
'rewrite' => array('slug' => 'ibf'),
'capability_type' => 'post',
'capabilities' => array
(
'edit_post' => 'edit_ibf',
'edit_posts' => 'edit_ibfs',
'edit_others_posts' => 'edit_others_ibf',
'publish_posts' => 'publish_ibf',
'read_post' => 'read_ibf',
'read_private_posts' => 'read_private_ibf',
'delete_post' => 'delete_ibf',
'create_posts' => 'create_ibfs',
),
);
register_post_type('ibf', $args);
}
add_action('init', 'customPostTypeIBF', 0);
}}}
Then I adjusted the **wp_user_roles** field in the database so that the permissions are also set appropriately based on the role.
Now when I don't have the **create_ibf** permission I get the following message in the admin panel:
[[Image(https://i.ibb.co/2dPcrWh/error-ok.png)]]
Thats right and it works!
**Now the problem:** When I don't have the **edit_ibf** ''(without S at the end)'' permission I just get a white page (blank page) in the admin panel. Now error message or so. Only a white page. The source code shows the page but in the browser I cant see anything.
If I use the developer tools I get the following error message:
[[Image(https://i.ibb.co/gjjyhkZ/error-white.png)]]
If I follow the link in the error message I can see that:
[[Image(https://i.ibb.co/3dFQ8Sh/wp-rest-error.png)]]
So I think here is a error message missing.
**And now another funny thing:** When I havent the permission **edit_ibf** and disable the **block editor** with the parameter:
{{{#!php
false,
}}}
the page is loading:
[[Image(https://i.ibb.co/dGJPdj3/ibf-ohne-blockeditor.png)]]
I think something is wrong here. Maybe someone can take a look and fix this. At least the error message that you don't have enough rights would make sense, since you're looking for the error for a long time.
Thanks in advance!
**My Live-Server:** Ubuntu 20.04.3 with PHP 8.0.22 and MariaDB 10.5
**My Test-Server (used here for reporting):** Windows 11 with XAMPP and PHP 8.0.19 and a fresh install from 18:00 Uhr",vincenz17
Needs Patch,52101,Need to add trash option for Draft Reusable Blocks,,"Posts, Post Types",5.6,normal,normal,Awaiting Review,defect (bug),new,,2020-12-17T10:29:34Z,2020-12-31T01:07:58Z,"For Reusable Blocks, there is no option for Reusable Blocks draft to trash.
Please check and let me know.
Screenshot - https://www.screenpresso.com/=GpEBb",rkradadiya
Needs Patch,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
Needs Patch,60777,New terms created when a term with commas is added in post editor,,"Posts, Post Types",6.4.3,normal,normal,Awaiting Review,defect (bug),new,,2024-03-14T17:35:07Z,2024-03-14T17:35:07Z,"When a taxonomy term has commas e.g ""Red, yellow & green"" and you add the term to a post in the post editor, the term gets added but new terms get created for the words before and after each comma. E.g you add the term ""Red, yellow & green"" to your post. That term will get added. However, you will also notice that two new terms have been created called ""Red"" and ""yellow & green"". Not sure if this is the case with both Gutenberg enabled.",awesiome
Needs Patch,37064,No checkbox in Posts list table for bulk action,,"Posts, Post Types",,normal,normal,,defect (bug),new,,2016-06-09T15:25:20Z,2019-06-04T21:00:24Z,In posts list table it checks that user has edit_post capability or not and output checkbox depend on that. WP_Posts_List_Table also output table for any CPT. But user may not have edit_post capability but have delete_post capability or may be any other capability which need bulk select. In my case i created a CPT and which i restricted users from editing published post using 'edit_published_posts' but i did not restrict users from delete published post. But when i saw post table for that CPT i saw that no checkbox after post being published. But have Trash link individually when i mouse over that post.,shamim51
Patch Needs Refresh,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
Needs Patch,60482,Password Protected stops working,,"Posts, Post Types",6.4.3,normal,normal,Awaiting Review,defect (bug),new,,2024-02-09T03:56:15Z,2024-02-09T03:56:15Z,"I have a site with 4 pages with different passwords to protect them. Every now and then the password just stops working and I need to edit the page, copy and paste the same password in and save it. Then it continues to work again for a while. I number of people visiting the site have reported the same issue. ",kitka
Needs Patch,44759,Percent-encoded unicode characters in CPT rewrite slug prevent finding the CPTs on the front-end,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2018-08-08T18:03:23Z,2018-08-09T03:17:11Z,"If you register a custom post type whose rewrite slug has percent-encoded unicode characters in it, the posts can't be found on the front-end.
Eg
{{{#!php
'unicode-cpts',
'public' => true,
'rewrite' => array(
'slug' => '%E6%BC%A2%E8%AA%9E%3B' // doesn't work
// 'rewrite_slug' => '漢語' // works
)
)
);
}
add_action('init','register_unicode_cpt');
}}}
Seems to initially work fine, the ugly percent-encoded unicode characters don't appear in the post editor (Eg https://drive.google.com/a/eventespresso.com/file/d/1d1j6skbgxrA7IJocGvYi5UMQ_Xw3sCrV/view?usp=drivesdk), but when I go to view the CPT, I'm being redirected to the homepage, (or, when my homepage displays latest posts, I'm seeing those without being redirected).
It seems some code needs to recognize percent-encoded rewrite slugs are the same as the unicode character ones.
The workaround is to use the unicode characters directly, which is technically against the RFC (see https://stackoverflow.com/questions/2742852/unicode-characters-in-urls/2742985#2742985)",mnelson4
Needs Patch,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
Needs Patch,31254,Post errors show success borders,,"Posts, Post Types",3.7,normal,normal,Awaiting Review,defect (bug),new,,2015-02-06T22:38:59Z,2021-01-18T13:47:57Z,Similar to #31241 if a post delete/update action fails a green border shows instead of red. I'm not sure what action should be taken here since failures and successes seem to be able to be displayed in the same message box.,ninnypants
Needs Patch,43569,Post not updated in backend,,"Posts, Post Types",4.9.4,normal,normal,Awaiting Review,defect (bug),new,,2018-03-16T17:18:47Z,2018-03-24T16:45:37Z,"Hi, posts are not updated in backend panel.
After edited the post's contend anche clicked the ""Update"", the older version of the post is reloaded.",emmeci
Needs Patch,40325,Potential bug with the “get_post_type” function,,"Posts, Post Types",4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-03-31T12:04:13Z,2020-12-14T12:56:20Z,"I have encountered a weird behavior in the WP code, and I want to report it, in case it is a bug.
I have posted it in the Support forum first and I was advised to make a ticket here.
'''Replication:'''
I have a custom post type created. A function is added to the '''before_delete_post''' hook. In this function, I am verifying the current post type.
I used to verify it with the '''get_post_type();''' function but I have found a problem with that in some cases. Now, I have replaced it with '''global $post_type;'''
{{{
class My_Example {
public function build_admin() {
add_action('before_delete_post', array($this, 'delete_post'));
}
public function delete_post($post_id) {
$case1 = get_post_type();
global $post_type;
$case2 = $post_type;
}
}
}}}
On the posts listing page, in the Trash table, there are 3 says of deleting posts:
1. The '''Delete Permanently''' button for each post.
2. The '''Empty Trash''' button.
3. And through '''Bulk Actions > Delete Permanently > Apply'''.
The '''get_post_type''' function returns the proper post type name only in the 1st case. For the other 2 cases, it returns '''false'''.
However, '''global $post_type''' returns the proper value in all cases.
I don’t know if it is a bug but it seems that way on the surface. If the global post type variable is set well, then the function should be able to return it too but I am not sure if something else it at play here.
A bit more info:
Looking over the source code for the [https://developer.wordpress.org/reference/functions/get_post_type/ get_post_type] function in Code Reference, I see that it is using the [https://developer.wordpress.org/reference/functions/get_post/ get_post] function to retrieve an object, instance of '''WP_Post''', from which it gets the post type.
So, the value is retrieved from different locations in the two examples.
",ancientro
Needs Patch,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
Needs Patch,54920,Problem with blog posts updating to WordPress 5.9,audrasjb,"Posts, Post Types",5.9,normal,normal,Awaiting Review,defect (bug),reviewing,,2022-01-26T12:54:59Z,2022-02-01T13:53:40Z,Posts preview view are showing the same text for all of them order by categories. Titles and images are ok.,jorgemartineznb
Needs Patch,32039,Publish date when publishing a scheduled post in the past,,"Posts, Post Types",4.1.1,normal,normal,,defect (bug),new,,2015-04-21T16:04:42Z,2019-06-04T20:49:37Z,"Given the following steps:
1. Set a post to be scheduled at a later date, i.e. 20/04/2015 11:30
2. Wait until that time has passed and then click 'Publish', i.e. at 21/04/2015 09:00
The post's published date is set to the date at which it was scheduled to go live, when in reality it was not actually pushed to a published state until the time publish was clicked.
`$post->date` was `2014-04-20T11:30` and not the expected `2014-04-21T009:00`, and published date in UI shows the incorrect date.
Although this is not necessarily a common occurrence (basically forgetting to click Publish / Schedule) it is possible in the UI and leads to a confusing date, and one that in our case breaks other functionality that relies on a published date.",adambarclay
Needs Patch,48047,Querying (non-CPT) posts from more than one (native) category only returning posts from first category,,"Posts, Post Types",5.2.3,normal,normal,Awaiting Review,defect (bug),new,,2019-09-16T08:23:54Z,2019-09-16T08:51:26Z,"I tried selecting posts from two categories using this code:
{{{
$wpQuery = new WP_Query([
'post_type' => 'post',
'posts_per_page' => 30,
'post_status' => 'publish',
'category__in' => [5, 6],
]);
$posts = $wpQuery->get_posts();
}}}
This code only returns posts from the first category. I tracked this back to the query variables `category_name` and `cat` being set to the first queried category in the `get_posts()` method. Code from core, `class-wp-query.php`, line 2173:
{{{
if ('category' === $queried_taxonomy) {
$the_cat = get_term_by($queried_items['field'], $queried_items['terms'][0], 'category');
if ($the_cat) {
$this->set('cat', $the_cat->term_id);
$this->set('category_name', $the_cat->slug);
}
unset($the_cat);
}
}}}
It was the same with any equivalent of the `category__in` option, such as using a comma separated list as an argument (`'category_name' => 'news,video'`) or writing my own `tax_query`.
When I access the `posts` property on the query object (`$wpQuery->posts`), the correct number of posts is returned. The problem only surfaces when `get_posts()` is called.
The bug persists on the Twenty Ninetheen theme without any plugins enabled.
Why is `category_name`/`cat` even set to the first category term? If there is a reason, it would make sense to filter out any ""duplicate"" category query vars present before the SQL query is built, because ''both'' `category__in` and `category_name`/`cat` don't make sense.
I'm looking forward to insights on this. ",lialyn
Needs Patch,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
Needs Patch,55665,Remove unused margin when post-body-content is empty,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2022-05-03T14:06:18Z,2022-05-06T15:25:33Z,"I created a custom post type that does not support any fields (support argument in $args)
It's just a metabox inside
But on the page to add that post (add-new post in wp-admin), there is an unused margin in , which creates a space at the top of the page that is related to the tag with the post-body-content ID.
I suggest deleting this margin if this tag is empty.
thank you
[[Image(https://i.imgur.com/fFhFWiT.png)]]",myousefi08
Needs Patch,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
Needs Patch,48106,Revisit post GUID sanitization on `&`,,"Posts, Post Types",5.2.3,normal,normal,Awaiting Review,defect (bug),new,,2019-09-23T08:26:37Z,2019-09-28T13:40:16Z,"=== The source code of core which needs to be revisit
When a new post/attachment is inserted into the database, the post GUID is sanitized and the `&` character in GUID is converted to `&`.
More specifically, in `wp-includes/default-filters.php`, function `wp_filter_kses` is added as a default `pre_post_guid` filter.
{{{#!php
// Save URL
foreach ( array( 'pre_comment_author_url', 'pre_user_url', 'pre_link_url', 'pre_link_image',
'pre_link_rss', 'pre_post_guid' ) as $filter ) {
add_filter( $filter, 'wp_strip_all_tags' );
add_filter( $filter, 'esc_url_raw' );
add_filter( $filter, 'wp_filter_kses' );
}
}}}
Before a post GUID is saved, function `wp_filter_kses` in `wp-includes/kses.php` is called, and eventually function `wp_kses_normalize_entities` does the real conversion, so that `&` is converted to `&`.
=== The problem it causes
The plugin External Media without Import (https://wordpress.org/plugins/external-media-without-import/) inserts external image URLs as post GUIDs into database so that users can add external images into their media libraries without actually uploading the image files to their WordPress servers. If the image URL contains `&`, such as
https://pbs.twimg.com/media/D_NKa3yWkAYwZwn?name=900x900&format=png
it is converted to
https://pbs.twimg.com/media/D_NKa3yWkAYwZwn?name=900x900&format=png
The result is that the image is not correctly displayed in some places, such as the media library page of the admin dashboard.
There're also other plugins, such as Imposer (https://github.com/dirtsimple/imposer/) and Postmark (https://github.com/dirtsimple/postmark/), encountering the same issue. Imposer fixes the issue by forcing to save post GUIDs again with the unsanitized version. I think it is equivalent to removing `wp_filter_kses` from the default `pre_post_guid` filters.
=== The reason of post GUID sanitization
Post GUID sanitization was added with a commit in 2011: https://github.com/WordPress/WordPress/commit/81a5f821fbfb63be6c5517d033b8e7a0a4172f07. The commit log message does not state why post GUIDs need to be sanitized on save and display. Also, the commit is so long time ago that seems that even the members of the core channel of WordPress Slack group can't tell the reason.
At first it was thought that it is because when exporting RSS feeds, `&` needs to be converted due to XML specification. But I did some experiments and inspected the core source code, and found that in fact WordPress core does convert `&` to `&` while exporting RSS2 feed, even if I changed the `&` back to `&` in the database via MySQL client. The convertion is done by function `wptexturize` in `wp-includes/formatting.php`. The function is added as a default `the_content` filter.
So I really don't understand why post GUIDs should be sanitized, especially for the `&` issue. This might be a core issue rather than a plugin issue. It might be fine to not add `wp_filter_kses` as a default `pre_post_guid`, i.e. not do the post GUID sanitization.
This issue has also been discussed here: https://github.com/zzxiang/external-media-without-import/issues/17",zzxiang
Needs Patch,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
Needs Patch,27002,Scheduling not working when editing posts,,"Posts, Post Types",3.8.1,normal,normal,,defect (bug),new,,2014-02-04T00:56:19Z,2019-06-04T20:45:34Z,"I didn't see this the list but I have had this happen to me more than once. I have posts scheduled 2-3 weeks in advance to work on them and set for Feb 22 at 14:00 posting time. While working on the post the button that should be ""schedule"" says ""publish"" If you click the publish butting it will publish it immediately rather then que it for posting via scheduling. I have to go in change the time or date, click the ok button below scheduling and then change it back.
This has happened more than once for me. If the post does publish it is still listed as the original date rather than the date it publishes. I have to double check them but I don't always catch them. This has happened on both firefox and Safari. Today is February 3 but the post says it was posted on February 22, 2014. It is now set to private
",timgoleman
Needs Patch,57810,Should wp_insert_post() function call 'wp_insert_post' action with 'update' equals true after creating post for the first time.,,"Posts, Post Types",6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-02-26T00:55:07Z,2023-03-12T03:06:30Z,"The wp_insert_post() function calls 'wp_insert_post' action hook with 'update' equals true when creating post for the first time.
Post was created using the Gutenberg editor.
/* $update should only be true when updating post */
`do_action( 'wp_insert_post', $post_ID, $post, $update );`
",zenithcity
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,58487,Text editor problem,,"Posts, Post Types",6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-06-08T11:07:40Z,2023-06-08T14:02:19Z,"Hi, the < character causes corruption.
lines are concatenating and shortcodes don't work
1: https://ibb.co/yndnCP1
2: https://ibb.co/Rhd2r87
If there is no < character, everything will look normal.
3: https://ibb.co/1Xvvw7V",burhi
Needs Patch,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
Needs Patch,55638,Undefined property: WP_Post_Type::$post_type,,"Posts, Post Types",5.9.3,normal,normal,Awaiting Review,defect (bug),new,,2022-04-28T08:38:11Z,2022-05-13T08:48:12Z,"
PHP 8.1.5
PHP Warning: Undefined property: WP_Post_Type::$post_type in wp-includes/post-template.php on line 649",pienoz
Needs Patch,47988,Unexpected behaviour when draft post has the same page_name as published post,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-09-06T02:49:20Z,2019-09-06T06:35:15Z,"> What steps should be taken to consistently reproduce the problem?
{{{
wp rewrite structure '/%postname%/'
wp post create --post_title=""Example post title"" --post_status=publish --post_name=my-chosen-post-name
wp post create --post_title=""A draft post"" --post_status=draft --post_name=my-chosen-post-name
}}}
Visit http://www.example.com/my-chosen-post-name
> In case it's relevant to the ticket, what is the expected output or result?
We're expecting the published post to be displayed.
> What did you see instead?
If you're authenticated and have permission to view drafts, the draft post will populate the `Global $post` object and be displayed.
Anonymous users will get a 404 page or the browser will throw a `Too many redirects` error.
> Does the problem occur even when you deactivate all plugins and use the default theme?
Yes.
> Please provide any additional information that you think we'd find useful. (OS and browser for UI defects, server environment for crashes, etc.)
The core behaviour of the WP Admin post edit screen doesn't allow us to get into this state because `post_name` values are not stored for a post until it transitions to the `publish` post status. When this transition does happen `wp_unique_post_slug()` ensures the `post_name` being saved unique.
We first encountered this issue via the Yoast SEO plugin metabox which allows a ''Slug'' to be saved for draft posts. As you can see with the WP-CLI commands above, however, there are other ways of getting to this state.
The draft post is loaded for authenticated requests because the default query vars `order_by => post_date` and `order => DESC` means the draft post created after the published post populates the `WP_Query->post` property.
Anonymous requests are not able to view the draft post, so before returning a 404, `redirect_canonical()` calls `redirect_guess_404_permalink()` which builds a query for a published post where `page_name` is `LIKE` the post name and finds the published post and redirects to it... and the loop continues.",ajfleming
Needs Patch,48580,Update status in save_post hooks always true in WordPress 5.0,,"Posts, Post Types",5.2.4,normal,normal,Awaiting Review,defect (bug),new,,2019-11-12T21:47:58Z,2019-11-12T21:47:58Z,"I think this issue shown after integration of Gutenberg editor, The {save_post} and {save_POST_TYPE} hooks always triggers {$update} as TRUE.
I made some tests, The {$update} is TRUE on saving the post for the first time and on updating also, it's always true.
{{{#!php
'No'
);
if( $update ) {
/* Saving New Post trigger this -- always {Yes} */
$db_values['is_new'] = 'Yes';
}
else {
$db_values['is_new'] = 'No';
}
/* Connect to IBM Server */
/* Update DB */
update_post_meta( $post_ID, 'postmetas_save_test', wp_unslash( $db_values ) );
}
}}}
",oxibug
Needs Patch,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
Needs Patch,37832,Using ?p=xxx on a posts page with an invalid post ID does not return a 404 status,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2016-08-25T23:06:41Z,2019-04-19T15:20:07Z,"Steps to replicate:
- Create a page and set it as the posts page.
- Visit this page with ?p=123456 (an invalid ID) added.
WordPress will return whatever 'no results found' message you have in the theme, but with a 200 status.
The handle_404 function seems to have been set up to always give a 200 status if is_home() returns true. This should not apply if you're overriding the query in some way via the URL.
Somehow many of these URLs have been detected by Google on a site of ours and are being reported as soft 404s. How they were found is one thing, but WordPress should not be returning a 200 status regardless.",smerriman
Needs Patch,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
Needs Patch,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
Needs Patch,54258,WP_Query::is_tax() returns true on custom post type archives (5.8.1),,"Posts, Post Types",5.8.1,normal,normal,Awaiting Review,defect (bug),new,,2021-10-13T19:26:11Z,2021-10-19T13:52:35Z,"I was testing the upgrade to 5.8.1 (from 5.7.3) on a copy of my (Lightsail/Bitnami-hosted) live instance and found that after upgrading to 5.8.1, a `post_type=` parameter is added to the URL when I navigate away from a page that displays posts from one of my custom post types. This happens whether or not I update plugins and themes.
E.g. I visit `/photographs`, then click to go to `/quotes`; `post_type=photos` gets added to the URL (i.e. `/quotes/?post_type=photos`) and it continues displaying photographs instead of quotes.
This happens both with my custom post types defined through the CPT plugin and with the ones I've defined in my own code. The parameter is not added when navigating away from standard post results.
Even if the parameter didn't interfere with the website's behavior, it would be a bug, as it's adding unnecessary and unwanted clutter to my URLs, but it does interfere and is a breaking change.",arestelle
Needs Patch,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
Needs Patch,56364,"When I update to 6.0.1 it hides categories, Featured image, Author selection when I want to create a post",,"Posts, Post Types",6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-08-11T13:35:08Z,2022-09-03T14:40:39Z,"Since I updated to v6.0, when I create/edit posts, the Author, Category and Feature Image tabs on the right-hand side have disappeared.
I’ve tried disabling plugins and reactivating plugins to determine if it’s a plugin compatibility issue, but I don’t understand why it would be. But nothing worked.
My user account is a full admin.
After searching, I can see that some people have had the same or similar issue, but their solutions (deactivating plugins etc.) didn’t work for me.",digital2019
Needs Patch,49136,"White screen in password protected posts, referrer policy",,"Posts, Post Types",5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-05T17:19:32Z,2020-03-06T15:20:10Z,"**Background**
Under some circumstances WP is displaying a white screen refering to URL ..../wp-login.php?action=postpass after entering either correct or incorrect password into password protected posts. It turns out this behaviour occurs reproducably in case WP site is set to no-referrer policy e.g. by Nginx configuration. This behaviour was observed since about July last year.
**Steps to reproduce**
1. Force no-referrer policy in Nginx .conf file
add_header Referrer-Policy no-referrer;
service nginx restart
2. Protect any post by password
3. Verify no-referrer policy in e.g. Chrome F12->network
4. Enter password into your password protected post
5. /wp-login.php?action=postpass white screen pops up, no error message, no debugg hints.
These steps reproduce in any WP configuration (under ubuntu server 18.04 LTS, LEMP stack) with or without themes/plugins. Exception: Safari and Edge (as of August last year) do not show white screenn. Reason: These browsers do not support referrer policy.
**Work around**
Set referrer policy to any other policy than no-referrer. In my case strict-origin-when-cross-origin did the job.
**Suggestion**
This issue might not be too common but it might become more relevant due to GDPR in Europe.
It seems that wp-login.php requires a reference to the calling URL to be able to redirect to that URL after verifying the password. In case of no-referrer policy this reference is not disclosed, hence wp-login.php cannot return to its caller.
If that is the case in order to ensure stable operation of password protected posts WP must not allow no-referrer policy but should force any other secure policy.",derfuchs98
Needs Patch,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
Needs Patch,56480,_add_post_type_submenus doesn't use WP_Post_Type::$menu_position,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2022-08-31T17:17:11Z,2023-04-12T19:26:37Z,"Although it's possible to add a post type as a submenu when registering by setting the property show_in_menu, it's not possible to set the position.
This is happening because in the function [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/post.php#L2071 _add_post_type_submenus] (wp-includes/post.php) the function add_submenu_page is called without passing the parameter $position.
{{{#!php
true ) ) as $ptype ) {
$ptype_obj = get_post_type_object( $ptype );
// Sub-menus only.
if ( ! $ptype_obj->show_in_menu || true === $ptype_obj->show_in_menu ) {
continue;
}
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"" );
}
}
}}}
Steps to reproduce the issue:
1. Add the code snippet in the functions.php of the theme (notice the 'menu_position')
{{{#!php
array(
'name' => 'Foo',
),
'show_in_menu' => 'edit.php?post_type=page',
'menu_position' => 20,
'public' => true,
)
);
register_post_type(
'bar',
array(
'labels' => array(
'name' => 'Bar',
),
'show_in_menu' => 'edit.php?post_type=page',
'menu_position' => 10,
'public' => true,
)
);
}}}
2. Visit the Dashboard and check that under the menu Pages, ""Foo"" appears **before** ""Bar""
Expected behaviour: ""Foo"" appears **after** ""Bar""",Rahmohn
Needs Patch,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
Needs Patch,48410,`wp_insert_post()` can result in duplicate post data,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-10-23T15:04:14Z,2020-01-02T02:10:25Z,"If 2 identical calls to `wp_insert_post()` are made close enough together, 2 posts are added to the database instead of 1. These posts differ by post ID only. The slug for example is the same.
This seems to happen because `wp_insert_post()` does a fair amount of processing before the database write takes place. The check to determine if a post already exists can be _stale_ at the point of insertion.",henry.wright
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,32057,fix: allow plugins to access click event in edit inline post,,"Posts, Post Types",2.7,normal,normal,,defect (bug),new,,2015-04-22T12:03:58Z,2019-06-04T20:49:45Z,"I wanted to add custom functionality to inline post edit, but there is code that prevents me from doing this.
---trunk---
in /wp-admin/js/inline-edit-post.js, line 53
{{{
51: $('#the-list').on('click', 'a.editinline', function(){
52: inlineEditPost.edit(this);
53: return false;
54: });
}}}
fix:
{{{
51: $('#the-list').on('click', 'a.editinline', function(e){
52: inlineEditPost.edit(this);
53: e.preventDefault();
54: });
}}}
but first time appered in 2.7
{{{
82: addEvents : function(r) {
83: r.each(function() {
84: var row = $(this);
85: $('a.editinline', row).click(function() { inlineEditPost.edit(this); return false; });
86: });
87: },
}}}
",wasikuss
Needs Patch,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
Needs Patch,37441,get_default_post_to_edit() function is broken,,"Posts, Post Types",,normal,normal,,defect (bug),new,,2016-07-22T08:32:09Z,2019-06-04T21:02:04Z,"The [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php?rev=38118#L591 get_default_post_to_edit()] function contains the following code (formatted for the sake of better readability) in case a new post should be inserted to the database:
{{{#!php
__( 'Auto Draft' ),
'post_type' => $post_type,
'post_status' => 'auto-draft',
) );
$post = get_post( $post_id );
}}}
Later in the function, we just ''work'' with the `$post` object.
The problem is, there are [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L2919 se]-[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L2966 ve]-[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L3038 ral] [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L3205 rea]-[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L3220 sons] under which [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L2873 wp_insert_post()] returns `0`. In such a case, [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/post.php?rev=38125#L451 get_post()], in turn, will return `null`, which is neither a `WP_Post` object nor an `object` at all.
Then, [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php?rev=38118#L639 setting a property on this null post] will automatically create a new `stdClass`, resulting in the `$post` object only having the three explicitly set properties `post_content`, `post_title` and `post_excerpt`.
If you want to see how this affects WordPress, just put `$post = null;` before [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php?rev=38118#L631 wp-admin/includes/post.php:L631].",tfrommen
Needs Patch,36313,get_pages() child_of argument does not work in combination with meta_key/value query,,"Posts, Post Types",4.4.2,normal,normal,,defect (bug),new,,2016-03-23T21:38:48Z,2023-07-06T12:21:02Z,"If you pass both `child_of` and `meta_key/value` parameters to the `get_pages()` function, there are problems. To reproduce:
Create a page structure like so:
Grandparent (id=1)
-Parent (id=2)
--Child (id=3)
Add a custom field to the Child page. Say `meta_key='bark'` and `meta_val='woof'`.
Call
{{{
get_pages(array(
'child_of'=>1,
'meta_key'=>'bark',
'meta_value'=>'woof'
));
}}}
And it will return an empty array. The reason this is happening is because in the `get_pages` function (`wp-includes/post.php`) on line 4562, the `$pages` array only contains Child because it's been filtered by the `meta_key`, but `get_page_children()`, which is being used to determine which pages are `child_of`, requires the complete hierarchy of connected pages to determine which are children, and so it returns nothing.
I hope this is helpful. Obviously there are workarounds using loops and get_posts() and people are always suggesting you don't use get_pages() but anyhow, there it is, a bug report. :)",MarcGuay
Needs Patch,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
'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
Needs Patch,50255,get_the_modified_author() not working,,"Posts, Post Types",5.4.1,normal,normal,Awaiting Review,defect (bug),new,,2020-05-26T14:16:36Z,2021-08-03T05:56:58Z,"It seems that get_the_modified_author() is not working.
Looking at the source code of the function I noticed that the _edit_last meta field is not filled for the specific post, even though the post was edited.
After a closer look it seems that _edit_last is not in the meta data for regular posts and for pages (though I noticed it was there for the standard privacy page). It is there for custom posts.
So it seems that get_the_modified_author() is not working for pages and regular posts.
I looked at wp_check_post_lock() and saw that this function takes another approach. It looks at the _edit_lock field. This field is still there after the editing is over.
So, this piece of code works for pages, posts and custom posts:
{{{#!php
ID, '_edit_last', true );
return $user;
}
}}}
In this case the user who modified the page/post is part of another field, which makes it harder to filter for that.
My suggestion would be to make _edit_last work again, or have a specific field in the post object, just like post_modified and post_modified_gmt that are used for the modification date/time. This would make it easier to filter also.
The functions get_the_modified_date() and get_the_modified_time() are working correctly.
I have tested this on WP 5.4.1
This was discussed in the forum here:
https://wordpress.org/support/topic/get_the_modified_author-not-working/",stilldreaming
Needs Patch,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
Needs Patch,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
Needs Patch,37372,"missing ""edit permalink button"" below the title",,"Posts, Post Types",4.5.3,normal,normal,,defect (bug),new,,2016-07-14T22:14:25Z,2019-06-04T21:01:40Z,"With posts and pages there is an ""edit permalink button"" below the title. Also, permalinks change when the title is changed.
For custom posts that does not seem to work in the same way:
For the function register_post_type() there is a 'public' argument which is merely a way of defining 4 other arguments in 1. If you set that to false and then set 'show_ui' to true to get the user interface back you get the complete user interface except the ""edit permalink button"" below the title. Also, permalinks do not change when the title is changed.
That seems like a bug and not like intended functionality.",realblueorange
Needs Patch,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
Needs Patch,47552,post_name when inserting is not guaranteed to be unique,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-06-18T00:41:05Z,2019-06-18T03:59:14Z,"Hi all,
In wp_insert_post, there is a gap between the allocation of the post_name (as wp_unique_post_slug), and the insertion ($wpdb->insert) of the post. This is problematic because another WordPress instance can insert a post with the same post_name in this gap, which would result in two posts being inserted with the same post name
See here for an example: https://github.com/domsleee/wp_insert_post_duplicate
I suppose a solution may be to obtain a table lock, then find a unique slug and insert the post, and then release the table lock... but this doesn't seem very performant. What do you guys think?",domslee
Needs Patch,58476,preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated,,"Posts, Post Types",6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-06-08T00:16:08Z,2023-12-12T20:54:33Z,"== Bug Report
=== Description
Using the filter hook 'the_content' and passing an empty string or null produces the preg_split deprecation notice in the convert_smilies() function.
=== Environment
- WordPress: 6.3-alpha-55892
- PHP: 8.2.2
- Server: Apache/2.4.54 (Win64) PHP/8.2.2 mod_fcgid/2.3.10-dev
- Database: mysqli (Server: 8.0.27 / Client: mysqlnd 8.2.2)
- Browser: Chrome 114.0.0.0 (Windows 10/11)
- Theme: Seele 1.1.1
- MU-Plugins:
* WP Migrate DB Pro Compatibility 1.1
- Plugins:
* bbPress 2.6.9
* Classic Widgets 0.3
* Contact Form 7 5.7.7
* Database Backup for WordPress 2.5.2
* Envato Market 2.0.8
* Force Plugin Updates Check 1.0.2
* Optimize Database after Deleting Revisions 5.0.110
* Query Monitor 3.12.3
* Redux Framework 4.4.1.4
* Regenerate Thumbnails 3.1.5
* Requite Core 1.1.13
* Slider Revolution 6.6.14
* Slider Revolution Paint-Brush Add-On 3.0.4
* Slider Revolution Particles Effect 3.3.2
* Slider Revolution Slicey Add-On 3.0.4
* Theme Check 20230417
* Ultimate Addons for WPBakery Page Builder 3.19.14
* WooCommerce 7.7.2
* WordPress Beta Tester 3.4.1
* WordPress Importer 0.8.1
* WPBakery Page Builder 6.13.0
* WP Crontrol 1.15.2
* WP Migrate DB Pro 1.8.1
* WP Migrate DB Pro CLI 1.3.2
* WP Migrate DB Pro Media Files 1.4.9
* WP Migrate DB Pro Multisite Tools 1.2
=== Steps to Reproduce
1. Use this filter, ensuring $content is empty or null: $content = apply_filters( 'the_content', $content );
preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated
wp-includes/formatting.php:3482
preg_split()
wp-includes/formatting.php:3482
convert_smilies()
wp-includes/class-wp-hook.php:310
apply_filters('the_content')
x. 🐞 Bug occurs.
=== Expected Results
1. ✅ The filtered content.
=== Actual Results
1. ❌ The indicated deprecation error due to preg_split not liking a null value.",KProvance
Needs Patch,56059,"register_post_type()'s ""description"" argument can't be translated (gettext)",,"Posts, Post Types",6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-24T00:25:17Z,2022-06-25T22:36:35Z,"Calling ''register_post_type'' it is possible to use ''gettext'' to translate the labels of the post type.
However, while the labels do work, the argument ''""description""'' doesn't translate.
{{{#!php
__('Books', 'text_domain'),
'singular_name' => __('Book', 'text_domain'),
'add_new' => 'New Book' );
$args['description'] = esc_html__(""This is a beautiful description for this post type, but sadly it doesn't get translated"", 'text_domain');
$args['has_archive'] = 'books';
...
?>
}}}
I'm rather sure that it's not some mistake of mine, because I checked the ''.po'' and ''.mo'' files multiple times and if I copy and paste that gettext line of code and I echo it anywhere on my website, it gets correctly translated. So it's something about the ''""description""'' parameter.",andreacalligaris
Needs Patch,51246,single_post_title() doesn't respect private and protected posts,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2020-09-04T12:35:59Z,2020-09-05T00:03:26Z,"`single_post_title()` doesn't respect private and protected content. It will either display or return the content regardless.
In contrast, `get_the_title()` does respect private and protected content.
Note `single_post_title()` is used when building the document title in `wp_get_document_title()`.",henry.wright
Needs Patch,47742,sorting by date incorrect,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-07-19T17:36:02Z,2019-07-20T20:34:46Z,"Sorting pages by date should be doing date modified. It seems to be going off another date, possibly date published.",lamaan
Needs Patch,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
Needs Patch,47652,wp_dashboard_right_now() emits debug notices on unregistered core post types,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-07-04T20:31:23Z,2019-07-05T02:26:47Z,"When you unregister a core 'post' or 'page' post type (I know... I know...) if they have posts in the database, the dashboard ""Right Now"" widget will output a debug notice for each unregistered type:
{{{
Undefined property: stdClass::$publish; wp-admin/includes/dashboard.php:270
}}}
This is because the code inside of `wp_dashboard_right_now()` always expects a `WP_Post_Status` object as the return type of each `wp_count_posts()` key, however a `stdClass` return type is also possible when no registered type or status is currently registered at the time the widget is rendered.
----
Unregistering ""built in"" post types is normally considered to ""void the warranty"" and the `unregister_post_type()` function explicitly throws an error when you try, but the patch I'm about to attach is a small and bit of code hardening that prevents filling debug logs for those of us that frequently work with out-of-warranty installation types.",johnjamesjacoby
Needs Patch,34253,"wp_insert_post() can assign a random, unauthorized user_id's",,"Posts, Post Types",4.3.1,normal,normal,,defect (bug),new,,2015-10-11T07:48:09Z,2019-06-04T20:52:13Z,"Hello,
When using wp_insert_post, the `get_current_user_id()` function is being called when post_author is left empty.
When updating a plugin, and this function appears, you would assume the admin (whoever updated the plugin) would ""insert the post"".
But this is not always the case, for instance when you update the plugin through FTP, or use auto-update, or static Opcode caching, etc.
However, the admin area is accessible to many on a multisite environment with open registrations. But is also accessible by subscribers, if permitted. The user who accesses the admin area first after updating the code be assigned as post author.
An example code below will show you the defect in action, on a Multisite environment:
{{{
// Update 'plugin' here, log out and flush opcode cache.
// This 'plugin' now executes the following code in admin_init:
// Some options.
$the_post_id = false;
$main_blog = 0;
$post_title = 'About WordPress';
$post_content = 'WordPress is great!';
$post_id_option = 'the_inserted_post_id';
// Switch to main blog
switch_to_blog( $main_blog );
// Prevent code from running twice with option
$page = get_post( get_option( $post_id_option ) );
if ( !$page ) {
// Page doesn't exist yet
// Insert post
$the_post_id = wp_insert_post( array(
'post_title' => $post_title,
'post_status' => 'publish',
'post_type' => 'page',
'post_content' => $post_content
) );
}
if ( $the_post_id ) {
// Prevent code from running twice by updating option.
update_option( $post_id_option, $the_post_id );
}
// Back to current blog.
restore_current_blog();
}}}
A resolution would be to check if the current user has rights to post content. Either by default or parameter.
Even more so, assign the site admin if the `current_user_can()` check fails.
Thanks!",Cybr
Needs Patch,56700,wp_update_post function not support meta update,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2022-09-30T15:04:23Z,2022-09-30T15:31:59Z,"Hi.
Seems like wp_update_post() function not support meta fields update.
I found post meta update only in wp_insert_post() function https://github.com/WordPress/wordpress-develop/blob/6.0.2/src/wp-includes/post.php#L4498-L4502
Is there are some reasons to not include meta fields update in wp_update_post() function? Or this can be fixed in the future?",borisolhor
Needs Patch,30917,"Add ""Save and Close"" button to page/post edit screen",,"Posts, Post Types",,normal,normal,,enhancement,new,,2015-01-05T19:36:30Z,2019-06-04T20:48:23Z,"It would be useful to have an additional button in the Publish box of the page/post the edit screen to save the post and then return to the main page/post edit/listing screen. Currently, the Save button reloads the page/post and you then have to click on the menu link to view the page/post main edit/listing screen.",Vitzkrieg
Needs Patch,44435,Add Action / Filter in Post Details page for Screen Meta Links,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2018-06-22T09:58:58Z,2019-01-16T06:50:09Z,We can add action/filter in wordpress backend for Screen Meta Links so that using plugin we can add our own links with screen meta links.,mohdjafarcedcoss
Needs Patch,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
Needs Patch,51403,Add filter for _post_states as it outputs raw HTML,,"Posts, Post Types",5.5.1,normal,normal,Awaiting Review,enhancement,new,,2020-09-28T07:39:47Z,2020-09-28T07:39:47Z,"Currently this function can't be overridden with a filter, so it outputs raw HTML separators and such directly into the post title in the edit screen. However it should be suggested to make it possible to display the post states in your own custom function, e.g. remove the separators and the divider with the title, which are currently hard-coded at the moment in the function as raw HTML?",brandbrilliance
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,34546,Change in function `get_post_field`,,"Posts, Post Types",,normal,normal,,enhancement,new,,2015-11-01T18:35:51Z,2019-06-04T20:53:00Z,"I suggest change for function get_post_field();
1. Second param should be optional;
2. Add default value in param of function.
Additional I have question. Why in function get_the_ID() or get_post_title(); don't call function get_post_field ?
In many functions in first line is $post = get_post( $post );
If we insert my patch then we can use:
{{{
function get_the_ID() {
return get_post_field('ID', null, 'display', false);
}
}}}
OR
{{{
function get_the_guid( $id = 0 ) {
return apply_filters( 'get_the_guid', get_post_field( 'guid', $id ) );
}
}}}
",sebastian.pisula
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,36849,Filter to limit length of post slug (filter for _truncate_post_slug),,"Posts, Post Types",4.5.2,normal,normal,,enhancement,new,,2016-05-16T14:38:16Z,2019-06-04T20:59:05Z,"There are circumstances where you need to limit the lenght of the post slug.
Unfortunately there is no filter in _truncate_post_slug to do so.
It will be a great enhancement, if there would be a filter in this function.
Related function:
-wp_unique_post_slug - calling _truncate_post_slug
Additionally it would be very usefull, if there could be a filter right at the start of wp_unique_post_slug for filtering the slug.
",wp-entwickler.at
Needs Patch,50654,Fix the filter docs in sanitize_post_field(),,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2020-07-13T22:38:49Z,2020-07-13T22:41:23Z,"The `sanitize_post_field()` function calls nine separate filters on its data depending on various conditions. The documentation for these need improving, and documentation for the missing filters need adding.
Need to be careful about accuracy here because of the very general names of these filters and their dynamic portions.",johnbillion
Needs Patch,42089,Function to detect if current page is a preview of a draft,,"Posts, Post Types",4.8.2,normal,normal,Awaiting Review,enhancement,new,,2017-10-04T17:56:22Z,2018-02-24T11:52:08Z,"It would be very helpful if there was a function to detect if the page being viewed is a preview of a draft. Call this is_draft_preview().
Currently, you can achieve this check with code like this:
{{{#!php
post_status;
return ( is_preview() && $is_draft );
}
}}}
",paulschreiber
Needs Patch,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
Needs Patch,46242,Heartbeat,,"Posts, Post Types",5.0.3,normal,normal,Awaiting Review,enhancement,new,,2019-02-12T21:51:08Z,2019-02-12T21:51:08Z,"While Heartbeat has its merits, on some pages it isn't fully needed and it's also too hard to disable it properly.
Would it be possible to add extra arguments to register_post_type with options to enable/disable heartbeat (and depending scripts (e.g. autosave, wp-remove-post-lock))?
If it's not possible at least load heartbeat related files at the end of a page load (footer). With query monitor I noticed these ajax calls are loaded first before anything else.
Kind regards,
Kiarashi",mireillesan
Needs Patch,49958,Improve paginator in general-template.php,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2020-04-20T10:21:34Z,2020-04-20T11:14:52Z,"I would like to add custom classes to the default paginator in the `general-template.php` file. For that I would suggest the following change:
{{{#!php
%s',
/** This filter is documented in wp-includes/general-template.php */
esc_attr( apply_filters( 'paginate_classes' ) ),
esc_url( apply_filters( 'paginate_links', $link ) ),
$args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number']
);
}}}
That needs to be applied to every `page-numbers` element and would be very helpful.",lolitsjohnnyboy
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,57496,Lazy load post meta,,"Posts, Post Types",4.5,normal,normal,Future Release,enhancement,assigned,,2023-01-18T12:33:40Z,2023-05-10T11:15:00Z,"Introduced in [36566], there is was a API introduced to lazily load metadata using the class `WP_Metadata_Lazyloader`. Currently this is only used comment and term meta data. However, this could be expanded to support over meta types like posts.
WP_Query is now run multiple lines per page load. Meaning that post meta is primed even when it is not needed. Using the `WP_Metadata_Lazyloader` class, post meta could be loaded on demand and save database queries and object cache lookups. ",spacedmonkey
Needs Patch,21132,"List tables' ""select all"" should let you really select all, regardless of screen options",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2012-07-02T04:38:38Z,2017-06-08T06:51:24Z,"The select all checkbox in list tables selects all the items in your current view. Usually what I really want is to select all the items on all the pages.
As a hack, I'll often leave the screen options setting for items per page on something really high, like 1,000. Unfortunately this means the tables are often really slow for no benefit (most of the time I don't need them all). A better solution would be a way to intelligently select all items without needing to show them on the page.
The best example of this that I know of is Gmail, which adds a line above the list of emails when you click the select all box that looks something like this: ""All 50 conversations on this page are selected. Select all 653 conversations in Spam"". The second sentence is a link that, as expected, selects all of your emails that fit the current view, regardless of paging. Screenshot attached.",evansolomon
Needs Patch,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
Needs Patch,29014,Normalization of template tag filters,,"Posts, Post Types",3.9,normal,normal,,enhancement,new,,2014-07-24T04:42:14Z,2019-06-04T20:47:26Z,"The filters for the template tags, specifically, title, content and excerpt, are not very uniform. Some of them have a filter for their `get_the` variant, but not others. Only `the_title` sends the post id through the filter while the others do not.
The included patch does the following:
- Add `get_the` filters to the proper functions for `get_the_title`, `get_the_content`, `get_the_excerpt`
- Added post_type specific variants of the filters ( ex. `the_title_{$post->post_type}`
- All filters now pass the post id as a second argument",Funkatronic
Needs Patch,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
Needs Patch,57829,"Post ""Read"" Capability for Rest API",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2023-03-01T00:56:55Z,2023-07-20T17:58:58Z,"Posttypes with the public attribute set to false are still queryable through the rest api. Since it seems there is no other capability to check for a general read permission of posts and the 'show_in_rest' attribute is needed for the block editor and to make the post queryable by authenticated users, i think it makes sense to either introduce said ""read_post"" capability or to make rest api requests only query editable posts when the posttype has public set to false.
Not having the option to have a non-public posttypes and the rest api enabled at the same time without any further workaround seems unintuitive to me. ",juvodesign
Needs Patch,55523,Remove deprecation notice from get_the_excerpt,,"Posts, Post Types",5.9.2,normal,normal,Awaiting Review,enhancement,new,close,2022-04-04T12:01:29Z,2022-04-20T09:43:52Z,"The deprecation notice for is_bool inside `get_the_excerpt` has long been redundant, it's been well over a decade since this function took a bool value of $fakeit & the deprecation notice is now just making noise, as it will still pass this value through to get_post regardless of it it's a bool value or not.
The line for this notice is: https://github.com/WordPress/wordpress-develop/blob/5.9/src/wp-includes/post-template.php#L408
There was previously a Trac ticket that looked at removing the notice, but it looks like it never made it into core: #27246.",jamesglendenning
Needs Patch,44842,Search post box in mobile,,"Posts, Post Types",,normal,normal,Future Release,enhancement,new,,2018-08-25T06:15:19Z,2022-05-18T16:41:22Z,"In mobile view when I go to posts screen, I found that search box is not on the top so I dragged all the way down and found that search box is there which is bit odd because why someone will go all the way down looking at posts to search any post.
Please see: https://prnt.sc/kmo3jn
We can make it like themes screen https://prnt.sc/kmo3k4 by just leaving the search box with a placeholder to search posts and since just typing and entering the text in the box works so they will be able to search the post
",prashantvatsh
Needs Patch,50161,"Slow query in WP_Posts_List_Table, no way to avoid with filters/hooks",,"Posts, Post Types",5.4.1,normal,normal,Awaiting Review,enhancement,new,,2020-05-14T02:43:29Z,2021-03-11T15:13:25Z,"The post listing page on my wordpress installation is taking more than 15seconds to load (wp_posts w/ more than 120k records, running on an AWS EC2 t2.large instance), and the main cause of this is the following query in the constructor of class wp-admin/includes/class-wp-posts-list-table.php:
{{{
SELECT COUNT( 1 )
FROM $wpdb->posts
WHERE post_type = %s
AND post_status NOT IN ( '"" . implode( ""','"", $exclude_states ) . ""' )
AND post_author = %d
}}}
It is used just to count the posts the logged-in user posted and show it over the listing table (in ""Mine"" link).
There is no way to filter this out or enhance the query (other than changing this file).
Suggestion: try to create an database index for this query (I tried, but failed), or enhance it in some way to make it faster.
Other option is to remove this ""Mine (xx)"" link above the listing, using hooks.
",LucasMS
Needs Patch,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
Needs Patch,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
Needs Patch,56576,"When post is switched from published to draft, create revision",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2022-09-15T08:35:32Z,2022-09-15T10:34:29Z,"Hello,
I was thinking if it's possible to create a revision also when a post is switched from published to draft. At the moment, I was unable to see when someone switched the post status.
Looking forward to your answers.
Kind regards,",denisflorin197
Needs Patch,44377,"add filter to post_submit_meta_box() to conditionally refrain from outputting the ""Visibility"" fields",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2018-06-15T19:07:57Z,2018-06-15T19:07:57Z,"I have a CPT that, by it's very nature, always has visibility `public` (not private nor password protected).
Since I don't want users selecting anything other than `public`, currently, I enqueue some CSS that hides the ""Visibility"" related fields in the ""Publish"" metabox on `/wp-admin/post.php` and `/wp-admin/post-new.php`, but that just seems kludgy.
**Note:** in case a ""sneaky"" user finds my CSS, unhides the fields and sets the post to be private or password protected,
I also hook into [[https://developer.wordpress.org/reference/hooks/wp_insert_post_data/|wp_insert_post_data]] to ""correct"" `post_status` and `post_password`.
It would be helpful if there were a filter in [[https://developer.wordpress.org/reference/functions/post_submit_meta_box/|post_submit_meta_box()]] to control whether the ""Visibility"" related fields are output.
Such a filter would be similar in spirit to the [[https://developer.wordpress.org/reference/hooks/view_mode_post_types/|view_mode_post_types]] filter in [[https://developer.wordpress.org/reference/classes/wp_screen/render_view_mode/|WP_Screen::render_view_mode()]] that controls whether the ""View Mode"" related fields are output in ""Screen Options"". Prior to `view_mode_post_types` being introduced in 4.4, I used to hide those fields via CSS when appropriate.
",pbiron
Needs Patch,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
Needs Patch,36579,global $wp_rewrite not set when create_initial_post_types() first run,,"Posts, Post Types",4.4,normal,normal,,enhancement,new,,2016-04-18T17:59:18Z,2019-06-04T20:57:05Z,"The global $wp_rewrite is set in wp-settings.php, after create_initial_post_types().
If you want to hook into the 'register_post_type_args' filter, to set `$args->rewrite` then you currently have to jump through hoops to avoid an
`Uncaught error Call to a member function add_rewrite_tag() on null`
Could the call to set `$GLOBALS['wp_rewrite']` be moved to before `create_initial_post_types()`?
Or perhaps some defensive programming in `rewrite.php` to test if $wp_rewrite is set.
Functions `add_rewrite_tag` and `add_permastruct` are candidates for that change.
",bobbingwide
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,52518,sanitize_post_field filter for 'raw' context,,"Posts, Post Types",5.6.1,normal,normal,Awaiting Review,enhancement,new,,2021-02-13T16:07:55Z,2021-02-13T22:57:32Z,"In some cases it can be useful to change values in `raw` context.
For example I need to change `post_status` value for `replyto-comment` ajax call, like so:
{{{#!php
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
Needs Patch,49708,Add a new function get_page_by_guid,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,,2020-03-27T09:20:31Z,2024-01-26T07:45:56Z,"We have two different functions to get a post base from another field rather than ID `get_page_by_path` and `get_page_by_title`. When working with RESTful API working with unique identifier could be more handy than auto incremental or a path that could change.
I propose to build a function named `get_page_by_guid` and help developers to search a Post more accurate with guid.",killua99
Needs Patch,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
Needs Patch,60189,Add post duplication quick action,,"Posts, Post Types",trunk,normal,normal,Awaiting Review,feature request,new,,2024-01-03T21:59:24Z,2024-01-03T21:59:24Z,"It seems like a useful feature (and one recent complaint from a client) to quickly duplicate a post so users can, for example, protect an existing version and work on a new draft.
It's possible to do it right now if they copy all the blocks and paste them on a new page, but it'd be quicker and easier to click somewhere instead.
I propose to add a new post quick action, as well as an action inside the post editor.",zaguiini
Needs Patch,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
Needs Patch,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
Needs Patch,58838,Author filter on a posts list page,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,,2023-07-18T10:57:32Z,2023-07-18T10:57:32Z,"**Current Behaviour**
Under the user list, it shows only the published count but when visiting the list page from the user list then it shows all the published and drafts in the list and the count shows different.
**Expected Behaviour**
If the draft, pending, or any other types are available then it should have a proper count based on the selected author.
**Suggestion**
The Author filter allows administrators to filter and view posts created by specific authors quickly. This feature is handy when managing large amounts of content or coordinating with multiple authors, making it easier to locate and work with particular posts.
Redirecting from the user list page the default author should have to be preselected in the author filter.",mikinc860
Needs Patch,59374,"Bulk Edit does not let me remove ""Uncategorized"" for categorized posts",,"Posts, Post Types",6.3.1,normal,normal,Awaiting Review,feature request,new,,2023-09-17T11:23:39Z,2023-09-17T11:23:39Z,"Bulk Edit Posts does not let you remove category ""Uncategorized"" even when the posts do all have an additional Category.",cmdgw
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,58447,Posts with ‘Stick to the top of the blog’ should also stick to the top of the categories it belongs to,,"Posts, Post Types",6.2.2,normal,normal,Awaiting Review,feature request,new,,2023-06-02T18:38:43Z,2023-11-20T17:35:19Z,"According to the WordPress documentation ‘Stick to the top of the blog’ seems to be designed to only stick to the top of the front page.
I don't think that makes sense. It should also stick to the top of the categories it belongs to! At least the main category. ",hero2
Needs Patch,55087,Published environment and published versions for posts/pages to be able to work on the same post/page without affecting the production version until the changes are ready to become the next version of the production post/page.,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,,2022-02-05T08:28:57Z,2023-10-30T23:38:16Z,"Imagine you have several environments - dev, stage and production and you are working on several pages at once. Some of them are ready to be shown to the client and you are deploying code and database to the stage from dev, but some of them are not ready and the client will be unhappy to see unfinished work on the stage, so, you are hiding them for a while and you are starting to reverse changes you did filing that you messed up somewhere.
And then the client is telling you that some of the pages need to be published straight away but others need additional work and to publish a part of the work you've done you are messing further with revisions hoping not to get confused by all this published, unpublished and reversed changes. This leads you to more work and more stress. As a result, you will publish something that isn't ready and lose something that was ready and start to think that you need to change processes to avoid this mess in future.
The solution is to publish a certain version for a certain environment assuming that if the version is published for the production it is also published for stage and dev if there is no later version published for a particular env. ",oglekler
Needs Patch,14513,Time for a wp_post_relationships table?,,"Posts, Post Types",3.0.1,normal,normal,,feature request,reopened,,2010-08-03T00:10:30Z,2023-05-30T15:04:16Z,"Now that we have custom post types the obvious next step for people using them is to start relating post types using parent-child and/or many-to-many relationships. I've implemented a taxonomy-mirrored-posts plugin but am starting to discover [http://lists.automattic.com/pipermail/wp-hackers/2010-July/033510.html many of the problems that @prettyboymp has pointed out on wp-hackers] and think it might be time we consider adding a new table to allow us to relate post and to allow us to build functionality around this table such as related post pickers, etc.
I'd like to offer a [http://en.wikipedia.org/wiki/Straw_man_proposal straw man proposal] to start discussions of a potential `wp_post_relationships` table added to WordPress 3.1 with three fields: `parent_id`, `post_id` and `term_taxonomy_id.` This allows us to relate any two post records and optionally associate at taxonomy+term to classify the relationship (here's the SQL to create the table):
{{{
CREATE TABLE `wp_post_relationships` (
`parent_id` bigint(20) unsigned NOT NULL,
`post_id` bigint(20) unsigned NOT NULL,
`term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`parent_id`,`post_id`,`term_taxonomy_id`),
KEY `term_taxonomy_id` (`term_taxonomy_id`),
KEY `post_id` (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
}}}
Looking forward to your feedback.",mikeschinkel
Needs Patch,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
Needs Patch,44010,Add general filters for registering various privacy policy information (cookies) from plugins,,Privacy,,normal,normal,Awaiting Review,defect (bug),new,,2018-05-08T19:04:24Z,2019-07-22T16:35:53Z,"I didn't see it mentioned but during testing of integrating a real plugin, I found that it seems extremely complicated and out of order without some explicit filters for listing things like cookies.
To be clear when a plugin adds additional suggested text it appears below the core text in a completely separate box. This is so detached it means if you have 10+ plugins this is gonna be an all-day process for any user to go through generating a policy for their needs.
If I just append our plugin suggested text to the end and it has cookies, they will be separate from the other ""Cookies"" sections further up.
I think the smarter approache is to implement something to the effect that we could register our cookies, analytics etc, just like the exporters.
{{{#!php
__( 'Cookie Label' ),
'reason' => __( 'Used for reason x, y & z' ),
];
return $cookies;
});
}}}
Then it could automatically be output via a shortcode or block or whatever to a table of
| Cookie Name | Cookie Label - Cookie Description |
| wp_cookie_test | WP Test Cookie - Used to determine if cookies are available for use. |
The same would apply to several other sections. I think outputting those into a simple 2 column table would be easy to work with, clean output and easy enough for plugins & themes to integrate with.
You could do similar and register user meta info collected, or even specific analytics plugins could output label and info on how they use the data directly under the Analytics heading.
Monster Insights, for instance, might add
Google Analytics: Tracks visitor engagement with the site anonymously for use in marketing & improvement.",danieliser
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,44381,GDPR V2 - Anticipate front-end only sites for confirm actions,,Privacy,,normal,normal,Awaiting Review,defect (bug),new,,2018-06-15T22:30:30Z,2019-06-03T16:54:06Z,"Hello,
This is spawned from #44376 as I realized that the confirmaction living in wp-login.php means that front-end only sites that block wp-login.php won't have the ability to execute the action. As GDPR V2 is expected to introduce front-end versions of the request forms it would make sense that these could operate without any backend or wp-login.php available.
The code that drives this lives in wp-login.php here;[[BR]]
https://github.com/WordPress/WordPress/blob/3ee58b55b14683af4c568bce1845c37408c88fbb/wp-login.php#L862
Cheers
",garrett-eclipse
Needs Patch,44258,Inconsistency in Export and Erase Personal data behavior,,Privacy,4.9.6,normal,normal,Awaiting Review,defect (bug),new,,2018-05-29T12:01:21Z,2020-01-10T09:53:46Z,"I am not sure if it is done on purpose but I have noticed an inconsistency in selecting contents for `Erase Personal Data` tool compared to `Export Personal Data` tool.
I have made a few comments as well as uploaded some images through Media Library.
My account display name is Subrata Sarkar and the email address is gdpr-tester@emailprovider.com
I created an Export Request for gdpr-tester@emailprovider.com and downloaded the `.zip` file. I see both comments and media files are considered in index.html as a part of Personal Data.
On the contrary, Erase Personal Data for the same email address does not consider Media Files. In Media Library the images uploaded by me are still showing uploaded by Subrata Sarkar!
Comment author is updated to `Anonymous` though.
Am missing something?
One more thing I have noticed. May be this is done to comply with GDPR regulations. That is, in users' list the email addresses are no longer appearing for each user, although I am logged in as the admin. Just wanted to know if this is the case.",subrataemfluence
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,58969,"Privacy setting > The ''Copied'' text also shows, When double-clicking on the 'Copy suggested policy text to clipboard' option,",,Privacy,6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-03T12:09:39Z,2023-08-07T16:11:03Z,"
When double clicked the ''Copy suggested policy text to clipboard'' and paste it to the notes the ''copied'' text is also showing ( Only when double clicking )
=== Environment
- WordPress: 6.3-RC3-56344
- PHP: 7.4.33
- Server: TasteWP-S4 Official/3.0.0
- Database: mysqli (Server: 8.0.32-0ubuntu0.20.04.2 / Client: mysqlnd 7.4.33)
- Browser: Firefox 116.0 (Windows 10/11)
- Theme: Twenty Twenty-Three 1.2
- MU-Plugins: None activated
- Plugins:
* WordPress Beta Tester 3.5.2
=== Steps to Reproduce
1. Open the wordpress 'policies' section
2. Double Click on the 'Copy suggested policy text to clipboard 'option
3. Paste the policy on the notepad or notes
4. ''Copied '' text is showing
=== Expected Results
When you double-click on the 'Copy suggested policy text to clipboard' option, the 'Copied' text should not be displayed.
=== Actual Results
When you double-click the 'Copy suggested policy text to clipboard' option, the 'Copied' text is also displayed.",vivekawsm
Needs Patch,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
Needs Patch,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
Needs Patch,49381,Add Javascript Documentation to privacy-tools.js,,Privacy,,normal,normal,Awaiting Review,enhancement,new,,2020-02-07T06:26:43Z,2020-02-07T06:26:43Z,"Stemming from a [https://core.trac.wordpress.org/ticket/44264#comment:18 comment] on #44264 the privacy-tools.js functions should be properly documented;
Javascript Documentation guidelines - https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/#functions",garrett-eclipse
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,49357,Admin intervention for personal data export really needed?,xkon*,Privacy,5.4,normal,normal,Awaiting Review,enhancement,accepted,,2020-02-04T11:30:58Z,2021-11-17T00:01:07Z,"Currently, the required intervention of the administrator for the sole purpose of clicking on ""Send Export Link"" after the user has confirmed the action via e-mail seems to add a workload completely unnecessary.
I have to highlight that, once the request has been confirmed by e-mail by the user, the administrator has to enter the panel and click individually on each user to have their zip file sent with their data.
**Is the administrator intervention -for clicking the ""Send Export Link"" button- really required here?
Is the administrator doing something / verifying something apart of clicking a button?**
I think it creates a completely avoidable workload.
Why can we simply send the export link to the users that have confirmed the export action?",rconde
Needs Patch,45154,Convert Privacy Policy content to indexed array and filter array to allow easy unsetting.,,Privacy,5.0,normal,normal,Future Release,enhancement,new,,2018-10-23T21:57:17Z,2019-03-27T20:04:40Z,"Following a discussion from #45151 it would be nice to investigate the privacy policy content to see if it can be converted to an indexed array for easier manipulation through a new filter run prior to the foreach so that plugins/devs can add content or adjust the array without having to worry about the block editor markup.
Comment - https://core.trac.wordpress.org/ticket/45151?replyto=8#comment:8",garrett-eclipse
Needs Patch,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
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
Needs Patch,44678,Introduce Bulk Copy or Copy All to Privacy Policy Guide,,Privacy,4.9.6,normal,normal,Awaiting Review,enhancement,new,,2018-07-30T18:24:52Z,2020-10-16T22:41:24Z,"As @desrosj pointed out in #44588 it would be nice to have a method for bulk copy of all privacy snippets.
This could be a 'Copy All to Clipboard' button at the top of the guide. Or if the selective copy is preferred maybe checkboxes beside the copy actions with a 'Bulk Copy to Clipboard' at the bottom.",garrett-eclipse
Needs Patch,47940,Introduce privacy tools (Export/Erasure) to the Network Admin for network-wide handling,,Privacy,,normal,normal,Future Release,enhancement,new,,2019-08-27T21:42:04Z,2020-10-16T22:44:17Z,"Spawned from @iandunn's comment [https://core.trac.wordpress.org/ticket/47085#comment:7 here].
It would be nice to provide the Export and Erasure privacy tools to this new Tools menu being introduced to the Network Admin in #47085.
This would give network administrators a way to conduct privacy requests across their entire network of sites.",garrett-eclipse
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,46560,Personal Data Export email unit tests found in erasure fulfillment,,Privacy,4.9.6,normal,normal,Awaiting Review,enhancement,new,,2019-03-19T08:21:55Z,2019-03-19T08:21:55Z,"Hello,
While working on #44721 and #46056 I found there's some unit tests for the erasure fulfillment email that aren't covered in the data export email. Specifically, the test on post_type and post_status found here;
https://github.com/WordPress/wordpress-develop/blob/5.1.1/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php#L240-L277
We should be checking these to have consistent coverage between unit test suites for the two similar emails.
Cheers",garrett-eclipse
Needs Patch,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
Needs Patch,44186,Possibles enhancements to 4.9.6 privacy tools,,Privacy,4.9.6,normal,normal,Awaiting Review,enhancement,new,,2018-05-22T13:53:05Z,2018-06-20T19:03:47Z,"-- User should start a request from frontend
User can create his own request starting from privacy page. Form are similar to the change password and login forms.
Maybe, in first time, wordpress do not provide directly the form, but let developer start a request from a form submission hooking to a specific hook or using a function provided by the core.
-- Automatic request processing
User could receive first email without admins starts or confirm the process as for change password request. For large websites is unthinkable they rely on the wordpress system to manage privacy requests if tasks of this kind has to be done by admins, they will go for other plugins to do that. We need to include an options to disable automatic request processing and let things as in 4.9.6.
-- Automatic send data
As for request processing, user could confirm the link on the second email and get directly the datas without admins work.
-- User should see their data on a webpage (Frontend Personal Data Profile Page?)
I guess the zip download has been long discussed.. but in my personal opinion is a real bad practice. We are talking about privacy and data protections and we should not stimulate the proliferation of pieces of personal datas spreading in internet and devices.
I’m thinking of a request started from a mobile device, the user can have his own datas and can delete it from your website. But this in some case this is not a real data erasure, but it is just a data transfer as, after the request, on his download folder of the mobile device it has a PDF containing a lot of personal informations like Addresses, Family Status, Accounts name, Phone numbers, etc…
People are not educated to take care of their personal datas..
Using a web page to show the personals data we could achieve more than one goal:
- we strength the overall privacy avoiding data proliferations
- people will remain on the website (marketers will love it)
- we could get granular erasure of datas
- user can update datas
-- Granular erasure of data
As 4.9.6 the request of deleting personal data is an all or nothing actions. People can request to delete all the data from the website and maybe delete his / her account.
People may want to delete just some part of the datas (maybe a second address, the family status, their phone number) but let other to be processed for their sake (they want to be in your interest based newsletter).
And again for the sake of the website admins, the relationship with the user will continue.
Example of an overall process.
- User start a data export request
- Website send an email to be confirmed
- User confirm the email
- Website send a second email with the link to see (and eventually download and erase) the personal datas
- On the Frontend Personal Data Profile Page the user delete an address, his marital status and update the phone number.
Every single step in the process could be automatic or manual depending on admins preferences.
",mnzhc
Needs Patch,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
Needs Patch,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
Needs Patch,43993,Provide indication to admin when user downloads privacy export,,Privacy,4.9.6,normal,normal,Awaiting Review,enhancement,new,,2018-05-07T16:17:24Z,2019-01-16T08:49:53Z,"Hello,
This was discussed on Slack here;
https://wordpress.slack.com/archives/C02RQBWTW/p1525518891000051
Basically along with the tickets which handled updating status to completed it would be nice to indicate when a user actually downloaded the export package. This would allow the admin to assess if they should resend the email.
",garrett-eclipse
Needs Patch,44067,Refactor get_avatar and related functions to make Gravatar a Hook instead of a Default,,Privacy,,normal,normal,Awaiting Review,enhancement,new,,2018-05-14T03:24:43Z,2019-02-13T19:51:55Z,"The design of get_avatar and related functions is a problem for a variety of reasons. It creates a dependency on gravatar even when a gravatar isn't being used.
However, gravatar is such a long-standing part of WordPress it would hurt more to remove it. So, the logical solution is a refactoring.
We've added filters are various levels. Gravatar should be hooked onto these filters, and if someone removes the hook, everything will return an anonymous image hosted in Core, that can be overridden by a plugin.
Identicon, wavatar, and monsterIDs were originally plugins for WordPress that were absorbed by Gravatar(https://blog.gravatar.com/2008/04/22/identicons-monsterids-and-wavatars-oh-my/). They generate anonymous icons from the provided email or hash. Mystery person can be stored locally, and maybe we can add a few options for this.
It would not change any functionality. It might pave the way for local avatars, waiting in #16020 for seven years.
Gravatars are implemented are problematic from a privacy standpoint, which has come out locally as a priority issue. As noted in an 8 year old ticket, #14682, it does share your information with gravatar.
5 Years Ago, in #23179, it waas suggested that gravatars should only be used for registered users.
So, we have people saying that this should be addressed. Local avatars continues to be a request, but this isn't that.
While I set out a bigger agenda here to host the default icons, the scope of this ticket would be that if you remove the gravatar hunting hook from WordPress, it would just return false, as the signature of the function already has as an option.
",dshanske
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,51144,Create a UI for the Disclosures Tab (site-level privacy),,Privacy,,normal,normal,Future Release,feature request,new,,2020-08-26T13:52:23Z,2020-11-26T18:09:52Z,"**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:**
The reach and impact of privacy initiatives are severely limited when there is no UI for it in /wp-admin/.
**The Solution:**
This ticket represents one milestone for the Disclosures Tab initiative.
#51092 proposes a .json schema for various Core components (e.g. avatars), for plugins and for themes.
The UI needs to present this information in a digestible format.
It seems preferable to aggregate the information to provide a holistic understanding to the site owner / admin and then allow them to drill-down to a more granular level (e.g. a single plugin).
The description fields in the schema can be used to explain the significance of each item to the site owner / admin.
Create a sub-menu under Settings called ""Privacy"" (H1).
Create a header called ""Disclosures"" on the page (H2).
The section below this should be filterable.
This section will eventually contain quite a bit of information, so it may be desirable to split it into tabs to improve the readability of the text.
Suggested tabs: Overview, Core, Plugins, Themes, Blocks.
This ticket was created in response to a request from Paaljoachim.",carike
Needs Patch,51188,Website user level consent management framework (logged in users),carike*,Privacy,,normal,normal,Future Release,feature request,accepted,,2020-08-29T19:39:38Z,2022-11-17T20:56:57Z,"**Background:**
The Consent API is an initiative that is currently underway in the Privacy team.
The code is available in the plugin repository here: https://wordpress.org/plugins/wp-consent-api/
The Feature Plugin proposal is here: https://make.wordpress.org/core/2020/04/01/feature-plugin-proposal-wp-consent-api/
While there has been a strong consensus for a long time that a consent management framework is necessary in Core, the Team is still building consensus on what the implementation should look like.
One of the disagreements with the proposed feature plugin implementation, is that consent choices made by website users are not going to be reliably available if they are saved in a cookie, because the cookie may expire, or more likely, be cleared.
While this is an inherent limitation for users who are not logged in, it is not necessary to subject registered users who are logged in to notice fatigue.
More information here: https://make.wordpress.org/core/2020/08/22/request-for-input-consent-preferences-for-logged-in-users-consent-api/
In short, it is possible to save the registered users' consent choices in the database.
**The Challenge:**
Cookies are inherently transient in nature.
In order to make consent choices persistent, user consent choices need to be saved in the database.
This is only possible for users who are registered and logged in.
**The Scope:**
This ticket represents a milestone for Website User Level Consent Management.
List of milestones:
This ticket seeks to answer the following design questions:
{{{#!php
array(
'comprehensive' => true,
'remainder' => true
),
'preferences' => array(
'comprehensive' => false,
'notifications' => array(
'all' => false,
'daily' => false,
'weekly' => true,
'monthly' => false,
'none' => false,
),
'remainder' => true
),
'anon_stats' => array(
'comprehensive' => true,
'remainder' => true
),
'stats' => array(
'comprehensive' => false,
'remainder' => false
),
'marketing' => array(
'comprehensive' => false,
'newsletter' => true,
'targeted_ads' => false,
'remainder' => true
)
);
}}}
The above should be appropriately serialized before being saved to the database.
Example 2:
This shows a use case for which one additional top-level consent type (not exposed to the front end, only available on /wp-admin/) would be very useful.
Plugin authors are currently allowed to advertise / provide notices, as long as they don't hijack the admin panel.
One of the most common ways to permanently dismiss a notice is to add a user_meta value for it - which isn't the best use of the database / ideal for performance.
The below may allow for theme authors to be able to provide installation / setup instructions via admin notifications as well. This ticket only shows a possible way it could be done. All discussion about the theme guidelines themselves should happen during Team meetings and on the relevant P2 posts.
In this example, the notice has not yet been permanently dismissed. Once the notice has been permanently dismissed for that user, the boolean value for that theme under ""repos"" should be set to ""false"".
{{{#!php
array(
'comprehensive' => true,
'remainder' => true
),
'preferences' => array(
'comprehensive' => false,
'remainder' => true
),
'anon_stats' => array(
'comprehensive' => true,
'remainder' => true
),
'stats' => array(
'comprehensive' => false,
'remainder' => false
),
'marketing' => array(
'comprehensive' => false,
'remainder' => true
),
'repos' => array(
'comprehensive' => false,
'exampleTheme' => true,
'remainder' => false
)
);
}}}
The above should be appropriately serialized before being saved to the database.
Example 3:
This shows a use-case where the website owner needs to cater for legislative consent requirements from various jurisdictions.
In this example, the website owner would still like to be able to send first party marketing to website users who choose to opt-out of the sale of their data i.t.o. the CCPA.
{{{#!php
array(
'comprehensive' => true,
'remainder' => true
),
'preferences' => array(
'comprehensive' => true,
'remainder' => true
),
'anon_stats' => array(
'comprehensive' => true,
'remainder' => true
),
'stats' => array(
'comprehensive' => true,
'remainder' => true
),
'marketing' => array(
'comprehensive' => false,
'sell_data' => false,
'remainder' => true
)
);
}}}
**Acknowledgements:**
Thanks to Rogier for defining the initial 5 categories with input from the privacy team.
Thanks to Paapst for the heads-up that consent needs to be re-confirmed if new cookies are added.
Thanks to Retrofitter for inquiring about additional consent categories on P2.
Thanks to Jono for input on a nested structure for consent.",carike
Needs Patch,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
Needs Patch,56312,Appending ?name to home URL shows the posts page instead of a static front page,,Query,,normal,normal,Future Release,defect (bug),reopened,,2022-07-30T10:45:09Z,2023-01-06T09:17:54Z,"I found something strange
I installed a WordPress then from setting . Reading I set a sample page as homepage
And when I opened website it was ok and showed content of sample page but when I added query string “?name” it showed latest blog posts
I tried everything as query string nothing did that and all showed sample page content and that was ok
Just just with ?name query string showed different thing
For ex localhost/site/?name show latest posts but
Localhost/site/?everythingyoutype
Was ok and show content of the page
Why ?name query string is like that??? I want to remove it
actually you must test it just on homepage of your site
not another pages
it hurts SEO if you show something else with query string on your site (specially on your homepage) instead of the main content
basically as you said when you enter the url of homepage with /?name you should see the homepage and nothing should change because it’s just a query string
I can show you an example
see this : https://amepro.at/
as you see everything is fine and homepage of website is ok
but please see this one https://amepro.at/?name
here you see the blog posts and it hurts SEO very bad
I got too much errors on search console with these kind of urls
Can you explan the logic behind it why should we show another thing like latest post when someone enter some parameter ?
it’s not normal at all",masimoti
Needs Patch,55649,Block Query with full post content do not display properly,,Query,5.9.3,normal,normal,Awaiting Review,defect (bug),new,,2022-05-02T12:15:53Z,2022-05-02T12:15:53Z,"When i change the QueryBlock content from the post excerpt to full post content in block theme edditor i get the correct behaviour but on the website it will not display the correct post content
i think it's not inheriting the query from the queryBlock and it is taking the query parameters from the main page instead.",jawedzennaki
Needs Patch,56165,Bogus query parameters force WordPress to drop query limit and exhausts memory,,Query,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-07-06T18:30:28Z,2022-07-06T18:33:37Z,"I noticed that a site was regularly getting out of memory errors at a URL that seems to be an attempt at ""hacking"" a Drupal site:
{{{
https://example.com/?q=user%2Fpassword&name[%23post_render][]=passthru&name[%23type]=markup&name[%23markup]=dir&debug
}}}
For some reason this causes WordPress to execute this query:
{{{
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC
}}}
You'll notice that there is no `LIMIT` set, even though the site has a limit set by default and there are no plugins/filters to alter this.
On a site with a large number of posts this can easily cause memory issues (I noticed it during the `update_meta_cache` function running after the query.
That URL is causing WordPress to execute this query:
{{{
WP_Query->query(Array ([name] => Array ([#post_render] => Array ([0] => passthru),[#type] => markup,[#markup] => dir)))
}}}
The `name` parameter is supposed to be a string, so I'm not sure why it's affecting the query at all (PHP 7.4 does throw warning because WP tries to `trim()` the value, PHP 8.1 throws error).
I haven't gotten far enough in to see why the query limit is dropped, but I imagine in any case this URL should result in either the homepage being displayed or a 404.
Here is a full backtrace:
{{{
#0 update_meta_cache(post, Array ([0] => 81102,[1] => 80934,[2] => 80927,...))
#1 update_postmeta_cache(Array ([0] => 81102,[1] => 80934,[2] => 80927,...))
#2 update_post_caches(Array ([0] => WP_Post Object ([ID] => 81102,[post_author] => 5,[post_date] => 2022-07-01 10:17:29,[post_date_gmt] => 2022-07-01 17:17:29,[post_content] =>
#3 WP_Query->get_posts() called at [/wp-includes/class-wp-query.php:3586]
#4 WP_Query->query(Array ([name] => Array ([#post_render] => Array ([0] => passthru),[#type] => markup,[#markup] => dir))) called at [/wp-includes/class-wp.php:648]
#5 WP->query_posts() called at [/wp-includes/class-wp.php:775]
#6 WP->main() called at [/wp-includes/functions.php:1330]
#7 wp() called at [/wp-blog-header.php:16]
#8 require(/wp-blog-header.php) called at [/index.php:4]
}}}",coreyw
Needs Patch,28568,Can't get private posts/pages via WP_Query when not logged in as administrator,,Query,3.9,normal,normal,Awaiting Review,defect (bug),reopened,,2014-06-17T18:44:59Z,2019-03-22T14:10:01Z,"I want to use WP_Query to display content of one private page on some place in a template.
{{{
// ... theme template sidebar.php, for example
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
Needs Patch,15551,Custom post type pagination redirect,,Query,3.1,normal,normal,,defect (bug),reopened,,2010-11-23T21:50:06Z,2022-12-28T06:15:12Z,"We seem to be having a problem with a redirect on a custom post page (e.g., http://www.example.com/show/slug/).
Everything on the page shows correctly. The template pulls in posts with the following query:
{{{
'show', 'meta_value' => $show->ID, 'paged' => get_query_var('paged'), 'caller_get_posts' => true)); ?>
}}}
After the posts we display pagination links (e.g., http://www.example.com/show/slug/page/2/). In our rewrite rules, we include the following rule which should handle these URLs:
{{{
'show/([^/]+)/page/([0-9]{1,})/?$' => 'index.php?show=$matches[1]&paged=$matches[2]',
}}}
Instead of the page displaying and allowing us to pull in the second page of posts, the browser is being redirected back to the original page (http://www.example.com/show/slug/) with a 301. I see that this is happening inside the redirect_canonical function. The following code in wp-includes/canonical.php replaces /page/2/ with / causing the redirect:
{{{
// paging and feeds
if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) {
if ( !$redirect_url )
$redirect_url = $requested_url;
$paged_redirect = @parse_url($redirect_url);
while ( preg_match( ""#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#"", $paged_redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $paged_redirect['path'] ) ) {
// Strip off paging and feed
$paged_redirect['path'] = preg_replace(""#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#"", '/', $paged_redirect['path']); // strip off any existing paging
$paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $paged_redirect['path']); // strip off feed endings
$paged_redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing comment paging
}
}}}",cbsad
Needs Patch,58200,Empty result when meta_query is supposed to select date less than certain date,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2023-04-26T17:53:16Z,2023-11-10T09:04:06Z,"
{{{
$args = [
'post_type' => 'page',
'posts_per_page' => '10',
'paged' => '1',
'meta_query' => [
'event' => [
'key' => 'event_end',
'value' => date( 'Y-m-d H:i:s' ),
'compare' => '<',
'type' => 'DATETIME'
],
];
}}}
Request will be:
{{{
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE 1=1 AND (
( wp_postmeta.meta_key = 'event_end' AND CAST(wp_postmeta.meta_value AS DATETIME) < '2023-04-26 17:12:15' )
) AND wp_posts.post_type = 'page' AND ((wp_posts.post_status = 'publish'))
GROUP BY wp_posts.ID
ORDER BY CAST(wp_postmeta.meta_value AS DATETIME) DESC
LIMIT 0, 10
}}}
And as a result, empty values will be among the result.
How to check:
1. Add to certain post_type post_meta event_end with empty value.
2. Create new WP_Query with this post_type and meta_query where event_end is less than current date (look above).
3. Get post and check that selection has empty value.
Expected behaviour is to get all posts, where event_end post_meta has a type of DATETIME and not empty.",oglekler
Needs Patch,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
Needs Patch,60395,Filtering posts by open ping_status returns posts with closed ping_status,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-31T07:06:00Z,2024-01-31T10:50:47Z,"CLI command {{{wp post --ping_status=open}}} returns published sticky posts with a {{{ping_status}}} of {{{closed}}}.
{{{
wp post list --ping_status=open --fields=ID,post_status,post_type,ping_status
+------+-------------+-----------+-------------+
| ID | post_status | post_type | ping_status |
+------+-------------+-----------+-------------+
| 2521 | publish | post | closed |
| 2508 | publish | post | closed |
+------+-------------+-----------+-------------+
}}}
The same command with a different output format yields no results:
{{{
wp post list --ping_status=open --format=ids
(no output)
}}}
Setting an arbitrary {{{ping_status}}} still returns results;
{{{
wp post list --ping_status=foobar --fields=ID,post_status,post_type,ping_status
+------+-------------+-----------+-------------+
| ID | post_status | post_type | ping_status |
+------+-------------+-----------+-------------+
| 2521 | publish | post | closed |
| 2508 | publish | post | closed |
+------+-------------+-----------+-------------+
}}}
The command should return no results as there are no posts with {{{ping_status}}} of {{{open}}}. At the very least, the results output should be consistent regardless of format.
Environment
{{{
OS: Linux 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Wed Nov 29 18:55:19 UTC 2023 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php
PHP version: 8.1.27
php.ini used: /etc/php.ini
MySQL binary: /bin/mysql
MySQL version: mysql Ver 15.1 Distrib 10.5.22-MariaDB, for Linux (x86_64) using EditLine wrapper
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /var/www
WP-CLI packages dir:
WP-CLI cache dir: /home/deploy/.wp-cli/cache
WP-CLI global config:
WP-CLI project config: /var/www/wp-cli.yml
WP-CLI version: 2.9.0
}}}
GitHub issue:
https://github.com/wp-cli/entity-command/issues/453
",jamieburchell
Needs Patch,59809,"Inconsistent ""ITEMS PER PAGE"" across pagination pages in the Query Loop",,Query,,normal,normal,Awaiting Review,defect (bug),new,,2023-11-06T02:11:45Z,2024-02-21T13:47:33Z,"There is an inconsistent behavior of the ""ITEMS PER PAGE"" across pagination pages in WP 6.4 and TT4 the Query Loop block.
Here is how to replicate it:
1. Ensure you have WP 6.4-RC3 installed, and the TT4 activated.
2. Ensure you have at least 10 blog posts.
3. Make a certain blog post sticky.
4. Navigate under Appearance > Editor, and edit any template.
5. In the template, add the Query Loop block, and choose a pattern that has pagination on it.
6. Disable the ""Inherit query from template"", and ensure the ""STICKY POSTS"" is set to include. Also, ensure the ""ORDER BY"" is set to ""Newest to Oldest""
7. From the ""Display Settings"" of the block, set the ""ITEMS PER PAGE"" to 2.
8. Save the changes, and come back to the frontend.
9. You will see that it shows 3 posts in the Query Loop, which is expected as it includes the Sticky post as well.
10. Now, navigate to the 2nd page using the pagination. See, now you will see 2 posts. This includes the STICKY post and another post.
11. Now, navigate to the 3rd page using the pagination. See, now you again have 3 posts showing, which is expected.
This is causing an issue with the 2nd page of the pagination, which is only showing 2 posts, including the Sticky one. But all the other pagination pages are showing fine, with 3 posts each, including the Sticky one. This is occurring in WP 6.4 and with the TT4 theme.",rajinsharwar
Needs Patch,47493,Meta Query Sorting with relation => OR not behaving as expected,,Query,4.8.2,normal,normal,Awaiting Review,defect (bug),new,,2019-06-06T13:45:36Z,2019-06-06T14:18:32Z,"When sorting on multiple meta query clauses with the default AND relation the sorting works as expected. When sorting with an OR relation the sorting does not function as expected.
{{{
'meta_query' => array(
//'relation' => 'OR',// when turning this on the sorting does not work..
'cornerstone_clause' => array(
'key' => '_yst_is_cornerstone',
'compare' => 'EXISTS',
'type' => 'BINARY',
),
'count_clause' => array(
'key' => 'erp_post_views_count',
'compare' => '>',
'value' => 0,
'type' => 'NUMERIC',
),
),
'orderby' => array(
'cornerstone_clause' => 'DESC',
'count_clause' => 'DESC',
),
}}}
The idea of the query is to first show any posts that contain '_yst_is_cornerstone' and sort the remaining by 'erp_post_views_count'.",tcaneeaglepub
Needs Patch,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
Needs Patch,40397,PHP 7.1.x problem in WP_Query,,Query,4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-04-08T23:08:20Z,2018-01-11T03:59:56Z,"I believe I have found another instance of the defect reported in Trac #37772. This was reported in my plugin's support forum:
https://wordpress.org/support/topic/warning-parameter-2-to-mlaquery
The first post there includes the PHP message:
Warning: Parameter 2 to MLAQuery::mla_query_posts_search_filter() expected to be a reference, value given in /home/prodport/staging/1/wp-includes/class-wp-hook.php on line 298
A later post from @adrianb includes a call trace showing the call to `apply_filters()` from line 1995 in WP_Query.",dglingren
Needs Patch,40984,Possible Bug with Named Orderby Meta Query SQL,,Query,4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-06-09T19:51:56Z,2017-06-09T20:10:26Z,"I don't know how easy this would be to replicate, but I can at least walk through the steps in identifying the bug, and how I was able to address it for my own use-case.
On the web application we're building, we've added a simple meta field called ""spotlight"" to basically drive a single post to the front of the list, and apply some extra styling.
To do this, I had built the following query:
{{{#!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
Needs Patch,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
Needs Patch,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
Needs Patch,48020,Queries display in inconsistent order when ordering by meta_value_num,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2019-09-11T17:00:10Z,2019-09-11T18:22:09Z,"So I caught this the other day. When ordering a query by
{{{meta_value_num}}}, multiple posts sharing the same meta value display in a random order such that if you run two identical queries, the order of the posts could differ between the two.
Example use case. I have a custom {{{class}}} post type with a {{{date}}} post meta. Many classes share the same date. On the frontend, I am displaying 12 classes at a time, ordered by date, and when users select to load more I fetch more posts from the server with and query more classes with
{{{'offset' => $classes_showing}}} and {{{'orderby' => 'meta_value_num'}}}. Classes belonging to the same show up in different orders from query to query, which occasionally results in multiple classes shown on the frontend.
Hopefully that was clear enough. Let me know if you need more code. Thanks.",truheart
Needs Patch,56081,Query Loop block with selection causes Sticky Posts setting to be ignored,,Query,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-27T21:06:32Z,2022-06-27T21:06:32Z,"The Query Loop has an option to ""Inherit query from template"". There is another option to display Sticky posts - only, include, or exclude. On an Archive page where a query has pre-selected taxonomy, the sticky selector is ignored. So, where Inherit Query is checked, it doesn't matter if Sticky Posts is set to Include, Exclude, or Only - stickies and non-stickies are both always shown. The correct selection is shown in the template editor, but not when rendering an archive page from the front-end.
**To test:** I am getting my stickies up top and everything following by using two query loops in the default Home page that displays all blog posts.
In the Home template: This page is not filtered. The first query loop has Inherit Query unchecked, and Sticky Posts set to Include. The second query loop has Inherit Query unchecked, and Sticky Posts set to EXclude. So there are two loops, one for stickies, and the next for all others. This results here are as expecteed.
To achieve the same results as above for the Archive template, which is filtered. The two query loops would be set the same as above, except with Inherit Query checked in both. But the result is not as expected.
Let's try a simpler version for the Archive. One Query Loop has Inherit Query checked, and Sticky Posts set to Exclude or Only. The Sticky setting is ignored and all pre-selected posts are rendered in the archive page with stickies and non-stickies mixed. Again, it looks OK on the back-end, not on the front-end.
**Desired behavior:** The Sticky setting and anything else that can be configured for a Query Loop should be included in the query at run-time.
**Notes:**
- This might be specific to the Twenty TwentyTwo theme.
- I have not checked to see if the behavior is the same with the classic loop, without blocks, with PHP templates rather than HTML templates.",Starbuck
Needs Patch,60274,Query loop showing too many posts,,Query,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2024-01-17T14:26:37Z,2024-01-17T14:35:11Z,"With recent updates, the query loop shows 4 posts while in editor (per the settings) but shows 5 in the site itself. (see mcld.org home page towards the bottom)",jcoonrod
Needs Patch,35758,Reading Settings fallback option when none is selected at Front page displays,,Query,4.4.1,normal,normal,,defect (bug),new,,2016-02-05T20:26:25Z,2019-06-04T20:54:56Z,"Hi,
I found a bug that makes the home page think it's a page. (I didn't look at the WP_Query variables.)
Here are the steps to replicate the issue:
1. Go to /wp-admin/options-reading.php
2. Delete the selected option at ""Front page displays"" through Developer Tools/Web Inspector.
3. Save settings.
4. Now no setting is selected.
The home page is a Posts Page but WP_Query doesn't recognize it as one, nor as a front page at all.
This causes all kinds of issues when plugins/themes rely on is_front_page().
Thanks!",Cybr
Needs Patch,36966,Search is not working with soft hyphen symbols,,Query,4.5.2,normal,normal,,defect (bug),new,,2016-05-28T21:36:29Z,2019-06-04T20:59:30Z,"Site search doesn't work if a word contains soft hyphen symbols.
When a word is pretty long and it should fit within a limited space, the best solution seems to be to stuff it with soft hyphens (), so there will be no hanging lines.
It looks like this: Pseudopseudohypoparathyroidism
But in this case the word can't be found.",mvasin
Needs Patch,45376,Search not working as described in codex,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2018-11-19T13:07:01Z,2018-12-07T01:56:14Z,"In the codex it says if I sort my search query results by relevance it should behave as follows:
""Order by search terms in the following order: First, whether the entire sentence is matched. Second, if all the search terms are within the titles. Third, if any of the search terms appear in the titles. And, fourth, if the full sentence appears in the contents.""
That actually is not right, because the third case never happens! Example:
I have 3 Posts with titles: ""Keyword"", ""Key"" and ""Word""
If I search for ""?s=key+word"" the result ist only ""Keyword"" but it should be ""Key"" and ""Word"" too!?",totatari
Needs Patch,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
Needs Patch,50885,Setting a pre_get_posts query post_type to array results in broken wp-admin filters,,Query,5.4.2,normal,normal,Awaiting Review,defect (bug),new,,2020-08-10T12:46:14Z,2020-08-11T01:27:00Z,"I have a in-house plugin which creates a few extra alternate post types (eg. `post_custom`), and one of its requirements is that these post types are queried together with normal posts.
To do this, I've implemented a function which converts any queries for the `post` post type into `array( 'post', 'post_custom', ... )` and it works as it should, but when on wp-admin, if one tries to go into the default ""Posts"" menu and filter by author or even search for anything, it will return a message saying ""Invalid post type"".
Checking the URL, it will contain the `post_type` query string as ""Array"" instead of ""post"", and changing it manually to ""post"" fixes the issue. I guess the wp-admin interface is not handling the array of post types correctly?",matpratta
Needs Patch,54436,Sorting issue- when sorting via a custom meta key,,Query,5.5.2,normal,normal,Awaiting Review,defect (bug),new,,2021-11-13T12:38:27Z,2021-11-14T18:01:55Z,"So, I created a new meta key with the name `_tstock` and stored numeric values in it, used the code below for sorting:
{{{
$args['orderby'] = 'meta_value_num';
$args['order'] = 'DESC';
$args['meta_key'] = '_tstock';
}}}
The products tend to repeat after switching the page if the value of `_tstock` of the last product is similar to first product on the next page.
Elaborating a bit more :-
Let's assume that there are 10 products with the `_tstock` value equal to one and 5 products are displayed on the first page while the rest 5 are displayed on second page.
The total number of the product will not change instead some of the products from the first page will be displayed on the second page replacing the ones that should be displayed.",prashantinfozion
Needs Patch,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
Patch Needs Refresh,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
Needs Patch,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
Needs Patch,58553,Two query blocks on home template (FSE) breaks the second one,,Query,6.2,normal,normal,Awaiting Review,defect (bug),new,,2023-06-16T06:47:30Z,2023-06-16T06:47:30Z,"On a site we have a home.html template where we display a custom query with sticky posts before the main query (inherited). We also filter the main query to do not display sticky posts again. Since we updated to 6.1.3 the second query skips the first post (that is the most recent non-sticky post).
After some debugging I realize that the `$wp_query->current_post` value is 0 after the first loop instead of -1, causing it to skip the first item (index 0) on the `$wp_query->posts array`. Following the logic in wp-includes I cannot find any obvious change introduced on 6.1.3 to produce this error.
I’ve reproduced the issue on a fresh new installation of wp (with 6.2 version):
* I have created several posts (duplications of Hello world)
* I have crated a new category.
* I have assigned three posts to the new category
* I have modified the home template (on the site editor) to add a custom query before the main one, where I display the three posts from the new category
[[Image(https://images2.imgbox.com/3d/5c/wfm9rpvl_o.png)]]
Result with wp 6.1.2
When I update to 6.1.3, the “last one” disapears:
[[Image(https://images2.imgbox.com/43/b0/OMZDY2ba_o.png)]]
I have found a quick fix that solves it:
{{{#!php
is_home){
global $wp_query;
//sets the $wp_query->current_post to -1
$wp_query->current_post = -1;
}
});
}}}
But I assume this may potentially affect more users and should be fixd on the core.
BTW: Using two custom queries doesn’t work for us because we want to keep the default pagination settings with the `/page/2` urls",acaballerog
Needs Patch,35131,Unexpected 404: pending post hides published post with matching slug,,Query,4.3.1,normal,normal,,defect (bug),new,,2015-12-17T08:55:51Z,2019-06-04T20:53:40Z,"While attempting to recreate #35012 and #35031 I also noted the anomaly previously reported in #22902 where an authorized user could see all the posts displayed as if they were a single page.
Investigating this led me to determining that the existence of a new ""pending"" post with the same slug as an existing post prevents the user from visiting the existing post using its permalink.
Example:
post: 31766, status: pending, title: Cycle 1, slug: cycle-1 date: 2015-12-16 11:18:26
Content: You might be able to see this if you're logged in.
post: 31764, status: publish, title: Cycle 1, slug: cycle-1 date: 2015-12-16 11:17:17
Content: You should be able to see this.
Steps:
1. Create posts as above
2. Log out or otherwise visit the site as a visitor
3. View the blog page or the archive
4. Note that you see the published post, not the pending post
5. Click on the published post's permalink
6. You'll get a 404.
=== Expected result ===
Displays the published post.
=== Actual result ===
Displays a 404 page.
=== Explanation ===
- The query in WP_query returns two posts: 31766:pending and 31764:publish.
- Even though there are two posts in the result set, `is_single` is true.
- The logic to ""Check post status to determine if post should be displayed."" kicks in and the post array is emptied.
- This eventually leads to the 404.
=== My Conclusion ===
There are two problems leading to this one
1. The pending post should not have been given the same slug as the published post.
2. `is_single` should not have been set to true.
=== Proposed solution ===
If it's not possible to deal with the underlying cause then the logic in the ""Check post status..."" should be adjusted to filter out the posts that the user shouldn't have been able to see. If the resulting set contains more than one post then is_single should become false.
I noticed this on 4.4 but have reproduced it on 4.3.
I imagine the actual bug goes back a long long way.
",bobbingwide
Needs Patch,58806,Unexpected ordering result when ordering based on multiple clauses,,Query,6.2.2,normal,normal,Awaiting Review,defect (bug),new,,2023-07-14T08:17:52Z,2023-07-14T08:17:52Z,"I am not sure if this is a bug or this is a mis-understanding from my side on how the ordering works but
Consider the following `WP_Query`:
{{{#!php
'ids',
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_query' => [
'relation' => 'OR',
'sticky_clause' => [
'key' => '_sticky',
'type' => 'UNSIGNED',
],
[
'key' => '_sticky',
'compare' => 'NOT EXISTS',
],
],
'orderby' => [
'sticky_clause' => 'desc',
'title' => 'asc',
],
]
);
}}}
The expected behavior is that the query should show posts that have a `_sticky` meta first, then shows the rest of the posts sorted by their title alphabetically.
However it doesn't happen.
{{{
array(7) {
[0]=>
string(20) ""A guide to WordPress""
[1]=>
string(27) ""Brotherhood of creativeness""
[2]=>
string(30) ""Gather all information you can""
[3]=>
string(16) ""Yet another post""
[4]=>
string(12) ""Hello world!""
[5]=>
string(36) ""Opera browser released a new version""
[6]=>
string(27) ""Zebras are cool and relaxed""
}
}}}
In the above output of post titles, the `""Hello World!""` has `_sticky` meta, but the sorting isn't correct (nor alphabetically and nor by `_sticky` meta first)
This is the SQL query generated by this query:
{{{#!php
SELECT
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
AND mt1.meta_key = '_sticky'
)
WHERE
1 = 1
AND (
wp_postmeta.meta_key = '_sticky'
OR mt1.post_id IS NULL
)
AND wp_posts.post_type = 'post'
AND (
(wp_posts.post_status = 'publish')
)
GROUP BY
wp_posts.ID
ORDER BY
CAST(
wp_postmeta.meta_value AS UNSIGNED
) DESC,
wp_posts.post_title ASC
}}}
If I am not wrong the issue happens at the position `ORDER BY CAST(wp_postmeta.meta_value AS UNSIGNED) DESC`, it should use the alias instead of the table name here (should be `mt1.meta_value`)",pelentak
Needs Patch,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
Needs Patch,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
Needs Patch,36696,WP_Meta_Query can give wrong results when comparing large numbers,,Query,3.8.1,normal,normal,,defect (bug),new,,2016-04-28T02:23:43Z,2019-06-04T20:58:03Z,"This is a follow on from #27272.
Using quoted numbers can trigger MySQL to do floating-point type conversion (last two points in the first bullet list in http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html):
> * If one of the arguments is a decimal value, comparison depends on the other argument. The arguments are compared as decimal values if the other argument is a decimal or integer value, or as floating-point values if the other argument is a floating-point value.
> * In all other cases, the arguments are compared as floating-point (real) numbers.
Currently number literals are quoted in `WP_Meta_Query`, whereas the LONGTEXT `meta_value` column is cast to the passed-in meta `type`. Thus when a number literal (quoted string) is compared to the `meta_value` column (cast to SIGNED/UNSIGNED meta `type`), floating-point type conversion is evoked. If the numbers involved are larger than the floating-point precision (53 bits), then incorrect comparisons can occur.
You can see this happening in the `mysql` client by using the 54 bit numbers 9007199254740992 (`0x20 0000 0000 0000`) and 9007199254740993 (`0x20 0000 0000 0001`):
{{{
select '9007199254740992'+0.0, '9007199254740993'+0.0, '9007199254740992'+0.0 < '9007199254740993'+0.0;
}}}
which will return:
{{{
+------------------------+------------------------+-------------------------------------------------+
| '9007199254740992'+0.0 | '9007199254740993'+0.0 | '9007199254740992'+0.0 < '9007199254740993'+0.0 |
+------------------------+------------------------+-------------------------------------------------+
| 9.007199254740992e15 | 9.007199254740992e15 | 0 |
+------------------------+------------------------+-------------------------------------------------+
}}}
(Note the results are system dependent.)
A way around this is to not quote number literals, as in the proposed patch, based on @wonderboymusic's [https://core.trac.wordpress.org/ticket/27272#comment:5 ""27272.2.diff""]. It's been switched (ahem) to an if-elseif-else statement to easily allow cases like `DECIMAL(10,2)` etc to be added. (Note the patch attached here also fixes a regression I introduced in previous proposed patches on the #27272 ticket re casting on `LIKE`/`NOT LIKE`.)
This issue relates to #36652 (using the PHP type of the meta `value` to determine cast), and the proposed patch should facilitate it.
This issue also relates to #36625 (don't bother `CHAR` casting `meta_value` column), and the proposed patch shouldn't impact on a fix for that.
",gitlost
Needs Patch,47009,WP_Query bug with author=0,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2019-04-22T07:10:12Z,2019-04-22T08:17:08Z,"Hi all,
I found a weird behaviour of WP_Query using the argument author.
If author is set to 0, the query returns all the posts and not an empty set.
Is this a wanted behaviour or a bug?",mikylucky
Needs Patch,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
Needs Patch,47802,WP_Query get_posts sometimes inserts contradictory taxonomy queries,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2019-07-30T18:15:54Z,2020-09-04T15:17:24Z,"In our website, we have a custom taxonomy called 'section.' It figures prominently in a query we're doing. Here's a (lightly anonymized) dump of the array we pass to the WP_Query constructor, before calling get_posts() on the query created:
{{{
[posts_per_page] => 25
[post_type] => post
[tax_query] => Array
(
[0] => Array
(
[operator] => IN
[taxonomy] => section
[field] => slug
[terms] => Array
(
[0] => section1
[1] => section2
[2] => section3
[3] => section4
)
)
[1] => Array
(
[operator] => NOT IN
[taxonomy] => section
[field] => slug
[terms] => Array
(
[0] => section5
)
)
[relation] => AND
)
[orderby] => post_date
[order] => DESC
}}}
We had a problem where many posts that should be returned here, are not. After much digging, I found the problem in get_posts. specifically in the segment of code commented:
{{{
/*
* Set 'taxonomy', 'term', and 'term_id' to the
* first taxonomy other than 'post_tag' or 'category'.
*/
}}}
It's true, the code is doing just that. It's adding a taxonomy parameter. But it's picking up one of the sections that is supposed to be one of several possibilities the section can be IN, not required. It then makes that one single section required in an appended AND! Sample (again, lightly anonymized) SQL segment of the obviously self-contradictory conditions created (where 1001-1005 are the IDs corresponding to sections 1-5)
{{{
wp_term_relationships.term_taxonomy_id IN (1001, 1002, 1003, 1004)
AND
wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (1005)
)
AND
tt1.term_taxonomy_id IN (1001)
)
}}}
That third clause, the final IN (1001) is being added by get_posts in the above-commented section. That's why we only get a fraction of the posts we're supposed to get. It's effectively overriding most of our IN list!
I can work around this by prepending to my tax_query an effective no-op using some custom taxonomy, but this seems like a problem that should be addressed in the WP core.
thank you,",nstevensdc
Needs Patch,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
Needs Patch,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
Needs Patch,35820,WP_Query(array( 'p' => 0)) will return posts,,Query,4.4.2,normal,normal,,defect (bug),new,,2016-02-12T21:28:16Z,2019-06-04T20:55:04Z,"Long to short, I was presuming that if the $args were such that no rows exist then WP_Query would return nothing.
Not so.
If by chance, 'p' => 0, you do get results.
Perhaps the 0 is interpreted as false? Even so, an ID == false should return no row, yes? Or one might argue ""well, that query doesn't make sense. it's not really valid."" again, all the more reason to return nothing.
",ChiefAlchemist
Needs Patch,48029,WP_Query::query only using a single post_status,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2019-09-12T18:27:51Z,2020-05-12T05:01:09Z,"While investigating why `bbp_forum_get_subforums()` was not returning private forums while being a keymaster, I found that WP_Query::query() will only use the first post_status of a given array.
E.g:
{{{
WP_Query Object
(
[query] => Array
(
[post_parent] => 5420
[post_type] => forum
[post_status] => Array
(
[0] => publish
[1] => private
[2] => hidden
)
[posts_per_page] => 50
[orderby] => menu_order title
[order] => ASC
[ignore_sticky_posts] => 1
[no_found_rows] => 1
)
...
[request] => SELECT wpp_posts.ID FROM wpp_posts WHERE 1=1 AND wpp_posts.post_parent = 5420 AND wpp_posts.post_type = 'forum' AND ((wpp_posts.post_status = 'publish')) ORDER BY wpp_posts.menu_order ASC, wpp_posts.post_title ASC LIMIT 0, 50
}}}
The same thing applies if you pass it a comma-separated string of statuses:
{{{
WP_Query Object
(
[query] => Array
(
[post_parent] => 5420
[post_type] => forum
[post_status] => publish,private,hidden
[posts_per_page] => 50
[orderby] => menu_order title
[order] => ASC
[ignore_sticky_posts] => 1
[no_found_rows] => 1
)
...
[request] => SELECT wpp_posts.ID FROM wpp_posts WHERE 1=1 AND wpp_posts.post_parent = 5420 AND wpp_posts.post_type = 'forum' AND ((wpp_posts.post_status = 'publish')) ORDER BY wpp_posts.menu_order ASC, wpp_posts.post_title ASC LIMIT 0, 50
}}}
Steps to replicate (taken from bbpress/includes/forums/template.php):
{{{
$r = bbp_parse_args( $args, array(
'post_parent' => 0,
'post_type' => bbp_get_forum_post_type(),
'post_status' => implode( ',', $post_stati ),
// 'post_status' => $post_stati,
'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
'orderby' => 'menu_order title',
'order' => 'ASC',
'ignore_sticky_posts' => true,
'no_found_rows' => true
), 'forum_get_subforums' );
$r['post_parent'] = bbp_get_forum_id( $r['post_parent'] );
// Create a new query for the subforums
$get_posts = new WP_Query();
// No forum passed
$sub_forums = !empty( $r['post_parent'] ) ? $get_posts->query( $r ) : array();
}}}",useStrict
Needs Patch,49911,WP_Tax_Query generates incorrect SQL,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2020-04-15T16:25:44Z,2020-04-15T19:33:57Z,"When calling WP_Query($arguments)::get_posts() like:
{{{
$arguments = [
'category__in' = ['7','31','704'],
'post_type' => array('post', 'page'),
'post_status' => array('publish'),
'nopaging' => true
];
}}}
704 is the category for posts and 7, 31 for pages. The following query will be produced:
SELECT bct_posts.* FROM bct_posts LEFT JOIN bct_term_relationships ON (bct_posts.ID = bct_term_relationships.object_id) LEFT JOIN bct_term_relationships AS tt1 ON (bct_posts.ID = tt1.object_id) LEFT JOIN bct_term_relationships AS tt2 ON (bct_posts.ID = tt2.object_id) WHERE 1=1 AND ( bct_term_relationships.term_taxonomy_id IN (704) AND tt1.term_taxonomy_id IN (704) AND tt2.term_taxonomy_id IN (7,31,704) ) AND bct_posts.post_type IN ('post', 'page') AND ((bct_posts.post_status = 'publish')) GROUP BY bct_posts.ID ORDER BY bct_posts.post_date DESC
instead of
SELECT bct_posts.* FROM bct_posts LEFT JOIN bct_term_relationships ON (bct_posts.ID = bct_term_relationships.object_id) WHERE 1=1 AND ( bct_term_relationships.term_taxonomy_id IN (7,31,704) ) AND bct_posts.post_type IN ('post', 'page') AND ((bct_posts.post_status = 'publish')) GROUP BY bct_posts.ID ORDER BY bct_posts.post_date DESC
The first query returns only posts, second one posts, and pages. Please note that categories and tags are enabled for pages.
",janznordman
Needs Patch,46347,WP_Term_Query where sql_clauses oddity,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2019-02-26T02:37:08Z,2019-02-26T03:03:52Z,"Hello, I was messing around with a customized version of the WP_Term_Query and noticed something odd.
In the function get_terms, there are a lot of places where {{{$this->sql_clauses['where'][somekey]}}} variables are created.
However, on line [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-term-query.php#L642 643], this code :
{{{#!php
$where = implode( ' AND ', $this->sql_clauses['where'] );
}}}
only uses the first sub array value found and ignores all the other keys.
Shouldn't this be:
{{{#!php
$where = implode( ' AND ', array_values($this->sql_clauses['where']));
}}}
so that all array elements are included in the where?",vrandom
Needs Patch,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
Needs Patch,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
Needs Patch,44519,Where are the pages of the headings added with the + add-on (any) ala https://wp-kama.ru/cat/wordpress/codex+xxx,,Query,,normal,normal,Awaiting Review,defect (bug),new,,2018-07-05T10:00:29Z,2018-07-05T14:39:16Z,"Here is the page for this blog (kama) - https://wp-kama.ru/cat/wordpress/codex+xxx
This is a page of the rubric with the added + add-on (any)
She does not give out the content, but her response code is 200 - http://joxi.ru/vAWplvLi13bNqr
It's just that Kama banned the headings for indexing through
meta name = ""robots"" content = ""noindex""
I have the same headings for indexing are allowed.So somehow finding such pages the search drags them to the index.
This is exactly what happens to me and Yandex joyfully informs me that I have dragged another pack of such pages into the index.
How to make sure that an error 404 would appear on the page https://wp-kama.ru/cat/wordpress/codex+xxx
As an option - how to add them
meta name = ""robots"" content = ""noindex""
Thank you.",Dmitriy1973
Needs Patch,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
Needs Patch,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
Needs Patch,48360,`meta_value` is ignored when empty string is provided,,Query,3.2,normal,normal,Awaiting Review,defect (bug),new,,2019-10-17T16:40:23Z,2020-02-13T12:30:59Z,"When trying to create a custom query using `meta_*` parameters, `WP_Meta_Query` will ignore `meta_value` if it is an empty string.
This does appear to be somewhat intentional, since `WP_Query` will set the default value for `meta_value` to an empty string. This can be seen here: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-meta-query.php#L255
The problem comes when you want to write a query that specifically targets meta keys that have empty values. The `'meta_value' => ''` parameter is stripped, and then the query does not behave properly. Here's an example query:
{{{#!php
'product',
'posts_per_page' => 10,
'meta_key' => '_regular_price',
'meta_value' => '',
'meta_compare' => '=',
);
$query = new WP_Query( $args );
}}}
I would like to propose that an empty string be allowed for `meta_value`. Alternatively, the fact that an empty value will be stripped should at least be documented more clearly so that developers know to expect that behavior.
Props also to @richardbuff for helping identify the issue.",JPry
Needs Patch,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
Needs Patch,45666,"adding ""order"" as query arg to the homepage url you are redirected to the last posts page",,Query,,normal,normal,Awaiting Review,defect (bug),new,,2018-12-16T19:30:08Z,2018-12-18T11:38:25Z,"I've tested it on many sites, with different plugins, no plugins, different themes, default WordPress themes. If you add ?order=something to the home page url you have a redirection to the last posts page.
",giuse
Needs Patch,57505,"category archive url ending with ""/0"" should be 404",,Query,,normal,normal,Awaiting Review,defect (bug),new,,2023-01-19T09:33:54Z,2023-05-14T13:17:29Z,"First, if URL is ""/category/cat1/0"", first, it is recognized as `category_name=""cat1/0""`,
then ""is_category=true"" and category archive template should be selected.
But for really query, `category_name=""0""` and `empty($q[""category_name""])==true`,
so it is recognized as ""category is not specified"", then `tax_query` will be empty, and `queried_object==null`.
Finally, category template will be confused.
No category is selected, any category related information are broken (maybe rise warnings or errors).
Any recent posts of any public post types will be displayed even if its post_type dose not belong to core 'category' taxonomy.",obache
Needs Patch,57766,filter query_loop_block_query_vars repeater 4 times,,Query,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-02-18T21:20:51Z,2023-02-18T21:40:51Z,"Hello! I think that filter query_loop_block_query_vars be repeated 4 times foreach query.
Tried to use this simple code in functions.php(theme Twenty Twenty-Two, no plugins):
add_filter( 'query_loop_block_query_vars', function( $query, $block ){
echo '1 ';
return $query;
}, 21, 2 );
You can notice 4 times 1 on top of the page.",gigito78
Needs Patch,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
Needs Patch,48860,get_queried_object return false when executed in parse_query hook,,Query,5.3,normal,normal,,defect (bug),reopened,,2019-12-03T08:47:53Z,2019-12-03T22:42:20Z,"When this function is executed in parse_query hook (i.e. woocommerce-perfect-seo-url) on author page ( /author/XXX/ ) it results with this notice.
{{{
#13 E_NOTICE: Trying to get property 'ID' of non-object
}}}
It's because 'author_name' is not converted into 'author' field in parse_query.
It's only used to mark page as ""is_author"".
{{{
if ( '' != $qv['author_name'] ) {
$this->is_author = true;
}
}}}
And get_queried_object relies on 'author' variable.
{{{
} elseif ( $this->is_author ) {
$this->queried_object_id = (int) $this->get( 'author' );
$this->queried_object = get_userdata( $this->queried_object_id );
}
}}}
",fliespl
Needs Patch,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
Needs Patch,49550,"is_home is set to true even for cron jobs, which causes sticky posts to get prepended to all WP_Query results",,Query,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-02-28T21:10:32Z,2023-02-24T23:41:36Z,"Hi,
We just ran into a bug where sticky posts were prepended to the list of posts being processed by a WP cron job in a new `WP_Query` like this:
{{{
$query = new WP_Query([
'post_status' => 'future',
'date_query' => array(
'before' => '- 1 minute'
),
'numberposts' => -1
]);
}}}
To my surprise, once someone stickied a post, our function in the cron job started doing stuff to the stickied posts, even though it simply runs in WP cron and we're not on the homepage.
I then looked at the logic that determines if the sticky posts get prepended.
{{{
// Put sticky posts at the top of the posts array
$sticky_posts = get_option( 'sticky_posts' );
if ( $this->is_home && $page <= 1 && is_array( $sticky_posts ) && ! empty( $sticky_posts ) && ! $q['ignore_sticky_posts'] ) {
}}}
So this can only fire when `is_home` is true. But how can it be? We're running via WP cron.
Looking at that logic:
{{{
if ( ! ( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) ) {
$this->is_home = true;
}
}}}
Since none of these are set - we're in WP cron - `is_home` gets set to true. That doesn't seem right. Is this a sneaky bug or am I missing something? Shouldn't it also check if it's running in cron here and not set `is_home` if so?",archon810
Needs Patch,45400,last of query_vars contains anchor,,Query,4.9.8,normal,normal,Awaiting Review,defect (bug),new,,2018-11-22T16:23:44Z,2018-12-05T17:17:29Z,"Anchor links (at least individual comment links) are generated basically by appending ""/#Comment-XX"" to the end of URL.
In which case $wp_query->$query_vars returns last variable with appended ""/"" in it.
",visnevskis
Needs Patch,48280,orderby meta_value breaks with newer versions of MySQL,,Query,5.2.3,normal,normal,Awaiting Review,defect (bug),new,,2019-10-10T19:01:27Z,2020-01-30T23:03:53Z,"When running a query like this:
{{{#!php
'course_record',
'posts_per_page' => -1,
'orderby' => 'meta_value',
'meta_key' => 'start_date'
));
?>
}}}
which results in the following SQL query:
{{{#!sql
SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( wp_postmeta.meta_key = 'start_date' ) AND wp_posts.post_type = 'course_record' AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value DESC
}}}
On MySQL v5.7.25, it works fine and returns posts as expected.
On MySQL v8.0.16, it returns zero posts without any errors.
The weird thing is, if I try to run the SQL statement from above directly into the MySQL console '''on either MySQL version''', I get the following error:
{{{#!text
ERROR 1055 (42000): Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'wp_artofed.wp_postmeta.meta_value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
}}}
I also get the same error if I try the SQL statement directly in PHP outside of WordPress '''again, on either MySQL version''':
{{{#!php
connect_error) die(""Connection failed: $conn->connect_error"");
if (!$results = $conn->query(""SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( wp_postmeta.meta_key = 'start_date' ) AND wp_posts.post_type = 'course_record' AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value DESC"")) {
die(""Query Error: $conn->error"");
}
?>
}}}
However it works if I use `$wpdb->get_results` '''on MySQL v5.7.25''' but not v8.0.16:
{{{#!php
get_results(""SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( wp_postmeta.meta_key = 'start_date' ) AND wp_posts.post_type = 'course_record' AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value DESC"");
?>
}}}
I was able to get everything working however by adding `wp_postmeta.meta_value` to the `GROUP BY` clause:
{{{#!php
query_vars) &&
$query->query_vars['orderby'] === 'meta_value'
) {
global $wpdb;
$groupby .= "", {$wpdb->postmeta}.meta_value"";
}
return $groupby;
}
?>
}}}",KodieGrantham
Needs Patch,31957,"query fails, when post is queried under specific name",,Query,4.1.1,normal,normal,,defect (bug),new,,2015-04-13T07:28:11Z,2019-06-04T20:49:30Z,"i.e., i have custom post type, named ""CARS"",
and when i have standard category, named ""CARS""..
when i publish '''standard''' post under ""cars"" category:
mysite.com/cars/something-name...
worpdress thinks, that it is under custom-post types, and 404 page is displayed..
to fix that, i have made this function:
{{{
//example URL: yoursite.com/cars/subcat/TORNADOO
add_action( 'pre_get_posts', 'myf' ); function myf( $query ) {
if ( $query->is_main_query() ) {
//when the PERMALINK was not found, then 404 maybe triggered.. But wait! maybe it is a standard post, under the standard category(which's name is i.e. ""cars"")
if (!url_to_postid(currentURL__MLSS)){
$link_array=explode('/','/cars/subcat/TORNADOO');
$k=array_filter($link_array); //remove empty values
$k=array_values($k); //reset hierarchy
$all_nmb = count($k);
//if post exists with the found slug(""TORNADOO""), lets check, if their parents are categories
$post=get_page_by_path(basename('TORNADOO'), OBJECT, 'post');
if ($post){
for($i=0; $i<$all_nmb-1; $i++){
$cat = get_term_by('slug', $k[$i], 'category');
if(!(in_category($cat->term_id,$post->ID) || post_is_in_descendant_category(array($cat->term_id),$post->ID))){
$failed=true; break;
}
}
if (!$failed){
//new query
$query->init();
$query->parse_query( array('post_type' =>'post') ) ;
//others
$query->is_home = false;
$query->is_single = true;
$query->is_singular = true;
$query->is_page = false;
$query->queried_object_id = $post->ID;
$query->set( 'page_id', $post->ID );
}
}
}
//if page exists with the that link, then query will be made correctly..
//$page=get_page_by_path(...., ..., 'page');
}
if ( ! function_exists( 'post_is_in_descendant_category' ) ) { function post_is_in_descendant_category( $cats, $_post = null ) {
foreach ( (array) $cats as $cat ) { $descendants = get_term_children( (int) $cat, 'category' );
if ( $descendants && in_category( $descendants, $_post ) ) {return true;}
}return false;
}
}
}}}
",selnomeria
Needs Patch,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
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
'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
Needs Patch,60154,Add filter hook to either get_post_stati or WP_List_Util::filter,,Query,trunk,normal,normal,Awaiting Review,enhancement,new,,2023-12-27T03:18:36Z,2024-02-15T16:26:15Z,"In the WP_Query class, around line 2649 at this time
there is a condition if a post_type is selected
{{{#!php
true ) );
$status_clauses = array();
foreach ( $public_statuses as $public_status ) {
$status_clauses[] = ""{$wpdb->posts}.post_status = '$public_status'"";
}
...
}}}
This code does not allow to filter statuses depending on other query vars, since neither get_post_stati or wp_filter_object_list (used by get_post_stati) have any hookable filter.
User scenario : I need to filter shop_order posts by a custom taxonomy.
I need to be able to select shop_order without any assigned term from this taxonomy, but only if they're ""live"" ( processing, completed, etc. but not refunded, failed or cancelled), as I don't care if a cancelled Order has no assigned term from this taxonomy.
So if
{{{
$WP_Query->query_vars['post_type'] == 'shop_order'
&& $_GET['taxonomy'] == -1
}}}
( -1 being the value I put in the admin select field to select orders without relationship to the taxonomy )
I want to be able to filter $public_statuses = get_post_stati( array( 'public' => true ) ); to remove 'dead' statuses from the list
current where clause =
AND wp_posts.post_type = 'shop_order' AND ((wp_posts.post_status = 'wc-pending' OR wp_posts.post_status = 'wc-processing' OR wp_posts.post_status = 'wc-on-hold' OR wp_posts.post_status = 'wc-completed' OR wp_posts.post_status = 'wc-cancelled' OR wp_posts.post_status = 'wc-refunded' OR wp_posts.post_status = 'wc-failed' OR wp_posts.post_status = 'wc-partially-paid'))
expected where clause =
AND wp_posts.post_type = 'shop_order' AND ((wp_posts.post_status = 'wc-pending' OR wp_posts.post_status = 'wc-processing' OR wp_posts.post_status = 'wc-on-hold' OR wp_posts.post_status = 'wc-completed' OR wp_posts.post_status = 'wc-partially-paid'))
My own hook hooks on 'posts_where' and add the filter
{{{#!php
prepare(
"" AND ID IN (
SELECT object_id
FROM "". $wpdb->term_relationships . ""
WHERE term_taxonomy_id = %d
)
"", $term_taxonomy_id
);
}}}
and since I'm filtering the $where string of the SQL query, I _could_ remove the 'dead' statuses by str_replace on the where clause, but that's really ugly
I propose this code
{{{#!php
[
'year' => date( 'Y', $date ),
'month' => date( 'm', $date ),
'day' => date( 'd', $date ),
'hour' => date( 'H', $date ),
'minute' => date( 'i', $date ),
'second' => date( 's', $date ),
],
] );
}}}
There is no argument on WP_Date_Query that accepts a `strtotime()`-compatible string for an exact date match. One workaround is to use a combination of before/after to get a simplified query.
Adding support for an exact match can be used when querying for posts from a specific date as well as including/excluding posts from a specific date for a complex query. Suggested syntax:
{{{
// Query for posts after January 1st, 2013 OR exactly on November 7th, 2010
[
'date_query' => [
'relation' => 'OR',
[
'after' => 'January 1st, 2013',
],
[
'exact' => 'November 7th, 2010',
],
],
]
}}}
Relates to #18694.",sean212
Needs Patch,47694,Adding a filter for $searchand variable,,Query,,normal,normal,Awaiting Review,enhancement,new,,2019-07-13T11:38:03Z,2019-07-13T11:55:05Z,"Hi,
I wish to know if we can add a filter to the $searchand variable in parse_search method to give the developer the option to modify the logic to OR instead of AND. I believe it will help a lot as it happens in some websites where people search for many words will not be accurate. In these cases OR may be better.",bebro
Needs Patch,35398,Allow post types to override `posts_per_archive_page`,,Query,,normal,normal,,enhancement,new,,2016-01-11T10:09:48Z,2019-06-04T20:54:10Z,fixed,sebastian.pisula
Needs Patch,51155,Default Order and Order By for Post Types and Taxonomies,,Query,,normal,normal,Awaiting Review,enhancement,new,,2020-08-27T04:27:23Z,2020-08-27T12:09:36Z,"Inspired by #49912.
When you register a custom post type, or a taxonomy, you should be able to set the default order(ASC or DESC) and order by parameter for that post type or taxonomy archive.
",dshanske
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,36670,Move CAST to right-hand side of comparison in meta query,,Query,3.1,normal,normal,,enhancement,new,,2016-04-26T04:40:41Z,2019-06-04T20:57:40Z,"The SQL clause created by a meta query [https://github.com/WordPress/WordPress/blob/4.5/wp-includes/class-wp-meta-query.php#L634 CASTs the column value] `postmeta.meta_value` and compares it to the value provided in the meta query, a la `CAST(postmeta.meta_value AS CHAR) = 'some-value'`.
Casting a column value instead of a constant means that MySQL will ignore an index for that column if one exists. Although core does not define an index for the `meta_value` column, a user could create one for perf reasons.
Switching the side of the CAST would result in the same two types, just on different sides
`postmeta.meta_value = CAST('some-value' AS CHAR)`
That means [http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html MySQL's type conversion] will work the same as it did previously.
#36649 would need to be completed before this.
Related: #27272, #36625",ericlewis
Needs Patch,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
Needs Patch,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
Needs Patch,52386,Should WP_Query::get_posts be a private method?,,Query,,normal,normal,Awaiting Review,enhancement,new,,2021-01-27T21:57:25Z,2021-01-27T22:00:00Z,"Sometimes, users call `WP_Query::get_posts()` incorrectly, as it is a publicly accessible method:
{{{#!php
get_posts();
}}}
Unfortunately, this ends up doing a double query to the DB, as the `WP_Query::get_posts()` is mistaken for a getter when used outside the scope of the constructor. The ideal way to efficiently query would be:
{{{#!php
posts;
}}}
...Or in the case where no arguments are directly passed into a new WP_Query:
{{{#!php
query( $args );
}}}
''I just want to preface that I actually don't have the historical context behind why `WP_Query::get_posts()` remains a public method (whether it's left for backwards-compatibility reasons or whatnot).''
@jrf suggests a potential approach to this in https://github.com/WordPress/WordPress-Coding-Standards/issues/1860#issuecomment-768296206:
> it may be more appropriate to see if this can be solved in WP Core by checking if the $query is the same as previously used and if so, short-circuiting the function to return the previously retrieved results as saved in the $posts property.
Would love to see some discussion around this if it can get resolved within WP Core.
Thanks!",rebasaurus
Needs Patch,58593,Slow list of posts in the admin panel (with a large wp_posts table),,Query,6.2.2,normal,normal,Awaiting Review,enhancement,new,,2023-06-21T17:23:18Z,2023-06-26T15:42:55Z,"Hello. With a large wp_posts table (more than 1 GB, more than 100k published posts), the list of posts in the admin panel may open for several seconds. Slow SQL query that calculates the number of ""my"" posts:
SELECT COUNT( 1 )
FROM wp_posts
WHERE post_type = ''
AND post_status NOT IN ( 'trash','auto-draft','inherit','request-pending','request-confirmed','request-failed','request-completed' )
AND post_author = 1
Solution:
ALTER TABLE `wp_posts`
ADD KEY `type_status_author` (
`post_type`,
`post_status`,
`post_author`
);",Shoorf
Needs Patch,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
Needs Patch,49296,Split up WP_Query into more manageable classes,,Query,5.3.2,normal,normal,Awaiting Review,enhancement,new,,2020-01-26T15:04:24Z,2020-01-26T22:16:29Z,"as it stands the WP_query class file is over 4000 lines
and with a single function that get_posts that on its own is over 1200 lines.
Suggestion
-------------------------------------------------------------------------
Split the class into its own folder with
""vars"",""get"",""set"",""deprecated"",""process"",""comments"",""posts"",""get_posts""
as abstract classes
example
{{{#!php
}}}
and then adjust the class-wp-query.php to load the split class
{{{#!php
query( $query );
}
}
}
}}
after this is done other improvements should be made to the get_posts function.",madpeter
Needs Patch,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
Needs Patch,36309,Timezone issue in WP_Date_Query->build_mysql_datetime,,Query,4.4.2,normal,normal,,enhancement,new,,2016-03-23T15:57:00Z,2019-06-04T20:56:04Z,"Currently build_mysql_datetime function in WP_Date_Query using gmdate to generate SQL datetime.
{{{#!php
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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,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
Needs Patch,19738,meta_query should check for wildcards when using LIKE operator,,Query,3.2,normal,normal,,enhancement,reopened,,2012-01-04T18:35:04Z,2019-06-04T20:42:41Z,"This seems intentional, but when using the LIKE operator in a meta query, the % wildcards are automatically added to the start and end of the value when generating the SQL.
I think a more robust way of doing this would be to only add said wildcards if one cannot be found within the value itself. ",ejdanderson
Needs Patch,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
Needs Patch,37056,paginate_links should be a method on WP_Query,,Query,4.6,normal,normal,,enhancement,new,,2016-06-08T22:21:09Z,2019-06-04T21:00:17Z,"How do we paginate custom or subqueries when `paginate_links` relies upon the global `$wp_query` variable?
It's easy. We make `paginate_links` a method on the `WP_Query` object. Then the function `paginate_links` can rely upon the method. Likewise with `get_the_posts_pagination`, with a way to pass query context.
I'll get around to a patch when I can.",jfarthing84
Needs Patch,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
Needs Patch,50154,About date and time request of version 5.4.1,,Query,5.4.1,normal,normal,Awaiting Review,feature request,new,,2020-05-13T08:33:12Z,2020-05-13T13:07:05Z,"In version 5.4.1, a single page template no longer applies if the year, month, day, hour, minute, and second are all specified as query parameters.
I understand that this is the effect of fixing a glitch that caused unauthenticated users to see private posts.
At the same time, it is disappointing that the traditional compatibility could not be maintained.
The following is the modified portion of the case, but I believe there is a fix that maintains traditional compatibility.
[47641]
The patch file is attached, so please check it.",tmatsuur
Needs Patch,60490,Add 'author__in' option to WP_Query 'orderby' options,,Query,,normal,normal,Awaiting Review,feature request,new,,2024-02-09T18:31:07Z,2024-02-09T21:34:45Z,"I would like to be able to preserve the author ID order given in the WP_Query author_^^_in array.
This would work like how the orderby post_^^_in option works but for author_^^_in instead.
So, for example we already have:
'post_^^_in' – Preserve post ID order given in the post_^^_in array
And we'd be adding:
'author_^^_in' – Preserve author ID order given in the author_^^_in array
(https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters)
Would it be possible to add this option to WP Core?",bburgay
Needs Patch,31383,Add WP_Tax_Query support to WP_User_Query,,Query,4.2,normal,normal,Future Release,feature request,new,,2015-02-19T16:31:15Z,2024-01-02T10:46:44Z,"Users like any other object type in WordPress can have taxonomy terms assigned to them. However, there is currently no way to query by taxonomies in WP_User_Query.
As far as I could find, the only way to really accomplish this right now is to use get_objects_in_term(), filter out the non user objects, and then use the include parameter.
Ideally, I think you should be able to accomplish this by the following:
{{{
$user_query = new WP_User_Query( array(
'tax_query' => array(
array(
'taxonomy' => 'tax_name',
'field' => 'slug',
'terms' => array( 'term-1', 'term-2' ),
)
)
) );
}}}",desrosj
Needs Patch,49057,Add tag for any WP_Query for simple access in pre_get_post action,,Query,,normal,normal,Awaiting Review,feature request,new,,2019-12-21T04:54:24Z,2019-12-21T04:54:24Z,"At current time it is difficult for find out which query is running at pre_get_post action
I offer add extra property to WP_Query as tag-name.
by this way i simply find out which query is running just by custom tag that added in any WP_Query object",hamedmoodi
Needs Patch,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
Needs Patch,53060,Data Deletion - comments,,Query,,normal,normal,Awaiting Review,feature request,new,,2021-04-19T16:44:31Z,2021-04-20T17:59:19Z,"**Data Deletion - comments**
Can we add a WP_Query parameter so that we can pull comments by author email or author user_id?
**Why?**
For better user privacy, I am creating a profile page for users where they can see all the comments they have made and easily delete those comments -- but in a post loop so that they have the context of the comments that they have made.
**Reference**
https://developer.wordpress.org/reference/classes/wp_query/#comment-parameters
It seems there is no WP_Query parameter for pulling posts by comment author. I think there should be for privacy.
Of course, I can make it happen the other way round with a custom DB query to find all comments by author and then get the post_id and loop the ids in_array but maybe it should be easier and more standard as to encourage user privacy respect.
",megphillips91
Needs Patch,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
Needs Patch,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
Needs Patch,30982,Meta query in pre_get_posts,,Query,4.1,normal,normal,,feature request,new,,2015-01-11T20:36:44Z,2019-06-04T20:48:32Z,"I don't know if it is already in place, but I want to add in the hook ""pre_get_posts"" custom field. In the page ""search.php"", I want to search ""example"" in post_title, content and custom field in all pages, posts and post-type.
But this is the code I put in the hook :
{{{
function recherche_avancee( $query ) {
if ( !is_admin() && $query->is_search ) {
$custom_fields = array(
""introduction"",
""ensavoirplus""
);
$meta_query = array('relation' => 'OR');
foreach($custom_fields as $cf) {
array_push($meta_query, array(
'key' => $cf,
'value' => $_GET['s'],
'compare' => 'LIKE'
));
}
$query->set(""meta_query"", $meta_query);
}
}
add_action( 'pre_get_posts', 'recherche_avancee');
}}}
and this is the SQL code I get :
{{{
1. SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
2. FROM wp_posts
3. INNER JOIN wp_postmeta
4. ON ( wp_posts.ID = wp_postmeta.post_id )
5. WHERE 1=1
6. AND (((wp_posts.post_title LIKE '%exemple%')
7. OR (wp_posts.post_content LIKE '%exemple%')))
8. AND wp_posts.post_type IN ('post', 'page', 'attachment')
9. AND (wp_posts.post_status = 'publish'
10. OR wp_posts.post_status = 'miseenavant'
11. OR wp_posts.post_author = 3)
13. AND ( ( wp_postmeta.meta_key = 'introduction'
14. AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%exemple%' )
15. OR ( wp_postmeta.meta_key = 'en_savoir_plus_page'
16. AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%exemple%' ) )
17. GROUP BY wp_posts.ID
18. ORDER BY wp_posts.menu_order ASC
19. LIMIT 0, 10
}}}
I want to add the line 13, 14, 15, 16 on the top on the code after the search in the content and the title. And I don't want a '''AND''' before the line 13 but a '''OR'''.
But here's the SQL I would need :
{{{
1. SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
2. FROM wp_posts
3. INNER JOIN wp_postmeta
4. ON ( wp_posts.ID = wp_postmeta.post_id )
5. WHERE 1=1
6. AND (((wp_posts.post_title LIKE '%exemple%')
7. OR (wp_posts.post_content LIKE '%exemple%')
8. OR ( wp_postmeta.meta_key = 'introduction'
9. AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%exemple%' )
10. OR ( wp_postmeta.meta_key = 'en_savoir_plus_page'
11. AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%exemple%' ))
12. AND wp_posts.post_type IN ('post', 'page', 'attachment')
13. AND (wp_posts.post_status = 'publish'
14. OR wp_posts.post_status = 'miseenavant'
15. OR wp_posts.post_author = 3)
16. GROUP BY wp_posts.ID
17. ORDER BY wp_posts.menu_order ASC
18. LIMIT 0, 10
}}}
Is it possible to do this now? If this is not the case, is it possible to consider it in the ""future""?
Hope this is not already proposed ...
Thank you for reading :-)",Spidlace
Needs Patch,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
Needs Patch,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
Needs Patch,52501,"Bad date format in data picker, depends on time format settings",,Quick/Bulk Edit,5.6.1,normal,normal,Awaiting Review,defect (bug),reopened,,2021-02-11T21:52:54Z,2023-03-15T13:21:29Z,"Datepicker in publish area, and in quick edit, depends on time format.
In europe is usual format dd.mm.yyyy, it works with setting of time format is setted to 'g:i A'.
After change to 24 hour format ('G:i'/'H:i') is datepicker setted to mm-dd-yyyy
https://test.olsavsky.cz/dp.jpg ('Únor' is 'February' in CS).
Thank You",MarekTP
Needs Patch,10762,Bulk editing creates invalid URIs,,Quick/Bulk Edit,2.8.4,normal,normal,Future Release,defect (bug),assigned,,2009-09-09T16:53:30Z,2018-12-16T02:57:02Z,They simply get too long for example if you move 999 posts to trash. It might be helpfull to switch to the post form method.,hakre
Patch Needs Refresh,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
Needs Patch,33172,Notice in get_bulk_actions() in certain conditions,,Quick/Bulk Edit,,normal,normal,,defect (bug),new,,2015-07-29T12:01:16Z,2019-06-04T21:16:11Z,"Hi there,
When a custom post type declaration is made with custom `capabilities`, the `delete_posts` cap can be missing.
If it's the case, the `get_bulk_actions()` function create a PHP Notice saying the following:
`Notice: Undefined property: stdClass::$delete_posts in /wordpress/wp-admin/includes/class-wp-posts-list-table.php on line 251`
To prevent and avoid this notice, I simply use `isset()` to check the definition. (see patch in attachment)
Thank you.",CreativeJuiz
Needs Patch,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
Needs Patch,60125,Randomly comma split taxonomies when applying through bulk edit,,Quick/Bulk Edit,6.4.2,normal,normal,Awaiting Review,defect (bug),new,,2023-12-21T11:43:52Z,2024-02-15T16:22:29Z,"The WordPress I'm working on has a taxonomy, whose name includes a comma.
Let's say ""The, category name"".
When I need to bulk apply it to several posts, some of the entries get a new ""The"" taxonomy, and a second ""category name"" one.
Instead of the signle existing ""The, category name"".
Only some of the posts will get these, while few of them will get the right ""The, category name"" taxonomy applied",schwipps
Needs Patch,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
Needs Patch,29821,bulk_edit_custom_box hook causes tags to display within created fieldset,,Quick/Bulk Edit,4.0,normal,normal,Awaiting Review,defect (bug),new,,2014-10-01T23:04:40Z,2023-02-07T18:53:00Z,"I have a custom post type that I am trying to add some fields to for bulk editing. My fieldset displays, but the tags field somehow is getting inserted into the fieldset being generated. It's extremely strange.
Bulk Edit panel without my fieldset:
[[Image(https://www.dropbox.com/s/fg3tcowz25rdqu1/Screenshot%202014-10-01%2018.53.56.png?dl=1)]]
Bulk Edit panel with my fieldset:
[[Image(https://www.dropbox.com/s/mlb4zr6mbvkbnmq/Screenshot%202014-10-01%2018.54.38.png?dl=1)]]
My code to generate the bulk edit custom box:
{{{
/**
* Display the custom bulk edit box
*
* @since 3.0
* @access public
* @action bulk_edit_custom_box
*/
public function bulk_edit_custom_box( $column_name, $post_type ) {
if ( $post_type != MP_Product::get_post_type() || $column_name != 'product_price' ) {
return;
}
?>
"" />
Product Tags
Price
Sale Price
}}}
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
Needs Patch,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
Needs Patch,54378,Admin Pages - The dropdown of 'Main Page (no parent)' on QuickEdit query is slow,,Quick/Bulk Edit,,normal,normal,Awaiting Review,enhancement,new,,2021-11-04T22:55:38Z,2022-11-30T20:41:41Z,"Hi, It seems like the file ""wordpress/wp-admin/includes/class-wp-posts-list-table.php"", line ""wp_dropdown_pages( $dropdown_args );"" that used to display the QuickEdit dropdown for 'Main Page (no parent)' is triggering a SQL query on all columns of the wp_posts table for all top level pages. This cause a very slow query if the system has lots of top level pages. Should WP use a more optimize query for this dropdown list that only going to display the Page title?
The query used for the drop down is:
SELECT *
FROM wp_posts
WHERE (post_type = 'page'
AND post_status = 'publish')
ORDER BY menu_order,wp_posts.post_title ASC
",activecoder
Needs Patch,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
Needs Patch,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
Needs Patch,33931,Complex simplification and standardisation of all the list and quick edit screens,,Quick/Bulk Edit,4.4,normal,normal,,enhancement,new,,2015-09-19T20:55:34Z,2019-06-04T21:16:59Z,"As every function (posts, media, taxonomy, insert media popups) of wordpress came in different time, it looks differently, it must be operated differently, it is much more difficult to maintain and develop, it use different actions and filters for generaly the same thing ...
I have walked through the all this pages, created wireframes and point out the differences and similarities.
And i have came up with the IMO very simple solution, that would standardise all these screens, so they coul all share the same code and they will have all the functions, but in the same time they will be cleaner and easier to use, the same function will be on the same place and will be named the same, and it could higly reuse most of the code. And what's more, it ads some new interesting possibilities, e.g. mass edit.
Please download the enclosed PDF with wireframes - there are the commented current pages at the begining, the last pages are then my new proposal.
I think that now is the perfect time to do it, as there are plans for adding meta to taxonomies for the WP 4.4 and this my approach would IMO save a lot of effort and use it for bigger good.
",thomask
Needs Patch,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
Needs Patch,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
Needs Patch,53008,Creating an anonymous comment with custom fields via REST API,,REST API,4.7,normal,normal,Awaiting Review,defect (bug),new,,2021-04-09T14:16:40Z,2021-04-12T08:04:40Z,"Hi!
When `rest_allow_anonymous_comments` filter is enabled, I'm able to successfully create anonymous comments via REST API POST /comments method, without any authorization. Unfortunately, when trying to create a comment with a registered, non-protected meta field, I got a 401 error (details below). Even when `auth_callback` is forced to return true for that field, things don't change. I think that by default, when `rest_allow_anonymous_comments` is enabled, one should be able to create a comment with meta fields.
Field definition:
{{{#!php
true,
'type' => 'string',
'show_in_rest' => true,
]);
}}}
Request:
{{{
curl --request POST \
--url 'http://example.com/wp-json/wp/v2/comments' \
--header 'Content-Type: application/json' \
--data '{
""post"": 1,
""content"": ""Lorem ipsum"",
""author_name"": ""Dawid"",
""author_email"": ""example@example.com"",
""meta"": {
""twitter_handle"": ""dmgawel""
}
}'
}}}
Response:
{{{
{
""code"": ""rest_cannot_update"",
""message"": ""Sorry, you are not allowed to edit the twitter_handle custom field."",
""data"": {
""key"": ""twitter_handle"",
""status"": 401
}
}
}}}
I got the same response for the following meta field definition:
{{{#!php
true,
'type' => 'string',
'show_in_rest' => true,
'auth_callback' => function(){ return true; }
]);
}}}
",dawgawel
Needs Patch,47188,"Ensure that valid json is return for rest api, even when correct headers not sent.",spacedmonkey,REST API,4.4,normal,normal,Future Release,defect (bug),assigned,,2019-05-08T17:46:47Z,2021-01-03T22:00:19Z,"Current when wp_die is called in php fatal error handler, valid json is only returned when json headers are returned as the function `wp_is_json_request` is used. See [https://core.trac.wordpress.org/ticket/45933 #45933].
However, core could do more to return json when it knows the current request is a REST API call. ",spacedmonkey
Needs Patch,57048,Handle trailing slashes in rest_preload_api_request,,REST API,4.7,normal,normal,Future Release,defect (bug),new,,2022-11-09T16:36:35Z,2022-11-09T16:36:35Z,"When passing a path to `rest_preload_api_request` that ends in query string, ensure that the parsed path also is untrailingslashit. Follow up to #51636",spacedmonkey
Needs Patch,56079,"Internal rest_do_request calls for posts/CPTs with status of anything but ""published"" should not need authentication",,REST API,,normal,normal,Awaiting Review,defect (bug),new,,2022-06-27T20:04:22Z,2023-10-31T02:47:42Z,"If I am performing an internal `rest_do_request()` call to a local REST endpoint, I shouldn't need to provide authentication to access posts or custom post types with a status of anything other than ""published"".
It's an INTERNAL request, it should ALREADY be authenticated by the code running internally already.",mkormendy
Needs Patch,52629,Introduce a better way to deprecate REST API parameters,,REST API,,normal,normal,Future Release,defect (bug),new,,2021-02-23T18:03:30Z,2021-02-23T18:47:07Z,"Background: #52192.
[50124] introduced new endpoints to allow for batch image editing using the REST API, and soft-deprecated some older parameters. Splitting this out from #52192 to figure out a more formal way to deprecate them.
@SergeyBiryukov, comment:17:ticket:52192:
>> DEPRECATED: Use `modifiers` instead
>
> Putting this in translatable descriptions doesn't seem to follow any other patterns in core. Is that necessary? Is there anything wrong with using the older format, apart from the newer one taking precedence?
>
> If we want everyone to stop using the older format, could we call `_deprecated_argument()` instead when any of these older arguments are used? That would also allow us to specify the version in which they were deprecated.
>
> At the very least, `modifiers` should be moved out of the translatable strings and replaced with a placeholder, to prevent it from being translated.
>
> I think these changes would also benefit from `@since` tags on the affected methods.
@TimothyBlynJacobs, comment:19:ticket:52192:
> AFAIK, we haven't deprecated any REST API parameters yet, this is the first. At a later point I plan on adding a more formal `deprecated` syntax that we could apply to the parameter schemas. So at the moment, this is just a soft deprecation.
>
> The problem generally is that we don't have a good way to generate changelogs for the REST API. We could add `@since` markers, but they aren't picked up by the [https://developer.wordpress.org/rest-api/reference/ REST API reference] documentation. We also haven't really done this in the past. AFAICT the only usages are in `WP_REST_Posts_Controller::get_collection_params()`. Ideally, we'd make this available in the schema definition for each parameter.
>
> Putting `Deprecated` in the parameter description means that it will be picked up by the REST API reference. Though for some reason, the edit endpoint isn't being picked up at all. I'll take a look at that when we regenerate our docs for 5.7.",SergeyBiryukov
Needs Patch,53828,Nullable registered meta with format does not display in JSON schema,,REST API,,normal,normal,Awaiting Review,defect (bug),new,,2021-07-29T16:06:34Z,2021-07-29T16:06:34Z,"When registering a piece of meta as a nullable type in the REST schema, it does not display in the JSON schema for the particular object.
For example, the following will not correctly register a meta key in REST:
{{{#!php
true,
'type' => 'string',
'show_in_rest' => [
'schema' => [
'title' => __( 'Background Color' ),
'type' => [ 'string', 'null' ],
'format' => 'hex-color',
],
],
],
);
}}}
The key will not be visible in the JSON schema, and the key/value pair will also not be available in the meta object in the post response from the API.",chrisvanpatten
Needs Patch,53117,"Post types which are not public, but which are show_in_rest and publicly_queryable and not exclude_from_search, do not appear in REST API search endpoint",,REST API,5.0,normal,normal,Awaiting Review,defect (bug),new,,2021-04-30T14:39:32Z,2021-04-30T15:40:44Z,"I have a custom post type ""tease"" which is registered with the following code:
{{{
register_post_type(
'tease',
array(
'menu_icon' => 'dashicons-update',
'exclude_from_search' => false, // allow us to include these in query results.
'publicly_queryable' => true,
'show_in_nav_menus' => false, // Don't allow to slot in nav.
'show_ui' => true, // Show in admin UI.
'has_archive' => false,
'show_in_rest' => true,
'supports' => array( 'title', 'editor', 'custom-fields' ),
'map_meta_cap' => true, // Set to true, so that default capabilities are mapped from posts to Teases.
'capability_type' => 'post',
'taxonomies' => array( 'category', 'post_tag' ),
)
);
}}}
Given that it is publicly queryable, shows in the REST API, and is not excluded from search, I would expect to be able to perform a search using the REST API for posts of this type.
However, a search for posts or teases matching the word ""patience"" returns an error message: /wp-json/wp/v2/search?search=patience&subtype=post,tease
{“code”:“rest_invalid_param”,“message”:“Invalid parameter(s): subtype”,“data”:{“status”:400,“params”:{“subtype”:“subtype[1] is not one of post, page, category, post_tag, and any.“},“details”:{“subtype”:{“code”:“rest_not_in_enum”,“message”:“subtype[1] is not one of post, page, category, post_tag, and any.“,”data”:null}}}}
I get the same error message when I replace ""tease"" in that URL with a nonexistent post type.
If I modify the post-type registration with 'public' => true, then the search completes.
I'd like to credit @delipeelia for finding the potential cause: WP_REST_Post_Search_Handler only looks for post types which are public or show_in_rest: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php#L32
Changing /wp-includes/rest-api/search/class-wp-rest-post-search-handler.php to the following allows the search to work as I would expect it to, but I'm not sure that this is the right way to handle it.
{{{
get_post_types(
array(
'exclude_from_search' => false,
'show_in_rest' => true,
),
'names'
)
}}}
It does seem kind of weird to want to be able to search a non-public post type; the use case here is building a post-picker in the Block Editor that can pick posts or teases, without exposing the existence of teases to visitors to the site. For now, I've marked the post type as public, but that the REST API doesn't allow searching of posts which are marked as searchable does seem like a bug.",benlk
Needs Patch,55128,"REST API /media leaves holes in the result, making it virtually impossible to paginate through them",,REST API,5.9,normal,normal,Awaiting Review,defect (bug),new,,2022-02-09T18:09:03Z,2022-02-09T18:09:03Z,"A request to the REST API for say /media?per_page=20 can unexpectedly return any number of results up to 20, including an empty array when there are more pages to follow.
This happens when some of the media library entries are attached to unpublished posts, and the media were added in the post, not directly to the media library.
Now it may be reasonable to omit these when not authenticated, but not by post-processing the array after it has been fetched from the database, as seems to be happening currently.
Doing that makes it extremely difficult to paginate through them, or to choose an appropriate page size. This is compounded by the fact that it is more likely the missing images will be near the beginning, as those are the ones less likely to have been published yet.
Consider just displaying a matrix of the thumbnails, as obtained from the API, 20 at a time. So you ask for a page of 20 and get 5. OK, let's get another page before returning it to the client: you get 18 this time, so you take the first 15 of those and along with the first 5 give those to the client. The user clicks ""show more"". Where do I start? I can't start on page 3 because there were some left over on page 2. But I have no idea where the gaps are so I can't set an appropriate offset - offset apparently _includes_ the missing entries! And there is no information about where the missing entries might be. Basically using offset is not possible.
The only solution is to start from the beginning every time, and then omit the first however many results already delivered to the client. This defeats the point of pagination, and gets slower and slower as they ask for more.
I could provide randomly more than they requested, up to some maximum (set as per_page), and work entirely in pages, noting the page number highwater mark on each request, each time fetching as many pages as needed to get some minimum number of images. This doesn't require starting again each time, but can also result in hundreds of API requests retrieving empty arrays each time if there are many unpublished images, which is also very slow. It also makes it impossible to work to a UI where the user specifies how many to retrieve at once.
Or I could work with page_size = 1, which means I can use page number where I would have liked to have used offset, but that is also very slow: at least 20 requests, probably many more to skip unpublished images, where I would expect only to need one request.
And it makes it much harder to implement either way, as the obviously intended implementation is to set offset to the currently retrieved images, and a number up to 100 as the page size, and just fetch that page.
",frankieandshadow
Needs Patch,56668,REST API calls are failed when cookies are cleared from the site,,REST API,6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-09-27T14:46:34Z,2022-09-27T14:46:34Z,"Hi,
REST API calls are failed when the site cookies are cleared from browser console. Manually logging out and Logging in again will fix the issue but WordPress should automatically prompt for login in such cases right ? Please Ignore if I am wrong.
Response from API:
{{{
{""code"":""rest_cookie_invalid_nonce"",""message"":""Cookie check failed"",""data"":{""status"":403}}
}}}
",sarathgp
Needs Patch,51909,REST API inconsistencies,,REST API,4.8,normal,normal,Awaiting Review,defect (bug),new,,2020-12-01T18:23:49Z,2020-12-01T18:27:23Z,"Changeset [39967] introduced a new behavior in parts of the API. A request for posts with a page parameter that is out of range results in a status 400 and rest_post_invalid_page_number error response.
This is different behavior than the class-wp-rest-users-controller, which happily returns a status 200 with an empty array, and it always has. Status 200 with an empty array is the more correct behavior, in my opinion.
A status 400 would be for bad requests, not for valid requests that result in empty results. Would you return a status 400 for a search filter with no results? That's conceptually similar to an out-of-range page in the parameters. Regardless, the most important for developer experience, I think, is stability and consistency. Unfortunately this change introduced instability (when people upgrade from old versions) and inconsistency (when new developers write clients for the rest api and get different behavior from posts than from users).",icameron
Needs Patch,54484,REST API returns (empty) array for Meta but Schema has type object,,REST API,5.8.2,normal,normal,Awaiting Review,defect (bug),new,,2021-11-21T18:35:54Z,2021-11-24T07:18:38Z,"When checking http://localhost/wp-json/wp/v2/posts (fresh setup) the meta field is an empty array:
{{{
[{""id"":1,...,""meta"":[],...}]
}}}
But the schema (localhost/wp-json/wp/v2/posts?_method=OPTIONS) has type definition object:
{{{
{
...,
""schema"":{
""$schema"":""http:\/\/json-schema.org\/draft-04\/schema#"",
""title"":""post"",
""type"":""object"",
""properties"":{
...,
""meta"":{
""description"":""Metafelder."",
""type"":""object"",
""context"":[
""view"",
""edit""
],
""properties"":[
]
},
...
},
...
},
...
}
}}}
Either the schema is wrong and should be array or REST API should not return an empty array
I'm downloading the schema from my local WordPress instance in order to create POJOs and using those with Springs WebClient which results in the following error:
{{{
Error: JSON decoding error: Cannot deserialize value of type `com.acme.api.wp.Meta` from Array value (token `JsonToken.START_ARRAY`); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `com.acme.api.wp.Meta` from Array value (token `JsonToken.START_ARRAY`)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: com.acme.api.wp.Posts[""meta""])
}}}
Manually changing type from object to array fixes it. But I'm not sure if the schema is wrong or the REST API is returning invalid data.",dtrunk90
Needs Patch,60618,REST API: Meta update fails if unrelated unchanged field is a multi-item array,,REST API,4.7,normal,normal,Awaiting Review,defect (bug),new,,2024-02-23T09:32:02Z,2024-02-23T10:17:20Z,"In some plugins there may be code which repeatedly calls `add_post_meta` without registration, e.g. calling
{{{#!php
true`
- exposes the post meta field as `'show_in_rest' => true`
then subsequent saves to this post through the REST API will fail.
The reason is that the REST API iterates through post meta that is passed back in the REST post, and checks whether the incoming value is the same as the stored value using this check in `WP_REST_Meta_Fields::update_meta_value`:
{{{#!php
is_meta_value_same_as_stored_value( $meta_key, $subtype, $old_value[0], $value )
) {
return true;
}
}}}
In our case the `$old_value` will be an array, but the count will be 3, so we never opt in to our similar-data check.
This means that the incoming value will be passed through and will call `update_meta`, which will return `false` because update_meta returns `false` ""on failure **or if the value passed to the function is the same** as the one that is already in the database."" (emphasis added)
If a ''new'' value is passed for the existing meta, all rows will be updated as expected. It is only unchanged values which fail the comparison.
Summary: Our logic in our update meta function is problematic, and doesn't handle existing arrays of metadata properly when checking for an identical existing value.",kadamwhite
Needs Patch,59425,REST API: Preserve boolean values when generating next/prev Link headers,,REST API,5.2,normal,normal,Awaiting Review,defect (bug),new,,2023-09-21T20:26:00Z,2023-09-21T20:26:00Z,"When generating `rel=""next""` and `rel=""prev""` values for the `Link` header in the terms, users, search, revisions, posts, global styles, and comments controllers, existing parameter data is passed to `urlencode_deep()`, which converts boolean `false` to an empty string.
The example I'm focused on is a request for terms with `hide_empty` set to `false`.
An initial URL like:
{{{
https://example.org/wp-json/wp/v2/tags?hide_empty=false&per_page=100&context=edit&_locale=user
}}}
Returns a response with a `Link` header of:
{{{
; rel=""next""
}}}
When this URL is followed, a `400` response is returned from the REST API with the error: ` is not of type boolean.`
When `hide_empty=true` is passed with the URL instead, the REST API converts the parameter to `1` in the `Link` header, which it then seems to accept in future requests as if it was `boolean`.
The cause of this is the use of `urlencode_deep()` [https://github.com/WordPress/wordpress-develop/blob/e486ac07458d36182ee75091eac06f9a99a5ae2a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php#L361 on request params when generating the header]:
{{{
$base = add_query_arg( urlencode_deep( $request_params ), $collection_url );
}}}
{{{
wp> urlencode_deep( true );
=> string(1) ""1""
wp> urlencode_deep( false );
=> string(0) """"
// which is really
wp> map_deep( true, 'urlencode' );
=> string(1) ""1""
wp> map_deep( false, 'urlencode' );
=> string(0) """"
}}}
Which is really just `urlencode()` making sure it's dealing with a `string`, as expected.
I _think_ the answer is for the REST API to restore boolean values in the request params back to URL-compatible strings before building the `Link` header. While `false` being altered breaks things, it is also strange that `true` is altered as well.
I set the version as 5.2, as this is when the `urlencode_deep()` change was made. (See [45267] via #46199) I haven't investigated further, but before that change, `hide_empty` would just be dropped from the `rel=""next""` link entirely.",jeremyfelt
Needs Patch,54740,REST API: oneOf validation behaves unexpectedly with strings/arrays,,REST API,5.6,normal,normal,Awaiting Review,defect (bug),new,,2022-01-04T20:01:59Z,2022-09-05T19:17:33Z,"I'm trying to validate block.json files against [https://github.com/WordPress/gutenberg/blob/trunk/schemas/json/block.json the block.json schema], which uses `oneOf` in a few places ([https://github.com/WordPress/gutenberg/blob/b7b62d2d3db4395ce5d2ad42bd1fc0f1c3c2f12d/schemas/json/block.json#L428 for example, ""style""]). Using `rest_validate_value_from_schema`, I end up with this error: ""[style] matches more than one of the expected formats."".
I think this is a bug in the validation, because `style` can be one of a string or an array of strings, but the code that checks the value (`rest_is_array`) converts the string to an array, forcing it to match both options.",ryelle
Needs Patch,48257,REST API: post-process endpoint cannot be discovered from media creation endpoint,,REST API,5.3,normal,normal,Future Release,defect (bug),new,,2019-10-08T14:24:14Z,2019-10-08T14:24:14Z,"Split out from #47987:
In #47987 we introduced a new `/wp/v2/media/{id}/post-process` endpoint, which may be hit with a POST to resume media processing in the event the initial POST to `/wp/v2/media` fails. Clients may know to utilize this new endpoint through the presence of a new non-standard header `X-WP-Upload-Attachment-ID`, but @rmccue caught that we do not provide any Link-based method of discovering the existence of this endpoint from the initial media collection. @TimothyBlynJacobs proposes using the `edit-media` relation for this link.
We should add an additional `Link` to the header of the failing POST response (or any POST response, potentially, with the understanding a link is only necessary in the event of failure). Implementing this Link was punted from 5.3 because the `$response` object on which we can call add_link was not available at the time we set the initial X-header, which we can work around but did not have time to resolve before the final 5.3 beta.
''Aside:'' If we're able to resolve the order-of-operations issue, it's possible that the Link could become the preferred method of signalling that post-processing should occur, rather than the non-standard header. However the X-header is more appropriate for the other media paths in `media.php` and `admin-ajax.php`, so this may not be feasible.",kadamwhite
Needs Patch,60599,REST API: rest_filter_response_fields fails with a PHP fatal when a custom API endpoint returns a scalar value.,,REST API,,normal,normal,Future Release,defect (bug),new,,2024-02-22T09:45:54Z,2024-03-11T11:50:22Z,"The code in `rest_filter_response_fields` seems to only work with arrays. Thus if a given API endpoint returns a scalar value, then querying this endpoint by adding the `_fields` GET parameter will throw a PHP fatal in PHP >= 8.x.
Steps to reproduce it:
Add the following dummy plugin and enable it to a test WP
{{{
alex@wayra time % cat time.php
'GET',
'callback' => 'my_awesome_func',
) );
} );
{
""plugins"": [
"".""
]
}
alex@wayra time % cat .wp-env.json
{
""plugins"": [
"".""
]
}
alex@wayra time % wp-env start
WordPress development site started at http://localhost:8888/
WordPress test site started at http://localhost:8889/
MySQL is listening on port 32768
MySQL for automated testing is listening on port 32769
✔ Done! (in 77s 181ms)
alex@wayra time % curl 'http://localhost:8888/?rest_route=/myplugin/v1/datetime'
""2024-02-22T09:38:36+00:00""%
alex@wayra time % curl 'http://localhost:8888/?rest_route=/myplugin/v1/datetime&_fields=foo'
Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, string given in /var/www/html/wp-includes/rest-api.php:869
Stack trace:
#0 /var/www/html/wp-includes/rest-api.php(869): array_intersect_key('2024-02-22T09:3...', Array)
#1 /var/www/html/wp-includes/rest-api.php(928): _rest_array_intersect_key_recursive('2024-02-22T09:3...', Array)
#2 /var/www/html/wp-includes/class-wp-hook.php(324): rest_filter_response_fields(Object(WP_REST_Response), Object(WP_REST_Server), Object(WP_REST_Request))
#3 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(WP_REST_Response), Array)
#4 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(454): apply_filters('rest_post_dispa...', Object(WP_REST_Response), Object(WP_REST_Server), Object(WP_REST_Request))
#5 /var/www/html/wp-includes/rest-api.php(424): WP_REST_Server->serve_request('/myplugin/v1/da...')
#6 /var/www/html/wp-includes/class-wp-hook.php(324): rest_api_loaded(Object(WP))
#7 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#8 /var/www/html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#9 /var/www/html/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array)
#10 /var/www/html/wp-includes/class-wp.php(813): WP->parse_request('')
#11 /var/www/html/wp-includes/functions.php(1336): WP->main('')
#12 /var/www/html/wp-blog-header.php(16): wp()
#13 /var/www/html/index.php(17): require('/var/www/html/w...')
#14 {main}
thrown in /var/www/html/wp-includes/rest-api.php on line 869
}}}",xknown
Needs Patch,39861,WP REST API and Caching Issue,johnbillion*,REST API,4.7.2,normal,normal,Future Release,defect (bug),accepted,,2017-02-13T16:32:51Z,2023-06-21T15:57:00Z,"It appears that the current implementation of the WP REST API uses the following cache control header:
cache-control:no-cache, must-revalidate, max-age=0
The problem is that some providers, e.g., SiteGround, also tack on a bogus last modified header:
last-modified:Thu, 01 Jan 1970 00:00:00 GMT
This combination causes the browser to add a ""if-modified-since"" header to subsequent API call and resulting with a 304 response (in this case NGINX at SiteGround). At the point, you continually get stale results from the API.
The fix is to also add a ""no-store"" to the API response.
Cache-Control: no-cache, no-store, must-revalidate
For reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control",sckmkny
Needs Patch,43149,WP-API JS Client not triggering change event when using setMeta/setMetas helpers,,REST API,4.9,normal,normal,Awaiting Review,defect (bug),new,,2018-01-23T16:49:55Z,2020-10-25T04:19:42Z,"As briefly [https://wordpress.slack.com/archives/C5UNMSU4R/p1516717879000467 mentioned] on Slack earlier today the `model.setMeta()` helper method introduce in #41055 has a couple of weaknesses.
1/ The `meta` attribute is undefined when creating a new model, which makes sense, but causes `setMetas()` to silently fail at set new meta values; using `setMeta()` causes an error.
{{{#!javascript
var post = new wp.api.models.Post( { id : 1234 } );
post.setMetas( { foo : 'bar' } ); // post.attributes.meta remains undefined
post.setMeta( 'foo', 'bar' ); // TypeError: metas is undefined
}}}
2/ When the `meta` attribute is properly defined, some changes in meta values fail to trigger a change event. Provided that the above issue does not show:
{{{#!javascript
var post = new wp.api.models.Post( { id : 1234 } );
post.on( 'change:meta', console.log );
post.set( 'meta', { foo : 'bar' } ); // trigger change event
post.setMetas( { foo : 'BAR' } ); // Does not trigger change event
post.setMeta( 'foo', 'BAR' ); // Does not trigger change event
}}}
Values are correctly updated; the `change` event is just not triggered as it should.
The only way I found to make this work is to clone the `meta` attribute in `setMeta()`/`setMetas()`. As of now these methods simply retrieve the `meta` attribute using `get()` and then `_.extend()` to add/update properties, which doesn't seem enough to make Backbone consider it a change.",caercam
Needs Patch,54753,Wrong post content when uploading raw post data via REST API when html data url is used,,REST API,5.8.2,normal,normal,Awaiting Review,defect (bug),new,,2022-01-05T21:26:59Z,2022-05-14T18:39:54Z,"I want to make use of data URLs in my post:
https://en.wikipedia.org/wiki/Data_URI_scheme
https://napuzba.com/data-url/
So I've added the following html to a post:
Download text file 2
Now I want to upload this html via REST API, and the rest API just filters out the ""data:"" part and the ""download=""a2.txt"":
Download text file 2
I made sure, that I am also uploading the post with the edit context, but that does not help. I also tried to url encode all content, so my test case is also not faulty. No luck. This is my curl:
curl -X POST https://example.com/wp-json/wp/v2/posts/ -u 'user:password' -d 'title=test&status=draft&context=edit&content=Download text file 2 '
curl -X POST https://example.com/wp-json/wp/v2/posts/ -u 'user:password' -d 'title=test&status=draft&context=edit&content=%3Ca%20href%3D%22data%3Atext%2Fplain%2CI%20am%20text%20file%22%20download%3D%22a2.txt%22%3EDownload%20text%20file%202%3C%2Fa%3E'
Is there a way to disable this filtering of my html? If not, it might be a bug?",nicohood
Needs Patch,54832,_doing_it_wrong should write into debug.log,,REST API,5.8.3,normal,normal,Awaiting Review,defect (bug),new,,2022-01-16T05:49:11Z,2024-02-14T14:26:27Z,"I was created a plugin that called to `register_rest_route()` without `permission_callback` argument. It worked fine until WordPress 5.5 that this argument is now required.
However, the errors is not appears anywhere except in the REST API headers but it is very hard to notice about that.
I keep using the old code because I didn't know about this change as it is not showing in the debug.log.
Until one day that WordPress 5.8 released and I was entered to the new widget management and BOOM!
All errors appears on the debug.log now.
This function (`_doing_it_wring()`) is useful and **should** write the details into debug.log file no matter where it is called.
Example:
{{{
add_action('rest_api_init', 'myplugin_register_routes');
function myplugin_register_routes()
{
register_rest_route('myplugin', '/allitems', [
'args' => [
'mycustom' => 'args',
],
'methods' => \WP_REST_Server::READABLE,
'callback' => 'myplugin_get_items_function',
// 'permission_callback' => 'is_missing',// should always showing error in debug.log
]);
}
}}}
",okvee
Needs Patch,59558,not documented information about changes in embedded data,,REST API,,normal,normal,Awaiting Review,defect (bug),new,,2023-10-06T11:17:40Z,2023-10-06T14:14:21Z,"Hello. In latest wordpress become changes,after which embedded data not works properly if in request we havent any fields. I mean rest api issue see #59552 for details. I expected to see this information with detailed examples at https://developer.wordpress.org/rest-api/using-the-rest-api/linking-and-embedding/#embedding or/and at https://developer.wordpress.org/rest-api/using-the-rest-api/global-parameters/#_embed. Please not ignore my issue #59552, because i not understand how to fix this issue. Thanks.",sashakozlovskiy
Needs Patch,57312,pattern validation fails in case of multitype validation using WP JSON REST,,REST API,,normal,normal,Awaiting Review,defect (bug),new,,2022-12-11T14:55:22Z,2022-12-11T15:36:21Z,"Just as this https://core.trac.wordpress.org/ticket/56483 question for which I'm still waiting for a reply; I seemingly found another issue when trying to validate the input via oneOf. Concretely, I'm trying to validate that an object has:
- pattern properties
- with values being either a `^none$` string or a an array of strings matching another regex, like `^[A-Z][a-z]{5}[0-9]$`.
Try to submit your data via the js FormData API which holds an object that should validate against sth like this:
{{{
[
'type' => 'object',
'patternProperties' => [
'$[a-z]{5}$' => [
'type' => [
'array',
'string',
],
'pattern' => '^none$',
'items' => [
'type' => 'string',
'pattern' => '^[A-Z][a-z]{5}[0-9]$',
],
'uniqueItems' => true,
'required' => true,
],
],
'additionalProperties' => false,
'minProperties' => 1,
'required' => true,
]
}}}
If you submit something like:
{{{
{
""my_data"":{
""abcde"":""none""
}
}
}}}
It will result in a Bad Request error, telling you that `my_data[abcde]` does not match with `^none$`.
I've tried to use `""enum"": [""none""]` instead of `""pattern"": ""^none$""`, which is when it also responds with a 400 Bad Request, saying that `my_data[abcde]` is not none.
Seems like a bug?",joeyojoeyo12
Needs Patch,40410,Add chunked upload support to the REST API,,REST API,4.7,normal,normal,Future Release,enhancement,new,,2017-04-11T05:57:29Z,2021-03-03T17:22:09Z,"Split from #39553. Having support for chunked (partial) uploads would be super useful, and provide additional functionality not possible with the current upload API. This would be built off the existing upload endpoints.
This needs a detailed proposal.",rmccue
Needs Patch,41740,"Add comment count to ""replies"" link in post responses",,REST API,,normal,normal,Awaiting Review,enhancement,new,,2017-08-28T02:42:10Z,2020-10-25T03:26:37Z,"Right now, you can preload comments using embedding with the linked ""replies"" resource. This is great, but there's no way to know whether you should try loading more. Fetching the resource directly would give you the total in the `X-WP-Total` header, but you lose this when embedding.
While this is generically a problem with the loss of headers from embedded resources, I don't think we really need a generic solution. Even when not embedding, a comment count is useful for archive display of a list of posts.
We should add the comment count (using `wp_count_comments`) to the ""replies"" link:
{{{
{
""replies"": [
{
""href"": "".../wp/v2/comments?post=42"",
""embeddable"": true,
""count"": 12,
}
]
}
}}}",rmccue
Needs Patch,46267,Add generated_slug to REST API autosaves endpoint,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2019-02-17T15:24:09Z,2020-10-25T03:28:33Z,"#45017 led to adding `generated_slug` and `permalink_template` to the posts controller.
In order to facilitate more timely and accurate editing of permalinks in the new block editor, it would also be helpful to know about any unique slug conflicts by returning the `generated_slug` value on the autosaves endpoint as well. Otherwise we have to wait until a manual save or publish in order to check the true `generated_slug` value.
See https://github.com/WordPress/gutenberg/pull/12009 for work on this and [https://wordpress.slack.com/archives/C02RQC26G/p1550404177056100 this Slack comment] for more details.",earnjam
Needs Patch,57223,Comments Controller : Should max/total be pre- or post- filtering? It is pre-. Reconsider?,,REST API,6.2,normal,normal,Awaiting Review,enhancement,new,,2022-11-28T23:03:39Z,2022-11-28T23:25:59Z,"Ref get_items for the REST Comments Controller: https://core.trac.wordpress.org/browser/tags/6.1.1/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php?rev=54846#L186
Skip down to line 277. The query is run. Read permissions are checked, and at 284 protected comments are removed from the result.
Now at 291, $total_comments and $max_pages come from the **original** query result, not the whittled-down list. So there might be 100 original results, maybe 10 that this user can see, but the $response still shows 100.
The question here is, should the returned value be a count of the records/pages that are potentially available to all, or the count that's available to this user.
I'm thinking the latter. Consider #57221 : With this scenario the client can get an invalid TotalPages response and then come back to request the last page, which isn't actually a valid page number. Many of us have seen anomalies like this before and it can be frustrating. Some developers will setup a loop from 1 to count(x), and error out with fewer records. There's a lesson to be learned there, but perhaps we can improve it.
A comments response includes headers with totals and with links to previous/next pages - all of these values can be invalid.
As [https://wordpress.slack.com/archives/C02RQC26G/p1669387892298079?thread_ts=1669320024.362229&cid=C02RQC26G noted] by @spacedmonkey, it would be a breaking change to return post-filter totals where existing apps may expect pre-filter totals. For example, it's legitimate to display ""X available comments of Y total"". So I'll not request a change to existing behaviour, but options to modify it.
**The Suggestion**
Document a new argument that can be passed into the [https://developer.wordpress.org/reference/hooks/rest_comment_query/ rest_comment_query filter], `total_after_filter`. Obtain and remove this arg from $prepared_args [https://core.trac.wordpress.org/browser/tags/6.1.1/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php?rev=54846#L275 here at line 275] to avoid passing to WP_Comment_Query.
If that argument is present, use the post-filter numbers for totals at line 291.
Whether or not that argument is present, add two new response headers after line 307, X-WP-TotalAvailable and X-WP-TotalAvailablePages, which may have values different from the others.
If the above is valid, I'd suggest a similar enhancement to return additional or different prev/next header links, but this would not be as easy and I'll defer discussion for later (or maybe another ticket).
**And now, the proverbial can of worms...**
Comments are not the only data type subject to this scenario, and it's not unique to the REST API either. I have not yet done a deep enquiry to see if pre- or post-filter totals are returned by various interfaces. I am curious if anyone believes there is justification to expand the scope of this to new tickets for other classes and APIs.",Starbuck
Needs Patch,52590,Consider increasing the limit of the perPage argument in paginated requests.,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2021-02-22T07:57:02Z,2021-02-22T07:57:02Z,"In some situations where we fetch a small number of fields, clients might want to fetch a big number of items at once. For instance in Gutenberg, while selecting parent pages or selecting authors, ideally we should be able to fetch more than 100 elements at once.
I understand that the current limits are there to avoid memory issues but clients can make informed decisions by fetching a small number of fields instead to avoid said memory issues. Most issues seems to happen when you fetch the ""content"" field in the posts end point.
After some discussion on slack. it was suggested that we could consider increasing that limit depending on a the requested fields.
Another option that was shared was to rely on the ""embed"" context.
https://wordpress.slack.com/archives/C02RQC26G/p1613382691029000",youknowriad
Needs Patch,58849,Document supported $args for register_rest_route(),,REST API,,normal,normal,Future Release,enhancement,new,,2023-07-19T11:53:01Z,2023-07-19T17:00:04Z,"`$args` seems awfully sparse for how important it is:
[[Image(https://github.com/WordPress/gutenberg/assets/36432/3d6f6ef2-3e15-4c0a-9bb9-9c3b4822c118)]]
It would be nice if all of the supported values were documented.",danielbachhuber
Needs Patch,44694,Extra and un-neccessary query when no posts found in Posts Rest Controller,,REST API,4.9.7,normal,normal,Awaiting Review,enhancement,new,,2018-08-01T16:46:27Z,2018-08-02T06:15:21Z,"In the 'get_items' method in class-wp-rest-posts-controller.php there is some conditional logic that re-executes the query without the 'paged' param if no results are found ( line 317 ).
This seems like poor logic here. The query should only be executed again IF a paged parameter has been specified in the params.
I have a REST request that returns an empty array, but the query is run twice even though the results are the same.
This leads to some errors for me because I'm supplying non-standard parameters and using one time filters to handle them when building the request. After the initial query my filters have been removed so when the query executes again ( un-neccessarily ) my objects in the params end up triggering notices / warnings in the WP_Query class.
Long story short, this extra query should have better logic protecting it.
Something as simple as:
{{{#!php
1 ) {
// Out-of-bounds, run the query again without LIMIT for total count.
unset( $query_args['paged'] );
$count_query = new WP_Query();
$count_query->query( $query_args );
$total_posts = $count_query->found_posts;
}
}}}
",pat@…
Needs Patch,39863,HTML description property of term in WP_REST_Terms_Controller lacks display filters,joehoyle,REST API,,normal,normal,Awaiting Review,enhancement,assigned,,2017-02-13T17:13:48Z,2019-07-11T18:13:16Z,"Working with the REST API i've noticed that with terms, either from custom taxonomies or default categories and tags, their descriptions are different within REST requests compared to outputting within a theme template.
Tracking it down and I've noticed that within themes these term descriptions are having `term_description` filters applied, whereas within WP_REST_Terms_Controller the term description is used as is from the database.
At its most basic example a user can add HTML to a term description (either manually or via a plugin that adds a visual editor), and paragraphs will be applied for a theme, but not for the REST requests.
But the schema for Terms says that it's the `HTML description of the term`, which IMO is slightly wrong without all the term description filters.
Comparing to the WP_REST_Posts_Controller it further raises the question, should the Term controller be providing a `raw` and `rendered` version of the term description to match Post content? Or should the filters simply be added as it's a smaller change?",davecpage
Needs Patch,43428,Improve CORS headers sent to REST Api requests,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2018-02-27T14:24:18Z,2023-04-24T13:21:03Z,"Currently some CORS headers are not sent correctly for REST API requests. This doesn't break anything yet, but can be improved for better performance.
The problematic headers are these:
- `Access-Control-Allow-Headers` and `Access-Control-Allow-Methods` need to be sent just to preflight requests, meaning just on requests with OPTIONS method. Now they are sent back on any REST API request, which is unnecessary
- `Access-Control-Allow-Methods` doesn't need to list the OPTIONS method. Preflight requests are made to check what's allowed, and OPTIONS requests are allowed by default. Current setup says something like 'I allow myself', as the preflight request is already a OPTIONS request
There's more detailed info here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS, but the relevant part is this (it doesn't have an anchor for direct link):
(Note: as described below, the actual POST request does not include the Access-Control-Request-* headers; they are needed only for the OPTIONS request.)
The proposed changes are:
1. Move header `Access-Control-Allow-Headers` from `serve_request` https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api/class-wp-rest-server.php#L239 to `rest_send_cors_headers` https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api.php#L536 making it easier to control the CORS headers from only one place, with one hook
2. Remove OPTIONS keyword from `Access-Control-Allow-Methods`
3. Send `Access-Control-Allow-Headers` and `Access-Control-Allow-Methods` only on request with OPTIONS method (preflight), as it's the place where they are necessary
4. While sending the Allow headers, include `Access-Control-Max-Age: 600` for caching the preflight requests, thus improving the performance for next requests (less requests between browser & server when requesting same data). Timing can be changed
5. ''Optional'' - Include `Content-Disposition` in `Access-Control-Allow-Headers`, enabling direct file upload (requested in other tickets as well)
Why?
To follow recommended specs for CORS and make the REST API work as expected with web apps
All proposed changes were tested in the last few months on a fleet of ~500 websites with different web clients for managing WordPress data. Everything works fine",andrei.igna
Needs Patch,55675,Improve performance Themes REST API endpoint,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2022-05-04T13:19:08Z,2022-05-19T13:06:11Z,"await wp.apiFetch({ path: 'wp/v2/themes?_envelope'});
The first time you call it, we have 2 duplicated queries.
The second time you call it, we have 1 duplicated query.
",furi3r
Needs Patch,57749,"In REST APIs, only prime meta data if there are registered keys",,REST API,4.4,normal,normal,Awaiting Review,enhancement,new,,2023-02-17T08:52:15Z,2023-02-17T08:52:15Z,"For REST API controllers like post, term, comment, this use Query classes like WP_Query, WP_Term_Query and WP_Comment_Query under the hood. By default of these query classes, also prime related meta data. This means that when a user requests one of these endpoints, meta data is primed along with the main object. However, this meta data may not be used in anywhere, making this priming unnessary. Meta data should only be primed, if there are registered meta keys that are going to be used. ",spacedmonkey
Needs Patch,48822,Indicate partial success/error of a REST API request,,REST API,4.7,normal,normal,Awaiting Review,enhancement,new,,2019-11-28T03:24:50Z,2020-10-24T05:14:31Z,"Currently, when the REST API encounters an error, that error is typically immediately returned and any context about what processing has occurred is lost. A good example of this is creating a post.
After the post is created an error can be returned after inserting terms, meta, and additional fields. The response does not provide a way to determine the ID of the post so updates could be made to the existing post, instead you must create a new post.
As a first step, it'd be great if we could return a `Link` to the single item route. This is similar to the post-process link in the media endpoint except that we know there is a `WP_Error` instance, we don't have to always send the header. I think we'd do this by adding link support to `WP_Error`.
A further step might be to add a way to allow returning a partial response. For instance, if I successfully inserted a post, but just inserting some meta values failed, it'd be ideal if I could receive back the prepared item as well as the errors that were encountered. This would probably require changing the output format. We could only return the different format if the client indicated that it could process it, possibly via the `Accept` header.",TimothyBlynJacobs
Needs Patch,60608,Missing REST API users endpoint orderby parameters,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2024-02-22T17:27:54Z,2024-02-22T17:46:52Z,"[https://github.com/WordPress/wordpress-develop/blob/4a3240eb8f4be840ad495302d66f2329d0827179/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php#L1548-L1555 Allowed orderby params in users endpoint]
compared to
[https://github.com/WordPress/wordpress-develop/blob/4a3240eb8f4be840ad495302d66f2329d0827179/src/wp-includes/class-wp-user-query.php#L194-L209 Supported orderby params in `WP_Users_Query`]
The rest endpoint is missing support for ordering by
- 'user_login' (or 'login')
- 'post_count'
- 'meta_value',
- 'meta_value_num'
- 'login__in'
I don't know how complex the meta would be, nor do I fully understand what `login__in` actually does, but for sure the endpoint is missing the ability to order by the user's login/username which can be different from the nicename.",helgatheviking
Needs Patch,53836,Option to additionally format API response,,REST API,5.8,normal,normal,Awaiting Review,enhancement,new,,2021-07-30T09:37:29Z,2021-07-30T09:37:29Z,"Hello,
I have a request for new feature described in this forum post:
https://wordpress.org/support/topic/expansion-of-wp_json_encode-method-with-hooks/
I was told to submit ticket instead of writing a forum post so here we are.
Let me know if I can help with anything else.
Best,
Bruno",bkrnetic
Needs Patch,47194,Posts endpoint: Enable collection parameters for querying by custom field,,REST API,4.7,normal,normal,Future Release,enhancement,new,,2019-05-08T20:40:35Z,2020-10-25T03:29:27Z,"Before the REST API was merged into Core, meta queries were possible via a filter parameter:
{{{
posts?filter[meta_key]=foo&filter[meta_value]=bar
}}}
This was [ticket:38378 removed] when the API was merged. In a [https://wordpress.slack.com/archives/C02RQC26G/p1557261445107000 recent Slack discussion] @kadamwhite mentioned this was due to the potential for very expensive DB queries, but that improvements to meta registration in subsequent versions of WP may have made this more possible.
There are abundant use cases for being able to query posts via the API based on postmeta values, but I haven't been able to find any other Trac tickets about this. So I'm asking the question: would this be feasible now?",coreymckrill
Needs Patch,50409,REST API about links should be embeddable.,,REST API,5.5,normal,normal,Future Release,enhancement,new,,2020-06-17T13:11:47Z,2020-10-15T15:33:45Z,"Currently the `about` links in the REST API aren't embeddable using the `?_embed=true` parameter.
Most likely cause I can think of is that, by default, this route ( `wp/v2/types/$post_type` ) doesn't contain much information and as such there's likely no need for it.
However plugins can add their own custom fields to post types that would be added to this route. Currently if one wishes to fetch that data an additional request would have to be made as it's not possible to embed the data in a previous request.
Making the about link embeddable would give the option to consumers of the REST API to also easily fetch custom fields on post types without requiring an additional request.
This change would be extremely minimal as it'd only require adding `'embeddable' => true`, on line 1864 in `wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php`.",herregroen
Needs Patch,56587,REST API sanitize and validate order / priority,,REST API,6.0.1,normal,normal,Awaiting Review,enhancement,new,,2022-09-16T11:49:30Z,2022-09-16T11:49:30Z,"wp-rest-server has this snippet
{{{#!php
has_valid_params();
if ( is_wp_error( $check_required ) ) {
$error = $check_required;
} else {
$check_sanitized = $request->sanitize_params();
if ( is_wp_error( $check_sanitized ) ) {
$error = $check_sanitized;
}
}
}}}
questions / need clarifications :
1. `validate` and `sanitize` here stands on its own, other than integrated. Which in result causing `rest_sanitize_value_from_schema` called twice. Example in array `enum`
- `has_valid_params` calls
- `rest_validate_request_arg` calls
- `rest_validate_enum` calls
- `rest_sanitize_value_from_schema` ( first call )
- `sanitize_params` calls
- `rest_sanitize_value_from_schema` ( second call )
When sanitize required DB, e.g. enum values are from table, calling it twice would be inefficient, so developers would need to come out with solution to memoize things around sanitize routine.
2. Shouldn't we prioritize `sanitize`, so when `validate` called, it can safely assume data are sanitized already ? otherwise if custom `validate_callback` function is not calling sanitize explicitly it would end up validate function processing a string `a,b,c` when its expected an array `[a,b,c]`, but by doing this, it would resulting #1 inefficiency.",pentatonicfunk
Needs Patch,36257,REST API: It's difficult to impossible to determine the endpoint matched to a request,rmccue,REST API,,normal,normal,,enhancement,assigned,,2016-03-15T23:14:18Z,2022-01-18T13:48:37Z,"Originally raised in Slack - https://wordpress.slack.com/archives/core-restapi/p1457730713002298
It is really difficult (and sometimes impossible) to get good information about the route/endpoint that was matched to a request.
You can inspect `$handler['callback']` in `'rest_dispatch_request'`, which gives the function that will handle the endpoint. In `'rest_post_dispatch'` you can get the URL regex that was matched. BUT none of that works if an error occurred in `'rest_authentication_errors'`, because the request is never dispatched.
A couple of cases where we need to match up requests to endpoints on WordPress.com:
1. Restricting access to certain endpoints. As far as I can tell, this is only possible by inspecting `$handler['callback']` during e.g. `'rest_dispatch_request'` and looking at the class and method name of the callback. (This also has the drawback that you can't prevent the endpoint's `permission_callback` from being called. To get around this, we use the filters added in #35590.)
2. Monitoring of endpoint calls, response times, etc. Getting the matched route regex, like `/wp/v2/posts/(?P[\d]+)`, is possible by listening on the `'rest_post_dispatch'` filter, but as mentioned above, this doesn't work if an error occurs in `'rest_authentication_errors'`, so we've had to move all of our auth logic out of `'rest_authentication_errors'` because we want to know which endpoints have failing auth.
Suggested improvements:
1. Make it possible to consistently and easily get info about the route that was matched up to a request, including the various URL pieces.
2. Still dispatch a request, or at least match it up to what the route would have been, if an error happens in `'rest_authentication_errors'`.",jnylen0
Needs Patch,49330,REST API: introduce block-editor context,,REST API,5.4,normal,normal,Future Release,enhancement,new,,2020-01-30T16:48:59Z,2020-10-01T17:53:05Z,"The block editor does not make use of rendered content, and rendering content for complex posts with a large quantity of dynamic blocks can take a non-trivial amount of time. The REST API maintainers and Gutenberg developers have previously discussed the need to be able to ""skip"" rendering of the content if it is not required.
In [46184] we introduced the ability to provide an explicit list of nested fields to include. Specifying `_fields=content.raw` without mentioning `rendered` now causes the posts controller to skip computation of the rendered field, as it has not been requested. Unfortunately, this approach requires a developer to provide a comprehensive list of all fields they _do_ wish to include in the response, and cannot easily be used to specifically exclude one field. Because block editor developers may depend on registered rest fields or other additional properties, it is infeasible to have the block editor request ""all but the rendered content"" using this interface.
A slack conversation ([https://wordpress.slack.com/archives/C02RQC26G/p1574361923322500]) with @aduth and @timothyblynjacobs addressed this problem and discussed two separate options, either providing an `_omit_fields` parameter to complement `_fields` and permit specific exclusions, or alternatively to introduce a new `block-editor` context that does everything that `edit` does except render content.
This trac ticket is intended to move that discussion forward and aim towards introducing a solution that can be used to speed up response times within the block editor.",kadamwhite
Needs Patch,45252,Reconsider the `context` argument in REST API calls,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2018-11-01T12:20:51Z,2019-11-21T16:50:32Z,"When creating an abstraction on top of the REST API, the line is often blurry between `edit` context and `view` context.
This issue is made visible in https://github.com/WordPress/gutenberg/issues/11335
The data module of Gutenberg is an abstraction layer allowing the consumer (logged-in users) to fetch WordPress data organized in entities (posts, taxonomies, ...). Each entity in the abstraction layer has a well-defined ""format"". At the moment, this format is defined by the returned value of the REST API in the `edit` context. This makes it impossible for users that don't have access to the `edit` context to use the data layer because conceptually the data layer is not a layer on top of the REST API, it uses the REST API as just an implementation detail, it's a layer to retrieve WordPress data.
So while I think we should rethink if we need the `context` argument entirely, I propose to do this iteratively and not change everything at the moment.
Can we consider this?
- Instead of returning 403 when users don't have access to the `edit` context, consider returning 200 but limiting the returned fields to the fields the current user has access to.
An argument for context could be to limit the size of the response or the time spent to compute all the fields, for me this is redundant with `_fields` and we shouldn't mix both use-cases: Security and Performance.",youknowriad
Needs Patch,35425,Return HTTP status code in WP_Error objects,,REST API,,normal,normal,Future Release,enhancement,new,,2016-01-12T20:04:34Z,2017-03-26T02:15:25Z,"The REST API has an existing pattern of using a HTTP status code to better describe the nature of a `WP_Error` object:
{{{
if ( ! empty( $request['id'] ) ) {
return new WP_Error( 'rest_post_exists', __( 'Cannot create existing post.' ), array( 'status' => 400 ) );
}
}}}
Throughout WordPress, it would improve the quality of error reporting to include an equivalent HTTP status when generating a new `WP_Error` object.
This ticket can serve as placeholder for improvements to this effect.
Previously: https://github.com/WP-API/WP-API/issues/153#issuecomment-170734687",danielbachhuber
Needs Patch,56481,Short-circuit HEAD methods in Core controllers,,REST API,4.7,normal,normal,Awaiting Review,enhancement,new,,2022-08-31T19:53:43Z,2022-08-31T19:53:43Z,"The REST API has built-in support for responding to a `HEAD` request. If no callback is specifically registered for the method, the server will fallback to the associated `GET` handler. However, this means that the server is throwing away work when no response body is needed.
`GET` routes can be adapted to check if the `WP_REST_Request::get_method` is `HEAD` and if so skip preparing the response body. For single item routes, this is pretty straightforward.
It is a little more nebulous for collection routes. We still need to provide any headers like pagination which are currently prepared after the response body is generated.
I think we'd want to extract the pagination logic to it's own method. Then, before making the database query,
adjust the query to only return `ids`. This will give us enough information to build the pagination headers and allow us to send the `HEAD` response.
See https://github.com/WordPress/gutenberg/pull/43703",TimothyBlynJacobs
Needs Patch,38641,Support partial ISO8601 dates in queries,,REST API,4.7,normal,normal,Future Release,enhancement,new,,2016-11-03T01:17:39Z,2022-01-18T13:48:52Z,"Right now, we support sending `date` or `modified` with a full ISO 8601 date (`yyyy-mm-ddThh:ii:ssZ`), and we also support `before` and `after`. However, there's no easy way to get posts for a certain month, without building the `before` and `after` yourself.
[https://en.wikipedia.org/wiki/ISO_8601 ISO 8601] gives us a way to specify partial dates: `yyyy` and `yyyy-mm` are both valid, and we could totally support them. This avoids the need for a separate `year` or `month` query parameter. Internally, this can map to `before` and `after` values.",rmccue
Needs Patch,56368,Unable to use enum with array data type - REST API,,REST API,,normal,normal,Awaiting Review,enhancement,new,,2022-08-12T08:16:14Z,2022-09-04T19:08:23Z,"I would like to be able to specify enums when creating a REST schema property that accepts an array of values.
**For example:**
{{{#!php
__( 'Sort collection by object attribute.' ),
'type' => array( 'string', 'array' ),
'default' => 'id',
'items' => array(
'type' => 'string',
),
'enum' => array( 'id', 'title', 'date', 'include' ),
'validate_callback' => 'rest_validate_request_arg',
);
}}}
",picocodes
Needs Patch,40988,Use objects for `get_item_schema()` calls,,REST API,4.7,normal,normal,Awaiting Review,enhancement,new,,2017-06-10T06:07:54Z,2017-12-03T22:32:02Z,"The `get_item_schema()` method of a REST API controller always returns a dynamically generated array of schema information. This dynamic nature is needed, because some keys/values can change based on the current environment/controller.
This incurs a large performance penalty because the arrays need to be set up again and again, and as a side-effect, the translations that are being used for the `'description'` field are being loaded every single time. On a fresh, empty install of WordPress 4.8, making a request to `GET /wp-json/wpv2/posts` can spend a third or more of its time translating strings. Most of these translations are done multiple times, every single time an item schema is being requested. See blackfire profiling run here: https://blackfire.io/profiles/20516863-50e3-4df2-938a-7fa2f462abc8/graph
I suggest turning the arrays that `get_item_schema()` returns into a collection of smart objects that implement `ArrayAccess`. This offers the following benefits:
* Objects use up the memory for their keys once.
* Objects can be cloned (with the possibility to make changes after the clone), making sure that translations will at the most be loaded only once for every individual string.
* Objects can be extended and/or decorated, making it easy and clean to provide different structures for different use case, to get around `if/else` edge case handling.
* Objects can provide ""lazily-loaded"" keys (through magic methods or the proxy pattern), allowing the descriptions to only be processed when they are actually being requested. This would avoid the translation work completely for a use case like I tested above.
I expect this to shave around 30% off of the execution time of the above test case. It also makes the code more scalable, as large response sets might even incur yet a bigger performance penalty than the one I have recorded.",schlessera
Needs Patch,57361,"WP_REST_Attachments_Controller::get_media_types not returning existing mime types, but the ones allowed for upload",,REST API,4.7,normal,normal,Awaiting Review,enhancement,new,,2022-12-20T14:04:31Z,2022-12-20T16:18:55Z,"While debugging an [https://github.com/WordPress/gutenberg/issues/46658 issue in Gutenberg's new media tab], it has been [https://github.com/WordPress/gutenberg/pull/46676 pointed out] that the REST API does not actually allows to list items which are already in media library, but can no longer be uploaded (eg.: the list of allowed mime types changed over time).
That's different from what the wp-admin does, as it lists all items in the media library, no matter what their (mime)type is, and whether it can be uploaded or not.
The `WP_REST_Attachments_Controller::get_media_types` method [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php#L1253 uses the `get_allowed_mime_types()` function], which is upload oriented (returns a list of mime types which can be uploaded), while the [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-media-list-table.php#L137 listing in wp-admin uses a logic based on existing mime types in the library].
Thus I wonder, if the same logic as used in wp-admin should be used in the REST API, allowing users and developers to get a listing of all existing items in the media library, no matter whether new ones can be uploaded or not.",david.binda
Needs Patch,42737,Add method wp.api.getModelByType for retrieving api models,adamsilverstein,REST API,5.1,normal,normal,Future Release,feature request,assigned,,2017-11-28T17:52:54Z,2018-10-19T18:33:35Z,"
For Gutenberg, it will be easier and less error prone to fetch the wp.api.model by retrieving by type instead of creating a route and searching for the model that matches that route.
An open detail to work out is if namespacing is needed, can objects have the same name in different API namespaces in the same instance of wp.api. A potential solution could be an optional second argument.
For example: `getModelByType( type, versionString = 'wp/v2' )`
Related to #41111
Original Slack Discussion at:
https://wordpress.slack.com/archives/C5UNMSU4R/p1511878493000062
",mkaz
Needs Patch,44862,"Create REST API endpoints to lock, release and takeover post edition",timothyblynjacobs,REST API,,normal,normal,Awaiting Review,feature request,assigned,,2018-08-29T13:05:41Z,2022-01-07T18:58:06Z,"**Context**
In this Gutenberg PR, we're trying to introduce post locking https://github.com/WordPress/gutenberg/pull/4217
To do so, we're reusing the existing ajaxActions, and the the non-REST API URLs to take over the posts. Ideally, we'd like to be able to lock, unlock and takeover edition of posts without the need of a page refresh or usage of ajax actions.
**Questions**
- I wonder if we should return an error in the PUT/DELETE requests on single posts if the post is locked by another user. (Not required for the ticket as a V1 but might be good to think about it).
",youknowriad
Needs Patch,50239,REST API Debug/Dev Mode,,REST API,4.4,normal,normal,Awaiting Review,feature request,new,,2020-05-24T19:39:55Z,2020-05-24T19:39:55Z,"I think we should consider adding some additional debug/dev helpers for the REST API when `WP_DEBUG` is active. When in this mode we'd provide additional validation that the developer is following the REST API paradigms correctly, validation that would be too intrusive or slow in production.
Some things that come to mind.
1. Verify that a developer is not calling `die()` in a response handler instead of using a `WP_REST_Response` object. This would be on top of #36271. I still see this in the wild.
2. Validating that the schemas themselves are valid.",TimothyBlynJacobs
Needs Patch,46379,REST API posts/pages response to include scripts needed for display of post content,,REST API,,normal,normal,Future Release,feature request,new,,2019-02-28T19:11:35Z,2020-10-24T05:25:49Z,"Often post body is dependent on external scripts and stylesheets in order to be displayed correctly, but there is no way to discover what those scripts/stylesheets are.
This problem was encountered in Gutenberg on https://github.com/WordPress/gutenberg/pull/9734, and the fix was to filter the REST API response to include the list of scripts.
You can't know what the scripts are required ahead of time, especially if the API client code is being run from a different server. Shortcodes and Gutenberg blocks can dynamically add scripts and stylesheets.
So, I think the problem is three-fold:
1. How to detect what scripts/stylesheets are required to display a particular page/post body
2. How to return that information over the REST API
3. How can API clients (like the backbone client) use that to display the post's body correctly (with the required javascript/stylesheets)",mnelson4
Needs Patch,39972,REST API: Allow querying posts by post format,,REST API,4.7,normal,normal,Awaiting Review,feature request,new,,2017-02-27T00:30:29Z,2017-05-07T05:48:09Z,"Although it is listed in the REST API reference,
{{{
posts?format=video
}}}
shows all posts.",sba7elfol
Needs Patch,52384,WordPress API - Add Limit / Block API Access Features,,REST API,,normal,normal,Awaiting Review,feature request,new,,2021-01-27T15:36:19Z,2021-01-27T15:53:27Z,"Hi,
WordPress API is powerful tool, but many users don't actually need or want it. While we can disable it using 3rd party plugins, I believe that basic features to limit access to API via specific/custom tokens, custom users, logged-in (authenticated) users, IP address(es) or CIDR ranges and so on -- should be provided in-core. Yes, yes I know we can achieve it via plugins, but they are not always best way to do it, and sometimes they have bugs, do not pass other internal plugins that actually use API (e.g. CF7) which may create problems, and so on.
What do you think?
Thanks",Darko A7
Needs Patch,39544,REST API: Improve users endpoint in multisite,,REST API,,normal,normal,Future Release,task (blessed),new,,2017-01-11T11:22:13Z,2021-08-17T17:53:20Z,"As per the discussion that happened during the past two weeks' multisite office-hours, the REST API users endpoint needs to be improved to support multisite behavior.
This ticket is supposed to act as a general task for discussion, and then for the actual implementation smaller spin-off tickets should be opened.
Currently, the four steps (possibly four tickets) we're thinking about are:
* The users overview at `wp-json/wp/v2/users`
should continue to only show users of that site by default, but a request like `wp-json/wp/v2/users?global=true` should show all users in the WordPress setup. This parameter must only be available to network administrators though, more specifically users with the `manage_network_users` capability. In the future a `network` parameter might also be introduced for support of multi networks, but at this point core does not support querying users per network. Accessing global users should be available from all sites in a setup instead of only from the main site. While this approach makes these endpoints duplicates of each other, it has several benefits like preventing the requirement for cross-domain requests, allowing easier API discovery and not requiring the main site of a setup to be exposed to REST API calls to a sub site.
* Assigning an existing user to a site and removing a user from a site should generally be only available to network administrators, and the site administrators of the site that is being interacted with.
* Similarly, editing a user that does not belong to the current site should only be possible for a network administrator. Currently this is available to site administrators as well which is probably wrong.
* Deleting any user completely should only be available to a network administrator. A good way to handle the `reassign` parameter needs to be found though.
For background information, please read the posts at https://make.wordpress.org/core/2017/01/09/improving-the-rest-api-users-endpoint-in-multisite/ and https://make.wordpress.org/core/2017/01/11/controlling-access-to-rest-api-user-functionality-for-multisite/ (the latter contains the above list as well)",flixos90
Needs Patch,39851,WP_REST_Posts_Controller::get_items() has too many concerns,,REST API,4.7,normal,normal,Future Release,task (blessed),new,,2017-02-11T23:20:39Z,2019-01-17T18:58:52Z,"I've written a bunch of custom endpoints that return collections of posts of one or more post types. I'd like my responses to be the same formatting, body and header as the default post routes provide. This allows for a client designed to consume default routes to be more easily modified to use custom routes.
Achieving this with a subclass of WP_REST_Posts_Controller still requires some cut and paste for collections of posts, since the get_items() method has way too many concerns. I'd like to break out the preparing of response body, as well as response header into separate methods, so that they can be used with different types of requests or ways to create arrays of WP_Post objects, while still providing a consistent response.
",Shelob9
Needs Patch,27244,'Restore This Autosave' immediately updates a published post,,Revisions,,normal,normal,Awaiting Review,defect (bug),new,,2014-02-28T23:43:29Z,2024-02-25T19:29:55Z,"The ""Restore This Autosave"" button on the revisions screen immediately replaces the post with the autosave without making it clear that that is the case.
Steps to reproduce:
1. Publish a post.
2. Edit the content of the post and trigger an autosave (either by waiting two minutes or by clicking the 'Preview Changes' button).
3. Navigate away from the post editing screen.
4. Return to the post editing screen and note the message stating ""There is an autosave of this post that is more recent than the version below"". Click ""View the autosave"".
5. On the revisions screen, click ""Restore This Autosave"".
6. Note that the autosave has been published rather than simply being restored to the editing screen.",johnbillion
Needs Patch,52303,Accessibility issues in revisions screen,joedolson,Revisions,3.6.1,normal,normal,Future Release,defect (bug),assigned,,2021-01-15T00:04:34Z,2021-01-27T21:59:41Z,"In the course of assessing a functional problem with `wp_text_diff`, a number of accessibility concerns were unearthed regarding the revisions screen.
Once the output of `wp_text_diff` is settled, the other concerns noted in #25473 should be addressed here. ",joedolson
Needs Patch,30679,"Clicking ""Restore this Revision"" publishes immediately",,Revisions,,normal,normal,,defect (bug),new,,2014-12-11T20:58:35Z,2019-06-04T21:13:03Z,"This is the same as #27244, but for non-autosaved posts.
The ""Restore This Revision"" button on the revisions screen immediately replaces the post with the autosave without making it clear that that is the case.
Desired behaviour:
Clicking Restore This Revision puts this revision into the editor, saving it as draft.
Example:
1. Create a post with three revisions, and publish it
Revision A
Revision B
Revision C <-- live and published
2. On the post edit screen, click on revision B.
3. On the revisions screen, click Restore This Revision.
Revision A
Revision B
Revision C <-- live and published
Revision B' <-- in the editor, saved as a draft
",paulschreiber
Needs Patch,49291,Code issues with set_time_limit,,Revisions,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-25T23:24:12Z,2020-01-27T12:43:01Z,"file: wp-admin\includes\ajax-actions.php
function: `wp_ajax_get_revision_diffs`
line: 3425
Issue: no time limit set
Suggestion: set value to 120
file: wp-includes\class-pop3.php
function: `__construct`
line: 63
Issue: timeout value is not tested and can be set to 9999999 or a negitive value that acts the same as 0
Suggestion: Force a range for the value (1 to 120)
",madpeter
Needs Patch,53607,Loading or saving a post with enough (large) revisions exhausts available memory,,Revisions,5.7.2,normal,normal,Awaiting Review,defect (bug),new,,2021-07-06T14:22:21Z,2021-07-06T14:22:21Z,"This is a follow-up to #34560.
**What steps should be taken to consistently reproduce the problem?**
- create a post with enough (large) revisions (see ""Steps to reproduce"" from #34560).
- Reduce `WP_MAX_MEMORY_LIMIT` so that it is enough to load one revision but not enough to load tens / hundreds of revisions (e.g. 128M)
- save post -> `Updating failed. The response is not a valid JSON response.`
- edit post -> `**Fatal error**: Allowed memory size of 134217728 bytes exhausted`
**Does the problem occur even when you deactivate all plugins and use the default theme?**
- yes
**Likely cause**
It seems full post revisions (including post content) are still being loaded when editing a post. This is likely the cause of high memory consumption. To look into this:
- on a standard WordPress installation, activate [https://wordpress.org/plugins/debug-bar/] with
{{{#!php
}}}
- edit a post with revisions enabled
- check the ""Queries"" tab of the debug bar (might need to turn off Gutenberg full screen mode to see it) and look for the query that loads the exhaustive list of full revisions (`wp_posts.*`):
{{{
SELECT wp_posts.* FROM wp_posts
WHERE 1=1 AND wp_posts.post_parent = [[THE CURRENT POST ID]]
AND wp_posts.post_type = 'revision'
AND ((wp_posts.post_status = 'inherit'))
ORDER BY wp_posts.post_date DESC, wp_posts.ID DESC
}}}
",mlbrgl
Needs Patch,43189,Restoring page revision doesn't restore page template previously used,,Revisions,4.9.2,normal,normal,Awaiting Review,defect (bug),new,,2018-01-31T13:23:15Z,2018-01-31T15:09:27Z,"I noticed this when one of the editors made a change in a page and also changed page template.
We reverted the change by restoring a previous revision, but this didn't restore the previous page template.
",bugnumber9
Needs Patch,44540,Revision restoring redirect issue when using custom wp_query inside shortcodes,,Revisions,4.9.7,normal,normal,Awaiting Review,defect (bug),assigned,,2018-07-07T10:43:11Z,2019-03-11T20:44:02Z,"Using a custom WP_Query inside page content shortcodes leads to weird ""revisions restoring"" behavior which is redirecting to improper page id. However the page content is restored correctly. Have found this lines 55, 56 in revision.php
{{{
wp_restore_post_revision( $revision->ID );
$redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) )
}}}
While wp_restore_post_revision( $revision->ID ) returns a correct post_id, the redirect is made to get_edit_post_link( $post->ID, 'url' ) and $post->ID may be broken by custom wp_query loop. Why not using wp_restore_post_revision( $revision->ID ) returned result to perform a correct redirect?
",vendetta90
Needs Patch,44929,Revisions: wp_get_revision_ui_diff only displays existing meta fields of the current post,,Revisions,,normal,normal,Awaiting Review,defect (bug),new,,2018-09-11T08:38:42Z,2019-01-16T23:01:18Z,"For reproducing the issue:
1. Turn on revisions
2. Create a post
3. Save
4. Create a custom field with some value
5. Save
6. Delete the custom field
7. Save
8. Go to the revision comparison
9. The field added and deleted won't display in the comparision
After doing some debug I found out that the the foreach loop in the function wp_get_revision_ui_diff in wp-admin\includes\revision.php uses _wp_post_revision_fields( $post ) which only takes into consideration of the custom fields of the actual post.
Solution:
Change:
{{{
foreach ( _wp_post_revision_fields( $post ) as $field => $name ) {
}}}
To:
{{{
$fields_from = array();
$fields_to = array();
if ( $compare_from != null )
$fields_from = _wp_post_revision_fields( $compare_from );
if ( $compare_to != null )
$fields_to = _wp_post_revision_fields( $compare_to );
$fields = array_merge( $fields_from, $fields_to, _wp_post_revision_fields( $post ) );
foreach ( $fields as $field => $name ) {
}}}
",luisarn
Needs Patch,41029,The changed author is not making the coming revisons,adamsilverstein,Revisions,4.8,normal,normal,Awaiting Review,defect (bug),assigned,,2017-06-13T14:02:03Z,2021-04-30T18:28:07Z,"Hi
In WordPress 4.8 the changed author won't be changed in the new revisions (and autosave).",elisa-demonki
Needs Patch,53417,The revisions endpoints provide an incorrect JSON schema,,Revisions,4.7,normal,normal,Awaiting Review,defect (bug),new,,2021-06-15T23:20:51Z,2021-06-15T23:29:55Z,"The schema provided by the REST API endpoints for revisions at `wp/v2/posts/{id}/revisions` and `wp/v2/pages/{id}/revisions` is incorrect. The schema states that `content.protected` and `excerpt.protected` properties exist for each revision, but these properties do not exist.
* [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L736 The schema is constructed here] from the parent controller for posts, which does include this property
* [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L600-L604 When the content data is prepared here] the `protected` property is not included
* [https://github.com/WordPress/wordpress-develop/blob/afee26086fea307c2a5c31c0e2018cb6acd598f7/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php#L608-L611 When the excerpt data is prepared here] the `protected` property is not included
Two options:
1. Remove the `content.protected` and `excerpt.protected` properties from the schema
2. Add the `content.protected` and `excerpt.protected` properties to the response
Here is the `content` property from the schema. Note the `protected.context` property states that the property exists for all three contexts.
{{{
""content"": {
""description"": ""The content for the post."",
""type"": ""object"",
""context"": [
""view"",
""edit""
],
""properties"": {
""raw"": {
""description"": ""Content for the post, as it exists in the database."",
""type"": ""string"",
""context"": [
""edit""
]
},
""rendered"": {
""description"": ""HTML content for the post, transformed for display."",
""type"": ""string"",
""context"": [
""view"",
""edit""
],
""readonly"": true
},
""block_version"": {
""description"": ""Version of the content block format used by the post."",
""type"": ""integer"",
""context"": [
""edit""
],
""readonly"": true
},
""protected"": {
""description"": ""Whether the content is protected with a password."",
""type"": ""boolean"",
""context"": [
""view"",
""edit"",
""embed""
],
""readonly"": true
}
}
},
}}}",johnbillion
Needs Patch,30854,`wp_insert_post` doesn't save revision for new published post,adamsilverstein,Revisions,,normal,normal,Future Release,defect (bug),assigned,,2014-12-28T16:41:25Z,2022-04-19T05:55:17Z,"Calling `wp_insert_post` with `post_status` of `publish` or any other status on a new post doesn't save a new revision.
The reason for this is the `$update` check at the beginning:
https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/post.php#L3085
checks whether or not the args include an ID, indicating that we're updating a post. Further down, that update check is what calls `post_updated`
https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/post.php#L3473
which `wp_save_post_revision` is hooked to. Therefore, if we call `wp_insert_post` in a plugin to insert a post with a`post_status` of `publish`, WordPress doesn't save a post revision.
Post revisions are supposed to be up-to-date with the latest post data, but we don't get a revision if we insert a post in this manner. I think the reason we ended up with this is to avoid saving a revision of the auto-draft that is created when opening up post-new.php, but that isn't necessary now, as `wp_save_post_revision` checks whether the `post_status` is an auto-draft.
I think the easiest solution is to move the `wp_save_post_revision` to the `save_post` hook, but I'm not sure if there are other places in the codebase this would cause issues.",JamesDiGioia
Needs Patch,48973,wp_text_diff() out of memory with 10GB memory limit on certain revisions,,Revisions,5.3.1,normal,normal,Awaiting Review,defect (bug),new,,2019-12-14T16:33:35Z,2019-12-16T20:59:38Z,"Hi,
I have identified a bug with wp_text_diff on a blank WP install on PHP 7.2.8 and 7.3.12
The bug causes the system to run out of memory no matter how much is available. I found it while trying to edit some revisions. The texts are large (50KB), maybe it has something to do with it.
To replicate the bug you need to use this code. I will provide the files.
{{{#!php
ID);
}}}
I would like to propose that that line be changed into:
{{{
$preview = !empty($_GET['preview_id'])?get_post($_GET['preview_id']):wp_get_post_autosave($post->ID);
}}}
The nonce has already been verified in `_show_post_preview()`, so there should be no security implications of this change.
With this change, the Revisions meta box (Edit Post screen) could display a ""preview"" icon/link that includes the appropriate nonce and does the same thing as the main ""Preview"" button.",coolmann
Needs Patch,47518,Add an explanatory message to the Revisions screen for locked posts,adamsilverstein,Revisions,,normal,normal,Awaiting Review,enhancement,assigned,,2019-06-10T15:30:43Z,2021-04-30T17:44:27Z,"It's possible for a user to navigate to the revisions screen for a post that's locked due to another user editing it, and not be able to restore any revisions due to the fact that the post is locked. In this situation no message is shown on the Revisions screen that explains why the `Restore This Revision` button is disabled.
Under normal operating procedure it's not easy to get to the Revisions screen for a locked post, but it is possible. A workflow related plugin, audit trail, or revisions list can make it possible to navigate directly to a revision without going via the otherwise locked editing screen.
1. User A navigates to the revisions screen for a non-locked post.
2. User B visits the editing screen for the post.
3. User A clicks `Return to editor` on the revisions screen.
4. User A chooses not to take over, and clicks `Go back`.
User A is now shown the revisions screen for a locked post and the `Restore This Revision` button is disabled for all revisions but with no explanatory information.",johnbillion
Needs Patch,38368,Add front-end revision browsing,,Revisions,,normal,normal,Awaiting Review,enhancement,new,,2016-10-19T16:17:04Z,2018-03-08T20:14:27Z,"This patch will add a live-updating revision browser to single post view when the current user can edit posts.
This feature requires the post and post revision routes of the WordPress REST API, as well as the JavaScript client for the REST API.
Here is demo of this patch:
[[Image(https://github.com/Shelob9/revisions-browser/blob/master/CvIKaDdWcAAtRSa.gif?raw=true)]]
Currently this is a functional prototype, as a plugin -- https://github.com/Shelob9/revisions-browser -- prepared by myself with guidance from @adamsilverstein and contributions from @mrahmadawais + @websupporter + @kadamwhite + @circlecube ",Shelob9
Needs Patch,47831,Compare any two revisions: Improve the distinction of From/To columns,,Revisions,,normal,normal,Awaiting Review,enhancement,new,,2019-08-04T12:35:04Z,2019-11-12T23:55:04Z,"This is a continuation from ticket #43532.
We have a {{{From/To}}} when the ""Compare any two revisions"" is checked, but it might not be obvious what column is {{{From}}} and what column is {{{To}}}.
Here are relevant comments from the #43532 ticket:
@adamsilverstein suggests using e.g. ""added"" and ""removed"" (see here https://core.trac.wordpress.org/ticket/43532#comment:5 )
@kjellr mentioned that this was discussed in design chat
https://core.trac.wordpress.org/ticket/43532#comment:19
>The Design team discussed this briefly in our triage today:
>https://wordpress.slack.com/archives/C02S78ZAL/p1564417984166900
>(A WordPress.org slack account is required to view that link)
>Both of these updates seem like solid improvements, and the screenshots look good. We're >going to remove ux-feedback for now.
>Thanks, all!
I'm adding the screenshots here below:",birgire
Needs Patch,48574,Create better post diff screens,,Revisions,5.3,normal,normal,Awaiting Review,enhancement,new,,2019-11-12T19:45:19Z,2019-11-12T23:54:46Z,"Post diffs showing the difference between post revisions have always been in raw form, showing differences in post HTML and not ''visual'' differences. With the addition of the Gutenberg editor to WordPress, there is now even more HTML shown due to the inclusion of block settings as comments. Additionally, Gutenberg blocks such as figures or lists create one-line HTML strings so small changes to list items result in one huge line change on the diff screen. It seems like now is the time to consider improving the post diff screen, and changing the way Gutenberg blocks generate their HTML to allow for cleaner diffs.
See the attached image for an example of a block that could have been generated across multiple lines such that the addition of a link didn't generate 12 lines of diff.
I suppose this feature request is twofold:
- Improve the diff page UI to show visual diffs (but keep the current ""raw"" mode as an option).
- Make sure Gutenberg block HTML is cleanly formatted across multiple lines to improve line-based diffs used on the post diff screen.",seanleavey
Needs Patch,48315,Scheduling already published posts or pages causes 404 error on page,,Revisions,,normal,normal,Awaiting Review,enhancement,new,,2019-10-15T20:44:41Z,2023-10-12T14:21:33Z,"Scenario: If you have a live published page and need to make some changes to it but those changes shouldn't be visible until a certain time.
**Steps**
1. Edit a published post
2. Change the publish date to future date and click update
Result: The post is now unpublished! (404 error)
Expected: New changes I made to update/appear on the scheduled date without taking down the page with a 404 error in the meantime.
Solution: Draft a revision of a published post without un-publishing it?
There is discussion about it here from a while ago, but none of the solutions or plugins are good:
https://wordpress.stackexchange.com/questions/3986/is-there-any-way-to-draft-a-revision-of-a-published-page-or-post-what-workaroun
https://redearthdesign.com/help-center/update-live-wordpress-page-post/
This seems like a common workflow?",wpfed
Needs Patch,42712,Enhance wp revisions to keep with expiration date for the revisions,,Revisions,,normal,normal,Awaiting Review,feature request,new,,2017-11-27T13:16:26Z,2017-11-28T00:39:31Z,"https://codex.wordpress.org/Revisions
Now, the options of the revisions are:
true (default), -1: store every revision
false, 0: do not store any revisions (except the one autosave per post)
(int) > 0: store that many revisions (+1 autosave) per post. Old revisions are automatically deleted.
What about to have expiration by time also, not just with number. In that way, in big multisite installations, old revisions could desappear after X months. Decreasing the size of the database.
Normally, if a post have not modifications after 1 year, is because not longer are necesary. Anyway, it would be a choice of the superadministrator of the installation.
thanks",colomet
Needs Patch,57641,Need functionality to preview revisions for the post such as preview,,Revisions,,normal,normal,Awaiting Review,feature request,new,,2023-02-06T10:19:46Z,2023-11-20T18:01:09Z,"Can we add some feature requests to WordPress core that is to preview the different revisions for the posts exactly as the preview while creating the new post?
This would help editors to review the revision full of content instead just checking normally content in revisions tab. With new Gutenberg editor, revisions are hard to check because blocks are not parsed while checking the revisions.
We can have a preview button over the revisions page for which we are checking the revisions and can be previewed as whole content with all parsed blocks. This can help editor to review perfectly and restore the revision if needed.
Current Revisions page have this kind of markup,
[[Image(https://user-images.githubusercontent.com/58802366/216945642-5b5324f7-07cb-47a5-811c-ff53808de3d0.png)]]
Need this type of markup with a preview button, so on click of that button, user can view the revision with that content.
[[Image(https://user-images.githubusercontent.com/58802366/216946179-cb9c2a12-e4b5-4cbc-90f1-b8d244ac230c.png)]]
",hbhalodia
Needs Patch,42086,Option to view condensed diffs for post revisions,,Revisions,,normal,normal,Awaiting Review,feature request,new,,2017-10-04T16:08:37Z,2020-09-01T16:16:59Z,"Viewing a revision of a post which has a lot of content in it can result in a very long screen. It would be great if there was a toggle somewhere on the revisions browser so a condensed diff view was shown.
The condensed view would more closely resemble a traditional VCS diff view, which highlights only the changed lines and a handful of lines above and below each change.
I haven't checked to see if the `Text_Diff` library that core uses supports such diff generation, I doubt it does but I'd like to be wrong.",johnbillion
Needs Patch,59419,"Revisions page: how to support varying ""Go to editor"" link templates",,Revisions,,normal,normal,Awaiting Review,feature request,new,,2023-09-21T03:26:10Z,2023-11-21T01:46:00Z,"For various post types, the Block Editor redirects to admin/revision.php.
The page admin/revision.php has a couple of ""Go to editor"" links, which open the the current post in the editor.
admin/revision.php builds the link by calling `get_edit_post_link()`, which uses the link template from `post_object->_edit_link`.
For most post types, including pages and posts, the `_edit_link` template looks something like this: post.php?post=%d.
get_edit_post_link() replaces the placeholder %d with the correct post id to build the edit post link.
Each page under Site Editor sidebar contains a link to admin/revision.php for page revisions.
However since the ""Go to editor"" links are constructed using `page_object->_edit_link`, they will always link to post editor.
I would expect the links to return me to the editor from which I last came.
The upshot is that we want the `_edit_link` template to vary depending on the origin of the referring URL. For pages, that means if we're coming from the Site Editor, the return template should be something similar to what the wp_template post object uses, which is site-editor.php?postType=%s&postId=%d&canvas=edit.
The question is ""what would be the best way to do this?""
Challenges:
1. admin/revision.php does not know where the revision is coming from, that is Post Editor vs Site Editor, but we could use some sort of `$_GET` query param on `revisions.php` to solve that. E.g., let's call it editor: `revision.php?revision=150&editor=site`. That is very specific and might be too narrow.
2. If 1, what then? Whether we grab the query param on the revision page and pass it to `get_edit_post_link` (thereby changing the function signature), or modify `get_edit_post_link` to do the lot internally, we'd still have to build the link accordingly to some pattern.
3. If 2, where would we store that pattern? `_edit_link` is taken. Maybe a new property on the post object? `_edit_site_link` or something.
It can be done I think without great fuss using the `get_edit_post_link` filter. With it we can return whatever we want.
We would just have to come up with migration approach for Core and I'm not sure what the best option would be.
Thank you for considering this issue!
For discussion and context see: https://github.com/WordPress/gutenberg/issues/51343#issuecomment-1724580879",ramonopoly
Needs Patch,42478,Add_permastruct ignores EP_NONE and other args if %post_id% is present in struct,,Rewrite Rules,4.9,normal,normal,Awaiting Review,defect (bug),new,,2017-11-08T22:15:20Z,2017-11-08T22:15:20Z,"Additional rewrite rules are made if the %post_id% is in a struct passed to add_permastruct. This happens because generate_rewrite_rules (called in to process the permastructs) assumes anything with %post_id% in its struct is a post and should have attachments, talkbacks, comments, etc. I suspect it's holdover from when %post_id% and p= only referred to posts and post_ids from the wp_posts table at large.
I have a simple enough solution.
Add another default rewrite_tag that generates the 'p=' query but doesn't trigger the additional rewrites.
i.e. add_rewrite_tag( '%p%', '([0-9]+)', 'p=' );",Underscorefunk
Needs Patch,41680,Added rewrite tags using add_rewrite_tag() not working on static front-page,,Rewrite Rules,4.8.1,normal,normal,Awaiting Review,defect (bug),new,,2017-08-20T19:46:58Z,2017-08-20T19:46:58Z,"Hello everyone,
the following ticket is a little bit similar to the issue described here: #25143
== Introduction ==
I am working on a plugin which provides a shortcode. This shortcode generates some content/output on a page where it is placed on. The shown output depends on optional URL-parameters. For example those two URLs result in different outputs:
- my-site.com/my-page
- my-site.com/my-page?'''foo'''=''bar''
In preparation for pretty URLs I have to register a new rewrite-tag '''foo''':
{{{#!php
add_rewrite_tag('%foo%', '([^/]*)');
}}}
This allows me (in combination with the corresponding rewrite rules) to use pretty URLs like this:
- my-site.com/my-page/'''foo'''/''bar''
As expected you can access the assigned value ''bar'' of '''foo''' with the following code:
{{{#!php
$value_of_foo = get_query_var('foo'); // returns: bar
}}}
== Problem ==
This all works fine as long as the page which includes the shortcode is not set as the sites static front-page. In this case your URLs will usually look like that:
- my-site.com (the content of the static page is shown)
- my-site.com/?'''foo'''=''bar'' (from here it is broken)
So, whats happening? Instead of generating and showing the content based on the URL parameter, the second URL loads the front-page but instead of showing the content of the static page, it acts like the blog page and shows the list of the latest posts.
The problem is that {{{is_home}}} is improperly set to {{{true}}} because we now have a custom query-var in our URL which basically makes the content of a ''static'' page not ''static'' anymore. But this fact shouldnt let WordPress showing the list of the latest posts-page instead. This problem makes it impossible for users to place and show the content of a shortcode - which is based on (prettyfied) URL-parameters - on their static front-page.
At the moment I am using the following code as a workaround but I think this is not an optimal long-term solution for this problem:
{{{#!php
function fix_query_vars_on_front_page($query) {
// Dont do this workaround when we are in the administration area or when we are not inside the main query.
if (is_admin() || !$query->is_main_query()) {
return;
}
// Cache the actual query vars first.
$queryVarCache = $query->query;
// Only continue when our query vars are not already empty.
if (!empty($queryVarCache)) {
// Remove our query vars from the cache when they are set.
if (isset($queryVarCache['foo'])) {
unset($queryVarCache['view']);
}
// When our cache is empty, we are on a front-page (is_home() or is_front_page()). Ensure that the following filtering only happens on a static front page.
if (empty($queryVarCache) && get_option('show_on_front') === 'page') {
// Get the ID of the front page and add it to the query vars.
$query->query['page_id'] = get_option('page_on_front');
// Reparse the query.
$query->parse_query($query->query);
}
}
}
add_action('pre_get_posts', 'fix_query_vars_on_front_page');
}}}
Maybe some way to add custom rewrite tags without adding them as a query var would be a possible solution for this. Of course there would be a need to add a function to access them, for example {{{get_rewrite_var('foo')}}} instead of {{{get_query_var('foo')}}}.
I am looking forward that WordPress will make this possible in a future version. :-)",Asgaros
Needs Patch,47686,Always flush rewrite rules when active plugins changes & on plugin upgrades,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2019-07-11T21:02:29Z,2021-12-18T14:09:24Z,"I think it's odd that plugins each need to roll their own rewrite rule flushing.
It's definitely nice to have the freedom to decide when it's necessary, but it is inconvenient as a developer to reinvent a new way with every new plugin whenever a rule needs to be changed.
It's also inconvenient to users when a plugin forgets to flush rules, or when a developer is unaware that it is their responsibility to flush their own rules.
I'm proposing here that WordPress core could improve the lives of both developers and users by automatically flushing rewrite rules every time a plugin is activated, deactivated, or updated.
For context, `flush_rewrite_rules()` is already called inside of `check_theme_switched()` which in hooked to `init` and always flushes rewrite rules when a new theme is activated, and I'm suggesting we consider doing this for plugins too.",johnjamesjacoby
Needs Patch,20520,Author Page Pagination Broken When Removing /author/ Slug,,Rewrite Rules,3.3,normal,normal,,defect (bug),new,,2012-04-23T04:16:03Z,2019-06-04T21:07:29Z,"WP 3.3.1 Multisite
Permalink setup: /author/post-name
- If the request is ""domain.com/authorname"" the authors page pagination link is broken.
- If the request is ""domain.com/author/authorname"" the authors page pagination link works fine.",rbaccaro
Needs Patch,41891,Bug when changing $(comments_)pagination_base of WP_Rewite instance to string with non-ASCII characters,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2017-09-15T13:05:55Z,2017-09-15T13:05:55Z,"When you change `$pagination_base`/`$comments_pagination_base` for `WP_Rewrite` instance to string with ASCII characters, it works as expected. But when you change to non-ASCII string, it doesn't work because it redirects from `//2` to `//2//2` which returns 404. If you use `rawurlencode()` on that string, it again works as expected.
So, in short:
`$GLOBALS['wp_rewrite']->pagination_base = 'something';` - works
`$GLOBALS['wp_rewrite']->pagination_base = 'чџш';` - doesn't work
`$GLOBALS['wp_rewrite']->pagination_base = rawurlencode( 'чџш' );` - works
This doesn't apply to other bases, they work without `rawurlencode()`, for example:
`$GLOBALS['wp_rewrite']->author_base = 'гдђ';`",dimadin
Needs Patch,54654,Can flush_rewrite_rules() be called automatically after changing the site URL?,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2021-12-18T08:52:09Z,2021-12-18T14:50:04Z,"A common issue that users run into after changing the WordPress Address and/or Site Address (such as when migrating to a new domain) is that some of their links stop working correctly after a site change.
The most common fix/workaround is to go to the wp-admin > Settings > Permalinks page and click ""Save"" once or twice, which usually does the trick.
Examples of this problem and workaround can be found all over Google:
https://www.google.com/search?q=wordpress+links+not+working+after+migration
https://wordpress.stackexchange.com/questions/221108/wordpress-links-not-working-after-migration
https://wordpress.stackexchange.com/questions/14685/after-server-migration-only-the-homepage-works
https://wordpress.stackexchange.com/questions/253245/wordpress-migration-getting-404-errors-only-home-page-works
https://stackoverflow.com/questions/42162570/wordpress-issue-after-migration-only-homepage-works
https://stackoverflow.com/questions/39514343/wordpress-migration-broken-links
I'm not sure if there's already a ticket for this anywhere, but surely there's some way to do this automatically? The view counters on the various Stack Exchange questions suggest that it has affected hundreds of thousands or even millions of users, so fixing it would be a fantastic QOL improvement, especially for non-technical users and users who don't notice the broken links until they start getting complaints.
Would it be possible to automatically flush_rewrite_rules() in the core function that handles the address change? I haven't looked into what happens when the permalink settings are resaved, but I would imagine that it does something similar there.",pikamander2
Needs Patch,51805,Clarify the prerequisites for updating the .htaccess file in flush_rewrite_rules(),,Rewrite Rules,,normal,normal,Future Release,defect (bug),new,,2020-11-17T17:08:11Z,2022-03-04T20:32:41Z,"Background: #51723
In `flush_rewrite_rules()`, the documentation for the `$hard` parameter currently says:
> Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
However, this does not mention that `WP_Rewrite::flush_rules()` only calls `save_mod_rewrite_rules()` if the function exists, which is only loaded in the admin.
Moreover, there is a section in [source:tags/5.5.3/src/wp-admin/admin.php?marks=40#L38 wp-admin/admin.php] to flush the rewrite rules when a database version is bumped, but `save_mod_rewrite_rules()` is not loaded yet at that point, leading to [comment:3:ticket:51723 some confusion].
The function should clearly state what exactly is needed for updating the `.htaccess` file.
Another idea suggested in #51723 is to make sure `save_mod_rewrite_rules()` is loaded to regenerate the file when flushing the rewrite rules after database version bumps, see comment:5:ticket:51723.",SergeyBiryukov
Needs Patch,39442,Custom rewrite endpoints and wp_old_slug_redirect,,Rewrite Rules,4.7,normal,normal,Awaiting Review,defect (bug),new,,2017-01-03T00:21:03Z,2020-07-14T05:13:13Z,"Previously: #33920
{{{wp_old_slug_redirect}}} currently only handles core rewrite endpoints (like {{{feed}}} and {{{embed}}}). If you have a custom rewrite endpoint, you end up redirected back to the new permalink.
You can use the [old_slug_redirect_url https://developer.wordpress.org/reference/hooks/old_slug_redirect_url/] filter to redirect correctly but the filter does not pass the post id, which makes things a bit challenging (especially if you need to do any processing beyond just appending the endpoint).
It would be nice if the post id was passed into the {{{old_slug_redirect_url}}} filter:
{{{
$link = apply_filters( 'old_slug_redirect_url', $link, $id );
}}}
It would be even nicer if the redirect handled custom endpoints automatically as well.",batmoo
Needs Patch,34683,Default .htaccess config creates rewrite infinite loops for path-based multisite installations,,Rewrite Rules,4.3.1,normal,normal,Awaiting Review,defect (bug),new,,2015-11-14T20:16:54Z,2020-03-27T14:11:01Z,"Default .htaccess config for path-based multisite installations looks like that:
{{{
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
}}}
The problem is in these lines:
{{{
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
}}}
`?` sign makes expression `([_0-9a-zA-Z-]+/)` optional, so rule works also for request like `http://example.com/wp-config/file.png` and basicly try to internal redirect request to the same address. If file does not exist, it creates infinite internal loops that causes internal server errors.
There is no sense create rewrite rules for main site of network and site prefix should no be optional for rewrites. Correct .htaccess content should be:
{{{
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
}}}
",rob006
Needs Patch,53545,Domain Mapping not working with page as homepage,,Rewrite Rules,5.7.2,normal,normal,Awaiting Review,defect (bug),new,,2021-06-28T20:43:11Z,2021-06-28T20:43:11Z,"Hi!
Since a few WordPress Versions it is possible to point different domains to the same WP installation without a redirect. So the domain example.org can point to a WP installation with foobar.org in the database home and siteurl without gettin redirected. This is very handy when it comes to SSL. Thanks for that.
That works great if the homepage displays the latest posts, or if a blog post or page is loaded.
But if the homepage is a page it redirects to foobar.org.
I tried this out in a few different wp installtions and hat the same problem everywhere.
Is this a bug or intended?
I brought an example:
https://www.sumisuweb.at/
It is a plain wp installation. There are no themes or plugins installed except the default ones. Also the htaccess is default. Everything.
The siteurl and home is https://www.sumisuweb.at/, I only made changes to the titles of the posts and the permalink (it's set to year/month/day - but it does not matter what permalink type) and I changed the homepage to a page instead of the latests posts archive.
The subdomain https://blog.sumisuweb.at/ also points to the wp installation.
If you visit https://blog.sumisuweb.at/example-page, the url stays the same, no redirect, it works, because it is a page.
But if you try to call only https://blog.sumisuweb.at/ it redirects to https://www.sumisuweb.at.
It is also possible to visit https://blog.sumisuweb.at/2021/06/28/hello-world/
So the redirect only happens if the homepage is a page. It does not happen if the homepage is the default post archive.
This is a bug, I can't explain otherwise why this would be intended behaviour.
Please take a look at it, it would mean very much to me.
If you have any further questions or need my assitance or anything, please don't hesitate to contact me.
Thank you!
Alle the best,
Theresa
",teresasumisu
Needs Patch,40339,If $home_path=='wp' then WP::parse_request() will remove 'wp' from 'wp-json/wc/v1/products' in $pathinfo,,Rewrite Rules,4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-04-02T13:32:06Z,2018-01-12T02:33:28Z,"I have installed WordPress in a subdirectory 'wp' so $home_path is 'wp'. The statement
{{{#!php
pathinfo = preg_replace( $home_path_regex, '', $pathinfo );
}}}
is called with arguments
{{{
$home_path_regex = '|^wp|i'
$pathinfo = 'wp-json/wc/v1/products'
}}}
and returns
{{{
$pathinfo = '-json/wc/v1/products'
}}}
Since, $_SERVER[ 'PATH_INFO' ] is the trailing part of the path wouldn't the leading home path be already removed?
Here is the $_SERVER variable:
{{{
$_SERVER=Array
(
[SERVER_SOFTWARE] => PHP 5.6.30 Development Server
[REQUEST_URI] => /wp/wp-json/wc/v1/products
[DOCUMENT_ROOT] => C:\\WWW
[REMOTE_ADDR] => 192.168.1.113
[REMOTE_PORT] => 54207
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_NAME] => me.local.com
[SERVER_PORT] => 80
[REQUEST_METHOD] => GET
[SCRIPT_NAME] => /wp/index.php
[SCRIPT_FILENAME] => C:\\WWW\\wp\\index.php
[PATH_INFO] => /wp-json/wc/v1/products
[PHP_SELF] => /wp/index.php/wp-json/wc/v1/products
[HTTP_HOST] => me.local.com
[HTTP_CONNECTION] => keep-alive
[HTTP_CACHE_CONTROL] => max-age=0
[HTTP_UPGRADE_INSECURE_REQUESTS] => 1
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate, sdch
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8,en-AU;q=0.6
[HTTP_COOKIE] => wp-settings-1=libraryContent%3Dbrowse%26mfold%3Do%26editor%3Dhtml%26posts_list_mode%3Dexcerpt%26widgets_access%3Don%26post_dfw%3Don%26hidetb%3D1; wp-settings-time-1=1489742056; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_82a92e8b6fd4f1e7bd35e69acfebe645=mc%7C1491295996%7ClSYWOrX5ljiNvjMUuOsdx3Hqd3B4PsyM6sdhaHx3VHB%7C0f85cc8928c44377d339344bd93f970151fb018ad0623b09964e252bc6104127
[REQUEST_TIME_FLOAT] => 1491131923.8711
[REQUEST_TIME] => 1491131923
)
}}}
",Magenta Cuda
Needs Patch,57858,"If permalink structure is set to /%category%/%postname% , WordPress will match a /0/ path as a category archive",,Rewrite Rules,6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-03-02T22:30:38Z,2023-03-12T08:30:39Z,"Issue:
When the post permalink structure (Settings > Permalinks > Permalink Structure > Custom Structure ) is set to /%category%/%postname% , any path containing /0/ will be matched as a category archive page.
eg.
example.com/wp-content/0/ will not return a 404, and resolve to category archive template.
example.com/wp-includes/0/ will not return a 404 and resolve to category archive template.
example.com/wp-admin/0/ will not return a 404 and resolve to category archive template.
example.com/some-post-name/0/ will resolve to some-post-name
example.com/0/ will properly resolve to the site_url, but still wont 404
Setting the permalink to anything but that, eg. /%author_name%/%postname% it will properly 404.
I'm guessing somewhere in the permalink structure, 0 is seen as a valid category and not empty/null.
Steps to reproduce:
1. Spin up a fresh WordPress
2. Go to Settings > Permalinks > Permalink Structure > Custom Structure
3. Set the Custom Structure to: /%category%/%postname%
4. Visit one of the example URLs above.
We found this issue as we noticed Google was indexing a page like example.com/wp-content/uploads/2011/0/
",krdevio
Needs Patch,19896,Non-WP rewrites not saved on a multisite install,,Rewrite Rules,3.0,normal,normal,Awaiting Review,defect (bug),new,,2012-01-25T16:14:20Z,2017-08-22T14:29:46Z,"The following code adds a rewrite rule which is classed as a non-WP rewrite rule because its redirect doesn't begin with `index.php`, and is stored in the `non_wp_rules` member variable of the `WP_Rewrite` class.
{{{
function my_rewrite() {
add_rewrite_rule( 'login/?$', 'wp-login.php', 'top' );
}
add_action( 'init', 'my_rewrite' );
}}}
On a single site install, this rewrite rule gets saved directly to the .htaccess file rather than being added to WordPress' internal rewrite array.
On a multisite install, this doesn't happen and the rewrite rule has no effect (probably because once a site is multisite-d WordPress no longer writes to .htaccess). The rule has to be manually added to .htaccess.
Likely introduced in 3.0, reproduced in 3.3 and trunk.",johnbillion
Needs Patch,41079,PHP Notice: Undefined offset: -1 in /var/www/html/live/wp-includes/rewrite.php,,Rewrite Rules,4.3,normal,normal,Awaiting Review,defect (bug),new,,2017-06-15T17:22:51Z,2017-06-16T01:27:50Z,"Low priority, but I'm trying to reduce the size of my error logs, and this notice is a vast majority of it.
Issue lies at lines 376 & 378 in the ""wp_resolve_numeric_slug_conflicts"" function. Occurs when $postname_index is 0. With my limited understanding, it seems like that scenario can be skipped, so I added the below snippet to the ""if"" statement at line 363 in my build:
{{{
|| 0 === $postname_index
}}}
Please resolve in the next update. Thanks.",myrmidon16
Needs Patch,26885,Path Based Multisite Rewrite rule absolute path without trailing slash,,Rewrite Rules,3.8,normal,normal,,defect (bug),new,,2014-01-20T16:06:31Z,2019-06-04T21:10:12Z,"The .htaccess rewrite rules generator output the absolute path to the files, but there is missing a slash at the begining to use it as absolute.
I've seen the same problem at http://wordpress.stackexchange.com/questions/77818/multisite-configuration-fails-with-css-js-files
The solution is to make it relative, or to add a ""/"" at the beggining of the two rewrite rules.
I think the .htaccess code generated can be fixed for future users.",skalex
Needs Patch,52969,Permalink for /wp-includes falls back to blog post,,Rewrite Rules,5.6.1,normal,normal,Awaiting Review,defect (bug),new,,2021-04-05T09:39:45Z,2021-04-05T10:11:00Z,"After setting up WordPress, and enabling pretty looking permalinks, I found something odd happening.
The Apache rewrite rules have been also set up in the VHost config:
{{{
ServerName example.com
DocumentRoot /usr/share/wordpress
Alias /wp-content /var/www/example.com/wp-content
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^index\.php$ - [L]
RewriteCond /usr/share/wordpress%{REQUEST_URI} !-f
RewriteCond /usr/share/wordpress%{REQUEST_URI} !-d
RewriteCond /var/www/example.com%{REQUEST_URI} !-f
RewriteCond /var/www/example.com%{REQUEST_URI} !-d
RewriteRule . /index.php [L]
# Directory permissions omitted
}}}
'''Note''': I have the (shared) code in `/usr/share/wordpress` and the actual ''site-specific'' content in `/var/www/` so I can host several sites with the same WP installation.
So, everything seems fine and dandy, until Chrome tries to load some `.js.map` files, which will raise a warning in the browser console:
DevTools failed to load SourceMap: Could not parse content for https://example.com/wp-includes/js/underscore.min.js.map: Unexpected token < in JSON at position 0
Having a look into the issue, I found, that most of the non-existent files will correctly return a 404 (as before the permalinks), however anything below `/wp-includes/js/` will fall back to my first blog post. (So `https://7c00.io/wp-includes/js/foo/` will also show my ""hello-world"" test post)
As due the rewrite rules everything is essentially handled by PHP, I suspect this is an issue with the WP permalinks business logic.",fancsali
Needs Patch,36915,Permalinks broken after 4.5 Rewrite rules,,Rewrite Rules,4.5,normal,normal,,defect (bug),new,,2016-05-22T20:08:04Z,2019-06-04T21:23:21Z,"Hi guys,
Some of my websites had the permalinks broken after upgrading to 4.5.
My webserver is NginX and the theme is iMedica.
How I fixed:
============
This file: /wp-includes/class-wp-rewrite.php
Line: 1813: ""update_option( 'rewrite_rules', '' );""
Before 4.5 that line was ""delete_option('rewrite_rules');""
But I think when WP team changed to update_option function they missed a parameter, it should be:
""update_option('rewrite_rules', $this->rules);""
After fixing this the permalink started working again.
",fatorbinario
Needs Patch,49510,Regular expression metacharacters in category and tag base lead rewrite rules to fail.,,Rewrite Rules,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-02-25T09:47:00Z,2020-02-25T11:05:59Z,"Steps to reproduce (theme Twenty Twenty):
1. Go to ''Settings > Permalinks'', search for the ''Category base'' and/or a ''Tag base'' with some [RegExp meta-characters](https://www.php.net/manual/en/regexp.reference.meta.php), for example:
[[Image(permalinks.png)]]
2. Try to access a category archive page, either by typing its URL directly in your web browser, or by clicking on a generated link for this category:
[[Image(category-page.png)]]
3. Same for tag archive page:
[[Image(tag-page.png)]]
I've done some research, and it seems that a similar bug happen with feeds URL: #43571
The proposed solution in the above patch is to escape the rewrite rules with PHP built in function `preg_quote()`, which would solve this problem too if we apply it in the correct location. But what is the correct location? And could other parts of the rewrite rules generation/evaluation benefits of escaping too?
I don't know if it should be discussed in the same ticket, but after solving this issue, this would allow WordPress administrators to use reserved characters (as defined in [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2.2) in their URLs...",raaaahman
Needs Patch,38518,Rewrite Rules rebuilding on parse_request,,Rewrite Rules,4.6.1,normal,normal,Awaiting Review,defect (bug),new,,2016-10-26T18:33:59Z,2019-03-26T17:20:05Z,"Hi,
We have an issue that when flush_rewrite_rules is flushing, another request is coming in an parse_request is firing. While update_option('rewrite_rules', ' ') is deleted and the rules are being processed, parse_request is passing the conditional and writing it's own rules.
I've created a patch that has flush_rewrite_rules being solely responsible for rebuilding the rewrite rules. Otherwise, parse request will just read the current rules.",andyphillips82
Needs Patch,32471,There is no proper way to flush rewrite rules at plugin network de-activation,,Rewrite Rules,3.0,normal,normal,,defect (bug),new,,2015-05-23T10:28:02Z,2019-06-04T21:15:18Z,"It is considered as best practice for a plugin modifying rewrite rules to flush them at activation and de-activation: http://codex.wordpress.org/Function_Reference/flush_rewrite_rules
Plugins should then handle this at network activation and de-activation too. Following a [https://core.trac.wordpress.org/ticket/14170#comment:30 comment] from @nacin on #14170, we can find a way to handle this properly at network activation. We can even make something which scales using for example the plugin [https://wordpress.org/plugins/proper-network-activation/ proper network activation] from @scribu as a basis.
However the only proposal I found to handle the network de-activation is:
{{{
foreach ($wpdb->get_col(""SELECT blog_id FROM $wpdb->blogs"") as $blog_id) {
switch_to_blog($blog_id);
flush_rewrite_rules();
restore_current_blog();
}
}}}
Apart from the fact that it does not scale, it would mess the rewrite rules of all blogs. I am aware of #20171 but fixing it with the proposed patch is not sufficient as other plugins may modify the rewrite rules and we then face the fact that $wp_rewrite->extra_rules_top is shared accross blogs.
So the only way I foresee as a potential solution is that the network de-activation is not handled at network level but that each blog runs its own individual de-activation process - in a similar way as @nacin proposed for the activation as indeed, with the current architecture, we must never mix switch_to_blog() and flush_rewrite_rules().
Unless I miss something, it seems that there is currently no way for a plugin to properly flush rewrite rules at network de-activation.",Chouby
Needs Patch,16832,Trouble if the slug of a custom taxonomy is the same as the url of page/post,,Rewrite Rules,3.1,normal,normal,,defect (bug),new,,2011-03-11T11:50:43Z,2019-06-04T21:06:35Z,"I got some troubles with the 3.1 version of WordPress concerning the slug of custom taxonomy.
'''An example that work in 3.0.5'''[[BR]]
www.example.com/agency (url of a page)[[BR]]
www.example.com/agency/john-smith (url of a custom type's detail)
Apparently having the same ""folder"" 'agency' only works for one or the other url but not both.
Hope I made myself clear.",LucasHantz
Needs Patch,20109,Valid htaccess rule causes 404 after upgrade to 3.3.1,,Rewrite Rules,3.3.1,normal,normal,,defect (bug),new,,2012-02-24T06:26:42Z,2019-06-04T21:07:25Z,"On 2/18/2012, I upgraded WP from 3.2.1 to 3.3.1. on www.denverhomevalue.com. I later noticed that Google webmaster tools started reporting 404 errors on lots of pages that were fine before. WP was still returning the proper pages and content, not my custom 404 page, so the issue was not readily apparent except in WMT reports. Running http header response checkers confirmed 404 responses, despite good contents being returned.
Deleting sections of the htaccess file until the problem went away, the issue was isolated to two rules meant to escape following rewrite rules on certain urls:
{{{
RewriteRule ^city(.*) - [L]
RewriteRule ^areas(.*) - [L]
}}}
These were the same family of urls that started returning 404s after 3.3.1 upgrade. These rules were in place since 12/5/2011, with WP 3.2.1 and never caused a problem.
I was able to revert a backup of the site to 3.2.1, on the same exact server environment, and confirm that these same valid htaccess rewrite rules were not a problem in that release.",ronnieg
Needs Patch,49155,WP_HOME constant will force-redirect static front page but not posts on front page,,Rewrite Rules,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-01-09T03:42:32Z,2020-01-09T03:42:32Z,"When a static front page is set and I have an HTTPS URL configured with the `WP_HOME` constant (such as `https://example.org`) and I try to navigate to `http://example.org`, I'll be redirected to `https://example.org`.
When the front page is set to show latest posts and I do the same thing, WP will respond successfully to `http://example.org` with no redirect.
I imagine this isn't specific to http/https. If my server is configured to respond to other URLs with the WP app, I ''think'' it would respond to anything.
This behavior seems like it ought to be consistent. The code in `wp-includes/canonical.php` around line 192 is responsible, and perhaps another case should be added?",eclev91
Needs Patch,36812,"WP_Rewrite removes regex groups, should replace with non-capturing",,Rewrite Rules,4.5.2,normal,normal,,defect (bug),new,,2016-05-11T05:23:43Z,2019-06-04T21:22:59Z,"I have got that plugin which adds a rewrite tag like so:
{{{
add_rewrite_tag('%lang%', '(en|fr)', 'lang=');
}}}
One can then customize the permalinks and add the post's language anywhere in the url.
The problem is that, at one point, the WP_Rewrite class adds rules for attachment and on line 1112 of class-wp-rewrite.php it simply gets rid of all the parenthesis in the regex.
So, if I configure the permalink to be `/%postname%/lang/%lang%/` the resulting regex for the rewrite rule is:
{{{
[^/]+/lang/en|fr|zh/attachment/([^/]+)/?$
}}}
which is a totally different rule than expected, where `anything/lang/en` is matched as an attachment page when it really shouldn't be.
Instead the regex should be:
{{{
[^/]+/lang/(?:en|fr|zh)/attachment/([^/]+)/?$
}}}
The code on line 1112 of class-wp-rewrite.php should be replaced with:
{{{
$submatchbase = str_replace( '(', '(?:', $match);
}}}
",cvedovini
Needs Patch,42328,"directory listing, missing index.html",,Rewrite Rules,4.8.2,normal,normal,Awaiting Review,defect (bug),new,,2017-10-24T22:17:00Z,2017-10-24T22:21:09Z,"On hostings where missing ""Options -Indexes"" (Apache) index.php file with ""Silence is golden."" could be an option or as discussed in #4759 as it will work also on NGINX.
While by default it's not a security issue, however, may lead to a discovery of private/non-for-public files.
Directories:
/wp-includes/
/wp-content/uploads/
/wp-content/languages/ (I know it's not by default here)
possible related: #17619
",rolandinsh
Needs Patch,42120,htpasswd protection not working due to .htaccess rewrite rules,,Rewrite Rules,4.8.2,normal,normal,Awaiting Review,defect (bug),new,,2017-10-06T09:44:24Z,2019-05-14T05:10:15Z,"Came across a strange bug whilst trying to password protect our staging sites.
This seems to be a known issue as a solution is already suggested online, however unless you know where to look, the first point of call would be to check with the server configuration/Apache/WHM.
Considering this is a small and easy fix that shouldn't break other features, it would be great to include to core.
'''The setup'''
* WHM 66.0.24 CentOS 7.4
* Apache
* Latest WP installed at /public_html
'''Steps to reproduce'''
1. Enable permalinks
2. Go to cPanel and enable ""Directory Privacy"" on the public_html folder OR
3. Update .htaccess to append AND
{{{
AuthType Basic
AuthName ""Test""
AuthUserFile ""/home/username/.htpasswds/public_html/passwd""
require valid-user
}}}
4. Create the passwd file on the directory shown above
5. Go to your staging site such as staging.website.com and confirm the login prompt is showing
6. Don't enter any details, but click cancel multiple times
7. Notice how the page content is now showing.
8. Try ctrl+u to see the source of the page and notice how the whole HTML is there.
'''The solution'''
1. Edit the .htaccess file in your WordPress home folder
2. Find the line RewriteRule . /index.php [L]
3. Replace with RewriteRule ./ /index.php [L]
'''The sources of this fix'''
Kudos to WHM Support who directed me to the solution and HostGator for actually publishing it
http://support.hostgator.com/articles/wordpress-preventing-you-from-password-protecting-a-directory
",subscriptiongroup
Needs Patch,40719,iis7_add_rewrite_rule and iis7_delete_rewrite_rule create malformed web.config,,Rewrite Rules,4.7.4,normal,normal,Awaiting Review,defect (bug),new,,2017-05-10T19:14:11Z,2020-02-15T21:56:04Z,"Running wordpress in azure on version 4.7.4 and i have a custom web config utilizing the location directive. The methods iis7_add_rewrite_rule and iis7_delete_rewrite_rule do not take into account when these directives exist and create a new system.webserver line in the web.config at the bottom causing the server to 500 error. This seems to happen even when simply deleting a post using the admin console, wp is thinking the web.config is wrong and trying to add lines. As an immediate work around i have disabled these methods, is there a configuration that will allow me to stop wordpress from ever doing this? I dont have the ability to change the web.config permissions because its a PAAS implementation. Example config:
This is only a partial sample of the file. ",jaendres
Needs Patch,45970,"in IIS if web.confing section and the site craches with wrong web.config",,Rewrite Rules,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-01-13T12:12:37Z,2019-01-13T22:34:19Z,"in IIS if web.confing section and the site craches with wrong web.config error (2 sections). It happens/triggers by example if you are trying to change the ""Permalink Settings"".
The code responsible for this check is located in \wp-admin\includes\misc.php (line 748)
{{{
// First check if the rule already exists as in that case there is no need to re-add it
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
if ( $wordpress_rules->length > 0 )
return true;
}}}
The fix could be to register the namespace:
{{{
$xpath->registerNamespace(""x"", ""http://schemas.microsoft.com/.NetConfiguration/v2.0"");
}}}
and then in `$xpath->query` to check also for `/x:configuration/x:system.webServer/x:rewrite/x:rules/x:rule[starts-with(@name,\'WordPress\')]`
In this way it works without problem and does not break the site.",boychev
Needs Patch,46000,non empty post object in case of error 404,,Rewrite Rules,5.0.3,normal,normal,Awaiting Review,defect (bug),new,,2019-01-16T09:21:09Z,2019-01-16T09:21:09Z,"In case of an 404 error the Posts Object is not empty if permalink setting is something like
{{{
/blog/%postname%/
}}}
The attached plugin can be used to debug this issue.
== How to reproduce the problem
**Step 1**
Change permalink setting to
{{{
/%postname%/
}}}
Request a non existing URL like example.com/non-existent.
Result: the Posts Object is empty
**Step 2**
Change permalink setting to
{{{
/blog/%year%/%monthnum%/%postname%/
}}}
Request a non existing URL like example.com/non-existent.
Result: the Posts Object is empty
**Step 3**
Change permalink setting to
{{{
/blog/%postname%/
}}}
Request a non existing URL like example.com/**blog**/non-existent.
Result: the Posts Object is empty
**Step 4**
permalink setting is still
{{{
/blog/%postname%/
}}}
Request a non existing URL like example.com/non-existent.
Result: **the Posts Objec is NOT empty**
== Impact ==
Plugins that use **the_posts** filter may produce wrong results.
I've tested it with 5.0.3 but I'm pretty sure, previous versions are affected also.",petersplugins
Needs Patch,19493,post and archive pagination don't work with custom endpoints,,Rewrite Rules,2.1,normal,normal,Awaiting Review,defect (bug),new,,2011-12-09T23:55:09Z,2018-01-25T20:22:02Z,"Archive pagination and post pagination are not endpoint-aware, so they break when endpoints are added to them.
The following example code creates an endpoint, and then uses a filter to add that endpoint to various links on the rendered page:
{{{
add_action( 'init', function() {
global $wp_rewrite;
add_rewrite_endpoint( 'foo', EP_ALL );
$wp_rewrite->flush_rules(false);
} );
add_filter( 'post_link', 'gist_add_endpoint_to_url', 99 );
add_filter( 'get_pagenum_link', 'gist_add_endpoint_to_url', 99 );
function gist_add_endpoint_to_url( $url_base ) {
$endpoint = 'foo';
$url_parts = parse_url( $url_base );
$url = ( isset($url_parts['scheme']) && isset($url_parts['host']) ) ? $url_parts['scheme'] . '://' . $url_parts['host'] : '';
$url .= isset($url_parts['path']) ? $url_parts['path'] : '';
$url = user_trailingslashit( $url );
if ( '' === get_option('permalink_structure') ) {
$url .= isset($url_parts['query']) ? '?' . $url_parts['query'] : '';
$url = add_query_arg( $endpoint, 'true', $url );
} else {
$url .= $endpoint . '/true';
$url = user_trailingslashit( $url );
$url .= isset($url_parts['query']) ? '?' . $url_parts['query'] : '';
}
$url .= isset($url_parts['fragment']) ? '#' . $url_parts['fragment'] : '';
return $url;
}
}}}
You'll see that it works perfectly using the theme unit test, except that paginated posts produce URLs like this:
http://example.com/2008/09/layout-test/foo/true/2/
...which doesn't work. The inverse -- http://example.com/2008/09/layout-test/2/foo/true/ -- also doesn't work, and produces a 404 on top of it.
Also, the older posts / newer posts produce this format of link:
http://example.com/page/2/foo/true/
.. .which also doesn't work.
If you change gist_add_endpoint_to_url() to add a querystring param, older posts/newer posts links work fine, but post pagination still breaks:
{{{
function gist_add_endpoint_to_url( $url_base ) {
$endpoint = 'foo';
$url_base = add_query_arg( $endpoint, 'true', $url_base );
return $url_base;
}
}}}
If you don't use a permalink structure at all, it works fine, since the pagination params are passed directly in the URL.
I'm not sure if the fix lies in modifying add_rewrite_endpoint() so that it creates pagination urls in wp_rewrite, or modifying the way _wp_link_page() and get_next_posts_link() work. ",mintindeed
Needs Patch,60330,redirect that working incorrectly!,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2024-01-23T19:57:30Z,2024-03-05T02:31:29Z,"Issues that once you going to for example https://example.com/example-page-slug/1000/ will redirect you to https://example.com/example-page-slug/ . But it's supposed to display 404 page. Is bad for SEO because that redirect using 301.
{{{#!php
0) {
$query = array(
'pagename' => '404'
);
}
return $query;
}
}
new RedirectFixer();
}}}
This is how to fix it.",markuscode
Needs Patch,58536,url_to_postid does not work at MS install in context of another blog when $wp_rewrite->use_verbose_page_rules differs,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2023-06-14T11:18:44Z,2023-10-29T06:02:12Z,"In a multisite installation, where there are blogs with mixed permastruct of some have the `$wp_rewrite->use_verbose_page_rules` set to `true` and some to `false`, the `url_to_postid` fails to find a post, since it's queried as a page, [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rewrite.php?rev=54364#L609 due to a falsey check].
As the rewrites rules are untouched upon `switch_to_blog` action and as the `url_to_postid` function works directly with the `rewrite_rules` option ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rewrite.php?rev=54364#L563 via `WP_Rewrite::wp_rewrite_rules()` function] ), IMHO the best way to fix such a case would be to not rely on the property, but perform the same check as when the `use_verbose_page_rules` property is being set (see the attached patch).",david.binda
Needs Patch,43881,url_to_postid doesn't works with custom post type in PhpUnit Test,,Rewrite Rules,,normal,normal,Awaiting Review,defect (bug),new,,2018-04-27T14:10:38Z,2018-12-21T02:32:13Z,"In the {{{functions.php}}} I have the following code:
{{{#!php
[
'name' => 'products',
'singular_name' => 'products',
'add_new' => 'Add New',
'add_new_item' => 'Add New Product',
'edit_item' => 'Edit Product',
'new_item' => 'New Product',
'all_items' => 'All Product',
'view_item' => 'View Product',
'search_items' => 'Search for Product',
'not_found' => 'No product found',
'not_found_in_trash' => 'No product found in the Trash',
'menu_name' => 'products',
'parent_item_colon' => '',
],
'description' => 'Product description',
'public' => true,
'rewrite' => ['slug' => 'products'],
'menu_position' => 5,
'supports' => ['title', 'editor', 'excerpt'],
'has_archive' => true,
'menu_icon' => 'dashicons-id-alt',
]
);
}
add_action('init', 'post_type_products');
}}}
Then I need to test it. And for this test I create the test record via factory class:
{{{#!php
'Test Post',
'post_content' => 'Test Post Content',
'post_excerpt' => 'Test Post excerpt',
'post_type' => 'products'
];
$this->factory->post->create($post_data);
}}}
The problem is when I got URL from following code:
{{{$url = get_permalink($this->factory->post->create($post_data));}}}
The function {{{url_to_postid}}} return {{{0}}}
{{{#!php
flush_rules();
}
add_action( 'init', 'duke_add_endpoints');
}}}
and discovered that i can't get it work because of it completely absence in further $wp_rewrite references.
Intrigued by that fact (especialy with hard flushing) i've been lead to ''parse_request''of class-wp and due to it's
{{{
$rewrite = $wp_rewrite->wp_rewrite_rules();
}}}
i guided to '''wp_rewrite_rules''' method of wp-includes/rewrite.php where discovered that rewrite_rules option is loaded from wp_options but if it's not there - it loaded from cache (bacause of get_option behaviour).
{{{
$alloptions = wp_load_alloptions();
if ( isset( $alloptions[$option] ) ) {
$value = $alloptions[$option];
} else {
$value = wp_cache_get( $option, 'options' );
if ( false === $value ) {
$row = $wpdb->get_row(....
}}}
Wondering why it was not overriden by flush_rules both in wp_options and in cache i've dig into '''flush_rules''' and discovered that it operates the same method
{{{
function flush_rules($hard = true) {
delete_option('rewrite_rules');
$this->wp_rewrite_rules();
.......
}}}
but wait... IF THE REWRITE_RULES IS NOT IN THE WP_OPTION then it still taken from cache with previous value.
{{{
function wp_rewrite_rules() {
$this->rules = get_option('rewrite_rules');
///at this point the value already deleted from table but still remains in cache so get_option returns OLD value till it remain in cache for indefinite time
if ( empty($this->rules) ) {
$this->matches = 'matches';
$this->rewrite_rules();
update_option('rewrite_rules', $this->rules);
}
return $this->rules;
}
}}}
so if your rewrite rules not in table but in cache - they probably stuck there forever till cache gets cleared. i guess it has something to infere with delete_option and situation when cache is not cleared. but i guess it's next bug to catch.
",mainpart
Needs Patch,21374,Add core support for letting custom permalink structure for different post types,,Rewrite Rules,2.9,normal,normal,,enhancement,new,,2012-07-25T14:42:15Z,2019-06-04T21:07:39Z,"By default, custom post types uses only the'' %postname%'' permalink structure (if using pretty links and not default query variables).
Currently there is no native way to easily have different permastructs for different CPT.
This features should be added to the '''register_post_type()''' function, letting different permalink structure be defined to each post_type being registered.
I sugget adding another new key to the '''rewrite''' array that can be passed to the '''register_post_type()''' function.
i.e. -
{{{
register_post_type('event',array(
......
'rewrite' => array('slug' => 'events',
'permastruct' => '%year%/%monthnum%/%event%'
),
.....
));
}}}
The register_post_type function should be changed, a suggestion for such a change may be that instead of this line in the function - (post.php line#1075)
{{{
add_permastruct( $post_type, ""{$args->rewrite['slug']}/%$post_type%"", $args->rewrite );
}}}
This example could be used -
{{{
if ( $args->rewrite['permastruct'] ) {
$perma_structure = $args->rewrite['permastruct'];
$wp_rewrite->add_rewrite_tag(""%{$post_type}%"", '([^/]+)', ""{$post_type}="");
$wp_rewrite->add_permastruct($post_type, $archive_slug.'/'.$perma_structure, false);
}
else {
add_permastruct( $post_type, ""{$args->rewrite['slug']}/%$post_type%"", $args->rewrite );
}
}}}
In order that the structure can interpret the permastruct tags, I added also this function to filter post_type_link, it is adapted from '''get_permalink''' function in ''wp-includes/link-template.php'' -
{{{
add_filter('post_type_link', 'tc_permalink', 10, 3);
function tc_permalink($permalink, $post_id, $leavename) {
$post = get_post($post_id);
$rewritecode = array(
'%year%',
'%monthnum%',
'%day%',
'%hour%',
'%minute%',
'%second%',
$leavename? '' : '%postname%',
'%post_id%',
'%category%',
'%author%',
$leavename? '' : '%pagename%',
);
if ( '' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft')) ) {
$unixtime = strtotime($post->post_date);
$category = '';
if ( strpos($permalink, '%category%') !== false ) {
$cats = get_the_category($post->ID);
if ( $cats ) {
usort($cats, '_usort_terms_by_ID'); // order by ID
$category = $cats[0]->slug;
if ( $parent = $cats[0]->parent )
$category = get_category_parents($parent, false, '/', true) . $category;
}
// show default category in permalinks, without
// having to assign it explicitly
if ( empty($category) ) {
$default_category = get_category( get_option( 'default_category' ) );
$category = is_wp_error( $default_category ) ? '' : $default_category->slug;
}
}
$author = '';
if ( strpos($permalink, '%author%') !== false ) {
$authordata = get_userdata($post->post_author);
$author = $authordata->user_nicename;
}
$date = explode("" "",date('Y m d H i s', $unixtime));
$rewritereplace =
array(
$date[0],
$date[1],
$date[2],
$date[3],
$date[4],
$date[5],
$post->post_name,
$post->ID,
$category,
$author,
$post->post_name,
);
$permalink = str_replace($rewritecode, $rewritereplace, $permalink);
} else { // if they're not using the fancy permalink option
}
return $permalink;
}
}}}
On a basic check this seems to be working, but ofcourse needed to be more deubgged.. I will be happy to here if you think such a feature should be added to core.",maorb
Needs Patch,24853,Add endpoint support to CPT archives,,Rewrite Rules,,normal,normal,,enhancement,new,,2013-07-28T19:25:06Z,2019-06-04T21:08:52Z,"#16303 aimed to introduce an endpoint mask for CPT archives. However, the way that CPT rewrite rules are set up means that there isn't actually support for endpoints.",duck_
Needs Patch,56592,Add filter to wp_redirect_admin_locations(),,Rewrite Rules,6.0.2,normal,normal,Awaiting Review,enhancement,new,,2022-09-17T01:00:52Z,2022-09-17T01:00:52Z,"Changing the default admin redirections currently requires removing the `template_redirect` action that calls this function and replacing it with a different function.
A more consistent way to do it would be to provide a filter hook for `$admins` and another for `$logins`.",galbaras
Needs Patch,34136,Allow register_post_type's rewrite to remove CPT slug,,Rewrite Rules,4.3.1,normal,normal,Awaiting Review,enhancement,new,,2015-10-02T23:20:58Z,2022-06-24T18:55:50Z,"Not sure if there are reasons (outside of naming conflicts) why register_post_type's rewrite does not allow an empty value as an argument to remove the post type slug from its future post URL's.
After a lot of research and some code from @JanBeck at my wordpress.stackexchange question: [http://wordpress.stackexchange.com/questions/203951/remove-slug-from-custom-post-type-post-urls] its clear that naming conflicts between a CPT and Page type URL's are being avoided.
I propose:
{{{
'rewrite' => array( 'slug' => '', 'with_front' => false ),
'has_archive' => 'something', // will now default to false to avoid possible conflict
}}}
then proper rewrite rules should be added to allow for the removal of this CPT slug and disallow the CPT to create conflicting URLs in the future. eg publishing ones that match page URL's the same as native posts append a '-1' to a conflicting URL.
This will solve a large problem where users are trying to hack around this by creating their own rewrite rules, hacking post.php, and pre_get_posts solutions.
",BenRacicot
Needs Patch,11931,Day/Month/Year Permalink Structure Fails in Archives,,Rewrite Rules,2.8.6,normal,normal,,enhancement,reopened,,2010-01-17T14:53:37Z,2019-04-05T17:40:57Z,"If you use a permalink structure with %day%/%monthnum%/%year% then the archives automatically become date/%day%/%monthnum%/%year%. WordPress automatically makes the links to monthly archives date/01/2010 etc (which is good), but if you go to it you get a 404 not found.
Reproduce using for example /%post_id%/%postname%/%day%/%monthnum%/%year%/
I ""fixed"" it with this plugin I wrote, but it will probably fail when things like /page/2/ come into play (that wasn't really important yet). ",Frenzie
Needs Patch,14502,Enable /post-type/taxonomy/term/ permalinks,,Rewrite Rules,,normal,normal,Future Release,enhancement,reopened,,2010-08-01T22:57:29Z,2019-06-04T13:51:29Z,"After we get /post-type/ handled (see #13818), it would be nice if we also had /post-type/taxonomy/term/ mapped to ?post_type=post-type&taxonomy=term",scribu
Needs Patch,34385,Missing site_url path results in array to string conversion,,Rewrite Rules,4.3.1,normal,normal,,enhancement,new,,2015-10-21T08:55:13Z,2019-06-04T21:17:38Z,"Given WP_Rewrite is used in verbose mode (use_verbose_mode = true), site_url() does not contain any path component and a rule which does not match home_url() is added to WP_Rewrite::$rewrite_rules, WordPress runs into an Array to string conversion within $wp_rewrite->mod_rewrite_rules().
The origin of this issue is in [https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/rewrite.php#L1902 wp-includes/rewrite.php#L1902] and the Array-to-String-Typecast occurs in [https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/rewrite.php#L1952 wp-includes/rewrite.php#L1952].
Interestingly, $home_root has a safety net against this special case. When no path is set, it defaults to ""/"" (Introduced in [https://core.trac.wordpress.org/changeset/9516 Changeset 9516]). Unfortunately, this is not the case for $site_root.
",adormann
Needs Patch,41946,Option to delete_with_markers,,Rewrite Rules,4.8.2,normal,normal,Awaiting Review,enhancement,new,,2017-09-21T18:14:48Z,2017-09-21T18:14:48Z,"I was trying to develop a plugin for adding speed optimisation code to htaccess using builtin functions . I happened to find options to insert_with_markers and extract_with_markers. But I found there was not a direct option to delete_with_markers. I tried searching as much as possible and finally came out with delete_with_markers myself which I have used in my plugin (which I will be submitting in a day for review).I have refered the insert_with_markers and extract_with_markers to retain the WP style. I thought to share , if this could be integrated in WP as well for it could be of use to many.
function delete_with_markers( $filename, $marker ) {
if ( ! file_exists( $filename ) ) {
if ( ! is_writable( dirname( $filename ) ) ) {
return false;
}
if ( ! touch( $filename ) ) {
return false;
}
} elseif ( ! is_writeable( $filename ) ) {
return false;
}
$start_marker = ""# BEGIN {$marker}"";
$end_marker = ""# END {$marker}"";
$fp = fopen( $filename, 'r+' );
if ( ! $fp ) {
return false;
}
// Attempt to get a lock. If the filesystem supports locking, this will block until the lock is acquired.
flock( $fp, LOCK_EX );
$lines = array();
while ( ! feof( $fp ) ) {
$lines[] = rtrim( fgets( $fp ), ""\r\n"" );
}
if ( $markerdata = explode( ""\n"", implode( '', file( $filename ) ) ));
{
$state = false;
foreach ( $markerdata as $markerline ) {
if (strpos($markerline, '# BEGIN ' . $marker) !== false)
$state = true;
if (! $state )
$result[] = $markerline;
if (strpos($markerline, '# END ' . $marker) !== false)
$state = false;
}
}
// Generate the new file data
$new_file_data = implode( ""\n"", array_merge(
$result
) );
// Write to the start of the file, and truncate it to that length
fseek( $fp, 0 );
$bytes = fwrite( $fp, $new_file_data );
if ( $bytes ) {
ftruncate( $fp, ftell( $fp ) );
}
fflush( $fp );
flock( $fp, LOCK_UN );
fclose( $fp );
return (bool) $bytes;
}",shivi66
Needs Patch,30907,Rewrite Rules collision,,Rewrite Rules,4.1,normal,normal,,enhancement,new,,2015-01-05T11:46:40Z,2019-06-04T21:13:30Z,"Step to reproduce:
1. Choose `/%post_id%/` permalink structure
2. Set category prefix `date`
3. Create a category with the title `2015`
4. Write a post under this category
Now Archive Widget and Category Widget points to the same place - archive category template.
I think ""date"" should be protected from repeat use in the prefix of categories or tags.",TempAcc
Needs Patch,36292,Rewrites: Next Generation,rmccue,Rewrite Rules,,normal,normal,Future Release,feature request,assigned,,2016-03-22T06:38:33Z,2020-11-19T11:28:21Z,"Let's start improving rewrites. The current rewrite system is outdated and clunky for modern development, and was one of the most complained about pieces of WordPress when I [https://twitter.com/rmccue/status/710460165879898114 enquired on Twitter]. Here's what I'd like to change.
== Part 1: Separate rules from WP Query ==
This has two parts. Firstly, we need to ensure any rule can be mapped to any set of arbitrary query parameters. Right now, this is quite hard to do for the more complex query parameters, such as [https://roots.io/routing-wp-requests/ date query]. Doing this will eliminate the need for temporary/intermediate query vars; these are typically used temporarily during the rewrite process, then changed into actual query vars in `pre_get_posts`.
The second part of this is breaking the interdependency between rewrites and the main query. Currently, it's not possible to have a page that doesn't generate a main query. #10886 has attempted to tackle this in the past, however has run up against problems. This is important for things like user profile pages, and can immediately be used in core for the REST API. The current solution for these is to hook in at `parse_request`, but this causes some hooks not to be run, and changes the overall flow of a WordPress request.
Part 1 will introduce a Rewrite Rule Interface that will allow better customisability of rules as well.
== Part 2: Ensure the rewrite process is DRY and testable ==
This part will decouple the rewrite process from the global state to ensure testability. @ericlewis has made a fantastic start on this in #18877, which works well with some of the refactoring from part 1.
In separating from the global state, we may be able to reuse `WP_REST_Request` as a more generic `WP_HTTP_Request` (it was designed for this from the start).
This should also start cleaning up the `WP` and `WP_Rewrite` classes as concerns get a cleaner separation. Currently the boundary between the two is pretty unclear.
== Part 3: Rework flushing ==
The `rewrite_rules` option and the flushing process are one of the toughest bits of the rewrite process. The fact with these is that they're a caching process that significantly predates transients and object caching. The reason flushing exists is to avoid regenerating expensive rules (like one-rule-per-tag) on every request, but we can create a better system using the newer tools available in core. An opt-in system for rewrite caching could potentially work well once we have a solid Rewrite Rule Interface that allows us to identify and group rules. (For example, a `WP_Rewrite_CachedRuleInterface`.)
#29118 digs into some past work on this front; automatically flushing rewrites is already possible.
== Other Changes ==
Note that these parts are in a rough order, and get more vague as they go on. We need to incorporate feedback after changes are made, and these changes might need to be reworked or rethought with previous feedback in mind. There are also other changes we may want to make based on feedback from the community.
",rmccue
Needs Patch,52247,Author role unable to set featured image (Error 403),,Role/Capability,5.6,normal,normal,Awaiting Review,defect (bug),new,,2021-01-07T17:42:56Z,2021-01-07T17:42:56Z,"Users with the role of author are unable to set featured images in posts. I am able to replicate this in a fresh installation of WordPress (Ver 5.6, Php 7.4.8, no plugins, 2021 theme).
There are two errors in the console:
{{{
api-fetch.min.js?ver=5f98b08f212ba8fa8b4685ad2e1b1378:2 GET https://dev.msiachild.org/wp-json/wp/v2/media/16?context=edit&_locale=user 403
}}}
and
{{{
Uncaught (in promise)
{code: ""rest_forbidden_context"", message: ""Sorry, you are not allowed to edit this post."", data: {…}}
code: ""rest_forbidden_context""
data:
status: 403
__proto__: Object
message: ""Sorry, you are not allowed to edit this post.""
__proto__:
constructor: ƒ Object()
hasOwnProperty: ƒ hasOwnProperty()
isPrototypeOf: ƒ isPrototypeOf()
propertyIsEnumerable: ƒ propertyIsEnumerable()
toLocaleString: ƒ toLocaleString()
toString: ƒ toString()
valueOf: ƒ valueOf()
__defineGetter__: ƒ __defineGetter__()
__defineSetter__: ƒ __defineSetter__()
__lookupGetter__: ƒ __lookupGetter__()
__lookupSetter__: ƒ __lookupSetter__()
get __proto__: ƒ __proto__()
set __proto__: ƒ __proto__()
}}}
",yewzy
Needs Patch,29594,Basic Cookie Authentication from External Database,,Role/Capability,4.0,normal,normal,,defect (bug),new,,2014-09-09T05:42:46Z,2019-06-04T21:12:21Z,"Several bridges (WP plugins) linking different forum software packages rely on the wp_set_auth_cookie($user_id,0,0) to get the user logged into WordPress. With the change in WP 4.0, this single line no longer works. Instead, the user is logged into the site but can no longer publish a post or page, nor update a plugin etc. Whereas the same user would be able to do all those things in 3.9.2 and below.
I've come across this issue for three different bridges.
The change is the addition of the token.
[Suggestion] Maybe there needs to be some instruction in the documents on how WP developers want the external authorization to happen for login plus capabilities to post.
Is this a bug with just the single line (wp_set_auth_cookie) not functioning as intended or do devs expect plugin developers to use other lines of code to get the user logged in .. and authorized to publish, post, etc. ?",LPH2005
Needs Patch,50252,Capability issue with admin menu,,Role/Capability,5.4.1,normal,normal,Awaiting Review,defect (bug),new,,2020-05-26T04:20:02Z,2023-06-24T05:55:23Z,"An answering of a question on Stack Exchange ([https://wordpress.stackexchange.com/questions/367518/how-do-i-code-access-to-the-built-in-ui-of-a-cpt-when-its-placed-as-submenu-of]) led to the reporting of this bug. Please refer to it for further explanation and coding examples.
When a custom post type is registered, the {{{show_in_menu}}} option allows for the UI link of the custom post type to be nested under the menu of a second custom post type. However, if the user is authorized to view/edit the first post type, the UI of said nested post type is unavailable if the user does not also possess the capabilities required of the post type represented in the parent menu.
The bug is this: the admin menu is properly displaying the links to pages which the user is capable of viewing, but the user is not permitted to access those pages. The same can be said of any page whose link is nested in the admin menu under a page which the user does not possess the required capabilities of that parent.",mort1305
Needs Patch,26807,Comments on private posts should also be private in admin depending on role,,Role/Capability,3.1,normal,normal,,defect (bug),new,,2014-01-10T14:54:51Z,2019-06-04T21:10:07Z,"Repro:
1. As user X, create a private post.
2. As user X, add a comment to the private post.
3. As user Y with Contributor role, go to the comment listing screen.
Actual Result: Contributor user Y can see the post in the listing.
Expected: Comments on private posts should not be visible to users who don't have elevated capabilities. There's a potential here for information disclosure, as when a comment quotes content from the private post.
There's already a cap check in `WP_Comments_List_Table::single_row()`, so it seems like we could suppress display as well based on that check (in fact, I did so to test), though working out the counts for display above the table and for pagination will likely be a little more involved.",dllh
Needs Patch,54966,Inconsistent checking of read permission for singular vs non-singular queries,,Role/Capability,,normal,normal,Awaiting Review,defect (bug),new,,2022-01-28T04:42:50Z,2022-02-03T02:21:12Z,"Apologies if this has already been reported, as I wasn't sure exactly what to search for, but I expect it's a very old behaviour.
When performing a singular query, the `read_post` meta capability is [https://github.com/WordPress/WordPress/blob/5.9/wp-includes/class-wp-query.php#L3190 checked] and the post not returned if the user is not allowed to read it.
The same does not happen for non-singular queries. Instead, a primitive capability is [https://github.com/WordPress/WordPress/blob/5.9/wp-includes/class-wp-query.php#L2593 checked], which may not always yield an accurate result if the post type is using some non-standard capability mapping.
It would be good if `read_post` could be checked individually on each of the posts being returned.",manfcarlo
Needs Patch,16808,Insufficient permissions for custom post type management and custom role/caps,,Role/Capability,3.1,normal,normal,,defect (bug),reopened,,2011-03-09T19:54:04Z,2023-01-27T05:59:30Z,"I asked a question over at [http://wordpress.stackexchange.com/questions/11508/permission-error-on-custom-post-type-add-new-action StackExchange] about this. Went into their chat room to talk to a few people and came to the conclusion I need to post this ticket.
---
When accessing an admin page located at post-new.php with a custom post type on a user that's in a custom role that has the available permission to ""Add New"", you get ""You do not have sufficient permissions to access this page.""
{{{
$post_caps = array( 'delete_post' => 'argus_admin', );
$visitor_caps = $post_caps;
$visitor_caps = array_merge( $visitor_caps, array(
'edit_post' => 'argus_visitors',
'read_post' => 'argus_visitors',
'edit_posts' => 'argus_visitors',
'edit_others_posts' => 'argus_visitors',
'publish_posts' => 'argus_visitors',
'read_private_posts' => 'argus_visitors',
));
$v_args = array(
'labels' => array (
'name' => 'Visitors',
'singular_name' => 'Visitor',
'add_new_item' => 'Register New Visitor',
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'show_ui' => true,
'show_in_menu' => 'argus',
//'show_in_menu' => false,
'hiearchical' => false,
'supports' => array( '' ),
'capabilities' => $visitor_caps,
'register_meta_box_cb' => array ( &$this, '_wp_visitor_meta_box_cb' ),
);
register_post_type( 'visitor', $v_args );
}}}
I've tested it with 3.0.4 and it worked flawlessly. However, when in 3.1, it doesn't want to work.",Genesis2001
Needs Patch,47897,Introduce method to introduce new roles and caps independently of db upgrades.,,Role/Capability,,normal,normal,Awaiting Review,defect (bug),new,,2019-08-18T22:42:27Z,2019-08-18T22:42:27Z,"Presently adding new roles and caps is avoided to guarantee backward compatibility with sites that don't update the database schema. This has resulted in:
* a bunch of capabilities being used for purposes other than their original purpose
* abuse of meta caps of faux primitives
* filters added to the `user_has_cap` to introduce faux capabilities (three and counting)
It's a little confusing and these hard coded capabilities make it more complex for sites with custom roles to manage granular capabilities.
Additionally, it has lead to problems in which custom roles that should be given the capability are not. For example a custom role with page editing permissions but no post editing permissions should probably be allowed to add shared blocks.
For the majority of sites which run database upgrade routines, it would be helpful to upgrade the roles and capabilities in the database.
For sites which do not, faux capabilities can be added to the `user_has_cap` filter in a single function, based on the database version.
For sites with hard coded arrays, the presence of the new capability can be detected and added as a faux capability if it is not.
As an initial construct, a faux capabilities function can be added:
{{{#!php
data->id)) {
This is a strange bug... it didn't effect my staging boxes running on 7.0.8 but it did effect all my boxes running 7.0.15+
It seems to me very unbeliavable that such little change can do harm, but I can reproduce it everytime I try to move the project to a box.
Sorry I'm not a WP boy but do move sites requllary and I haven't experienced such behavior with 4.6 or earlier.",dffnbfee
Needs Patch,38714,Taxonomy meta boxes do not work right with Custom Post Types that use custom capabilities,,Role/Capability,4.6,normal,normal,Awaiting Review,defect (bug),new,,2016-11-08T18:42:31Z,2019-03-25T23:52:11Z,"Category and tag taxonomies have the capability required for ""assign_terms"" set to ""edit_posts"", as in the global `$wp_taxonomies['category']->cap->assign_terms` for example. This becomes a problem with custom post types that define a custom capabilities array specifying a different edit capability and the usual ""edit_posts"" capability for particular roles is removed, though they have the proper edit CPT capability. Then the corresponding meta box on the CPT edit screen is not properly interactive.
For example, I create a CPT called ""Contributions"" and map the ""edit_posts"" capability to ""edit_contributions"". I also create a ""Contributor"" role that has all the expected capabilities for Contributions posts, including ""edit_contributions"" This role does not have the usual ""edit_posts"" and other default post and page capabilities, other than ""read"". The role also has ""manage_categories"" capability.
When logged in as a user with only the Contributor role, when I go to the edit contributions screen, I can see the categories meta box, but cannot assign any terms to the current contributions post. The checkboxes are inactive. Similarly for tags, I can see the tags meta box, but it has no content.
This issue was brought up in this forums post: https://wordpress.org/support/topic/custom-post-type-with-categories-and-tags-checkbox-disabled/",bcworkz
Needs Patch,51651,The `read_post` meta capability returns an incorrect result for the inherit post status.,,Role/Capability,3.4,normal,normal,Awaiting Review,defect (bug),new,,2020-10-27T23:29:33Z,2021-02-02T23:51:03Z,"When an attachment is uploaded via an edit post screen, it is given the inherit post status to determine whether it is published, private, etc.
The key definition within the post object are as follows:
{{{
post_type: attachment
post_status: inherit
post_parent: 1
}}}
The `inherit` post status is registered as `internal`, and is therefore not considered `public`.
As the `read_post` meta capability gets the post status object without checking if it is inherited, it returns the incorrect result for logged in users able to read the post:
{{{#!php
post_status /* 'inherit' */ );
}}}
To correctly determine if a user can read the post, the post status string ought to use `get_post_status()`:
{{{#!php
has_cap(‘create_users')) return true; // line added
return $current_user->has_cap( $capability, ...$args );
}
}}}
",malamiao
Needs Patch,49287,Users with no page deletion capabilities can delete homepage in multisite,,Role/Capability,,normal,normal,Awaiting Review,defect (bug),new,,2020-01-24T16:37:27Z,2020-01-24T16:40:17Z,"To recreate:
- Set up a vanilla multisite. On one of the sites, set a static page as the homepage. Create a second page for comparison purposes.
- Create a standard administrator user on that site. By default, they have permission to delete both the pages referred to above (expected behaviour).
- Add the following to the theme's `functions.php`:
{{{
add_action('init', function () {
$role = get_role('administrator');
$role->remove_cap('delete_pages');
$role->remove_cap('delete_others_pages');
$role->remove_cap('delete_published_pages');
});
}}}
The administrator role is now unable to delete pages EXCEPT the page that is set as the homepage, which they are still able to trash.
It appears this bug exists in v4.7 onwards. In 4.6.1 I see the expected behaviour: this code prevents an administrator from trashing any pages, including the page set as the homepage.",robdxw
Needs Patch,46440,WP_Roles data doesn't load correctly when 'switch_to_blog' is called in a multisite.,,Role/Capability,5.1,normal,normal,Awaiting Review,defect (bug),new,,2019-03-08T03:07:08Z,2019-03-08T16:35:38Z,"On `switch_to_blog` call, eventually it will come to `get_roles_data` method of `WP_Roles` through `switch_blog` hook. Then this method checks `is_multisite() && $this->site_id != get_current_blog_id()`, but `$this->site_id != get_current_blog_id()` will always be false, because the current blog id is already set in `switch_to_blog`, hence it fails to load the data.",syammohanm
Needs Patch,45879,WP_User::set_role() does not remove previous roles,,Role/Capability,,normal,normal,Awaiting Review,defect (bug),new,,2019-01-09T14:28:45Z,2019-01-09T14:39:00Z,"If a user has a role that has been removed from WordPress by using remove_role() this role is not removed when using WP_User::set_role() on the user.
Example:
remove_role('subscriber') has been used on the install removing the subscriber role from available roles.
A new user is created with wp_create_user()
The new user is automatically assigned the role subscriber (which does not exist)
The new users role is set using WP_User::set_role()
In the database, the usermeta row with capabilities for the new user still contains the subscriber role and the new role is given an index of 1 instead of 0 in the $user->roles array.
Expected result:
WP_User::set_role() should effectively remove all previous roles from the user even if they have been removed from WordPress with remove_role().
",fried_eggz
Needs Patch,36056,"When saving a post for an other author, the current_user_can() check is not passing the post ID with the edit_others_posts capability",,Role/Capability,4.4.2,normal,normal,,defect (bug),new,,2016-03-03T01:48:29Z,2019-06-04T21:20:50Z,"The scenario: we're using a custom role that is locked down to only being able to edit a single page titled 'About Us'. We've added an 'edit_about' capability to the role, and use the map_meta_cap filter to return 'edit_about' if that's the page being edited for the role.
{{{
if ( in_array( $cap, $cap_needed ) && user_can( $user_id, 'edit_about' ) && ! empty( $args ) ) {
$post_id = $args[0];
$page = get_post( $post_id );
$parent = get_post( $page->post_parent );
$caps = array();
if ( 'page' === $page->post_type && ( 'about us' === strtolower( $page->post_title ) || ( null !== $parent && 'about us' === strtolower( $parent->post_title ) ) ) ) {
$caps[] = 'edit_about';
} else {
$caps[] = 'do_not_allow';
}
}
}}}
WP_Posts_List_Table and wp-admin/post.php is doing a simple check just on edit_post.
{{{
current_user_can( 'edit_post', $post->ID );
}}}
Because we're getting the post ID, we can allow any user with that role to see the Edit link and get to the edit page, and it's turned off for every other page.
When trying to save the post, wp-admin/includes/post.php checks to see if the author is different than the current user, but is not passing the post ID in the check:
{{{
if ( isset( $post_data['user_ID'] ) && ( $post_data['post_author'] != $post_data['user_ID'] )
&& ! current_user_can( $ptype->cap->edit_others_posts ) ) {
if ( $update ) {
if ( 'page' == $post_data['post_type'] ) {
return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) );
}
}}}
Because we don't have the post ID, we don't have any context of the post being saved and are not able to tell WordPress that saving this others post is allowed. Changing the code in core above to:
{{{
current_user_can( $ptype->cap->edit_others_posts, $post_data['ID'] )
}}}
fixes the issue and allows the page to be saved. Giving the role the edit_others_pages capability also fixes the issue.
I'm not 100% sure this is a bug or by design, and may be related to #30452, but would like some input from the core team. ",GunGeekATX
Needs Patch,47338,is_super_admin() should check a different capability,,Role/Capability,,normal,normal,Awaiting Review,defect (bug),new,,2019-05-21T14:07:18Z,2019-09-23T09:56:35Z,"Currently is_super_admin() returns true in case the user has the delete_users cap (in case of a single site).
Since admins may want to delegate users managemente capability, IMHO a more appropriate capability to check is 'activate_plugins' or, better, check more than a single capability.",lllor
Needs Patch,36691,"Ability to disable ""Password Protected"" post option",,Role/Capability,,normal,normal,Awaiting Review,enhancement,new,,2016-04-27T19:19:02Z,2018-03-10T17:59:50Z,"We don't want any of our posts accidentally being published as ""password protected.""
It would be helpful to have a filter to disable that part of the UI.",paulschreiber
Needs Patch,34608,Add role display name to WP_Role object,,Role/Capability,,normal,normal,,enhancement,new,,2015-11-06T20:32:02Z,2019-06-06T06:25:22Z,"Roles have both a `name` (slug) and `display_name`. The `display_name` is saved to the database in an untranslated form, and should be translated with `translate_user_role()` before display.
I would have thought that you could get the display name of a role by first calling `get_role()` to retrieve the `WP_Role` object, and then accessing a property or method. However, the `WP_Role` objects are constructed only with the `name` and capabilities of the role. It is therefore not possible to retrieve the `display_name` directly from the `WP_Role` object.
Instead, to retrieve the `display_name` for a role, you have to call `WP_Roles::get_names()`, which returns an array of (untraslated) role display names (not the slug `name`s).
I am proposing that we introduce a way to get the display name directly from the `WP_Role` object. Possibly we could offer two properties: `display_name` with the translated display name, and `raw_display_name` with the raw display name (in case it would actually be useful for anything). I would never have known that the role display names needed special treatment for translation if I hadn't done this digging, so it would probably be helpful to newbies if the translated names were exposed in the API by default, instead of untranslated. (Related: #20764)
In the process, maybe it would be possible to clear up the difference between the name and the name, at least in the docs. Perhaps that deserves its own ticket. It really is confusing in the code though, so much so that I've had to double-check which name (the display or the slug) was the one passed to `WP_Role`. Both of them are just referred to as the name in much of the code.
This goes all the way back to [2703] when the role classes were introduced.",jdgrimes
Needs Patch,56373,La EDICION de Contenidos y los ROLES de Usuario,,Role/Capability,,normal,normal,Awaiting Review,enhancement,new,,2022-08-14T01:54:28Z,2022-08-14T01:58:01Z,"CHANGES IN BUSINESS MODEL
Congratulations to the entire WordPress team for the constant improvements to the interface and functionality.
With the home office, for reasons of Covid, the editorial work using WordPress has revealed a pertinent change in the Relationship: User Role / type of interface, I explain:
************
The ADMINISTRATOR {Editor General} Role is the only level that has attribution / permissions to manage and make changes in all DASHBOARD segments: Home, Themes, All Posts, Media, Pages...
************
The EDITOR {Posts Content Editor} Role should only have POST {all Post}. Its Editorial Role is to manage the Contents to apply the ""Editorial Line"" {informative bias, journalistic style}.
The Editor has the ROLE of assigning CATEGORIES for AUTHOR and Contributor type users.
For that reason you should ONLY access: ALL POST, all Media/Library and USERS. Nothing more.
The Toolbar {under the TITLE / h1}, for the Editor, Author and Contributor, should ONLY have:
-- Add Media / NO Contact Form
-- The Menu Paragraph should be changed to ""Sub Head"" {h3}
-- Bold + Italic + Blockquote + Link + Clear Format + Special Character
-- View: Visual / Text
Side Bar Right:
--Featured Images
-- Tags
-- Category
-- Publish
NOTHING ELSE. Important to guarantee the integrity of the Style and Graphic Design, established by the Theme.
**********
Role AUTHOR
Inherits all accesses from the Editor, except the CATEGORY Menu {only for the Editor}
The Author has access to all own previous Post.
When you publish a Post, you send an ALERT to the Administrator and the Editor
**********
COLLABORATOR role
It inherits all access from the Author, but... when you press PUBLISH, it publishes in DRAFT State.
The Contributor has access to all of their own previous Posts.
When you publish a Post, you send an ALERT to the Editor
**********
It is pertinent, necessary these changes, to turn WordPress into an EDITORIAL SYSTEM.
Next step: Integration with Adobe InDesign, Adobe InCopy
I hope you can accept this suggestion.
Cheers
José Fuertes Ortega
[https://www.linkedin.com/in/limanorte/]
ppfuertes@gmail.com
limanorte28@gmail.com",LimaNorte.com
Needs Patch,32085,Less ambiguous dashboard access. Suggested new capability: access_dashboard,,Role/Capability,4.1.2,normal,normal,,enhancement,new,,2015-04-23T19:15:12Z,2023-11-23T02:52:00Z,"Wordpress makes the assumption that the theme (or some plugin) may not provide a place for users to edit their profile, and lets any registered user access the dashboard to do so. It's a decent assumption to make. While it creates a jarring ""did I just leave the site?"" experience, you can't assume the theme or some plugin will accommodate updating profiles.
There are a host of other plugins that rely and build upon this assumption. Vendor Products (a paid Woocommerce extension) assumes users of any role have access to the dashboard, to let users identified as vendor admins (by its own means) manage products. There's an LMS which makes the same assumption to let teachers manage quizzes and such. I'm sure many other plugins make that same assumption.
I recently discovered that WooCommerce relies upon the `edit_posts` capability to determine if a user should be able to access the dashboard vs getting redirected to ""my account"". This keeps customers on the front-end, which is valuable, but breaks a host of other plugins which assume any registered user can access the dashboard.
Overuse of the `edit_posts` capability to determine some level of admin access is a different discussion (worth having!), but it seems obvious to me that a new capability should be introduced to specifically target accessing the dashboard. This is certainly a Woocommerce issue, but I feel an `access_dashboard` capability would remove the ambiguity around... well, accessing the dashboard.
This would also let WP admins have refined control over letting their users access the dashboard vs staying on the front-end. Buddypress for example provides a front-end profile editing template. Under Buddypress settings, there could be a checkbox for allowing users to access the dashboard. Unchecking it would keep subscribers on the front-end. WooCommerce also provides front-end account management and could have the same approach. Users without these plugins could also just use a plugin like User Role Editor to remove the `access_dashboard` capability from subscribers to keep users on their front-end, or achieve the same result with 4 lines in their functions.php.",archonic
Needs Patch,14986,Make WordPress roles/capabilities more secure (edit_users related),,Role/Capability,,normal,normal,,enhancement,new,,2010-09-28T20:39:03Z,2022-12-05T12:09:09Z,"We've discussed this before, but after some thought, I think we can do this and make it work.
Right now, the edit_users capability is the key to the kingdom. Anybody with edit_users can change their role to anything, including to something with more capabilities than they already have.
Back in #6908 and #6014, this was thought about in terms of the old user levels system, which of course shouldn't be used and makes no sense.
In #8770, an editable_roles filter was introduced, which allows a plugin to limit the roles that a user can change themselves too. This works for one aspect of the problem, but a) it doesn't solve the passwords problem(1), and b) it assumes that the roles are still only in one chain of command. That is to say, that all the roles have an ordering, where each role has all the capabilities of the role ""below"" it.
To solve these, I think we need a capability comparison system. To wit, code that implements these two rules:
1. No user can change the role of another user to a role that has capabilities that the changing user does not also have.
2. No user can change either the role or the password of another user who has any capability that the changing user does not also have.
For rule 1, this means that if Adam was to try to assign Bob a role, he would only be given the choice of assigning roles that have a subset of the capabilities Adam himself had.
For rule 2, if Adam was to try to change the role or the password of Bob, he would not be able to change either unless Bob already had a subset of Adam's own capabilities.
This makes the roles have a sort of definable hierarchy, where roles with lesser capabilities can be multi-faceted. I can define more than one chain of roles which are ""above"" each other in hierarchy, allowing me to build a tree of groups and users capable of different things.
For things like bbPress-as-a-plugin, this sort of enforcement is going to be a must-have feature.
Note 1: The ""passwords problem"" is that any user who can change another users password can easily change the password of somebody of ""higher"" rank, log in as them, and then have their capabilities. It's detectable, but in some cases, may not be so detectable. Admins who don't log in often, say.
Note 2: We also need role management in core, but that's a topic for a separate day. I'm speaking only of enforcement of a security model here for now.",Otto42
Patch Needs Refresh,20152,Multisite simplify option name to user_roles,,Role/Capability,3.3.1,normal,normal,Future Release,enhancement,new,,2012-03-01T21:44:28Z,2018-09-18T16:24:40Z,"Currently each blog in a MS install of WP stores an array of user roles in it's [prefix]_[$blog_id]_options table as an entry with the key [prefix]_[$blog_id]_user_roles
This makes it much harder to migrate MS install of WP to a different db prefix, etc. because not only do you need to change the table prefixes you need to go into each blog's options table and then properly update that option's key.
Because the table itself is sufficiently unique there isn't a need for this. The user roles array could be stored in an option called ""user_roles"" for each blog.",colind
Needs Patch,31210,Problem with WP core function to get user dropdown,,Role/Capability,4.1,normal,normal,,enhancement,new,,2015-02-02T12:44:00Z,2020-02-14T02:06:22Z,"Why does WP pass the argument 'who' => 'authors' on line 1014 of core file /wp-admin/includes/class-wp-posts-list-table.php. Which then causes WP to check the $dbprefix_user_level meta key in the database for that user, which is as far as I know, is a deprecated method of checking that.
This then stops WP from showing authors with enough caps (but level_0 for some reason) in the 'Author' dropdown on the page quick edit function.",andyx2v
Needs Patch,45709,Suggestion for User Roles,,Role/Capability,,normal,normal,Awaiting Review,enhancement,new,,2018-12-19T17:51:47Z,2019-01-29T18:13:49Z,"Hello,
User Roles on WordPress works through a serialized object in a record at the wp_options table in the database. I understand that this might be considered enough. Although, I have a suggestion for improvement:
I had a problem while working with multisites: I imported one website, and it happens that multisites depends on the name of the option at the wp_options table. Because I only updated the name of the tables, I couldn't see my user roles because that part is in the name of the option. After importing/updating it I could see.
I believe that it would be more maintainable if we had a separate table wp_roles instead. I would like to hear some comments on that.If enough people agrees or have some positive thoughts on that, I might prototype a plugin for the community to try it out.
Thanks!
Savio Resende",lotharthesavior
Needs Patch,23391,User in contributor role can add images to post only via the text editor,,Role/Capability,,normal,normal,Awaiting Review,enhancement,new,,2013-02-05T07:34:26Z,2018-10-03T12:18:01Z,"1. Create a user with contributor role
2. start new post with it
3. notice there is no ""add media"" button anywhere
4. switch to text editing
5. use the img button to insert a URL to a valid img on the web
6. request approval for the post
7. let admin/editor approve it
8. go the the post's URL and notice that the image is shown
So, it is not that contributors are not allowed to use images, it is just that WP makes it hard to do so.
Either HTML needs to be sanitized and have all img tags removes for contributors, or access to the media library should be allowed for contributors denying only access to uploading. I vote for the second option.",mark-k
Patch Needs Refresh,5942,Add Owner role,,Role/Capability,3.1,normal,normal,Awaiting Review,feature request,reopened,,2008-02-21T10:13:08Z,2017-11-06T17:05:19Z,"This patch adds a new 'owner' role. The owner is an administrator who cannot be demoted, deleted or edited by other administrators. Owner is a secondary role - the user is both an administrator and an owner.
In the current implementation there is only one owner at a time. The current owner can transfer ownership of the blog to another administrator on the Transfer Ownership tab (under Users). I implemented this as a plugin because some site owners won't want the feature there at all.
This is of most interest for MU, but it's also probably useful for some regular WordPress blogs with multiple users.
This would be particularly useful in conjunction with the user_role table from #5541, but it works fine with or without it.",tellyworth
Needs Patch,41778,Archive page for user roles,,Role/Capability,4.8.1,normal,normal,Awaiting Review,feature request,new,,2017-09-01T17:22:55Z,2017-09-02T21:23:07Z,"If possible, implement userroles in the author archive page or create a seperate user archive for it. Along with an option to modify the base/slug.
For example, subscribers should have their own archive page. While subscribers don't hold any rights inside wordpress, in themes such as an ecommerce website or membership website, these subscriber roles are quite important as they are considered as 'customers'.
",mireillesan
Needs Patch,46716,Site owner unable to control admin level users in Word Press dashboard,,Role/Capability,,normal,normal,Awaiting Review,feature request,new,,2019-03-29T12:25:21Z,2019-03-30T04:27:00Z,"Issue details:
I just created my website using WordPress. I am not a web developer and wordpress dashboard is pretty native and lacks default functionalities like giving sub headings in your page or blog ( editor should at least be as good as MS Word).
Also I can create new page under parent page but can't view their title under parent page in menu after publishing the page.( expected behavior)
So I need to take help of a web developer to get proper page templates, theme, plugin etc. I created a second administrator in my site to give access to a web dev to my site dashboard.
Now I ( site owner ) and the web developer have equal rights in the site. the Web developer can even change my password or delete me as an administrator, or log me out!!
How can wordpress allow that? There are plug ins which give different User roles but this is a core capability to add, edit or delete users including site owner. Plugins can be removed by an admin user so not useful to protect rights of site owner if he/she has to create other admins. If I do not give admin rights to web developer, he can not add templates/plugins/theme so I have to give admin rights..
Expected Behavior:
To make wordpress websites secure, the site owner should have Master admin rights.
Site owner should be able to add or remove other admins but other admins should not be able to view - site owner( master admin) among list of users. other admins should not be able to view, edit or delete any details of Master admin profile.
Also Publishing rights should be restricted to not allow every user to publish anything they write/change.
in fact there should be check box for different capabilities while creating users:
1. User Management (All- master admin)
2. User management ( all but not master admin)
3. Developer capabilities ( templates, plug ins, coding )
4. Read, write, edit posts (self only- Jr. blog writer)
5. Read, write, edit, publish posts (self only- blog writer)
5. Read, write, edit, publish posts ( all contributors- editor)
6. Read write,edit, publish, delete posts, review publish comments ( all contributors- Sr.editor)
Additional improvements:
Today most blog sites have basic editing features which make them more user friendly for nontechnical bloggers. WordPress try to keep everything simple and is great for developers but please think from beginners' perspective and add basic capabilities to page editor. Also add menu editor or create core functionality to automatically add child page under parent page in main menu.
",anu24
Needs Patch,55106,Split publish_posts in publish_posts and publish_others_posts,,Role/Capability,,normal,normal,Awaiting Review,feature request,new,,2022-02-07T21:24:30Z,2022-02-08T08:10:48Z,"While working on a multisite blog I've found that several capabilities have an _others_ version, but is missing on the `publish_posts` capability.
This is important because you currently can't limit someone to publish only his/her own posts. It's all or nothing. Example: a newly added Author can publish a draft from the Administrator.
It can also be seen as a feature the other way around: when everyone has only `publish_others_posts` capabilities, every posts has to get a second pair of eyes before getting published.
**I suggest implementing:**
`publish_posts` - Controls whether objects of this type __owned by current user__ can be published. Set as default capability of Super Admin, Administrator, Editor, Author.
`publish_others_posts` - Controls whether objects of this type __owned by other users__ can be published. If the post type does not support an author, then this will behave like publish_posts. Set as default capability of Super Admin, Administrator, Editor.
",freakenstein
Needs Patch,37616,Replace `is_super_admin()` calls with real capability checks,,Role/Capability,,normal,normal,Future Release,task (blessed),reviewing,,2016-08-09T18:18:57Z,2017-05-08T17:18:40Z,"As discussed in Multisite office hours (https://wordpress.slack.com/archives/core-multisite/p1470762377000454), there are plans to improve capability handling in WordPress, to also support network-wide (and possibly global) capabilities. The current `is_super_admin()` check system is no actual role- and capability-based system which makes it impractical to refine roles and capabilities on this level.
While a super admin should have access to all capabilities, we should get rid of all `is_super_admin()` checks that happen outside of `WP_User` and the `map_meta_cap()` function and replace those calls with dedicated capabilities. There might be a few other occurrences where `is_super_admin()` is actually the right choice, but generally it shouldn't be used in other locations anymore. This will open up new possibilities to think about how we can implement a true role- and capability-based system beyond the scope of a site.
The hardest part of this ticket will probably be finding names for the new capabilities. The good thing is that we most likely won't need to touch any roles or adjust `map_meta_cap()` since the new capabilities should only be granted to the super admin for now anyway.
We should probably create a list of occurrences and think about names for the capabilities (or whether we can use existing capabilities) first.",flixos90
Needs Patch,53848,'is_feed was called incorrectly' notice if `wp_styles()` is called before the query,,Script Loader,5.8,normal,normal,Awaiting Review,defect (bug),new,,2021-07-31T17:20:16Z,2021-12-14T23:59:40Z,"WordPress 5.8 introduced the `wp_should_load_separate_core_block_assets` (https://developer.wordpress.org/reference/functions/wp_should_load_separate_core_block_assets/) function which calls `is_feed()` internally as part of its preliminary checks that guard the application of its filter.
Since `wp_should_load_separate_core_block_assets` is now called within `wp_default_styles()`, this has the potential to raise a ""doing it wrong"" notice if `WP_Styles` is initialized before the query runs for non-admin requests.
`wp_styles()` has never imposed such timing restrictions on when it is called, this is somewhat of a breaking change.
Ideally a different condition that does not impose the same limitation could be used in the place of `is_feed` here.",aaemnnosttv
Needs Patch,37362,@font-face errors with dashicons in Microsoft Edge,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2016-07-14T12:08:36Z,2017-12-11T23:04:04Z,"I encountered the following errors in Microsoft Edge console when enter admin dashboard:
CSS3113:@font-face font format not recognized
dashicons.eot
CSS3120: No fonts available for @font-face rule
load-styles.php (0,37)
This is the following explanation of error code https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k%28VS.WebClient.Help.CSS3113%29#cssCodes
",jevuska
Needs Patch,59780,Add functionality to dequeue a block style added via wp_enqueue_block_style,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2023-10-31T19:53:29Z,2023-10-31T19:53:29Z,"Currently there is no API to remove a block style that has been enqueued with `wp_enqueue_block_style`. This makes it harder than neccessary for a child theme to override a blockstyle from a theme.
See the discussion in this core thread: https://wordpress.slack.com/archives/C02RQBWTW/p1698774094584149",jorbin
Needs Patch,43900,Add hint about blocked Javascript as possible error reason in script-loader.php,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2018-04-29T18:52:58Z,2018-05-02T09:41:14Z,"When trying to do various things with a new site, I got the same error message over and over:
{{{Connection lost or the server is busy. Please try again later.}}}
I even reinstalled, but the error didn't go away. When I revisited the issue next day, finally realized what silly mistake i had made.
In order to help other people with same issue, we only need to change the string above in /wp-includes/script-loader.php (around row 840) into:
{{{Connection lost, the server is busy, or you may have blocked JavaScript. Please try again later.}}}
",tobifjellner
Needs Patch,30036,Add some escaping to $handle when printing styles.,,Script Loader,,normal,normal,,defect (bug),new,,2014-10-18T22:58:04Z,2019-06-04T21:12:39Z,"There's a number of instances where we're currently printing out the dependency handle without any sort of escaping. We should probably do something about that.
https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class.wp-styles.php#L87
`WP_Styles::do_item()`
Things can currently get somewhat mucked up if someone enqueues a script or style with a single quote in it, that breaks out of the id attribute.
I'm not sure what the best fix for this is, attached are some starting point unit tests to demonstrate the varied types of handles that work currently, that we'll want to at least take into consideration.",georgestephanis
Needs Patch,55485,"Clarify `wp_should_load_separate_core_block_assets()`, `block.json` script expectations",,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2022-03-30T00:49:10Z,2023-10-25T10:27:44Z,"In the `block.json` [https://github.com/WordPress/gutenberg/blob/45a8e6be0eb7fca87d64ce8140792b30e6bc4a20/schemas/json/block.json schema], the `script` property is described as:
> ""Block type frontend and editor script definition. It will be enqueued both in the editor and when viewing the content on the front of the site.""
From that description, I expect the `script` set in my block's `block.json` to load in the editor and on the front-end when my block is in use. I do not expect the script to load on the front-end when my block is not in use.
If I activate TwentyTwentyTwo, everything works as expected.
If I activate TwentyTwentyOne, my script appears on every front-end view, whether or not the block is loaded.
The cause of this can be tracked to `wp_should_load_separate_core_block_assets()`, which has a short description of:
> Checks whether separate styles should be loaded for core blocks on-render
This implies at the beginning of the function documentation that the function will only apply to **core** blocks.
The longer description helps a bit, but is muddied up in talking about core and third-party blocks separately when in reality it seems that they are treated the same. It mentions `block-library/style.css`, which itself implies this _might_ be talking about styles rather than all assets.
The filter inside the function, `should_load_separate_core_block_assets`, defaults to `false` for themes that are not FSE and has a short description of:
> Filters whether block styles should be loaded separately.
The longer description refers only to ""core block assets"".
-----
== Proposal
My guess is that we can't just change the filter to default to `true`, though that would be ideal. :)
I think the function docs could be clarified with something like:
{{{
/**
* Checks whether block assets should always load or only on-render.
*
* When this function returns true, block assets defined by the `script` and
* `style` properties in `block.json` are loaded on-render.
*
* When this function returns false, these block assets are always loaded,
* regardless of whether the block is rendered in a page.
*
* This only affects front end and not the block editor screens.
}}}
And the filter docs with something like:
{{{
* Filters whether block assets should always load or load only on-render.
*
* Returning false loads all block assets, regardless of whether they are rendered
* in a page or not. Returning true loads block assets only when they are rendered.
}}}
Previously #53505
",jeremyfelt
Needs Patch,24713,"Compression in load_styles.php does not always work, causing inability to use the admin",,Script Loader,3.5.2,normal,normal,,defect (bug),new,,2013-07-08T22:59:05Z,2019-06-04T21:08:47Z,"I think this is quite important, because it sometimes prevents using wp-admin pages altogether.
Server environment: Debian Linux 6.0.5, apache 2.4.2, mysql 5.5.27, php 5.4.5.
I have discovered that sometimes my admin Console pages are not rendered properly, as though a style sheet is not loaded. This does not depend on a browser and client operating system. I tried IE, Firefox, Chrome, Opera, I tried client browser in Windows XP, Windows Vista, Android 4.1.2, and the problem could be seen in all these cases.
The problem is random. Through some magick and without any special activity on my side, wp-admin pages sometimes stop working as described, and after 10 minutes it randomly fixes itself (or does not), again without any action on my side.
Further investigation showed that when I manually try to open a link containing load-styles.php as referred to from the console page (I copy and paste the link including all GET request variables into a new browser window), then sometimes garbage is shown for the load-styles.php. Encoding is UTF-8 (I have added .htaccess just in case to make sure this is not an issue). But when garbage is shown, then admin pages do not work (their stylesheet obviously does not get loaded). When there is no garbage in load-styles.php (i.e. normal stylesheet, good visible text), then all is good.
I had a faint idea that this was because I mechanically moved my site from one URL (approx. localhost) to a ""production-level"" URL (copied all files + database), I thought this could be related (even though I changed all URLs in Settings/General afterwards), but this did not hold water.
So looked into load-styles.php and noticed there is some conditional content encoding out there. What I did I disabled this content encoding altogether like this:
{{{
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
header('Vary: Accept-Encoding'); // Handle proxies
if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
// header('Content-Encoding: deflate');
// $out = gzdeflate( $out, 3 );
} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
// header('Content-Encoding: gzip');
// $out = gzencode( $out, 3 );
}
}
}}}
and now everything works. All fine and all good, problem solved. No garbage anymore.
Would please bother to disable this worse than useless content compression in load-styles.php for the time being before you find a solution that works for all? I believe I might be not the only one to experience these random issues with Console stylesheet. I expect that 99% of website admins have fast connections to manage their websites, and for those who do not, Opera Mini is still there and still working.
And I also mean that the problem, once it shows up, is persistent, i.e. it does not disappear through a trivial full page reload (Ctrl-Shift-R in FF, for instance). If pages (stylesheet) stop working, then nothing helps: not clearing the browser cache, not restarting the browser, not starting a new instance of the browser, not starting another browser from another vendor. So the problem is not on the client side, it is on the server side.",cfeet77
Needs Patch,45106,Concerns related to moving mce_external_plugins filter to WP_Scripts::__construct,,Script Loader,5.0,normal,normal,Awaiting Review,defect (bug),new,,2018-10-17T13:19:26Z,2019-01-16T22:59:17Z,"In r43723 the `mce_external_plugins` filter was moved to a function called via `wp_default_scripts` which, in turn, is called from `WP_Scripts::__construct` (via `WP_Scripts::init`).
While the `wp_default_packages_inline_scripts` function calling the `apply_filters( 'mce_external_plugins'` is only triggered in case the `did_action( 'init' )` returns true, there might be cases when the `WP_Scripts` object is being reinitialised after the `init` and thus code hooked to `mce_external_plugins` trying to enqueue or register a script causes an infinite loop, since the constructor of the `WP_Scripts` class is calling the filter, which calls the constructor again.
This does not feel like something what would matter in 99% of time, but, for instance, this breaks core unit tests which are reinitialising the WP_Scripts object, eg.: `Test_WP_Customize_Selective_Refresh::test_register_scripts`. in case such a piece of code is being used.
An example of a code used in a mu-plugin and breaking the mentioned test:
{{{#!php
jQueryWP = jQuery;`
Then in my JS, I do:
{{{
;(function (w) {
var jQ = w.jQueryWP || w.jQuery;
// my jQuery code here, using jQ
})(window);
}}}
I think that having a dependable reference to WP's jQuery object would be quite useful. One way to solve it would be to just add the line to our copy of jQuery. But that will cause issues with people who use well-behaved CDN plugins to swap out WP's jQuery for a Google-hosted copy of jQuery (note: THE SAME VERSION). So maybe a better way to do it would be to create a way to append inline JS code immediately after the inclusion of a particular script handle. We could then do what I'm doing in my plugin, but without the nasty PHP output buffers.
",markjaquith
Needs Patch,55184,Custom style handle attached to a custom block style is never load even if the block is in the page.,,Script Loader,5.9,normal,normal,Awaiting Review,defect (bug),new,,2022-02-17T11:12:39Z,2024-01-30T05:12:10Z,"== Description
I have a custom block based theme running on WP 5.9 that declares custom styles for certain blocks via the register_block_style function, but when I specify a style_handle the style is never enqueue even though the block is present in the page content (and core block assets are only loaded when they are rendered).
This issue ref to ticket #54457 https://core.trac.wordpress.org/ticket/54457
== Step-by-step reproduction instructions
1. Create a theme
2. Register a custom ""Display"" block style for the ""Heading"" block via register_block_style with ""my-theme-block-style-css"" style_handle
3. Register a ""my-theme-block-style-css"" style via wp_register_style
4. Add ""Heading"" block in page content with our ""Display"" style
5. Check CSS, ""my-theme-block-style-css"" is not loaded
== The relevant code
It seems that the render_block filter callback in enqueue_block_styles_assets from script-loader.php never fire.
script-loader.php
[https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes/script-loader.php#L2463-L2477]
[https://core.trac.wordpress.org/changeset/52262]
",alexandrebuffet
Needs Patch,59114,Infinite loop after upgrading from WordPress 6.1.3 to 6.2,,Script Loader,6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-15T20:20:09Z,2023-08-30T18:10:34Z,"Regeristing a function with the 'wp_video_shortcode_library' filter hook that enqueues a script causes an infinite loop, resulting in WordPress running out of memory.
It seems that the $wp_scripts global is being set to null at some point and being reinitialized, which causes this loop since the 'wp_video_shortcode_library' filter is called as part of the wp_default_scripts function in script-loader.php. This is my theory anyways. I'm not familiar enough with the WordPress codebase to say for sure.
To recreate this issue, you can make a basic theme with an empty index.php, only the theme definition inside the style.css, an empty js file (to try to enqueue), and a functions.php that registers the hook.
{{{#!php
'my-theme-buttons',
'src' => get_theme_file_uri( 'assets/blocks/buttons.css' ),
);
// Add ""path"" to allow inlining asset if the theme opts-in.
$args['path'] = get_theme_file_path( 'assets/blocks/buttons.css' );
// Enqueue asset.
wp_enqueue_block_style( 'core/buttons', $args );
} );
}}}
=== Result
Output inline.
{{{
}}}
The path
/wp-content/themes/abc/assets/blocks/
is not needed. I want to delete it. Is there any solution? Or is it a bug?
",s56bouya
Needs Patch,40134,Invalid data for scripts in footer,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2017-03-12T16:37:24Z,2017-03-12T16:37:24Z,"During register scripts via wp_register_script in last param I can choose that script should be in footer. In function we see:
{{{#!php
add_data( $handle, 'group', 1 );
}
}}}
so footer scripts I should check use this code:
{{{#!php
get_data( $handle, 'group' ) ) {
echo 'in footer';
} else {
echo 'in header';
}
}}}
I check for this: admin-bar and I have false -> `in header`. We can see this code:
{{{#!php
add( 'admin-bar', ""/wp-includes/js/admin-bar$suffix.js"", array(), false, 1 );
}}}
This should be in footer (and is, but I can't check it via my script).
I think that this is bug.",sebastian.pisula
Needs Patch,36779,Move /wp-admin/load-scripts.php and /wp-admin/load-styles.php to /wp-includes,,Script Loader,4.4.2,normal,normal,,defect (bug),new,,2016-05-06T18:26:45Z,2019-06-04T21:22:41Z,"Basically these files are inside /wp-admin directory, but you can hit them and get an output without being authenticated,
examples:
http://somedomain.usingwp.com/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,svg-painter,heartbeat,wp-auth-check&ver=4.4.2
http://somedomain.usingwp.com/wp-admin/load-styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=4.4.2
If these scripts are for use inside admin, why authentication isn't required?,
if these scripts are for general use on the admin, themes, etc, why these aren't on wp-includes?
This was pointed to me on a security scan, and apart from that if the idea is general use for this, I think hosting these on /wp-admin is misleading.
",SaulNunez
Needs Patch,47789,"NGINX: Request for media-view.js leads to ""zero size buf in writer""",,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2019-07-28T13:14:52Z,2019-10-20T11:56:28Z,"I do currently have an issue loading the media-view.js file in backend, which leads to multiple js errors on pages or media grid. Checking the logs show an ""zero size buf in writer"" error for these requests.
The error occurs even on deactivated plugins and default theme. So I tried to debug this down.
I am running multiple WordPress sites locally over NGINX (laravel) in development mode, where SCRIPT_DEBUG is true; so it tries to load the unminidfied version of the file. Replacing it´s content with the minified version solves the bug.
I do currently not know, what causes the empty buffer.",d.sturm
Needs Patch,49742,No longer able to enqueue multiple Google Fonts with wp_enqueue_style,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2020-03-31T16:03:07Z,2021-11-10T00:04:08Z,"I'm using wp_enqueue_style to enqueue this Google Font file. Here is my code:
wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,700;1,400&family=Neuton:ital,wght@0,300;0,400;0,700;1,400&display=swap', [] );
This is in my functions.php file.
However, when I view source on my loaded page, the URL for that font file is cut down to: https://fonts.googleapis.com/css2?family=Neuton%3Aital%2Cwght%400%2C300%3B0%2C400%3B0%2C700%3B1%2C400&display=swap&ver=5.3.2
As you can see, the first family param has been removed after being outputted through wp_enqueue_style. Is there a way to fix this without doing anything hacky? I think there may be an outdated way to build the URL to both to come through, but I'd rather be able to use what Google now provides. My original URL inside wp_enqueue_style is the URL generated by Google Fonts for me to embed.
SO post here: https://stackoverflow.com/questions/60953810/why-cant-i-enqueue-multiple-google-fonts-in-wordpress-functions-php/60954323#60954323",tannerm
Needs Patch,21520,Prevent recursive script dependencies in wp_enqueue_script,,Script Loader,,normal,normal,,defect (bug),new,,2012-08-08T17:21:43Z,2019-06-04T21:07:42Z,"If a script sets itself as a dependency, we should catch that, strip out the dependency, and throw a {{{_doing_it_wrong}}}:
{{{wp_enqueue_script( 'my-script', '/path/to/file.js', array( 'my-script' ) );}}}
This may need to be done at the lowest level possible, i.e. {{{_WP_Dependency}}}",batmoo
Needs Patch,15833,Script concatenation fails to take external dependencies into account.,,Script Loader,3.0,normal,normal,Future Release,defect (bug),new,,2010-12-15T17:35:17Z,2019-05-21T10:42:05Z,"Script concatenation places the concatenated script include first, before any scripts loaded separately. If one of the scripts in the concatenation relies on a script outside the concatenation the dependency order is ignored.
When the dependencies are all internal to the concatenation things work fine (for example script4 relies on script3):
* concat=script1,script2,script3,script4,script5
But when script3 is loaded externally, script4 will break:
* concat=script1,script2,script4,script5
* external-script3
This becomes apparent if jQuery is loaded from a non-standard location (via a plugin or the [http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location code from the Codex]) in that the visual editor fails to function correctly because source:/trunk/wp-admin/js/editor.js uses jQuery (which it fails to register as a dependency, see ticket:15830, but when I fixed that locally the results were the same).
I'm working around this in [http://wordpress.org/extend/plugins/use-google-libraries/ Use Google Libraries] by globally disabling concatenation, but it would be nice if this was fixed.
If possible, it would be nice if the loader was smart enough to do something like:
* concat=script1,script2
* external-script3
* concat=script4,script5
Or at least flagged the script with the dependency as unsafe for concatenation:
* concat=script1,script2,script5
* external-script3
* script4
",jczorkmid
Needs Patch,49470,Script loader: simplify maintenance,,Script Loader,5.0,normal,normal,Future Release,defect (bug),new,,2020-02-18T22:11:18Z,2020-07-21T19:03:13Z,"The main functionality of script-loader is to provide a list of all WordPress scripts and stylesheets together with their dependencies, translation objects and extra/inline code.
During the WP 5.0 development a few (shorthand) functions were introduced that output hard-coded data used to ""construct"" that list by running several loops instead of the simpler, one-line definitions like in the pre-existing list. This makes it harder to ""see"" and maintain the entries in the list, and doesn't bring any benefits (all data is still hard-coded, but is now in separate places). It also makes it harder to ""dynamically"" extract and construct the scripts list like in #48154.
For best results and easier maintenance the ""helper functions"" introduced in WP 5.0 should be removed and the list of scripts in `wp_default_scripts ()` should include all entries.",azaozz
Needs Patch,42440,Uncaught TypeError: $(...).wpColorPicker is not a function,,Script Loader,4.8.3,normal,normal,Awaiting Review,defect (bug),new,,2017-11-05T23:30:56Z,2017-11-06T00:56:47Z,"I can't edit my page using Page Builder because the next Error
{{{
gdlr-admin-panel-html.js?ver=f63693efb5b9a5e10ac3abbd57323a6b:192 Uncaught TypeError: $(...).wpColorPicker is not a function
at HTMLDocument. (gdlr-admin-panel-html.js?ver=f63693efb5b9a5e10ac3abbd57323a6b:192)
at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=f63693efb5b9a5e10ac3abbd57323a6b:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=f63693efb5b9a5e10ac3abbd57323a6b:2)
at Function.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=f63693efb5b9a5e10ac3abbd57323a6b:2)
at HTMLDocument.K (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=f63693efb5b9a5e10ac3abbd57323a6b:2)
}}}
Can you help please?",shamstarek
Needs Patch,36448,When concatenating scripts in script-loader dependencies may not be honoured.,,Script Loader,4.4.2,normal,normal,,defect (bug),new,,2016-04-08T09:33:59Z,2019-06-04T21:21:36Z,"This is a follow on from [https://core.trac.wordpress.org/ticket/36392#comment:13 36392#comment:13]. Ticket #15833 looks to be related.
When concatenating scripts, dependencies may not be honoured for scripts that trigger the use of `$print_html` (ie those outside the default directories or having conditionals or (if available!) inline scripts).
For instance this test where `three` depends on `one` and `one` has a conditional:
{{{#!php
do_concat = true;
$wp_scripts->default_dirs = array( '/directory/' );
$wp_scripts->default_version = 1;
wp_enqueue_script( 'one', '/directory/one.js', array(), 1 );
wp_enqueue_script( 'two', '/directory/two.js', array(), 1 );
wp_enqueue_script( 'three', '/directory/three.js', array( 'one' ), 1 );
wp_script_add_data( 'one', 'conditional', 'blah' );
$wp_print_scripts = get_echo( 'wp_print_scripts' );
$print_scripts = get_echo( '_print_scripts' );
$expected = ""\n"";
$expected .= ""\n"";
$this->assertEquals( $expected, $print_scripts );
$this->assertEquals( '', $wp_print_scripts );
}
}}}
will fail, as the conditional stuff will always be outputted after the concatenated scripts, resulting in `one` appearing after `three`:
{{{
}}}
The same is also true, ''mutatis mutandis'' (ahem), for styles, but I'll open a separate ticket for that.",gitlost
Needs Patch,36449,When concatenating styles in script-loader dependencies may not be honoured.,,Script Loader,4.4.2,normal,normal,,defect (bug),new,,2016-04-08T09:43:07Z,2019-06-04T21:21:41Z,"This is the (not-really) evil twin of the scripts issue [https://core.trac.wordpress.org/ticket/36448 36448].
When concatenating styles, dependencies may not be honoured for styles that trigger the use of `$print_html` (ie those outside the default directories or having conditionals or alts).
For instance this test where `three` depends on `one` and `one` has a conditional:
{{{#!php
do_concat = true;
$wp_styles->default_dirs = array( '/directory/' );
$wp_styles->default_version = 1;
wp_enqueue_style( 'one', '/directory/one.js', array(), 1 );
wp_enqueue_style( 'two', '/directory/two.js', array(), 1 );
wp_enqueue_style( 'three', '/directory/three.js', array( 'one' ), 1 );
wp_style_add_data( 'one', 'conditional', 'blah' );
$wp_print_styles = get_echo( 'wp_print_styles' );
$print_styles = get_echo( '_print_styles' );
$expected = ""\n"";
$expected .= "" \n"";
$this->assertEquals( $expected, $print_styles );
$this->assertEquals( '', $wp_print_styles );
}
}}}
will fail, as the conditional stuff will always be outputted after the concatenated styles, resulting in `one` appearing after `three`:
{{{
}}}
",gitlost
Needs Patch,54777,passing empty object to wp_localize_script will convert it to empty array instead of empty object,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2022-01-10T10:44:36Z,2022-01-10T12:56:47Z,"This will correctly converted to js object:
{{{
wp_localize_script( $handle, $object_name, array(
""foo"" => ""Foo value"",
""bar"" => ""Bar value""
) );
}}}
the value will be:
{{{
{""foo"":""Foo value"",""bar"":""Bar value""}
}}}
But passing empty array will be converted to js empty array:
{{{
wp_localize_script( $handle, $object_name, array() );
}}}
the value will be:
{{{
[]
}}}
We want to pass empty array because we want to prepare the global js variable to be used later. But because of the inconsistency it can cause problem if we want to loop it for later use. since we use different method to loop object and array in javascript.",erikdemarco
Needs Patch,47322,scenario based-bug in the file load-style.php,,Script Loader,5.2,normal,normal,Awaiting Review,defect (bug),new,,2019-05-20T01:29:27Z,2019-05-20T12:04:06Z,"Technically the file load-style.php has a bug, however it is a scenario based-bug so it rarely occurred. Not going in to so much details of PHP the problem is with the variable $out concatenation of ""$contents"" used in the foreach loop, i.e., O(n) complexity issue - the allocated buffer is exhausted assigned by PHP during the single http request execution.
The better and optimized way is:
move the ""header"" just the above ""foreach ( $load as $handle )"" loop statement.
remove ""$out"" , i.e., echo $content rather concatenating into $out.
I had this issue during installing app on my local machine, and solved it happily by doing changes that way.",asimbaki
Needs Patch,55030,wp_enqueue_script( 'jquery-ui-autocomplete' ) - is enqueueing a bunch of extra scripts I don't need,,Script Loader,,normal,normal,Awaiting Review,defect (bug),new,,2022-02-01T16:56:14Z,2022-02-18T11:57:05Z,"When I enqueue default scripts located in WP, specifically
{{{#!php
` and `
}}}
So a better output would be:
{{{
}}}
Or even no output at all, since those are default values.
Now to the topic of Cumilative Layout Shift. Currently `wp-container` inline styles are being output in the `wp_footer` action unless user theme supports newest templates feature. This results in the following behaviour during the loading (Default Social Block as an example):
[[Image(https://i.ibb.co/kmCtVVC/2-Annotation-2022-04-18-070146.png)]]
And after page is fully loaded it looks like it's intented to be:
[[Image(https://i.ibb.co/v3smntX/1-Annotation-2022-04-18-070139.png)]]
Those styles either should be output in the `wp_head` action or right before block tags.",rinart73
Needs Patch,14824,WordPress is not updating Theme option after making a theme a child theme by adding the line 'Template' to the child`s css without refreshing Theem activation,,Themes,3.1,normal,normal,,defect (bug),new,,2010-09-09T23:27:35Z,2019-06-04T21:05:56Z,"Situation:
If you have 2 Themes on a 2 sites MultiSite install (each site is using one theme) and want to make one of them a child Theme of the other, you will go to one of them and add the line 'Template: NAME OF THE PARENT THEME' and save it.
After doing so the Child Theme will not inherit any Template Files from the parent until you deactivate/activate the Child Theme again.
Although it says in the ""Themes/Appereance"" section of the Child Themes backend 'CHILD THEME NAME uses templates from PARENT THEME NAME. Changes made to the templates will affect both themes.' even before deactivating/activating the Child Theme.
Looks like the template page might be checking the style.css and not update the option.",drale2k
Needs Patch,57390,[ wp-includes/template.php - get_archive_template() ] - archive for post doesn't load the correct template,,Themes,1.5,normal,normal,Awaiting Review,defect (bug),new,,2022-12-28T09:41:31Z,2022-12-28T10:10:02Z,"Good morning everyone, while making templates for the post-type 'post' I discovered that:
The get_archive_template() function ( in wp-includes/template.php line 150 ) for a post archive returns archive.php instead of archive-post.php while the get_single_template() function for a post returns single-post.php.
In my opinion, the two results don't agree each other and the first function should work for posts as well.
Thanks in advance.
",riccardodicurti
Needs Patch,59626,admin-bar-css not following codex,,Themes,6.3.3,normal,normal,Awaiting Review,defect (bug),new,,2023-10-14T15:23:40Z,2023-10-21T00:34:43Z,"Hi!
I have noticed that when the path to the admin-bar-css is changed via `define('TEMPLATEPATH')` / `define('STYLESHEETPATH')` hook(s) it is not followed when generating `.../wp-includes/css/admin-bar.min.css` which looks for the file at the original location, ignoring any change(s).
Regards,
@brianbrown",brianbrown
Needs Patch,30105,css defining protocol,,Themes,3.8.2,normal,normal,,defect (bug),new,,2014-10-26T06:41:59Z,2019-06-04T21:12:42Z,"{{{when switching between http & https css breaks. css has the protocol defined rather than using // it uses http:// or https://}}}
to produce the problem load in apache and localhost:80, then localhost:443. one or the other will be broken.
sane:
{{{ }}}
insane:
{{{ }}}",666threesixes666
Needs Patch,51755,editor-styles theme feature naming with or without trailing s,,Themes,5.5.2,normal,normal,Awaiting Review,defect (bug),new,,2020-11-11T18:00:49Z,2023-05-30T22:29:32Z,"I tried in vain to follow the documentation about [https://codex.wordpress.org/Editor_Style editor styles]:
There is no need to explicitly [https://codex.wordpress.org/Function_Reference/add_theme_support add theme support] for this feature since support is added automatically when calling:
{{{#!php
add_editor_style();
}}}
But I can't make it work.
The only way to do it is to use both functions:
{{{#!php
// in after_setup_theme action:
add_theme_support( 'editor-styles' ); // without that call, the editor-style.css
add_editor_style();
}}}
After tried all combinations, I found that the function [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-includes/theme.php#L2037 add_editor_style], [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-includes/theme.php#L2062 remove_editor_styles] and [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-includes/theme.php#L2843 remove_theme_support] use the theme feature name `editor-style` (without the trailing `s`) where the feature is called `editor-styles` in [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-includes/theme.php#L3951 wp-includes/theme.php].
Note the default file name used in [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-includes/theme.php#L2037 add_editor_style] is `editor-style.css` (filename without `s`)
Note also that, this name also used (without `s`) in [https://core.trac.wordpress.org/browser/tags/5.5.3/src/wp-admin/includes/theme.php#L310 wp-admin/includes/theme.php].
Also it exist an [https://developer.wordpress.org/block-editor/developers/themes/theme-support/#dark-backgrounds other theme feature] called `dark-editor-style` (without `s`) which is related to `editor-styles` theme feature.
There is a ways to simplify that, like using the name `editor-style`, and `editor-styles` as an alias (or vice versa)?
To be consistant, use (with or) without the trailing `s` everywhere?",mmems
Needs Patch,55963,fontFace not in json schema,,Themes,6.0,normal,normal,Awaiting Review,defect (bug),new,,2022-06-11T06:08:18Z,2022-06-11T19:15:58Z,"I validate my `theme.json` using the json schema, as recommended in the manual: https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#developing-with-theme-json
I started using the recent `fontFace` property to add my fonts via the `theme.json`. Now the validation fails, because the current schema doesn't include the `fontFace` property: https://schemas.wp.org/trunk/theme.json Neither does the Gutenberg schema: https://raw.githubusercontent.com/WordPress/gutenberg/trunk/schemas/json/theme.json
It seems the schema update was never part of the Gutenberg PR https://github.com/WordPress/gutenberg/pull/40493 and thus not of the Core backport: [53282]
An update to the json schema is needed to reflect the changed interface.",wprediscovered
Needs Patch,55023,get_header() notice: Theme without header.php is deprecated,audrasjb*,Themes,5.9,normal,normal,Future Release,defect (bug),accepted,,2022-02-01T09:39:22Z,2024-01-15T17:31:23Z,"1) i had install 2022 theme on one of the multisite (site.alakh.co.in)
2) Overall theme works well. Just found one issue.
3) on my site's register/signup page (https://site.alakh.co.in/wp-signup.php). i see following error in header and footer.
error msg:
`Deprecated: Theme without header.php is deprecated since version 3.0.0 with no alternative available. Please include a header.php template in your theme. in .../wp-includes/functions.php on line 5516`
kindly help me in solving this issue.",kpdaa
Needs Patch,40221,switch_theme action + Live Preview = confusion,,Themes,4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-03-21T17:09:49Z,2019-03-13T04:04:10Z,"The switch_theme function has inside a hook named the same: switch_theme, it is used for theme deactivation actions, but the problem is that after you activate the theme via Live Preview - this action is executed, so can create confusion.
(switch_theme hook is for theme deactivation functions - https://codex.wordpress.org/Plugin_API/Action_Reference/switch_theme)
When we activate a theme (not via Live Preview) - then this hook is executed together with old theme, not with new theme, but when we have a Live Preview with a new theme, then this hook will be used with the theme that is inside the Live Preview, with it's files. That's why this hook is called incorrectly.
So if this is not by design and it is a bug then the fix would be to skip this hook after a theme activation via Live Preview.
",alexvorn2
Needs Patch,22414,validate_current_theme() should validate cached theme roots,,Themes,,normal,normal,,defect (bug),new,,2012-11-11T21:57:54Z,2019-06-04T21:07:55Z,"See ticket:22252#comment:14. To handle edge cases like the same theme being in multiple roots, validate_current_theme() should validate the cached theme roots, and update or delete them as appropriate.",nacin
Needs Patch,50048,wp_ajax_update_theme is broken when updating themes whose styles.css file is not located in the root,,Themes,5.4,normal,normal,Awaiting Review,defect (bug),new,,2020-05-01T16:37:59Z,2020-05-01T16:48:46Z,"Cannot update themes using wp_ajax_update_theme when templates aren't located in the theme root folder.
Sample folder structure:
{{{
/wp-content/themes/my-theme/templates/style.css
/wp-content/themes/my-theme/templates/functions.php
/wp-content/themes/my-theme/templates/index.php
}}}
The template name is defined as ""my-theme/templates"", but ""wp_ajax_update_theme"" is striping the slash so it becomes ""my-themetemplates"". This is why it's unable to locate the theme and not starting the update process.
Reference: https://core.trac.wordpress.org/browser/tags/5.4/src/wp-admin/includes/ajax-actions.php#L4118
Is this the desired behavior?",anonymized_16042088
Needs Patch,53748,wp_render_layout_support_flag assumes centered layout,,Themes,5.8,normal,normal,Awaiting Review,defect (bug),new,,2021-07-22T18:42:43Z,2021-07-22T18:42:43Z,"When applying sizes to a block, margin is also added.
https://core.trac.wordpress.org/browser/tags/5.8/src/wp-includes/block-supports/layout.php#L74
What if a theme doesn't want all content centered?",douglasjohnson
Needs Patch,49351,wp_theme_editor_filetypes filter can not remove php and css file types,,Themes,5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-02-03T08:17:10Z,2020-02-03T08:43:06Z,"I don't know why {{{wp_get_theme_file_editable_extensions}}} this method need to ensure that default types will still there.
Sometimes just won't let people modify php files or other file types to avoid an unexpected issue. (including plugin editor)
btw, this {{{wp_get_plugin_file_editable_extensions}}} method do not have that restrict.
Maybe it's a bug!?",mxp
Patch Needs Refresh,7795,Activate and Deactivate Theme hooks,,Themes,2.7,normal,normal,Future Release,enhancement,assigned,,2008-09-26T20:40:53Z,2019-03-15T00:32:18Z,"Currently, there is no standard way of checking whether of theme is activated, deactivated and uninstalled. Plugins have this capability and themes should also have the same to ensure that both share similar functionality.",jacobsantos
Needs Patch,18301,Activating a new theme on multisite is very long-winded,DrewAPicture*,Themes,3.1,normal,normal,Future Release,enhancement,accepted,,2011-07-30T23:38:48Z,2023-08-29T15:29:18Z,"Scenario:
I've just uploaded a new theme to my theme directory and I now want to activate it on a site. I head to the Appearance › Themes menu for that site and, whoops, I forgot to activate it on the network first. Now I need to:
1. Click my name in the header
2. Click Network Admin in the dropdown menu
3. Click Sites
4. Find the site and click Edit
5. Click Themes
From there I can enable the theme.
We're not done yet though. We need to traverse a minimum of two screens to get back to the Themes menu of the site (even more if the admin bar isn't enabled) in order to activate it.
Two things would make this process easier:
1. A link from the Themes screen to the Themes tab of the site in network admin, so five clicks become one.
2. The ability to activate a theme from the Themes tab of the site in network admin.
",johnbillion
Patch Needs Refresh,16396,Add a hook to the theme editor page when the write is successful,,Themes,3.1.3,normal,normal,,enhancement,new,,2011-01-28T17:29:35Z,2019-06-04T21:06:27Z,Add a filter to the end of theme-editor.php's processing when the write is successful.,scottconnerly
Needs Patch,56556,Add a link to go to the thema wordpress.org page.,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2022-09-12T09:17:44Z,2022-09-12T09:17:44Z,"When you click on details on a plugin, you get a link to the WP.org page.
With theme's, this link can't be found.",NekoJonez
Needs Patch,58952,Add search to get_the_archive_title(),,Themes,,normal,normal,Awaiting Review,enhancement,new,,2023-08-01T09:40:07Z,2023-10-27T22:09:16Z,"Add search archive title to get_the_archive_title():
{{{#!php
Posts Navigation
}}}
To sum it up:
- You can't add custom classes.
- There is no way to add wrapping ``.
- I get lost when trying to figure out Singular-post, posts and comment pagination.
With that said I'm sure there is a way to add all these things in backwards compatible way but I need to look the code first before I can suggest something.
At first look pagination functions seems messy:)
",sami.keijonen
Needs Patch,53406,Custom css,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2021-06-15T09:18:45Z,2021-06-15T13:06:15Z,"Hi, I am relatively new to WP development and am helping out on styling a couple sites. I see WP has a text box for adding in custom CSS. this isn't ideal as that css is then written into the page. Changing the theme css is risky as when the theme updates then all the changes are lost.
It would be great if there was a custom css file independent of the theme and added into the header after the theme and plugin css files. I am currently adding in these files manually however am not sure if the theme will overwrite them. It means requires gaining access to the server in order to create the css files which is not ideal.
Ideally It would be great to have 4 css files that form part of WP and are independent of the theme. 1 for the home page, 1 for pages, 1 for posts and one for all. That way it is easy to customise theme and plugin css for different parts of the site.",lupussolaris
Needs Patch,55756,Deletion of broken themes,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2022-05-18T07:27:00Z,2022-05-18T14:55:50Z,"When themes fail during installation, they severally appear on the theme installation page. A user cannot mass delete these broken themes. They will need to be deleted one by one.
If they had check boxes like posts, it would be quicker to delete many orall at once.",martiniwebb
Needs Patch,10432,"Dynamic classes for current blog post item, current term item",,Themes,2.8.1,normal,normal,,enhancement,new,,2009-07-17T14:35:33Z,2019-06-04T21:05:34Z,"wp_list_pages() produces a class .current_page_item for the page you are currently viewing. This makes it possible to style the current page item different from the other page items in the list.
But there are several other places the same functionality would come in handy: There should be equivalent ways to style the current blog post item in the Recent Posts widget, the current category in wp_list_categories(), and the current tag in wp_tag_cloud('format=list').",dnusim
Needs Patch,51518,Enhancement: Show list of previously active themes,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2020-10-14T03:28:05Z,2020-10-14T13:33:31Z,"When someone is trying out new themes - it is possible they would activate a number of them to see what they like. This can make it hard to go back to a previous theme if they don't remember the name specifically.
Would it be possible to somehow have a log of previously active themes - so user's could reactivate them?",jordesign
Needs Patch,33123,Filter on theme mod default value,,Themes,4.3,normal,normal,Awaiting Review,enhancement,new,,2015-07-25T15:56:28Z,2018-06-23T19:15:25Z,"For those of us using theme mods for storing theme settings, we often need a method for modifying the default theme mod when building child themes. For example, I might build a Christmas-styled child theme and modify the parent theme's default ""primary"" color to green. The only way this is possible is if the parent theme does something like this:
{{{
$primary = get_theme_mod( 'color_primary', '' );
add_filter( 'theme_mod_color_primary', 'parent_color_primary', 99 );
function parent_color_primary( $hex ) {
return $hex ? $hex : '#00000';
}
}}}
Then, the Christmas child theme can hook in earlier and modify this if needing to change the default like so:
{{{
add_filter( 'theme_mod_color_primary', 'child_color_primary', 10 );
function child_color_primary( $hex ) {
return $hex ? $hex : '#cc0000';
}
}}}
That's kind of a janky way to do things. It'd be far easier to have a filter on the default passed into `get_theme_mod( $mod, $default )`. Something like:
{{{
$default = apply_filters( ""theme_mod_{$mod}_default"", $default );
}}}
In this scenario, the parent theme merely needs to do this:
{{{
$primary = get_theme_mod( 'color_primary', '#000000' );
}}}
And, the child theme:
{{{
add_filter( 'theme_mod_color_primary_default', 'child_color_primary' );
function child_color_primary() {
return '#cc0000';
}
}}}
I'm attaching a patch that will provide this filter hook.",greenshady
Needs Patch,35052,Filter themes by language translations,,Themes,,normal,normal,,enhancement,new,,2015-12-13T17:59:39Z,2019-06-04T21:18:31Z,"Since themes can now be translated in a fairly easy way, we should incorporate a filter in the WP admin UI that lets the users search only for themes which are translated to their language of choosing.
We should probably agree on a % value treshold after which a theme will show up in the results (likely somewhere around 50% - 70% completion).",eclare
Needs Patch,41690,Fix missing assignment of page templates on theme switch,,Themes,,normal,normal,Future Release,enhancement,new,,2017-08-21T17:32:54Z,2017-08-21T20:14:56Z,"Following up on #39692 and #39693, let's see if we can also save page template mapping when someone switches themes.
For example:
- Variations on ""homepage"" or ""front page""
- Variations on ""fullwidth""",melchoyce
Needs Patch,32326,Improve Support for Structured Data,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2015-05-09T14:50:00Z,2019-10-13T00:52:06Z,"There has been discussion before on various types of structured data. WordPress has limited support for microformats and it is a long-standing part of WordPress.
New standards for structured data continue to appear, and there have been some proposals in support. However, different people want support for different things. I think there is a solution with more general appeal.
body_class and post_class add classes to the body and post containers.
What if they were superseded by two new functions with a broader scope?
body_attributes and post_attributes which could add any attribute from a provided array into the body and post containers? Most of the structured data works on an attribute of the tags it is attached to, be it class or property or otherwise.
The body_class and post_classes continue to work as they always have.
Newer themes could use the attributes function, which could remove hentry adding by default, for example, and transfer control of structured data back to the theme.
There is also the possibility, if it isn't going too far, of adding a similar function for the content container.
",dshanske
Needs Patch,37461,Introduce get_the_title_attribute() to wrap the_title_attribute( 'echo=0' ),,Themes,4.6,normal,normal,,enhancement,new,,2016-07-25T17:10:06Z,2019-06-04T21:25:02Z,"the_title_attribute( 'echo=0' ) is ugly and annoying given that all the other the_* template tags have corresponding get_* functions.
Patch adds get_title_attribute() as a simple wrapper function.",sillybean
Needs Patch,13691,Make get_template_part() accept multiple template names,,Themes,,normal,normal,,enhancement,new,,2010-06-02T03:19:34Z,2019-06-04T21:05:47Z,"This enhancement allows get_template_part() allows to pass several template names, to work in the same way as: locate_template()
so, you could call,
get_template_part( 'loop', array('category', 'taxonomy', 'archive') );
$names are passed by order of priority.",wjm
Needs Patch,59139,"Marketing / ""fairness"" : Change ""Classic Themes"" to ""Template Themes""",,Themes,,normal,normal,Awaiting Review,enhancement,new,,2023-08-18T12:03:39Z,2023-09-04T20:54:12Z,"With total respect to the term ""Classic themes"", I think it feels old fashioned, which is a bit unfair to the power involved behind the scenes.
""Template Themes"" (WPTT) would be a recognition of WordPress pioneering a long time ago.
A tribute to it's visionary approach at that time.
And a tribute to its relevance and pioneering today, where we see so many tools and solutions being created with the same intent but not so powerful - if some recognition and dedication would be implemented to maintain it a state of the art solution.
FSE is super powerful.
PHP templating is super powerful.",ridesirat
Needs Patch,43597,Modify template-loader engine,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2018-03-21T09:54:15Z,2019-10-04T21:01:33Z,"Hi, I think it would be useful if the functionality of the template-loader.php file that determines the template to load were added directly to the template_include filter with priority 1, so that it will be accessible using a function.
I have found the need in some projects in which I load the WordPress core from an external application, since once the core is loaded, it is necessary to include the template_loader.php file and it is not possible just to obtain which would be the template to load (and not ley ir load).",chespir
Needs Patch,30797,New function for parent theme stylesheet uri,obenland,Themes,4.4,normal,normal,,enhancement,assigned,,2014-12-20T18:36:39Z,2019-06-04T21:13:20Z,"= Request
I would like to propose a new function to fetch the parent theme. I have attached a patch.
{{{
/**
* Retrieve URI of current parent theme stylesheet.
*
* The stylesheet file name is 'style.css' which is appended to {@link
* get_template_directory_uri() stylesheet directory URI} path.
*
* @since 4.2.0
*
* @return string
*/
function get_parent_stylesheet_uri() {
$template_dir_uri = get_template_directory_uri();
$parent_stylesheet_uri = $stylesheet_dir_uri . '/style.css';
/**
* Filter the URI of the current parent theme stylesheet.
*
* @since 4.2.0
*
* @param string $parent_stylesheet_uri Stylesheet URI for the current parent theme.
* @param string $template_dir_uri Stylesheet directory URI for the current parent theme.
*/
return apply_filters( 'parent_stylesheet_uri', $parent_stylesheet_uri, $template_dir_uri );
}
}}}
= Background
The reason for adding this was there was a discussion how child themes should load the parent styles.css. Using @import is not best solution. The solution would be for the parent themes to load the styles for the child theme. I created a [https://github.com/Automattic/_s/pull/638 PR] to do it in _s. The code looked like this but I realized this was not the best method. The problem with this method is that it is not possible to load a stylesheet between the parent theme and child theme as the order changes when you activate a child theme.
My temporary solution for a theme would be add the function `_s_get_parent_stylesheet_uri()` to the theme like this: https://github.com/grappler/_s/commit/3fd84b4179f727bb24a32bfd23fcef9be79033f4
By adding `get_parent_stylesheet_uri()` to WordPress core all themes could use this function and the code in the theme would look like this.
{{{
function _s_scripts() {
wp_enqueue_style( '_s-style', get_parent_stylesheet_uri() );
if ( is_child_theme() ) {
wp_enqueue_style( '_s-child-style', get_stylesheet_uri() );
}
}
add_action( 'wp_enqueue_scripts', '_s_scripts' );
}}}
= Theme Review Requirements
On thing to take into account is that the TRT requires that themes use the function `get_stylesheet_uri()`. The requirement needs to be changed when this function gets added.",grapplerulrich
Needs Patch,51479,Notifications in case of a broken theme,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2020-10-08T10:13:10Z,2021-01-22T11:49:37Z,"1. If the current theme is broken or does not exist, WordPress doesn’t apply automatically another theme until someone will visit “Themes” in admin and are not sending the notification to Administration Email Address either. So, the site owner could have no idea that something is wrong.
2. If someone is visiting the Dashboard, there is no information that something is wrong with the theme, even if the frontend isn’t working normally already.
3. The message “The active theme is broken. Reverting to the default theme.” is marked green. Possibly it needs to be splitted into two messages - error and warning.
4. If there is an Error “Stylesheet is missing.”, the message “The active theme is broken. Reverting to the default theme.” is also present above the error, but actually is nothing happening (it’s good behaviour in comparison to what was previously when a site could have been working fine without style.css and was deactivating a theme after you visit Themes in the admin). https://yadi.sk/i/FtWLhEyBLx2qSQ So, the second message is misleading and needs to be removed in the case where the reverting isn't happening.
",oglekler
Needs Patch,56247,Page editor for the page assigned as Front Page does not indicate this status,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2022-07-19T00:42:55Z,2022-07-19T00:42:55Z,"This is an issue that has existed in WordPress prior to FSE, when a front page PHP template or widget based homepages were used in themes.
The issue appears more egregious however, now that FSE is intended to allow editing of all portions of the site.
If I have a static page set to the front page of the site, my expectation is that clicking ""Edit Page"" in the admin bar would take me to the page that displays that content. Instead, when a theme has a front page template, I am seeing content that will not display on the actual site frontend.
My suggestion is some form of notice to the user that they are not editing in the actual place that content is displayed. They could also be taken directly to the front page template of the ""Edit Site"" portion of the dashboard.
I imagine that there would be a variety of edge cases to work around here, as well as related issues such as opening the editor to the proper template, as suggested in #56246",wolfpaw
Patch Needs Refresh,40108,Pagination Enhancement wp_link_pages(),,Themes,,normal,normal,Awaiting Review,enhancement,new,,2017-03-11T01:39:00Z,2018-01-25T23:34:23Z,"
Current implementation of the function is not well suited for posts containing 10+ pages, this creates usability issues for desktop and especially mobile users. Most popular themes which rely on this built-in function are affected. Popular hosting providers such as Wordpress.com do not allow 3rd party plugins or any enhancements to work around this issue.
'''Example:'''
[[Image(http://i.imgur.com/yqLOfD0.jpg)]]
'''Goal:'''
Provide theme creators posibility to reduce the number of visible page links and enhance CSS theming by wrapping the current page in CSS selectable tag, allowing improved usability on mobile devices and reducing the reliance of wider community on 3rd party plugins or custom code.
'''Solution:'''
Accept additional 'mixed' value for the [next_or_number] parameter and create a helper parameter to control the max number of outputted page links. Wrap the current page in a to allow CSS theming.
The looks/functionality as per the screenshot above can be achieved with only ~20 additional lines of code (below)
It accounts for any edge cases and ensures full backwards compatibility, however, additional testing is needed.
'''Enhanced wp_link_pages Function:'''
{{{#!php
'' . __( 'Pages:' ),
'after' => '
',
'link_before' => '',
'link_after' => '',
'next_or_number' => 'number',
// new param for controling max link number in 'mixed' mode
'navwidth' => '3', //number of links displayed before and after current page
'separator' => ' ',
'separator' => ' ',
'nextpagelink' => __( 'Next page' ),
'previouspagelink' => __( 'Previous page' ),
'pagelink' => '%',
'echo' => 1
);
$params = wp_parse_args( $args, $defaults );
/**
* Filters the arguments used in retrieving page links for paginated posts.
*
* @since 3.0.0
*
* @param array $params An array of arguments for page links for paginated posts.
*/
$r = apply_filters( 'wp_link_pages_args', $params );
$output = '';
if ( $multipage ) {
if ( 'number' == $r['next_or_number'] ) {
$output .= $r['before'];
for ( $i = 1; $i <= $numpages; $i++ ) {
$link = $r['link_before'] . str_replace( '%', $i, $r['pagelink'] ) . $r['link_after'];
if ( $i != $page || ! $more && 1 == $page ) {
$link = _wp_link_page( $i ) . $link . '';
}
/**
* Filters the HTML output of individual page number links.
*
* @since 3.6.0
*
* @param string $link The page number HTML output.
* @param int $i Page number for paginated posts' page links.
*/
$link = apply_filters( 'wp_link_pages_link', $link, $i );
// Use the custom links separator beginning with the second link.
$output .= ( 1 === $i ) ? ' ' : $r['separator'];
$output .= $link;
}
$output .= $r['after'];
} elseif ( $more ) {
$output .= $r['before'];
$prev = $page - 1;
if ( $prev > 0 ) {
$link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '';
/** This filter is documented in wp-includes/post-template.php */
$output .= apply_filters( 'wp_link_pages_link', $link, $prev );
}
/**
*Start of New Code for 'mixed' navigation mode
*/
// Output number of links equal to $navwidth before current page
if ( 'mixed' == $r['next_or_number'] ) {
For ( $i = $page - $navwidth; $i < $page; $i++) {
if ( $i > 0) {
$link = _wp_link_page( $i ) . $r['link_before'] . str_replace( '%', $i, $r['pagelink'] ) . $r['link_after'] . '';
$link = apply_filters( 'wp_link_pages_link', $link, $i );
// Use the custom links separator beginning with the second link.
$output .= ( 1 === $i ) ? ' ' : $r['separator'];
$output .= $link
}
}
// Output current page within tags for enhanced styling capability
if ( $prev ) {
$output .= $r['separator'];
}
$output .= $r['link_before'] . ('') . str_replace( '%', $i, $r['pagelink'] ) . (' ') . $r['link_after'];
// Output number of links equal to $navwidth after current page
For ($i = $page + 1; $i <= $numpages; $i++) {
$link = _wp_link_page( $i ) . $r['link_before'] . str_replace( '%', $i, $r['pagelink'] ) . $r['link_after'] . '';
$link = apply_filters( 'wp_link_pages_link', $link, $i );
$output .= $r['separator'] . $link;
}
}
/**
*End of New Code for 'mixed' navigation mode
*/
$next = $page + 1;
if ( $next <= $numpages ) {
if ( $prev ) {
$output .= $r['separator'];
}
$link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '';
/** This filter is documented in wp-includes/post-template.php */
$output .= apply_filters( 'wp_link_pages_link', $link, $next );
}
$output .= $r['after'];
}
}
/**
* Filters the HTML output of page links for paginated posts.
*
* @since 3.6.0
*
* @param string $output HTML output of paginated posts' page links.
* @param array $args An array of arguments.
*/
$html = apply_filters( 'wp_link_pages', $output, $args );
if ( $r['echo'] ) {
echo $html;
}
return $html;
}
}}}
Let me know if I can further help to get this be pushed into the next release.
Martin
[https://martinshreder.com]
",mshumacher
Needs Patch,41204,Placement of wp_redirect() in template,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2017-06-29T13:15:03Z,2017-07-12T18:32:02Z,"It doesn't say on [https://developer.wordpress.org/reference/functions/wp_redirect/ | this page] where in template file should wp_redirect() function be called. If placed in wrong place, there could be created confusion and impression that function doesn't work.
So, it should be placed '''before''' get_header();
In case page is redirected only under certain condition, it would be something like:
{{{
/**
* Redirect only if this condition is met
*/
if ( certain_condition ) {
wp_redirect( $location );
exit;
}
/**
* Otherwise render the page
*/
get_header();
}}}
",milana_cap
Needs Patch,30729,Rework Theme Install and Preview Flow in wp-admin,,Themes,3.8,normal,normal,Future Release,enhancement,assigned,,2014-12-16T14:37:48Z,2020-12-23T19:47:34Z,"Consider making the ""Preview"" the primary button instead of ""Install"" in theme-install.php.
See #26899.",iseulde
Needs Patch,36971,Show readme.txt from Themes,SergeyBiryukov*,Themes,,normal,normal,Future Release,enhancement,accepted,,2016-05-29T23:53:20Z,2022-11-09T19:39:32Z,"The readme.txt should be used to document any dependencies of a theme. But if we install the theme from inside WordPress there is no way to see the readme.txt for an unexperienced user.
For example the Sela theme needs Jetpack to show Testimonials.
See readme.txt: https://themes.svn.wordpress.org/sela/1.0.9/readme.txt
But the theme page is not mentioning that (https://wordpress.org/themes/sela/) and there is no direct link or presentation of the readme.txt with this essential information on the theme page or inside WordPress.
I suggest showing the readme.txt somewhere or use a system like https://github.com/TGMPA/TGM-Plugin-Activation to give this information to the user.",zodiac1978
Needs Patch,35164,Singular body class and main post post class,,Themes,,normal,normal,,enhancement,reviewing,,2015-12-19T11:53:29Z,2019-06-04T21:18:36Z,"I think it would be pretty useful to be able to style all singular posts with one selector. I thought it might be a good idea to output "".singular"" using the `body_class()` function. This would allow people to target all singular pages.
In addition, detecting the main post on the page would be useful if someone had some related posts on a singular page. So the class "".main-post"" could by added using the `post_class()` function.
I'm using this method via hooks in a theme so I can say: `.singular .main-post {}` which allows me to style posts and pages with one selector and give a default look to all custom post types. ",danielpataki
Needs Patch,54533,State more clearly that an active theme can't be deleted,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2021-11-29T16:18:19Z,2021-11-29T18:54:42Z,"A post in the forums https://wordpress.org/support/topic/theres-no-delete-button/ by @dmcohen pointed out a thing that should be better shown:
In wp-admnin/themes.php when a user with capability delete/install themes (i.e. usually an administrator) hits the ""Theme details"" button that is visible on hover and opens the theme details pop-up, they'll see the ""Delete theme"" link in the pop-up. But for the currently active theme (and its parent theme, where applicable) that link is ""missing"".
Suggestion: Instead of nothing, show a short message ""This theme is currently active and therefore cannot be deleted.""",tobifjellner
Needs Patch,42711,Support for symlinked themes in the themes folder,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2017-11-27T12:38:34Z,2017-11-27T12:38:34Z,"Symlinking themes to the theme directory does not work.
This feature is more important than ever, since developers usually use various build tools.
The repository – almost everytime – looks something like this:
{{{
.
├── build
├── src
├── package.json
└── readme.md
}}}
The build folder contains the generated theme. Currently it is necessary to use a script to copy the build files to the Wordpress theme folder, after a successful build.
It would be much easier to symlink the build folder to the WP themes directory. This way you keep your repository and the WordPress themes folder clean.",Afterlame
Needs Patch,22810,Support for theme changelogs,,Themes,,normal,normal,Future Release,enhancement,new,,2012-12-07T14:39:22Z,2022-02-24T03:43:23Z,"Plugins' changelogs are shown in the WordPress plugin repository in tabs, eg. http://wordpress.org/extend/plugins/events-manager/changelog/.
Plugins' changelogs are also linked to when viewing available updates in WP-admin, so the siteadmins can know if the update could mess with their customizations.
Theme changelogs are not visible in either place. They should be supported in both places. Also http://codex.wordpress.org/Theme_Review should be updated to reflect that the theme changelogs are much recommended if not mandatory to use and to specify the exact format for them. Currently it uses language that is not clear for those who don't speak English as their first language: ""In lieu of..."" and then ""...Themes are recommended to include a changelog"", which doesn't let the theme author know what format should the changelog be in.
At the moment I've seen changelogs for themes in different formats, but none of them is supported.
Summary of the issues:
1. Add support for theme changelogs on https://wordpress.org/extend/themes/ theme pages in tabs.
2. Add support for theme changelogs in wp-admin theme list views.
3. Clarify Theme Review codex page on the supported format(s) and use more simple English than ""in lieu of"".",Daedalon
Needs Patch,55823,The Theme Details Page Options Need to be Streamlined,,Themes,6.0,normal,normal,Awaiting Review,enhancement,new,,2022-05-25T11:41:59Z,2022-05-25T17:59:01Z,"What problem does this address?
It is difficult for new users to spot all the options available to manage a theme on the theme details page.
What is your proposed solution?
See the [https://core.trac.wordpress.org/attachment/ticket/55823/55823-proposal.png attached image].
Put all theme management options in a single location in the UI instead of having them multiple locations. This will help users locate the option they are looking for quicker. The suggested area of placement for the options is the blue area in the image.
Reference:
First proposed in [https://github.com/WordPress/gutenberg/issues/41247 Gutenberg] but suggested to move to Trac for Core consideration.",deborah86
Needs Patch,49920,Theme directory uri on multisite website,,Themes,5.2.5,normal,normal,Awaiting Review,enhancement,new,,2020-04-16T13:15:21Z,2020-05-27T17:58:26Z,I've noticed that on a subsite in the multisite the url to files in the current theme directory all start with the url of the mainsite (blog 1). I would like to request that the function `get_template_directory_uri` updates the url to the current subsite. Since the same files are also accessible from the path that starts with the current subsite subdomain. ,ReHo20
Needs Patch,28122,Themes - RTL: add support for fully mirrored css files,,Themes,,normal,normal,,enhancement,new,,2014-05-04T19:51:57Z,2019-06-04T21:11:14Z,"RTL support in themes is achieved through the creation of an rtl.css file, which is loaded (if it exists) in addition to the main theme css file. The rtl.css file should overwrite only those css properties from the main file that affect the horizontal layout.
The creation of an rtl.css file is mostly a manual process, and keeping it up to date with the main theme style.css file is a difficult task.
I propose that WordPress support loading of fully mirrored css files instead of the original theme css file, in a similar way to what was done for core/wp-admin css files in #24977.
'''How will this work?'''
- '''Backwards compatibility:''' If an {{{rtl.css file}}} is found in the theme root, it will be loaded as usual (in addition to {{{style.css}}}).
Otherwise
- Load {{{./rtl/style-rtl.css}}} if it exists '''instead''' of {{{style.css}}}
- For any additional css file in the theme folder enqueued using wp_enqueue_style (i.e. {{{css/grid.css}}}), look for a filename-rtl.css file in an rtl subdirectory (i.e {{{css/rtl/grid-rtl.css}}}) and load it if it exists instead of the original file.
While theme developers will be able to chose their tool of choice to create an rtl css file, we'll make it easier for them by updating grunt-cssjanus to work when run in a theme directory.",yoavf
Needs Patch,53356,"Themes admin page: make theme details, active, and preview links always visible",Travel_girl,Themes,,normal,normal,Future Release,enhancement,assigned,,2021-06-07T23:21:42Z,2024-01-29T20:21:48Z,"Follow up from #52649
In ticket 52649, we fixed a number of accessibility issues in the theme navigation. In the course of discussing that, there was a proposal to modify the layout so that the three action buttons for a theme were always visible, without obscuring the theme screenshot.
Since it was beyond the scope of the original ticket, we opted to complete that ticket and open the design issue as a new ticket.
See:
https://core.trac.wordpress.org/ticket/52649#comment:15
https://core.trac.wordpress.org/ticket/52649#comment:27
",joedolson
Needs Patch,53523,Themes can't be bulk edited.,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2021-06-26T16:37:48Z,2022-06-06T13:29:53Z,"On the plugin screen, you have a nice list of every plugin with a handy checkbox to put them all on auto-update or delete them in bulk.
This isn't possible in on the themes page while both of these things would be kind of handy. Especially for dev sites. ",NekoJonez
Needs Patch,12839,Themes should be sandboxed on activation to prevent fatal errors,,Themes,3.0,normal,normal,Future Release,enhancement,new,,2010-04-04T06:16:25Z,2021-01-02T20:23:28Z,"I've just made a child theme of TwentyTen by copying the folder over, renaming, and adding a Template: header to the style.css file.
Upon activation, I've been thrown to a page with a fatal error due to redefining a twentyten function.
Ideally, theme activations should be passed through a sandbox style activation the same as plugins.",dd32
Needs Patch,31924,Use add_theme_support( 'more-tag' ) to control display of More Tag button in TinyMCE,,Themes,,normal,normal,,enhancement,new,,2015-04-07T20:39:08Z,2019-06-04T21:15:00Z,"The More Tag (i.e. ``) can be inserted with a button that is in the top row of the TinyMCE editor by default. However, it's possible to build a theme where the More Tag has no functionality: a theme that uses `the_excerpt()` on all archive pages, the page for posts, and search results.
It's a bad user experience for WordPress to display a button if it cannot have any effect on the display of content. Therefore, I think the best way to handle this would be to add a new `add_theme_support()` value of `more-tag`. This would still let themes opt-in any time it makes sense, but wouldn't clutter up the editor with pointless buttons.",mrwweb
Needs Patch,48241,Using `add_theme_support( 'custom-background' )` enables both background color and background image.,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2019-10-07T18:30:09Z,2019-10-30T08:10:47Z,"Both custom color and custom image options for appear in the customizer when `add_theme_support( 'custom-background' )` is defined. In some instances it is designer preference to have no custom color option or no custom image option. Currently it is not possible to have one or the other - it is both or none.
The code responsible for this is here: https://github.com/WordPress/wordpress-develop/blob/5.2/src/wp-includes/theme.php#L2535-L2545
It could be adjusted to first detect a newly added default value before adding the support. That way would keep it working in a backwards compatible way while allowing others to pick and choose which their theme supports going forward.",williampatton
Needs Patch,60644,"When theme installation fails, add a link to return to theme installer page",,Themes,,normal,normal,Future Release,enhancement,reopened,,2024-02-27T05:51:47Z,2024-02-27T10:52:28Z,"When for any reason a theme installation fails (If the user uploads a zip file other than the theme zip file) you will be confronted with an error and there is no way out.
Screenshot: https://nimb.ws/OK9mRU1
Of course, you can use the browser's built-in back button, but still it would be nice to offer an additional link ""Go to Theme Installer"" (leading to wp-admin/theme-install.php)",pmbaldha
Needs Patch,53108,`get_theme_file_uri()` fails with query params,,Themes,5.7.1,normal,normal,Awaiting Review,enhancement,new,,2021-04-29T01:18:08Z,2021-04-29T02:44:02Z,"`get_theme_file_uri()` fails to locate a file if it is supplied with any query params and incorrectly falls back to returning the parent theme's path to the file, including the supplied query params. This prevents the ability to use a bundler's versioning without adding complexity to registering scripts and styles.
{{{#!php
$name ]) )
}}}
Then, inside `header.php` it would be possible to access the header name like this:
`$header_name = $args['__name']`",Jules Colle
Needs Patch,51895,theme_root filter for WP_Theme::get_files,,Themes,,normal,normal,Awaiting Review,enhancement,new,,2020-11-29T13:21:09Z,2020-11-29T13:21:09Z,"WP_Theme::get_files() is using a class method that doesn't pass the value through the theme_root filter from wp-includes/theme.php
As a result WP_Theme::get_post_templates() is targeting the default theme_root regardless of the filtered value. ",rafasashi
Needs Patch,51072,Add action hook after theme skip links,sarahricker,Themes,5.5,normal,normal,Future Release,feature request,assigned,,2020-08-20T01:48:13Z,2020-10-16T14:42:38Z,"Not sure if this is the right place. My feature request is to add a default hook in themes that is after skip links. I was recently working on a code project where I had a widget loaded in wp_footer but had no idea how to dynamically add a trigger link in the header for screen readers. If I used jQuery to add it before the first link, it could come before skip links and this is bad UX. If I added it after the first link, there could be multiple skip links creating a mess or maybe the theme doesn't have skip links, it could insert after a logo. There are also themes with top navigation, etc. that makes this rather difficult to figure out how to dynamically insert a trigger link.
If theme guidelines were updated to require a hook after skip links, I could simply add my trigger link like this.
{{{#!php
Trigger Link';
}); ?>
}}}
In the header.php file, it might look something like this.
{{{#!php
Skip to main content';
do_action( 'theme_after_skip_links' );
?>
}}}
Hopefully others will agree that there are situations this could be really useful to plugin and even child theme developers.
Thanks.",alexstine
Needs Patch,42309,Add page-numbers CSS class to wp_link_pages generated links,,Themes,4.9,normal,normal,Awaiting Review,feature request,new,,2017-10-23T01:28:38Z,2018-04-17T20:28:50Z,"While creating my own theme, I were annoyed by the differences between the functions wp_link_pages() and the_posts_pagination().
To simplify the styling of the pagination, I would like to suggest some changes to ensure some unification as stated below.
----
For example, equal styling currently works if you use the functions as follows:
{{{#!php
// pagination on singular pages
wp_link_pages (array (
'before' => '',
'after' => ' ',
'link_before' => '',
'link_after' => ' ',
));
//pagination on Posts page
the_posts_pagination ();
}}}
Resulting HTML markup
{{{
1
2
3
screen-reader headline
}}}
Sample CSS styling:
{{{
/* all page numbers */
nav.pagination {
text-align: center;
}
nav.pagination .page-numbers {
display: inline-block;
padding: 0.25em;
margin: 4px;
}
/* current page */
nav.pagination .page-numbers.current, nav.pagination > span.page-numbers {
border-bottom: solid 1px #003e41;
}
}}}
Following circumstances: For singular pages, you have to add
a) an additional container (okay)
b) a (hmm)
c) unnecessarily confusing CSS rules (!)
just to achieve equal styling...
----
BUT: If we would change the wp_link_pages() to output links (like the_posts_pagination()) like this:
{{{
}}}
and that the current page is wrapped in an extra container
{{{
}}}
and that the whole pagination is wrapped in a container (like the_posts_pagination())
{{{
}}}
styling would be easier and more intuitive:
{{{#!php
// pagination on singular pages
wp_link_pages ());
//pagination on Posts page
the_posts_pagination ();
}}}
{{{
/* all page numbers */
nav.pagination {
text-align: center;
}
nav.pagination .page-numbers {
display: inline-block;
padding: 0.25em;
margin: 4px;
}
/* current page */
nav.pagination .page-numbers.current {
border-bottom: solid 1px #003e41;
}
}}}
I agree, that this might break the compatibility with existing stylesheets, but I'd appreciate it if there was a nice solution.
Thanks in advance.",okaestne
Needs Patch,55879,Add the Ability to Allow/Disallow Auto-Update for Multiple Themes on the Theme Page,,Themes,6.0,normal,normal,Awaiting Review,feature request,new,,2022-05-30T20:31:23Z,2022-06-02T15:15:11Z,"What problem does this address?
Right now, a user has to click on each individual theme to allow auto-update. If the user has multiple themes installed, this can be tedious.
What is your proposed solution?
My proposed solution is to have the option to allow/disallow auto-update for multiple themes on the theme page.
See original issue here: https://github.com/WordPress/gutenberg/issues/41250
",deborah86
Needs Patch,53412,Consider allowing themes to include block directory block references,,Themes,,normal,normal,Awaiting Review,feature request,new,,2021-06-15T15:33:12Z,2021-06-15T21:32:12Z,"Important note: this is not a plugin dependencies ticket!! But maybe a little bit.
Imagine that you've found a perfect-looking single page theme for your establishment and the screenshot or demo shows a map in a really convenient spot, but then you go to edit that page or template and you have no idea where exactly that map should go. Everything else looks just right thanks to patterns and other core blocks, but that pesky map needs a block from the block directory. How could core help users discover blocks that are recommended/especially styled by a given theme?
In my imagination, this is something like showing a placeholder prompting the editor to install/activate the block and why they would want to do that (or delete the block if they don't need it). But that's just one person's imagination - this would definitely benefit from exploration and positing other relevant scenarios (even/especially ones that would disprove this as a helpful feature).
I believe this could apply to both FSE/block-based themes within template areas as well as all themes with starter content, though it may make sense to narrow the initial support. Also, we may/probably want to support theme demos on .org showing blocks from the block directory to go along with this, if we go this route.",helen
Needs Patch,43352,Make html5 standard rather than opt in for theme development,,Themes,,normal,normal,Awaiting Review,feature request,new,,2018-02-19T11:36:10Z,2019-01-16T06:42:42Z,"Currently when you want to have WordPress output valid HTML5 code for certain elements ('search-form', 'comment-form', 'comment-list', 'gallery', 'caption') you have to specifically add support in functions.php via add_theme_support( 'html5', […]) to opt in for use in your theme.
I propose to make these 5 elements HTML5 by default, HTML5 support in modern browsers are more than adequate and most, if not all, modern themes use HTML5 code. The HTML5 standard is also stable.
WordPress should output these elements in HTML5 by default rather than having developers opt in, by now the situation should be the other way around, you should opt out if you for some unknown reason would rather not have HTML5 code.",kkalvaa
Needs Patch,59515,Multiple color palettes and font pairs,,Themes,6.3.2,normal,normal,Awaiting Review,feature request,new,,2023-10-02T13:14:07Z,2023-10-02T19:23:41Z,"I have some suggestions for block themes.
We can create a single color palette for a theme. When you want to change the color palette, a custom palette can be created.
So why don't themes have multiple predefined color palettes? Maybe you could say that style variations support this feature. Yes, partially. But style variations have many theme features; colors, fonts, spacing, etc. Users may only want to change the color palette. The theme's colors change with a single click. Users can add custom colors if they wish.
Themes can also have predefined font pairs. (Combination of two fonts)
Theme developers need to define keywords for color palettes and font pair to achieve both of these options. For example, the keywords ""primary"", ""secondary"", ""tertiary"", ""foreground"", ""background"" are reserved for color palettes. Or for font pairs ""primary font"", ""secondary font""...
This way users replace colors or font pairs with predefined ones.",arkenon
Needs Patch,39076,Reinstate Vimeo support for external header videos,,Themes,4.7,normal,normal,Awaiting Review,feature request,new,,2016-12-04T21:07:36Z,2021-08-04T22:50:51Z,Re: [39165] and [39128]. I've been able to embed Vimeo videos from non-pro accounts on Squarespace's site headers just fine (example: https://hanashapiro.com). It appears to embed an iframe inside a header ``. Should be doable since we already embed an `
` inside a header `
` for the background image.,nonproftechie
Needs Patch,33472,Templating Engine,,Themes,4.4,normal,normal,Awaiting Review,feature request,new,,2015-08-20T21:01:36Z,2021-04-28T18:13:54Z,"Templating engines are being used everywhere, not just in other languages, but nearly all other PHP frameworks and CMS's that are actively maintained. Even Drupal 8 will be rolling out [https://www.drupal.org/theme-guide/8/twig Twig integration].
I wasn't able to find an actual discussion about this on Trac, so I definitely wanted to open the discussion. Should WordPress integrate a templating engine?
The benefits are obvious:
* Automatic escaping. No more escaping all the things every single time.
* Easier to read. This is sometimes down to personal opinion, but I and many others do find templating engines much easier to read than PHP templates
* Better separation of logic from templates. This isn't a guarantee, and depends on how strict the templating engine is, but it does help reinforce this.
Cons:
* More to learn. I don't know '''how much''' more, but it is something to take into account
* Speed? I haven't looked up benchmarks lately, but another thing to potentially keep in mind
* Backwards compatibility. However this could be mitigated if plugins/themes had the option to use straight PHP or the templating engine.
There are many options available, Smarty isn't widely used anymore, but there is (http://twig.sensiolabs.org/ Twig) which is probably the most adopted, and (http://laravel.com/docs/5.1/blade Blade) has become rather popular.",KalenJohnson
Needs Patch,58542,Theme.json / Restricting general settings like font sizes on blocks generates a lot of duplication,,Themes,,normal,normal,Awaiting Review,feature request,new,,2023-06-15T10:21:56Z,2023-06-15T10:21:56Z,"Hello.
In my theme.json file, let's say I declare 20 font sizes in my settings / typography / fontSizes section. As per the official schema, it is an array of objects with a size, slug, and name property. I've seen a project declaring 20 of those.
Then I would like to restrict core/paragraphs to use only 5 of them, and core/headings to use only three.
With the current theme.json implementation, I need to declare a settings / blocks / ""core/paragraph"" object, then copy / paste the 5 font sizes objects I allow to my user to use with paragraphs.
The current problems I face are as follows :
- It generates a lot of code duplication
- The two declarations are not linked together, which can be used as an advantage, but also seen as an inconvenient, especially when adjusting main settings, which would then not be updated in blocks.
Proposal :
- Add a new attribute to the blocks settings, like ""restrict"", ""include"" or ""exclude"" which would be an array of slugs coming from the main settings declaration.
- It could work with color palettes, fontSizes, spaces, or any array that supports slugs.
- This way when declaring block specific settings, we could have less duplication, and a synchronization with main settings.
Example:
{{{#!json
{
""blocks"": {
""core/button"": {
""typography"": {
""fontSizesInclude"": [""sizeSlugA"",""sizeSlugB""]
},
""color"": {
""paletteExclude"": [""colorSlugA"",""colorSlugB""]
}
}
}
}
}}}
Thank you for your work and your time reading me.
Best Regards.
Jeremy.",jdmweb
Needs Patch,19627,Themes should be able to opt-in to a static front page,,Themes,,normal,normal,,feature request,assigned,,2011-12-21T01:42:05Z,2019-06-04T21:07:22Z,"A theme should be able to register that they are designed to have a static front page by default. Core should then pick up on this as part of the activation process and allow them to pick or create a page, or ignore it and show posts on the front.
Twenty Twelve will most likely need this (http://wpdevel.wordpress.com/2011/12/20/default-theme-twenty-twelve/).",nacin
Needs Patch,24152,Use JSON as alternative to CSS file headers,,Themes,,normal,normal,Awaiting Review,feature request,reopened,,2013-04-21T19:06:42Z,2023-08-13T09:21:37Z,"Themes are [http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme required] to include style.css for its header info. Plugins are [http://codex.wordpress.org/Writing_a_Plugin#File_Headers required] to contain header info in their main file. It makes more [http://en.wikipedia.org/wiki/Single_responsibility_principle sense] to store package info in [http://en.wikipedia.org/wiki/JSON JSON]. A filename like theme.json or plugin.json (or an all-encompassing wordpress.json) seems viable. When present, the JSON file would be favored over the headers. This would make it possible to have a theme without a style.css file.",ryanve
Needs Patch,51528,"When updating the theme from the dashboard, I want to change the theme folder name to the file name specified by Content-Disposition: attachment.",,Themes,5.4.2,normal,normal,Awaiting Review,feature request,new,,2020-10-15T07:38:37Z,2020-10-15T07:41:02Z,"When updating the theme, the character string is also used as the file name after downloading at the end of the path of the download URL, but if the file name of Content-Disposition: attachment is specified, that file name should be used as the file name after downloading. ..",kusokamayarou
Needs Patch,45344,Add Two New Theme Tags on Theme Directory,,Themes,,normal,normal,Future Release,task (blessed),reopened,,2018-11-14T09:15:49Z,2024-02-02T04:07:07Z,"As per the [https://wordpress.slack.com/archives/C02RP4Y3K/p1542132120930800 discussion] of theme review team, we want to add two tags `align-wide` and `block-styles`.
* `align-wide` - Support for Wide Align
* `block-styles` - Has styles for the block editor
Also, we need this tags on the theme filter. ",kafleg
Needs Patch,55120,"""wp_editor_settings"" filter not working for the Classic block TinyMCE settings",,TinyMCE,,normal,normal,Awaiting Review,defect (bug),new,,2022-02-08T21:49:55Z,2022-02-08T21:49:55Z,"This filter was added in the #45348 to Classic Block but I think it's not working. To run this filter we need to use return value of `array_merge` [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/script-loader.php#L517/ reference]. I double check if there is an any version of PHP could support this usage but I couldn't found: https://3v4l.org/v4YBT
You can find below my must use plugin for test, it doesn't effect any option of Classic block.
{{{#!php
'bold,italic'
];
return $settings;
}
}}}
I hope I don't miss anything 🙂
",oztaser
Needs Patch,60799,Change the Header Tag in Link Modal from