WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4377 closed defect (bug) (invalid)

permalink tag %postname% != post name

Reported by: Emanon Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:

Description

Using the %postname%-tag in permalinks does not give the real post title, but rather the post slug.

This might be as intended, but the problem is that post slugs is never updated after the first save! If you (like me) thend to mess about a lot in and re-structure posts several times before publishing (even changing languages half way through writing...), the slug tends to have very little to do with that the post actually says.

My attempts to implement a nice permalink-structure had my blog filled with a lot of URLs pointing to some really stupid titles...

Change History (4)

comment:1 @rob1n8 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Once you publish a post (with or without setting a post slug), that slug, by default, stays like that so there are no broken links, unless you manually alter it. This is because that URL is what you ping the notification servers with.

I would save & continue, look at your draft, then publish.

comment:2 @Emanon8 years ago

  • Summary changed from permaling tag %postname% != post name to permalink tag %postname% != post name

I'm not familiar with the trac or bugreporting in general, so forgive me for replying here. I personaly don't (knowingly) use the slugs, and doesn't (knowingly) allow notifications to be sent. But I do understand the point of such a system.

My question is: can we create a permalink tag that actually uses the post title? What would be an apropriate way for me to request this feature?

comment:3 @foolswisdom8 years ago

Emanon, what version of WordPress are you using?

As Ro1n describes the post title is not set until the post is published. After that it makes sense to have to manually change the slug if you want to, because it affects any links that have already been made. I can't see what you are proposing being generally desirable.

comment:4 @Emanon8 years ago

I'm on 2.2.

It seem's I'm a bit of a special case then, altering titles (but not slugs) after publishing posts. It threw me a little I suppose, to see this discrepancy of URLs vis-à-vis actual post-titles.

I understand the purpose of slugs better now, and will simply have to go through my posts and manually set them all straight. And change my workflow a little to avoid the problem in the future.

Thanks for your input, foolswisdom.

Note: See TracTickets for help on using tickets.