Make WordPress Core

Opened 14 years ago

Last modified 6 years ago

#15761 assigned defect (bug)

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

Reported by: dd32's profile dd32 Owned by: garyc40's profile garyc40
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Quick/Bulk Edit Keywords: needs-refresh has-screenshots
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 14 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 14 years ago.
patch refreshed, give proper href attribute to Bulk Edit Cancel link

Download all attachments as: .zip

Change History (13)

#1 follow-up: @scribu
14 years ago

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

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#3 in reply to: ↑ 1 @garyc40
14 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?

#4 @nacin
14 years ago

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

#5 @garyc40
14 years ago

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

@garyc40
14 years ago

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

#6 @garyc40
14 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.

#7 @nacin
14 years ago

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

@garyc40
14 years ago

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

#8 @ocean90
14 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

#9 @jeremyfelt
11 years ago

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

#10 @iseulde
10 years ago

  • Component changed from Posts, Post Types to Quick/Bulk Edit

#11 @afercia
9 years ago

  • Keywords has-screenshots added

Worth noting while in previous versions Bulk editing was available even with JavaScript off and pressing Apply resulted in edited posts set to "Draft", the "Edit" option in the "Bulk Actions" select has now a hide-if-no-js CSS class, added in [18222].

https://cldup.com/ls2USK-Tno.png

Of course this doesn't solve the lack of a non-JS working UI, it still relevant patch would need a refresh.

Note: See TracTickets for help on using tickets.