WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#6716 closed defect (bug) (worksforme)

Permalink slug not fully editable

Reported by: cyndin Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.5
Component: General Keywords: slug, permalink, blog stats
Focuses: Cc:

Description

In older versions of WP, a slug for the permalink was created from the title at the point you published it. So "My Day Today" would turn into "my-day-today."

Now, in WP 2.5, the slug seems to get created at a very early point in writing the post. My guess is when the first auto-save occurs after something is in the title, but I can't confirm that. You can edit the slug at any point, but it does not change in all locations.

For one post, the first slug that WP created was from the title I put in. A few minutes into writing the post, I decided to change the title. The slug did not change with it. I edited the slug to reflect the new title.

For another post, the slug that WP created was the first four letters of the first word of the title. In other words, it grabbed a slug while I was in the middle of typing. I then edited the slug.

In both cases, the correct slug was displayed on the permalink on the main page of the blog, on the sidebar for the lists of posts, and in some other places on the blog itself.

However, when I view blog stats, the original (incorrect) slug shows up as the title of the post. The link is not a permalink (it's the question mark and number), though it turns into the (correct) permalink when I click on it.

It's a minor inconvience if it is limited to blog stats (though it makes it harder to remember which post it is referring to...one "title" is simply "surv" for example).

My concern is that it may occur elsewhere. I haven't found it anywhere else yet, but I wanted to report this bug right away.

Change History (6)

comment:1 follow-up: Viper007Bond6 years ago

Now, in WP 2.5, the slug seems to get created at a very early point in writing the post. My guess is when the first auto-save occurs after something is in the title, but I can't confirm that.

An autosave is triggered when you deselect the title field. This autosave triggers a slug to be created.

I too would wish the slug would auto-update to match the title until the post was actually saved (as opposed to autosaved). Too many times I've partially typed in the title, or changed the title, mid-writing.

As for the stats, are you talking about a plugin or something? If so, bug reports for plugins don't belong here. ;)

comment:2 in reply to: ↑ 1 ; follow-up: cyndin6 years ago

Replying to Viper007Bond:

An autosave is triggered when you deselect the title field. This autosave triggers a slug to be created.

Except I didn't deselect it one of the times...I was in the middle of typing.

As for the stats, are you talking about a plugin or something? If so, bug reports for plugins don't belong here. ;)

Blog stats is a plugin for 2.3 and earlier but I think it's been integrated into WP 2.5 (I may be wrong). Anyway, it's not a bug of the stats program. All it's doing is grabbing the slug line from somewhere it is stored. The issue is that it's stored wrong in at least one place.

comment:3 in reply to: ↑ 2 Viper007Bond6 years ago

Replying to cyndin:

Blog stats is a plugin for 2.3 and earlier but I think it's been integrated into WP 2.5 (I may be wrong). Anyway, it's not a bug of the stats program. All it's doing is grabbing the slug line from somewhere it is stored. The issue is that it's stored wrong in at least one place.

It's not in the core, it's just better integrated into WordPress when used.

And it is a plugin (well, not even the plugin really) issue as all stats are pulled off a remote server. The remote WP.com server is probably holding a copy of your old slug.

comment:4 caesarsgrunt6 years ago

I often have problems with the slug being saved too soon, too. Most often this is when I write the post before adding the title, and so on the first autosave the slug is set to a number. WTF?

I don't think the slug should be created until either the post is published or the user sets it manually.

Until then, the slug field should just display what the auto-generated slug based on the current title will be, without actually saving that value (or any other...) to the database.

comment:5 janeforshort6 years ago

  • Milestone changed from 2.7 to 2.9

comment:6 Denis-de-Bernardy5 years ago

  • Milestone 2.9 deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.