Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13133 closed defect (bug) (fixed)

Users with "Contributor" role can't save initial draft with JavaScript disabled

Reported by: foofy Owned by: MarkJaquith
Milestone: 3.0 Priority: high
Severity: blocker Version: 3.0
Component: Autosave Keywords: has-patch needs-review
Focuses: Cc:


Users with the "Contributor" role can't save a new post as draft with JavaScript disabled. They can Submit for Review or edit existing drafts, but they can't post that initial one.

This doesn't seem to be a problem with any of the other roles.

I'm not sure if WordPress requires JavaScript support now, but if it does, shouldn't it check for it? I don't submit tickets so please delete (with my apologies) if I missed something or this is a known issue.

Steps to recreate

  • Disable JavaScript in your browser
  • Log in as a user with the Contributor role (doesn't seem to affect other roles)
  • Go to Posts > Add New to create a new post
  • Hit "Save Draft"

What happens

Post edit screen reloads with the title missing. Draft post is not created and the preview link does not work.

What should happen

A new draft post should have been created.

Attachments (1)

13133.1.diff (449 bytes) - added by jbsil 8 years ago.
logic: If !autosave && status == 'auto-draft' then status = 'draft' in edit_post()

Download all attachments as: .zip

Change History (8)

#1 @sivel
8 years ago

So far I have determined that the post is actually being created, however the post status stays as auto-draft.

#2 @jbsil
8 years ago

  • Cc Jesse.Silverstein@… added
  • Severity changed from normal to blocker

#3 @sivel
8 years ago

  • Component changed from General to Autosave
  • Keywords needs-patch added
  • Owner set to azaozz
  • Priority changed from normal to high

8 years ago

logic: If !autosave && status == 'auto-draft' then status = 'draft' in edit_post()

#4 @jbsil
8 years ago

  • Keywords has-patch needs-review added; needs-patch removed

post_new creates auto-draft post. admin_ajax converts post_status from 'auto-draft' to 'draft'

copied same logic to edit_post() for js-disabled draft saves.

#5 @nacin
8 years ago

  • Owner changed from azaozz to MarkJaquith
  • Status changed from new to assigned

#6 @markjaquith
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [14551]) Handle manual saving of auto-drafts for Contributors without JavaScript. props jbsil. fixes #13133

#7 @nacin
8 years ago

(In [16761]) Move [14551] to after the is_wp_error check. see #13133, fixes #15511, props alexdunae.

Note: See TracTickets for help on using tickets.