Comments (6)
Added in dd60f1d
from indieblocks.
If these are active and a post is given a name of, e.g., 2020
, you'll get a 404 if no posts for that year are found, rather than the single post with that slug.
I.e., we have to prevent notes/likes get a 4-digit number as a slug. WordPress already does this for pages, or, depending on your permalink setup, for posts, by adding a -2
suffix.
We should probably do the same, i.e., either always add -2
or do it only when there's a chance of conflicting slugs.
from indieblocks.
[O]nly when there's a chance of conflicting slugs.
So not when autogenerated slugs are active, and---possibly, although this could be challenged---also not when actual date-based permalinks are an option, and selected. The issue with not doing it for the latter scenario is that a conflict may still occur once the permalink option is changed.
from indieblocks.
In WP core, what happens is the -2
only gets added when there's potential for a conflict. If afterward the permalink settings are changed, the (now conflicting) single post comes out on top. There's then no way to reach the archive for that year anymore.
We should probably mimic this behavior.
from indieblocks.
See https://github.com/WordPress/wordpress-develop/blob/ec91ec56be44d8cdbc611758b9721860aae60491/src/wp-includes/post.php#L5049 and following.
from indieblocks.
Added in 50fd2b0, although archives take precedence over single posts, should there be a slug conflict. Think I like it that way, so that month and day archives don't all get hijacked by a single post.
from indieblocks.
Related Issues (20)
- Comments don't get a Webmention meta box, posts do
- Hide posts' Webmention meta box until there's something to show?
- Consider removing top margin after hidden titles HOT 1
- Fatal error? HOT 6
- Don't store preview cards for 403s, etc. HOT 1
- Comment webmentions sent out too often HOT 5
- Add support for `?c=\d+` URLs HOT 3
- Improve Syndication block's prefix and suffix HOT 1
- "Webmention scheduled" but not sent? HOT 2
- Note Publish 500 error HOT 14
- Move Webmention panel to Gutenberg sidebar HOT 1
- Move Location panel to Gutenberg HOT 9
- Add Facepile block checkbox HOT 5
- Rescheduling a webmention when mentions are closed results in the "webmention history" being deleted
- When comments (or webmentions) are closed, they're closed for edits and updates, too HOT 2
- Webmention history in wrong format? HOT 1
- Keep webmentions open but reject only new posts, after "closing" them? HOT 2
- Create WP-CLI command to store/cache (and delete) images
- Smarter avatar filtering HOT 2
- Add compatibility with rssclub post type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indieblocks.