WordPress.org

Make WordPress Core

Opened 8 weeks ago

Closed 5 weeks ago

#41985 closed defect (bug) (fixed)

Gallery widget loses "Link to" value

Reported by: joyously Owned by: joemcgill
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

When I add images to the Gallery widget, the defaults under "Gallery Settings" look correct.
After I click on Insert Gallery, and Save the widget, I then click on Edit Gallery and the values under "Gallery Settings" do not match what I thought I saved. Specifically, the Link value is reset to None.

Attachments (4)

gallery-widget-on-creation.jpg (70.3 KB) - added by joyously 8 weeks ago.
This is what I see on creation of the widget. Defaults look good.
gallery-widget-after-save.jpg (68.5 KB) - added by joyously 8 weeks ago.
This is what I see after I Save the widget and click Edit gallery. Note the "Link".
41985.patch (1.2 KB) - added by bor0 7 weeks ago.
41985.2.patch (576 bytes) - added by bor0 7 weeks ago.

Download all attachments as: .zip

Change History (14)

@joyously
8 weeks ago

This is what I see on creation of the widget. Defaults look good.

@joyously
8 weeks ago

This is what I see after I Save the widget and click Edit gallery. Note the "Link".

#1 @westonruter
8 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.9
  • Owner set to joemcgill
  • Status changed from new to assigned

For future reference, see Slack thread where this has been discussed: https://wordpress.slack.com/archives/C02S78ZAL/p1506364733000574

@bor0
7 weeks ago

#2 @bor0
7 weeks ago

  • Keywords has-patch added; needs-patch removed

#3 @joemcgill
7 weeks ago

  • Status changed from assigned to reviewing

Thanks @bor0. The change to the gallery defaults appears to fix this issue by making sure the default props are consistent with the wp.media.galleryDefaults which are used when the wp.media.view.Settings.Gallery view is rendered.

Is there a reason, other than consistency, for changing the image widget defaults? If not, we should update the default for the media widget to use custom, per #41629. Would you mind creating a separate patch for that issue on that ticket?

#4 @bor0
7 weeks ago

Is there a reason, other than consistency, for changing the image widget defaults?

Not really. I didn't know of #41629, but now that I found out about it I will update the patch for this one and add a patch for that one.

Thanks!

@bor0
7 weeks ago

#5 follow-up: @joemcgill
7 weeks ago

@bor0 Perfect. Thanks!

I'm happy to commit the current change, but wonder if the current default was an intentional design decision. cc: @melchoyce or @westonruter.

Additionally, I am interested in tracking down why the gallery settings aren't being applied when the media frame is initially rendered, but this is at least a good first step.

This ticket was mentioned in Slack in #core-customize by joemcgill. View the logs.


7 weeks ago

#7 in reply to: ↑ 5 @melchoyce
7 weeks ago

Replying to joemcgill:

I'm happy to commit the current change, but wonder if the current default was an intentional design decision. cc: @melchoyce or @westonruter.

Nope, it sounds like a bug. :)

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


7 weeks ago

This ticket was mentioned in Slack in #core by westonruter. View the logs.


5 weeks ago

#10 @westonruter
5 weeks ago

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

In 41840:

Widgets: Update default link_type for Gallery widget from none to post for consistency with wp.media.galleryDefaults.

Props bor0.
See #41914.
Fixes #41985.

Note: See TracTickets for help on using tickets.