WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#22930 closed defect (bug) (fixed)

Gallery re-order not working in WP 3.5, Update Gallery button just closes dialogue

Reported by: chrsdgtl Owned by: nacin
Priority: normal Milestone: 3.5.1
Component: Gallery Version: 3.5
Severity: normal Keywords: has-patch commit fixed-major
Cc:

Description

I checked some of the other tickets, none reference this error that I saw.

"Update Gallery" button triggers dialogue window closing, with no action.

Seems to be an issue in load-scripts.php line number 451: "g is null" is the error... if you go to that line.. g seems to reference...

var g=document.documentElement.style

Attachments (1)

22930.diff (492 bytes) - added by lessbloat 6 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 chrsdgtl6 months ago

  • Summary changed from Gallery re-order not working in WP 3.5, Update Gallery just closes dialogue to Gallery re-order not working in WP 3.5, Update Gallery button just closes dialogue

Just to clarify, this is of course after attempting to reorder images in a gallery via "drag and drop."

comment:2 wycks6 months ago

I can confirm this. The gallery is not updated when selecting just "Update Gallery" it just closes the window.

The gallery setting are only updated when you "Update" the post, this might be the intended method.

comment:3 chrsdgtl6 months ago

To wycks point I do not get the preferred order when I "update" the post either. Which is the sequence I go through anyway: re-order --> update gallery settings (where error occurs) --> "update" post." I focused on the update gallery button because thats where I see the error occurring in the console.

Tested in Mac Chrome, Safari, and Firefox.

comment:4 wycks6 months ago

tested on Chrome, My update works, but I do get a JS error.

Cannot call method 'get' of null media-views.min.js:1
f.controller.Library.f.controller.State.extend.refreshContent media-views.min.js:1
g.Events.trigger backbone.min.js:9
f.extend.reset backbone.min.js:22
f.controller.Library.f.controller.State.extend.reset media-views.min.js:1
g.Events.trigger backbone.min.js:9
(anonymous function) underscore.min.js:5
T.map.T.collect underscore.min.js:5
T.invoke underscore.min.js:5
r.(anonymous function) backbone.min.js:25
f.view.Frame.f.View.extend.reset media-views.min.js:1
toolbar.set.f.view.Toolbar.items.insert.click media-views.min.js:1
f.view.Button.f.View.extend.click media-views.min.js:1
v.event.dispatch jquery.js:2
o.handle.u

The specific error is trigger on line 525 of media-views.js.

if ( this.active && ! selection.length && ! router.get( mode ) )
Last edited 6 months ago by wycks (previous) (diff)

comment:5 nacin6 months ago

  • Milestone changed from Awaiting Review to 3.5.1

lessbloat6 months ago

comment:6 lessbloat6 months ago

Fairly certain 22930.diff​ will fix this.

comment:8 koopersmith6 months ago

In 23260:

Media: Check that a router region exists before attempting to access its child views. Add relevant documentation. see #22930.

comment:9 nacin6 months ago

  • Keywords has-patch commit fixed-major added; needs-patch removed

comment:10 nacin6 months ago

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

In 23268:

Media: Check that a router region exists before attempting to access its child views. Add relevant documentation.

Merges [23260] to the 3.5 branch.

props koopersmith.
fixes #22930.

Note: See TracTickets for help on using tickets.