WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#37099 closed defect (bug) (fixed)

Sidebar with attachment details remains after deleting an attachment

Reported by: ocean90 Owned by: adamsilverstein
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.5
Component: Media Keywords: has-patch needs-testing commit
Focuses: javascript Cc:

Description

Originally reported in #36483.

A new bug is that the right sidebar (image info and settings) doesn't get refreshed/cleared out after deleting an image. Seems caused by the Backbone update as far as I see.

Attachments (2)

media-delete.gif (293.4 KB) - added by ocean90 4 years ago.
37099.diff (67.4 KB) - added by adamsilverstein 4 years ago.

Download all attachments as: .zip

Change History (7)

@ocean90
4 years ago

#1 @ocean90
4 years ago

  • Owner set to adamsilverstein
  • Status changed from new to reviewing

@adamsilverstein Can you take a look at this?

#2 @adamsilverstein
4 years ago

yep, will do.

#3 @adamsilverstein
4 years ago

  • Keywords has-patch needs-testing commit added; needs-patch removed

I tracked this down to a bug introduced in Backbone 1.2.3; updating to 1.3.3 fixes this issue (and possibly other related regressions).

See: http://backbonejs.org/#changelog

Despite the version number changing from 1.2.3->1.3.3 this version of Backbone is primarily a bug fix release and is a much smaller change than our last Backbone upgrade. Regardless, would appreciate a review/testing and of this update. Also, we should probably get this in ASAP so it we can catch any potential regressions.

In 37099.diff: Upgrade Backbone to the latest production version - 1.3.3, fixing some bugs around change events for collection models.

#4 @ocean90
4 years ago

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

In 37723:

External Libraries: Update Backbone to version 1.3.3.

Changelog: https://cdn.rawgit.com/jashkenas/backbone/1.3.3/index.html#changelog
Diff: https://github.com/jashkenas/backbone/compare/1.2.3...1.3.3

Includes a unit test to ensure that the minified version doesn't include sourceMappingURL.

Props adamsilverstein.
Fixes #37099.

#5 @ocean90
4 years ago

Thanks @adamsilverstein. The minified file shouldn't include the URL to a (non-existent) source map. I added a unit test in [37723] similar to the one we have for jQuery.

Note: See TracTickets for help on using tickets.