Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27183 closed defect (bug) (fixed)

On a gallery update default shortcode attributes are added

Reported by: ocean90's profile ocean90 Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Gallery Keywords: needs-patch
Focuses: Cc:

Description

Steps to reproduce:

  • Create a post with a gallery.
  • Post content should look like [gallery ids="4197,5203"]
  • Open the Edit Gallery modal by clicking on the gallery placeholder
  • Press the "Update gallery" button
  • Post content is now [gallery order="ASC" itemtag="dl" icontag="dt" captiontag="dd" columns="3" link="post" size="thumbnail" ids="4197,5203" orderby="menu_order ID"]

Attachments (1)

media-editor.js.patch (543 bytes) - added by JohnConners 10 years ago.
Explicitly using wp.media.gallery.defaults to remove default gallery attributes

Download all attachments as: .zip

Change History (7)

#1 @bravokeyl
10 years ago

I can't reproduce this..

#2 @ocean90
10 years ago

  • Version set to trunk

bravokeyl, which version have you tested?

#3 @bravokeyl
10 years ago

oh my bad .. i checked that on stable version..

On trunk: It's showing attributes as you stated

@JohnConners
10 years ago

Explicitly using wp.media.gallery.defaults to remove default gallery attributes

#4 @JohnConners
10 years ago

  • Keywords has-patch added; needs-patch removed

So the bug is that at the point of attempting to remove any default gallery shortcode attributes, 'this.defaults' is undefined, so the defaults remain. I couldn't figure out if there's a mechanism whereby those defaults should have been populated by that line of code so my patch just explicitly passes them in. Please change accordingly!

#5 @ocean90
10 years ago

  • Keywords needs-patch added; has-patch removed

This needs to be more general.

Related: [27213], #27183.

#6 @wonderboymusic
10 years ago

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

Fixed in [27238].

Note: See TracTickets for help on using tickets.