WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#15761 assigned defect (bug)

Bulk editing on posts without Javascript enabled results in the post being set to draft

Reported by: dd32 Owned by: garyc40
Milestone: Future Release Priority: normal
Severity: normal Version: 2.9
Component: Quick/Bulk Edit Keywords: needs-refresh
Focuses: administration Cc:

Description

Currently, Bulk editing is available without JavaScript being enabled.

The result of attempting to edit a post, is a redirect back to the posts page with the post being marked as a draft. No UI is offered for bulk editing.

This behaviour exists in trunk, 3.0, and 2.9 from my testing (havn't tested earlier versions).

The Bulk editing screen appears to work without Javascript for modification submittal, so it's possible that a non-js version would be possible.

Attachments (2)

garyc40-15761.patch (14.5 KB) - added by garyc40 5 years ago.
UI for bulk edit (JS disabled), javascript fix for checkbox behavior during bulk edit
garyc40-15761.2.diff (14.7 KB) - added by garyc40 4 years ago.
patch refreshed, give proper href attribute to Bulk Edit Cancel link

Download all attachments as: .zip

Change History (12)

comment:1 follow-up: @scribu5 years ago

A quick solution would be to add a 'hide-if-no-js' class to the 'Edit' <option>.

comment:2 @nacin5 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:3 in reply to: ↑ 1 @garyc405 years ago

Replying to scribu:

A quick solution would be to add a 'hide-if-no-js' class to the 'Edit' <option>.

The way I see it, Bulk Editing should still work regardless of whether JS is enabled or not, right?

comment:4 @nacin5 years ago

Correct. That stopgap is why I moved this to 3.1 though. A real fix would be swell.

comment:5 @garyc405 years ago

  • Owner set to garyc40
  • Status changed from new to assigned

@garyc405 years ago

UI for bulk edit (JS disabled), javascript fix for checkbox behavior during bulk edit

comment:6 @garyc405 years ago

  • Keywords has-patch needs-testing added

There are two problems that are fixed in this patch.

  • UI for bulk edit when JS is disabled. User flow is as follows:
  1. Select posts that you want to bulk edit. Click Apply.
  1. A bulk edit user interface appears. You can click on the X icons to remove posts from bulk edit (which initiates another page load). New behavior: You can also selected other posts outside of the bulk edit title list if you want to include more posts without having to go back to step 1. After you're done, click Update.
  1. You're redirected to the normal post list with a nice update message.
  • Fixed some inconsistent behavior with JavaScript bulk edit:

After you have selected posts, choose "Bulk Edit", and click Apply, the user interface appears. However, if you uncheck one of your previously selected posts outside of the Bulk Edit user interface, that post's title is still in the Bulk Edit title div. Clicking "Update" and that post ends up not changed.

On the other hand, if you select a post outside of the Bulk Edit user interface, that post's title doesn't appear in the Bulk Edit post title list. Clicking "Update" will also update that post.

comment:7 @nacin5 years ago

  • Keywords 3.2-early added
  • Milestone changed from 3.1 to Future Release

@garyc404 years ago

patch refreshed, give proper href attribute to Bulk Edit Cancel link

comment:8 @ocean904 years ago

  • Keywords needs-refresh added; 3.2-early has-patch needs-testing removed

Patch looks good, but it needs some refresh:

  • jQuery 1.6.1 => attr. vs prop.
  • check some posts, bulk edit, apply: Titles doesn't added to the list
  • Missing translation for remove link: Remove From Bulk Edit

Related: #17733

comment:9 @jeremyfelt17 months ago

  • Component changed from Administration to Posts, Post Types
  • Focuses admin added

comment:10 @iseulde6 months ago

  • Component changed from Posts, Post Types to Quick/Bulk Edit
Note: See TracTickets for help on using tickets.