WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#10256 closed defect (bug) (wontfix)

Autosave while typing title creates permalink too soon

Reported by: xibe Owned by:
Milestone: Priority: low
Severity: minor Version: 2.8
Component: Autosave Keywords:
Focuses: Cc:

Description

Autosave is a great help to prevent loosing one's post, but I just stumbled on a possible defect: autosave happened while I was typing my post's title. I was not yet done with typing, so while my fully-typed was of the form "aaaa bbbb ccc ddddd eee ffff", the permalink generated by the autosave was just "aaaa bbbb ccc".

This is not a big issue, since I can edit the permalink whenever I want, but this is still a hindrance.

I think autosave should be disabled while the focus is on the title.

Change History (10)

comment:1 @bi0xid6 years ago

I think it works this way now. I have tried and it waits until I focus another place to autosave and create the permalink.

Maybe you are having some trouble with javascript? Any plugin?

comment:2 @azaozz6 years ago

  • Milestone changed from 2.9 to 3.0
  • Priority changed from normal to low
  • Severity changed from normal to minor

Not sure if we should explicitly disable autosave while the title field has focus. Perhaps we can disable it for 3 sec on each keyup there or something similar.

comment:3 @caesarsgrunt5 years ago

Autosave should be disabled until there is content in the post body.

comment:4 @dd325 years ago

Autosave should be disabled until there is content in the post body.

Some people like to enter a title, upload content, then write a post. It all comes down to individual taste.

IMO, a autosave to get a post ID should occur pretty early, but the permalink should not be created until the title has not had focus for ~5 seconds?

Something in the back of my head says that the slug is not set in stone at that point however and may change? (Or am i completely wrong?)

comment:5 @caesarsgrunt5 years ago

Alright; how about doing it the first time any one of the following occurs :

  • The title looses focus and is not blank.
  • The title has not had focus for 1 minute and there is content in the post body.
  • There is more than X characters in the post body.
  • The Upload dialog is opened.

comment:6 @caesarsgrunt5 years ago

And, if the post is autosaved while the title is blank, then the first time the title is changed the slug should be changed to match.

comment:7 @caesarsgrunt5 years ago

Can you autosave without creating a permalink at all?

That would be best; autosave anyway but don't create a permalink until the first time the title looses focus and is not blank.

comment:8 @lloydbudd5 years ago

  • Milestone changed from 3.0 to Future Release

comment:9 @solarissmoke4 years ago

  • Keywords close added; needs-patch 2nd-opininon removed

The permalink that is generated on the autosave of a new post isn't permanent - it will get refreshed once you click "save draft" or "publish" and if the title has changed then so will the permalink. So I don't see any issue here?

comment:10 @markjaquith4 years ago

  • Keywords close removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

solarissmoke is correct. The permalink isn't "set" until you publish, or until you manually set it yourself. We can live with this small quirk. Your next autosave will rectify it.

Note: See TracTickets for help on using tickets.